; LLVM IR from UtkarshPathrabe/Competitive-Coding :: Model Algorithms/Graphs/Shortest Path from Source to Destination with exactly k edg_7d1118cd (EEiii)

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

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z12shortestPathRSt6vectorIS_IiSaIiEESaIS1_EEiii(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %1, i32 noundef %2, i32 noundef %3) #0 {
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !9
  store i32 %2, ptr %7, align 4, !tbaa !9
  store i32 %3, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  %19 = load ptr, ptr %5, align 8, !tbaa !5
  %20 = call noundef i64 @_ZNKSt6vectorIS_IiSaIiEESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %19) #5
  %21 = trunc i64 %20 to i32
  store i32 %21, ptr %9, align 4, !tbaa !9
  %22 = load i32, ptr %9, align 4, !tbaa !9
  %23 = zext i32 %22 to i64
  %24 = load i32, ptr %9, align 4, !tbaa !9
  %25 = zext i32 %24 to i64
  %26 = call ptr @llvm.stacksave.p0()
  store ptr %26, ptr %10, align 8
  %27 = mul nuw i64 %23, %25
  %28 = alloca [2 x i32], i64 %27, align 16
  store i64 %23, ptr %11, align 8
  store i64 %25, ptr %12, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #5
  store i32 0, ptr %13, align 4, !tbaa !9
  br label %29

29:                                               ; preds = %210, %4
  %30 = load i32, ptr %13, align 4, !tbaa !9
  %31 = load i32, ptr %8, align 4, !tbaa !9
  %32 = icmp sle i32 %30, %31
  br i1 %32, label %34, label %33

33:                                               ; preds = %29
  store i32 2, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %213

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

35:                                               ; preds = %206, %34
  %36 = load i32, ptr %15, align 4, !tbaa !9
  %37 = load i32, ptr %9, align 4, !tbaa !9
  %38 = icmp slt i32 %36, %37
  br i1 %38, label %40, label %39

39:                                               ; preds = %35
  store i32 5, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  br label %209

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

41:                                               ; preds = %202, %40
  %42 = load i32, ptr %16, align 4, !tbaa !9
  %43 = load i32, ptr %9, align 4, !tbaa !9
  %44 = icmp slt i32 %42, %43
  br i1 %44, label %46, label %45

45:                                               ; preds = %41
  store i32 8, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  br label %205

46:                                               ; preds = %41
  %47 = load i32, ptr %15, align 4, !tbaa !9
  %48 = sext i32 %47 to i64
  %49 = mul nsw i64 %48, %25
  %50 = getelementptr inbounds [2 x i32], ptr %28, i64 %49
  %51 = load i32, ptr %16, align 4, !tbaa !9
  %52 = sext i32 %51 to i64
  %53 = getelementptr inbounds [2 x i32], ptr %50, i64 %52
  %54 = load i32, ptr %13, align 4, !tbaa !9
  %55 = srem i32 %54, 2
  %56 = sext i32 %55 to i64
  %57 = getelementptr inbounds [2 x i32], ptr %53, i64 0, i64 %56
  store i32 2147483647, ptr %57, align 4, !tbaa !9
  %58 = load i32, ptr %13, align 4, !tbaa !9
  %59 = icmp eq i32 %58, 0
  br i1 %59, label %60, label %75

60:                                               ; preds = %46
  %61 = load i32, ptr %15, align 4, !tbaa !9
  %62 = load i32, ptr %16, align 4, !tbaa !9
  %63 = icmp eq i32 %61, %62
  br i1 %63, label %64, label %75

64:                                               ; preds = %60
  %65 = load i32, ptr %15, align 4, !tbaa !9
  %66 = sext i32 %65 to i64
  %67 = mul nsw i64 %66, %25
  %68 = getelementptr inbounds [2 x i32], ptr %28, i64 %67
  %69 = load i32, ptr %16, align 4, !tbaa !9
  %70 = sext i32 %69 to i64
  %71 = getelementptr inbounds [2 x i32], ptr %68, i64 %70
  %72 = load i32, ptr %13, align 4, !tbaa !9
  %73 = sext i32 %72 to i64
  %74 = getelementptr inbounds [2 x i32], ptr %71, i64 0, i64 %73
  store i32 0, ptr %74, align 4, !tbaa !9
  br label %75

