; LLVM IR from bqi343/cp-notebook :: Contests/USACO Solutions/2020-21/Dec/Plat (space_matrix)

; 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::vector.3" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::vector<mint<1000000007, 5>>, std::allocator<std::vector<mint<1000000007, 5>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<mint<1000000007, 5>>, std::allocator<std::vector<mint<1000000007, 5>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<mint<1000000007, 5>>, std::allocator<std::vector<mint<1000000007, 5>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<mint<1000000007, 5>>, std::allocator<std::vector<mint<1000000007, 5>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.mint = type { i32 }

@.str.12 = external hidden unnamed_addr constant [111 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [11 x i8], align 1
@__PRETTY_FUNCTION__._ZmlRKSt6vectorIS_I4mintILi1000000007ELi5EESaIS1_EESaIS3_EES7_ = external hidden unnamed_addr constant [40 x i8], align 1

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIS_I4mintILi1000000007ELi5EESaIS1_EESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

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

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z7makeMatii(ptr dead_on_unwind noalias writable sret(%"class.std::vector.3") align 8, i32 noundef, i32 noundef) #3

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

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

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

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) #4

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZmlRKSt6vectorIS_I4mintILi1000000007ELi5EESaIS1_EESaIS3_EES7_(ptr dead_on_unwind noalias writable sret(%"class.std::vector.3") align 8 %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %2) #3 personality ptr @__gxx_personality_v0 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i1, align 1
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca %struct.mint, align 4
  %16 = alloca %struct.mint, align 4
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  store ptr %0, ptr %4, align 8
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #5
  %19 = load ptr, ptr %5, align 8, !tbaa !5
  %20 = call noundef i64 @_ZNKSt6vectorIS_I4mintILi1000000007ELi5EESaIS1_EESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %19) #5
  %21 = trunc i64 %20 to i32
  store i32 %21, ptr %7, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #5
  %22 = load ptr, ptr %5, align 8, !tbaa !5
  %23 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt6vectorIS_I4mintILi1000000007ELi5EESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %22, i64 noundef 0) #5
  %24 = call noundef i64 @_ZNKSt6vectorI4mintILi1000000007ELi5EESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %23) #5
  %25 = trunc i64 %24 to i32
  store i32 %25, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #5
  %26 = load ptr, ptr %6, align 8, !tbaa !5
  %27 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt6vectorIS_I4mintILi1000000007ELi5EESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %26, i64 noundef 0) #5
  %28 = call noundef i64 @_ZNKSt6vectorI4mintILi1000000007ELi5EESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %27) #5
  %29 = trunc i64 %28 to i32
  store i32 %29, ptr %9, align 4, !tbaa !9
  %30 = load i32, ptr %8, align 4, !tbaa !9
  %31 = load ptr, ptr %6, align 8, !tbaa !5
  %32 = call noundef i64 @_ZNKSt6vectorIS_I4mintILi1000000007ELi5EESaIS1_EESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %31) #5
  %33 = trunc i64 %32 to i32
  %34 = icmp eq i32 %30, %33
  br i1 %34, label %35, label %36

35:                                               ; preds = %3
  br label %38

36:                                               ; preds = %3
  call void @__assert_fail(ptr noundef @.str.13, ptr noundef @.str.12, i32 noundef 300, ptr noundef @__PRETTY_FUNCTION__._ZmlRKSt6vectorIS_I4mintILi1000000007ELi5EESaIS1_EESaIS3_EES7_) #6
  unreachable

37:                                               ; No predecessors!
  br label %38

38:                                               ; preds = %37, %35
  store i1 false, ptr %10, align 1
  %39 = load i32, ptr %7, align 4, !tbaa !9
  %40 = load i32, ptr %9, align 4, !tbaa !9
  call void @_Z7makeMatii(ptr dead_on_unwind writable sret(%"class.std::vector.3") align 8 %0, i32 noundef %39, i32 noundef %40)
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #5
  store i32 0, ptr %11, align 4, !tbaa !9
  br label %41

41:                                               ; preds = %98, %38
  %42 = load i32, ptr %11, align 4, !tbaa !9
  %43 = load i32, ptr %7, align 4, !tbaa !9
  %44 = icmp slt i32 %42, %43
  br i1 %44, label %46, label %45

45:                                               ; preds = %41
  store i32 2, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  br label %101

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