75:                                               ; preds = %64, %60, %46
  %76 = load i32, ptr %13, align 4, !tbaa !9
  %77 = icmp eq i32 %76, 1
  br i1 %77, label %78, label %107

78:                                               ; preds = %75
  %79 = load ptr, ptr %5, align 8, !tbaa !5
  %80 = load i32, ptr %15, align 4, !tbaa !9
  %81 = sext i32 %80 to i64
  %82 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %79, i64 noundef %81) #5
  %83 = load i32, ptr %16, align 4, !tbaa !9
  %84 = sext i32 %83 to i64
  %85 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %82, i64 noundef %84) #5
  %86 = load i32, ptr %85, align 4, !tbaa !9
  %87 = icmp ne i32 %86, 2147483647
  br i1 %87, label %88, label %107

88:                                               ; preds = %78
  %89 = load ptr, ptr %5, align 8, !tbaa !5
  %90 = load i32, ptr %15, align 4, !tbaa !9
  %91 = sext i32 %90 to i64
  %92 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %89, i64 noundef %91) #5
  %93 = load i32, ptr %16, align 4, !tbaa !9
  %94 = sext i32 %93 to i64
  %95 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %92, i64 noundef %94) #5
  %96 = load i32, ptr %95, align 4, !tbaa !9
  %97 = load i32, ptr %15, align 4, !tbaa !9
  %98 = sext i32 %97 to i64
  %99 = mul nsw i64 %98, %25
  %100 = getelementptr inbounds [2 x i32], ptr %28, i64 %99
  %101 = load i32, ptr %16, align 4, !tbaa !9
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds [2 x i32], ptr %100, i64 %102
  %104 = load i32, ptr %13, align 4, !tbaa !9
  %105 = sext i32 %104 to i64
  %106 = getelementptr inbounds [2 x i32], ptr %103, i64 0, i64 %105
  store i32 %96, ptr %106, align 4, !tbaa !9
  br label %107

107:                                              ; preds = %88, %78, %75
  %108 = load i32, ptr %13, align 4, !tbaa !9
  %109 = icmp sgt i32 %108, 1
  br i1 %109, label %110, label %201

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

111:                                              ; preds = %197, %110
  %112 = load i32, ptr %17, align 4, !tbaa !9
  %113 = load i32, ptr %9, align 4, !tbaa !9
  %114 = icmp slt i32 %112, %113
  br i1 %114, label %116, label %115

115:                                              ; preds = %111
  store i32 11, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  br label %200

116:                                              ; preds = %111
  %117 = load ptr, ptr %5, align 8, !tbaa !5
  %118 = load i32, ptr %15, align 4, !tbaa !9
  %119 = sext i32 %118 to i64
  %120 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %117, i64 noundef %119) #5
  %121 = load i32, ptr %17, align 4, !tbaa !9
  %122 = sext i32 %121 to i64
  %123 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %120, i64 noundef %122) #5
  %124 = load i32, ptr %123, align 4, !tbaa !9
  %125 = icmp ne i32 %124, 2147483647
  br i1 %125, label %126, label %196

126:                                              ; preds = %116
  %127 = load i32, ptr %15, align 4, !tbaa !9
  %128 = load i32, ptr %17, align 4, !tbaa !9
  %129 = icmp ne i32 %127, %128
  br i1 %129, label %130, label %196

130:                                              ; preds = %126
  %131 = load i32, ptr %16, align 4, !tbaa !9
  %132 = load i32, ptr %17, align 4, !tbaa !9
  %133 = icmp ne i32 %131, %132
  br i1 %133, label %134, label %196

134:                                              ; preds = %130
  %135 = load i32, ptr %17, align 4, !tbaa !9
  %136 = sext i32 %135 to i64
  %137 = mul nsw i64 %136, %25
  %138 = getelementptr inbounds [2 x i32], ptr %28, i64 %137
  %139 = load i32, ptr %16, align 4, !tbaa !9
  %140 = sext i32 %139 to i64
  %141 = getelementptr inbounds [2 x i32], ptr %138, i64 %140
  %142 = load i32, ptr %13, align 4, !tbaa !9
  %143 = sub nsw i32 %142, 1
  %144 = srem i32 %143, 2
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds [2 x i32], ptr %141, i64 0, i64 %145
  %147 = load i32, ptr %146, align 4, !tbaa !9
  %148 = icmp ne i32 %147, 2147483647
  br i1 %148, label %149, label %196

149:                                              ; preds = %134
  %150 = load i32, ptr %15, align 4, !tbaa !9
  %151 = sext i32 %150 to i64
  %152 = mul nsw i64 %151, %25
  %153 = getelementptr inbounds [2 x i32], ptr %28, i64 %152
  %154 = load i32, ptr %16, align 4, !tbaa !9
  %155 = sext i32 %154 to i64
  %156 = getelementptr inbounds [2 x i32], ptr %153, i64 %155
  %157 = load i32, ptr %13, align 4, !tbaa !9
  %158 = srem i32 %157, 2
  %159 = sext i32 %158 to i64
  %160 = getelementptr inbounds [2 x i32], ptr %156, i64 0, i64 %159
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  %161 = load ptr, ptr %5, align 8, !tbaa !5
  %162 = load i32, ptr %15, align 4, !tbaa !9
  %163 = sext i32 %162 to i64
  %164 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %161, i64 noundef %163) #5
  %165 = load i32, ptr %17, align 4, !tbaa !9
  %166 = sext i32 %165 to i64
  %167 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %164, i64 noundef %166) #5
  %168 = load i32, ptr %167, align 4, !tbaa !9
  %169 = load i32, ptr %17, align 4, !tbaa !9
  %170 = sext i32 %169 to i64
  %171 = mul nsw i64 %170, %25
  %172 = getelementptr inbounds [2 x i32], ptr %28, i64 %171
  %173 = load i32, ptr %16, align 4, !tbaa !9
  %174 = sext i32 %173 to i64
  %175 = getelementptr inbounds [2 x i32], ptr %172, i64 %174
  %176 = load i32, ptr %13, align 4, !tbaa !9
  %177 = sub nsw i32 %176, 1
  %178 = srem i32 %177, 2
  %179 = sext i32 %178 to i64
  %180 = getelementptr inbounds [2 x i32], ptr %175, i64 0, i64 %179
  %181 = load i32, ptr %180, align 4, !tbaa !9
  %182 = add nsw i32 %168, %181
  store i32 %182, ptr %18, align 4, !tbaa !9
  %183 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %160, ptr noundef nonnull align 4 dereferenceable(4) %18)
  %184 = load i32, ptr %183, align 4, !tbaa !9
  %185 = load i32, ptr %15, align 4, !tbaa !9
  %186 = sext i32 %185 to i64
  %187 = mul nsw i64 %186, %25
  %188 = getelementptr inbounds [2 x i32], ptr %28, i64 %187
  %189 = load i32, ptr %16, align 4, !tbaa !9
  %190 = sext i32 %189 to i64
  %191 = getelementptr inbounds [2 x i32], ptr %188, i64 %190
  %192 = load i32, ptr %13, align 4, !tbaa !9
  %193 = srem i32 %192, 2
  %194 = sext i32 %193 to i64
  %195 = getelementptr inbounds [2 x i32], ptr %191, i64 0, i64 %194
  store i32 %184, ptr %195, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  br label %196

196:                                              ; preds = %149, %134, %130, %126, %116
  br label %197

197:                                              ; preds = %196
  %198 = load i32, ptr %17, align 4, !tbaa !9
  %199 = add nsw i32 %198, 1
  store i32 %199, ptr %17, align 4, !tbaa !9
  br label %111, !llvm.loop !11

200:                                              ; preds = %115
  br label %201

201:                                              ; preds = %200, %107
  br label %202

202:                                              ; preds = %201
  %203 = load i32, ptr %16, align 4, !tbaa !9
  %204 = add nsw i32 %203, 1
  store i32 %204, ptr %16, align 4, !tbaa !9
  br label %41, !llvm.loop !13

205:                                              ; preds = %45
  br label %206

206:                                              ; preds = %205
  %207 = load i32, ptr %15, align 4, !tbaa !9
  %208 = add nsw i32 %207, 1
  store i32 %208, ptr %15, align 4, !tbaa !9
  br label %35, !llvm.loop !14