47:                                               ; preds = %94, %46
  %48 = load i32, ptr %13, align 4, !tbaa !9
  %49 = load i32, ptr %8, align 4, !tbaa !9
  %50 = icmp slt i32 %48, %49
  br i1 %50, label %52, label %51

51:                                               ; preds = %47
  store i32 5, ptr %12, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  br label %97

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

53:                                               ; preds = %86, %52
  %54 = load i32, ptr %14, align 4, !tbaa !9
  %55 = load i32, ptr %9, align 4, !tbaa !9
  %56 = icmp slt i32 %54, %55
  br i1 %56, label %58, label %57

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

58:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #5
  %59 = load ptr, ptr %5, align 8, !tbaa !5
  %60 = load i32, ptr %11, align 4, !tbaa !9
  %61 = sext i32 %60 to i64
  %62 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt6vectorIS_I4mintILi1000000007ELi5EESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %59, i64 noundef %61) #5
  %63 = load i32, ptr %13, align 4, !tbaa !9
  %64 = sext i32 %63 to i64
  %65 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorI4mintILi1000000007ELi5EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %62, i64 noundef %64) #5
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %16, ptr align 4 %65, i64 4, i1 false), !tbaa.struct !11
  %66 = load ptr, ptr %6, align 8, !tbaa !5
  %67 = load i32, ptr %13, align 4, !tbaa !9
  %68 = sext i32 %67 to i64
  %69 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt6vectorIS_I4mintILi1000000007ELi5EESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %66, i64 noundef %68) #5
  %70 = load i32, ptr %14, align 4, !tbaa !9
  %71 = sext i32 %70 to i64
  %72 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorI4mintILi1000000007ELi5EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %69, i64 noundef %71) #5
  %73 = getelementptr inbounds %struct.mint, ptr %16, i32 0, i32 0
  %74 = load i32, ptr %73, align 4
  %75 = invoke i32 @_Zml4mintILi1000000007ELi5EERKS0_(i32 %74, ptr noundef nonnull align 4 dereferenceable(4) %72)
          to label %76 unwind label %89

76:                                               ; preds = %58
  %77 = getelementptr inbounds %struct.mint, ptr %15, i32 0, i32 0
  store i32 %75, ptr %77, align 4
  %78 = load i32, ptr %11, align 4, !tbaa !9
  %79 = sext i32 %78 to i64
  %80 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_I4mintILi1000000007ELi5EESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %79) #5
  %81 = load i32, ptr %14, align 4, !tbaa !9
  %82 = sext i32 %81 to i64
  %83 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI4mintILi1000000007ELi5EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %80, i64 noundef %82) #5
  %84 = invoke noundef nonnull align 4 dereferenceable(4) ptr @_ZN4mintILi1000000007ELi5EEpLERKS0_(ptr noundef nonnull align 4 dereferenceable(4) %83, ptr noundef nonnull align 4 dereferenceable(4) %15)
          to label %85 unwind label %89

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

86:                                               ; preds = %85
  %87 = load i32, ptr %14, align 4, !tbaa !9
  %88 = add nsw i32 %87, 1
  store i32 %88, ptr %14, align 4, !tbaa !9
  br label %53, !llvm.loop !12

89:                                               ; preds = %76, %58
  %90 = landingpad { ptr, i32 }
          cleanup
  %91 = extractvalue { ptr, i32 } %90, 0
  store ptr %91, ptr %17, align 8
  %92 = extractvalue { ptr, i32 } %90, 1
  store i32 %92, ptr %18, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #5
  call void @_ZNSt6vectorIS_I4mintILi1000000007ELi5EESaIS1_EESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  br label %105

93:                                               ; preds = %57
  br label %94

94:                                               ; preds = %93
  %95 = load i32, ptr %13, align 4, !tbaa !9
  %96 = add nsw i32 %95, 1
  store i32 %96, ptr %13, align 4, !tbaa !9
  br label %47, !llvm.loop !14

97:                                               ; preds = %51
  br label %98

98:                                               ; preds = %97
  %99 = load i32, ptr %11, align 4, !tbaa !9
  %100 = add nsw i32 %99, 1
  store i32 %100, ptr %11, align 4, !tbaa !9
  br label %41, !llvm.loop !15