209:                                              ; preds = %39
  br label %210

210:                                              ; preds = %209
  %211 = load i32, ptr %13, align 4, !tbaa !9
  %212 = add nsw i32 %211, 1
  store i32 %212, ptr %13, align 4, !tbaa !9
  br label %29, !llvm.loop !15

213:                                              ; preds = %33
  %214 = load i32, ptr %6, align 4, !tbaa !9
  %215 = sext i32 %214 to i64
  %216 = mul nsw i64 %215, %25
  %217 = getelementptr inbounds [2 x i32], ptr %28, i64 %216
  %218 = load i32, ptr %7, align 4, !tbaa !9
  %219 = sext i32 %218 to i64
  %220 = getelementptr inbounds [2 x i32], ptr %217, i64 %219
  %221 = load i32, ptr %8, align 4, !tbaa !9
  %222 = srem i32 %221, 2
  %223 = sext i32 %222 to i64
  %224 = getelementptr inbounds [2 x i32], ptr %220, i64 0, i64 %223
  %225 = load i32, ptr %224, align 4, !tbaa !9
  store i32 1, ptr %14, align 4
  %226 = load ptr, ptr %10, align 8
  call void @llvm.stackrestore.p0(ptr %226)
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  ret i32 %225
}

; 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: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) #4

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

; 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 nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { 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}


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

; Function Attrs: mustprogress nounwind uwtable
define dso_local noundef i32 @_Z12shortestPathRSt6vectorIS_IiSaIiEESaIS1_EEiii(ptr noundef nonnull align 8 dereferenceable(24) %0, i32 noundef %1, i32 noundef %2, i32 noundef %3) local_unnamed_addr #0 {
  %5 = alloca i32, align 4
  %6 = tail call noundef i64 @_ZNKSt6vectorIS_IiSaIiEESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %0) #3
  %7 = and i64 %6, 4294967295
  %8 = mul nuw i64 %7, %7
  %9 = alloca [2 x i32], i64 %8, align 16
  %.not115 = icmp sgt i32 %3, -1
  %10 = trunc i64 %6 to i32
  %11 = icmp sgt i32 %10, 0
  %or.cond = and i1 %.not115, %11
  br i1 %or.cond, label %.preheader75.us.preheader, label %._crit_edge

.preheader75.us.preheader:                        ; preds = %4
  %wide.trip.count149 = and i64 %6, 2147483647
  %wide.trip.count159 = and i64 %6, 2147483647
  %wide.trip.count184 = and i64 %6, 2147483647
  %xtraiter = and i64 %6, 1
  %12 = icmp eq i64 %wide.trip.count184, 1
  %unroll_iter = sub nsw i64 %wide.trip.count184, %xtraiter
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br label %.preheader75.us

.preheader75.us:                                  ; preds = %.preheader75.us.preheader, %._crit_edge97.split.us.us
  %.062116.us = phi i32 [ %40, %._crit_edge97.split.us.us ], [ 0, %.preheader75.us.preheader ]
  %13 = and i32 %.062116.us, 1
  %14 = zext nneg i32 %13 to i64
  %15 = icmp eq i32 %.062116.us, 0
  %16 = xor i32 %13, 1
  %17 = zext nneg i32 %16 to i64
  switch i32 %.062116.us, label %.preheader74.us.us117 [
    i32 1, label %.preheader74.us.us.us122
    i32 0, label %.preheader74.us.us101.us.us
  ]

.preheader74.us.us117:                            ; preds = %.preheader75.us, %._crit_edge.split.split.split.us.us.us
  %indvars.iv181 = phi i64 [ %indvars.iv.next182, %._crit_edge.split.split.split.us.us.us ], [ 0, %.preheader75.us ]
  %18 = mul nuw nsw i64 %7, %indvars.iv181
  %19 = getelementptr inbounds [2 x i32], ptr %9, i64 %18
  %20 = getelementptr inbounds [2 x i32], ptr %19, i64 %indvars.iv181
  br label %21

21:                                               ; preds = %.thread72.us89.us.us, %.preheader74.us.us117
  %indvars.iv176 = phi i64 [ %indvars.iv.next177, %.thread72.us89.us.us ], [ 0, %.preheader74.us.us117 ]
  %22 = getelementptr inbounds [2 x i32], ptr %19, i64 %indvars.iv176, i64 %14
  store i32 2147483647, ptr %22, align 4, !tbaa !5
  %23 = icmp eq i64 %indvars.iv181, %indvars.iv176
  %or.cond.us87.us.us = and i1 %15, %23
  br i1 %or.cond.us87.us.us, label %.thread.us88.us.us, label %.preheader.us.us.us

.preheader.us.us.us:                              ; preds = %21
  %invariant.gep.us.us.us = getelementptr inbounds [2 x i32], ptr %9, i64 %indvars.iv176, i64 %17
  br label %24

24:                                               ; preds = %39, %.preheader.us.us.us
  %indvars.iv171 = phi i64 [ %indvars.iv.next172, %39 ], [ 0, %.preheader.us.us.us ]
  %25 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv181) #3
  %26 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %25, i64 noundef %indvars.iv171) #3
  %27 = load i32, ptr %26, align 4, !tbaa !5
  %.not66.us.us.us = icmp eq i32 %27, 2147483647
  %.not67.us.us.us = icmp eq i64 %indvars.iv181, %indvars.iv171
  %or.cond70.us.us.us = or i1 %.not67.us.us.us, %.not66.us.us.us
  %.not68.us.us.us = icmp eq i64 %indvars.iv176, %indvars.iv171
  %or.cond71.us.us.us = or i1 %.not68.us.us.us, %or.cond70.us.us.us
  br i1 %or.cond71.us.us.us, label %39, label %28

28:                                               ; preds = %24
  %29 = mul nuw nsw i64 %7, %indvars.iv171
  %gep.us.us.us = getelementptr inbounds [2 x i32], ptr %invariant.gep.us.us.us, i64 %29
  %30 = load i32, ptr %gep.us.us.us, align 4, !tbaa !5
  %.not69.us.us.us = icmp eq i32 %30, 2147483647
  br i1 %.not69.us.us.us, label %39, label %31

31:                                               ; preds = %28
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %5) #3
  %32 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv181) #3
  %33 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %32, i64 noundef %indvars.iv171) #3
  %34 = load i32, ptr %33, align 4, !tbaa !5
  %35 = load i32, ptr %gep.us.us.us, align 4, !tbaa !5
  %36 = add nsw i32 %35, %34
  store i32 %36, ptr %5, align 4, !tbaa !5
  %37 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4) %22, ptr noundef nonnull align 4 dereferenceable(4) %5)
  %38 = load i32, ptr %37, align 4, !tbaa !5
  store i32 %38, ptr %22, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %5) #3
  br label %39

39:                                               ; preds = %31, %28, %24
  %indvars.iv.next172 = add nuw nsw i64 %indvars.iv171, 1
  %exitcond175.not = icmp eq i64 %indvars.iv.next172, %wide.trip.count184
  br i1 %exitcond175.not, label %.thread72.us89.us.us, label %24, !llvm.loop !9

.thread.us88.us.us:                               ; preds = %21
  store i32 0, ptr %20, align 8, !tbaa !5
  br label %.thread72.us89.us.us

.thread72.us89.us.us:                             ; preds = %39, %.thread.us88.us.us
  %indvars.iv.next177 = add nuw nsw i64 %indvars.iv176, 1
  %exitcond180.not = icmp eq i64 %indvars.iv.next177, %wide.trip.count184
  br i1 %exitcond180.not, label %._crit_edge.split.split.split.us.us.us, label %21, !llvm.loop !11

._crit_edge.split.split.split.us.us.us:           ; preds = %.thread72.us89.us.us
  %indvars.iv.next182 = add nuw nsw i64 %indvars.iv181, 1
  %exitcond185.not = icmp eq i64 %indvars.iv.next182, %wide.trip.count184
  br i1 %exitcond185.not, label %._crit_edge97.split.us.us, label %.preheader74.us.us117, !llvm.loop !12