101:                                              ; preds = %45
  store i1 true, ptr %10, align 1
  store i32 1, ptr %12, align 4
  %102 = load i1, ptr %10, align 1
  br i1 %102, label %104, label %103

103:                                              ; preds = %101
  call void @_ZNSt6vectorIS_I4mintILi1000000007ELi5EESaIS1_EESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #5
  br label %104

104:                                              ; preds = %103, %101
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #5
  ret void

105:                                              ; preds = %89
  %106 = load ptr, ptr %17, align 8
  %107 = load i32, ptr %18, align 4
  %108 = insertvalue { ptr, i32 } poison, ptr %106, 0
  %109 = insertvalue { ptr, i32 } %108, i32 %107, 1
  resume { ptr, i32 } %109
}

; Function Attrs: mustprogress uwtable
declare dso_local i32 @_Zml4mintILi1000000007ELi5EERKS0_(i32, ptr noundef nonnull align 4 dereferenceable(4)) #3

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nounwind }
attributes #6 = { noreturn 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 = !{i64 0, i64 4, !9}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}
!14 = distinct !{!14, !13}
!15 = distinct !{!15, !13}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"class.std::vector.3" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::vector<mint<1000000007, 5>>, std::allocator<std::vector<mint<1000000007, 5>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<mint<1000000007, 5>>, std::allocator<std::vector<mint<1000000007, 5>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<mint<1000000007, 5>>, std::allocator<std::vector<mint<1000000007, 5>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<mint<1000000007, 5>>, std::allocator<std::vector<mint<1000000007, 5>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%struct.mint = type { i32 }

@.str.12 = external hidden unnamed_addr constant [111 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [11 x i8], align 1
@__PRETTY_FUNCTION__._ZmlRKSt6vectorIS_I4mintILi1000000007ELi5EESaIS1_EESaIS3_EES7_ = external hidden unnamed_addr constant [40 x i8], align 1

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIS_I4mintILi1000000007ELi5EESaIS1_EESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #1 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_I4mintILi1000000007ELi5EESaIS1_EESaIS3_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 @_ZNSt6vectorI4mintILi1000000007ELi5EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_Z7makeMatii(ptr dead_on_unwind noalias writable sret(%"class.std::vector.3") align 8, i32 noundef, i32 noundef) local_unnamed_addr #2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorI4mintILi1000000007ELi5EESaIS1_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 @_ZNKSt6vectorIS_I4mintILi1000000007ELi5EESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

; Function Attrs: noreturn nounwind
declare void @__assert_fail(ptr noundef, ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorI4mintILi1000000007ELi5EESaIS1_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 @_ZN4mintILi1000000007ELi5EEpLERKS0_(ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZmlRKSt6vectorIS_I4mintILi1000000007ELi5EESaIS1_EESaIS3_EES7_(ptr dead_on_unwind noalias writable sret(%"class.std::vector.3") align 8 %0, ptr noundef nonnull align 8 dereferenceable(24) %1, ptr noundef nonnull align 8 dereferenceable(24) %2) local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %4 = alloca %struct.mint, align 4
  %5 = tail call noundef i64 @_ZNKSt6vectorIS_I4mintILi1000000007ELi5EESaIS1_EESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #4
  %6 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt6vectorIS_I4mintILi1000000007ELi5EESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 0) #4
  %7 = tail call noundef i64 @_ZNKSt6vectorI4mintILi1000000007ELi5EESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #4
  %8 = trunc i64 %7 to i32
  %9 = tail call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt6vectorIS_I4mintILi1000000007ELi5EESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef 0) #4
  %10 = tail call noundef i64 @_ZNKSt6vectorI4mintILi1000000007ELi5EESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #4
  %11 = tail call noundef i64 @_ZNKSt6vectorIS_I4mintILi1000000007ELi5EESaIS1_EESaIS3_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %2) #4
  %12 = trunc i64 %11 to i32
  %13 = icmp eq i32 %8, %12
  br i1 %13, label %15, label %14

14:                                               ; preds = %3
  tail call void @__assert_fail(ptr noundef nonnull @.str.13, ptr noundef nonnull @.str.12, i32 noundef 300, ptr noundef nonnull @__PRETTY_FUNCTION__._ZmlRKSt6vectorIS_I4mintILi1000000007ELi5EESaIS1_EESaIS3_EES7_) #5
  unreachable