._crit_edge97.split.us.us:                        ; preds = %._crit_edge.split.split.us.us.split.us107.us.us, %._crit_edge.split.us.us.us.split.us.us, %._crit_edge.split.split.split.us.us.us
  %40 = add i32 %.062116.us, 1
  %.not.us = icmp sgt i32 %40, %3
  br i1 %.not.us, label %._crit_edge, label %.preheader75.us, !llvm.loop !13

.preheader74.us.us.us122:                         ; preds = %.preheader75.us, %._crit_edge.split.us.us.us.split.us.us
  %indvars.iv156 = phi i64 [ %indvars.iv.next157, %._crit_edge.split.us.us.us.split.us.us ], [ 0, %.preheader75.us ]
  %41 = mul nuw nsw i64 %7, %indvars.iv156
  %42 = getelementptr inbounds [2 x i32], ptr %9, i64 %41
  %invariant.gep.us = getelementptr inbounds i8, ptr %42, i64 4
  br label %43

43:                                               ; preds = %.thread72.us.us.us.us.us, %.preheader74.us.us.us122
  %indvars.iv151 = phi i64 [ %indvars.iv.next152, %.thread72.us.us.us.us.us ], [ 0, %.preheader74.us.us.us122 ]
  %44 = getelementptr inbounds [2 x i32], ptr %42, i64 %indvars.iv151, i64 %14
  store i32 2147483647, ptr %44, align 4, !tbaa !5
  %45 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv156) #3
  %46 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %45, i64 noundef %indvars.iv151) #3
  %47 = load i32, ptr %46, align 4, !tbaa !5
  %.not65.us.us.us.us.us = icmp eq i32 %47, 2147483647
  br i1 %.not65.us.us.us.us.us, label %.thread72.us.us.us.us.us, label %48

48:                                               ; preds = %43
  %49 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IiSaIiEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv156) #3
  %50 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %49, i64 noundef %indvars.iv151) #3
  %51 = load i32, ptr %50, align 4, !tbaa !5
  %gep.us = getelementptr inbounds [2 x i32], ptr %invariant.gep.us, i64 %indvars.iv151
  store i32 %51, ptr %gep.us, align 4, !tbaa !5
  br label %.thread72.us.us.us.us.us

.thread72.us.us.us.us.us:                         ; preds = %48, %43
  %indvars.iv.next152 = add nuw nsw i64 %indvars.iv151, 1
  %exitcond155.not = icmp eq i64 %indvars.iv.next152, %wide.trip.count159
  br i1 %exitcond155.not, label %._crit_edge.split.us.us.us.split.us.us, label %43, !llvm.loop !11

._crit_edge.split.us.us.us.split.us.us:           ; preds = %.thread72.us.us.us.us.us
  %indvars.iv.next157 = add nuw nsw i64 %indvars.iv156, 1
  %exitcond160.not = icmp eq i64 %indvars.iv.next157, %wide.trip.count159
  br i1 %exitcond160.not, label %._crit_edge97.split.us.us, label %.preheader74.us.us.us122, !llvm.loop !12

.preheader74.us.us101.us.us:                      ; preds = %.preheader75.us, %._crit_edge.split.split.us.us.split.us107.us.us
  %indvars.iv146 = phi i64 [ %indvars.iv.next147, %._crit_edge.split.split.us.us.split.us107.us.us ], [ 0, %.preheader75.us ]
  %52 = mul nuw nsw i64 %7, %indvars.iv146
  %53 = getelementptr inbounds [2 x i32], ptr %9, i64 %52
  %54 = getelementptr inbounds [2 x i32], ptr %53, i64 %indvars.iv146
  br i1 %12, label %._crit_edge.split.split.us.us.split.us107.us.us.unr-lcssa, label %.preheader74.us.us101.us.us.new

.preheader74.us.us101.us.us.new:                  ; preds = %.preheader74.us.us101.us.us, %.thread72.us84.us.us106.us.us.1
  %indvars.iv141 = phi i64 [ %indvars.iv.next142.1, %.thread72.us84.us.us106.us.us.1 ], [ 0, %.preheader74.us.us101.us.us ]
  %niter = phi i64 [ %niter.next.1, %.thread72.us84.us.us106.us.us.1 ], [ 0, %.preheader74.us.us101.us.us ]
  %55 = getelementptr inbounds [2 x i32], ptr %53, i64 %indvars.iv141, i64 %14
  store i32 2147483647, ptr %55, align 4, !tbaa !5
  %56 = icmp eq i64 %indvars.iv146, %indvars.iv141
  br i1 %56, label %.thread.us83.us.us.us.us, label %.thread72.us84.us.us106.us.us