15:                                               ; preds = %3
  %16 = trunc i64 %10 to i32
  %17 = trunc i64 %5 to i32
  tail call void @_Z7makeMatii(ptr dead_on_unwind writable sret(%"class.std::vector.3") align 8 %0, i32 noundef %17, i32 noundef %16)
  %18 = icmp sgt i32 %17, 0
  %19 = icmp sgt i32 %8, 0
  %or.cond = and i1 %18, %19
  %20 = icmp sgt i32 %16, 0
  %or.cond51 = and i1 %or.cond, %20
  br i1 %or.cond51, label %.preheader29.us.us.preheader, label %._crit_edge

.preheader29.us.us.preheader:                     ; preds = %15
  %wide.trip.count49 = and i64 %5, 2147483647
  %wide.trip.count44 = and i64 %7, 2147483647
  %wide.trip.count = and i64 %10, 2147483647
  br label %.preheader29.us.us

.preheader29.us.us:                               ; preds = %.preheader29.us.us.preheader, %._crit_edge32.split.us.us.us
  %indvars.iv46 = phi i64 [ 0, %.preheader29.us.us.preheader ], [ %indvars.iv.next47, %._crit_edge32.split.us.us.us ]
  br label %.preheader.us.us.us

.preheader.us.us.us:                              ; preds = %._crit_edge.us.us.us, %.preheader29.us.us
  %indvars.iv41 = phi i64 [ %indvars.iv.next42, %._crit_edge.us.us.us ], [ 0, %.preheader29.us.us ]
  br label %21

21:                                               ; preds = %27, %.preheader.us.us.us
  %indvars.iv = phi i64 [ %indvars.iv.next, %27 ], [ 0, %.preheader.us.us.us ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #4
  %22 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt6vectorIS_I4mintILi1000000007ELi5EESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv46) #4
  %23 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorI4mintILi1000000007ELi5EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %22, i64 noundef %indvars.iv41) #4
  %.sroa.0.0.copyload.us.us.us = load i32, ptr %23, align 4, !tbaa !5
  %24 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNKSt6vectorIS_I4mintILi1000000007ELi5EESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %2, i64 noundef %indvars.iv41) #4
  %25 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNKSt6vectorI4mintILi1000000007ELi5EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %24, i64 noundef %indvars.iv) #4
  %26 = invoke i32 @_Zml4mintILi1000000007ELi5EERKS0_(i32 %.sroa.0.0.copyload.us.us.us, ptr noundef nonnull align 4 dereferenceable(4) %25)
          to label %27 unwind label %.split.us.split.us.split.us

27:                                               ; preds = %21
  store i32 %26, ptr %4, align 4
  %28 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_I4mintILi1000000007ELi5EESaIS1_EESaIS3_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %0, i64 noundef %indvars.iv46) #4
  %29 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorI4mintILi1000000007ELi5EESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %28, i64 noundef %indvars.iv) #4
  %30 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZN4mintILi1000000007ELi5EEpLERKS0_(ptr noundef nonnull align 4 dereferenceable(4) %29, ptr noundef nonnull align 4 dereferenceable(4) %4)
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #4
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge.us.us.us, label %21, !llvm.loop !9

._crit_edge.us.us.us:                             ; preds = %27
  %indvars.iv.next42 = add nuw nsw i64 %indvars.iv41, 1
  %exitcond45.not = icmp eq i64 %indvars.iv.next42, %wide.trip.count44
  br i1 %exitcond45.not, label %._crit_edge32.split.us.us.us, label %.preheader.us.us.us, !llvm.loop !11

._crit_edge32.split.us.us.us:                     ; preds = %._crit_edge.us.us.us
  %indvars.iv.next47 = add nuw nsw i64 %indvars.iv46, 1
  %exitcond50.not = icmp eq i64 %indvars.iv.next47, %wide.trip.count49
  br i1 %exitcond50.not, label %._crit_edge, label %.preheader29.us.us, !llvm.loop !12

.split.us.split.us.split.us:                      ; preds = %21
  %31 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #4
  call void @_ZNSt6vectorIS_I4mintILi1000000007ELi5EESaIS1_EESaIS3_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %0) #4
  resume { ptr, i32 } %31

._crit_edge:                                      ; preds = %._crit_edge32.split.us.us.us, %15
  ret void
}

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = { noreturn nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }
attributes #5 = { noreturn 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}


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