.thread.us83.us.us.us.us:                         ; preds = %.preheader74.us.us101.us.us.new
  store i32 0, ptr %54, align 8, !tbaa !5
  br label %.thread72.us84.us.us106.us.us

.thread72.us84.us.us106.us.us:                    ; preds = %.preheader74.us.us101.us.us.new, %.thread.us83.us.us.us.us
  %indvars.iv.next142 = or disjoint i64 %indvars.iv141, 1
  %57 = getelementptr inbounds [2 x i32], ptr %53, i64 %indvars.iv.next142, i64 %14
  store i32 2147483647, ptr %57, align 4, !tbaa !5
  %58 = icmp eq i64 %indvars.iv146, %indvars.iv.next142
  br i1 %58, label %.thread.us83.us.us.us.us.1, label %.thread72.us84.us.us106.us.us.1

.thread.us83.us.us.us.us.1:                       ; preds = %.thread72.us84.us.us106.us.us
  store i32 0, ptr %54, align 8, !tbaa !5
  br label %.thread72.us84.us.us106.us.us.1

.thread72.us84.us.us106.us.us.1:                  ; preds = %.thread.us83.us.us.us.us.1, %.thread72.us84.us.us106.us.us
  %indvars.iv.next142.1 = add nuw nsw i64 %indvars.iv141, 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.split.split.us.us.split.us107.us.us.unr-lcssa, label %.preheader74.us.us101.us.us.new, !llvm.loop !11

._crit_edge.split.split.us.us.split.us107.us.us.unr-lcssa: ; preds = %.thread72.us84.us.us106.us.us.1, %.preheader74.us.us101.us.us
  %indvars.iv141.unr = phi i64 [ 0, %.preheader74.us.us101.us.us ], [ %indvars.iv.next142.1, %.thread72.us84.us.us106.us.us.1 ]
  br i1 %lcmp.mod.not, label %._crit_edge.split.split.us.us.split.us107.us.us, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge.split.split.us.us.split.us107.us.us.unr-lcssa
  %59 = getelementptr inbounds [2 x i32], ptr %53, i64 %indvars.iv141.unr, i64 %14
  store i32 2147483647, ptr %59, align 4, !tbaa !5
  %60 = icmp eq i64 %indvars.iv146, %indvars.iv141.unr
  br i1 %60, label %.thread.us83.us.us.us.us.epil, label %._crit_edge.split.split.us.us.split.us107.us.us

.thread.us83.us.us.us.us.epil:                    ; preds = %.epil.preheader
  store i32 0, ptr %54, align 8, !tbaa !5
  br label %._crit_edge.split.split.us.us.split.us107.us.us

._crit_edge.split.split.us.us.split.us107.us.us:  ; preds = %.epil.preheader, %.thread.us83.us.us.us.us.epil, %._crit_edge.split.split.us.us.split.us107.us.us.unr-lcssa
  %indvars.iv.next147 = add nuw nsw i64 %indvars.iv146, 1
  %exitcond150.not = icmp eq i64 %indvars.iv.next147, %wide.trip.count149
  br i1 %exitcond150.not, label %._crit_edge97.split.us.us, label %.preheader74.us.us101.us.us, !llvm.loop !12

._crit_edge:                                      ; preds = %._crit_edge97.split.us.us, %4
  %61 = sext i32 %1 to i64
  %62 = mul nsw i64 %7, %61
  %63 = getelementptr inbounds [2 x i32], ptr %9, i64 %62
  %64 = sext i32 %2 to i64
  %65 = srem i32 %3, 2
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds [2 x i32], ptr %63, i64 %64, i64 %66
  %68 = load i32, ptr %67, align 4, !tbaa !5
  ret i32 %68
}

; Function Attrs: mustprogress 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)) local_unnamed_addr #0 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 #0 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 #0 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZSt3minIiERKT_S2_S2_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #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 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10}
!12 = distinct !{!12, !10}
!13 = distinct !{!13, !10}


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