; LLVM IR from stonne-simulator/omega :: omega-code/stonne/src/utility.ll (Z24generateMinorIDFromDensePfjjRi15GENERATION_TYPE)

; 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.4" }
%"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare { i64, i1 } @llvm.umul.with.overflow.i64(i64, i64) #1

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) #2

; Function Attrs: mustprogress uwtable
define dso_local noundef ptr @_Z24generateMinorIDFromDensePfjjRi15GENERATION_TYPE(ptr noundef %0, i32 noundef %1, i32 noundef %2, ptr noundef nonnull align 4 dereferenceable(4) %3, i32 noundef %4) #3 personality ptr @__gxx_personality_v0 {
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %"class.std::vector.3", align 8
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca ptr, align 8
  %24 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store i32 %1, ptr %7, align 4, !tbaa !9
  store i32 %2, ptr %8, align 4, !tbaa !9
  store ptr %3, ptr %9, align 8, !tbaa !5
  store i32 %4, ptr %10, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 24, ptr %11) #5
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #5
  %25 = load i32, ptr %10, align 4, !tbaa !11
  %26 = icmp eq i32 %25, 0
  br i1 %26, label %27, label %78

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

28:                                               ; preds = %73, %27
  %29 = load i32, ptr %12, align 4, !tbaa !9
  %30 = load i32, ptr %7, align 4, !tbaa !9
  %31 = icmp ult i32 %29, %30
  br i1 %31, label %33, label %32

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

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

34:                                               ; preds = %60, %33
  %35 = load i32, ptr %15, align 4, !tbaa !9
  %36 = load i32, ptr %8, align 4, !tbaa !9
  %37 = icmp ult i32 %35, %36
  br i1 %37, label %39, label %38

38:                                               ; preds = %34
  store i32 5, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  br label %63

39:                                               ; preds = %34
  %40 = load ptr, ptr %6, align 8, !tbaa !5
  %41 = load i32, ptr %12, align 4, !tbaa !9
  %42 = load i32, ptr %8, align 4, !tbaa !9
  %43 = mul i32 %41, %42
  %44 = load i32, ptr %15, align 4, !tbaa !9
  %45 = add i32 %43, %44
  %46 = zext i32 %45 to i64
  %47 = getelementptr inbounds float, ptr %40, i64 %46
  %48 = load float, ptr %47, align 4, !tbaa !13
  %49 = fpext float %48 to double
  %50 = fcmp une double %49, 0.000000e+00
  br i1 %50, label %51, label %59

51:                                               ; preds = %39
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 4 dereferenceable(4) %15)
          to label %52 unwind label %55

52:                                               ; preds = %51
  %53 = load i32, ptr %14, align 4, !tbaa !9
  %54 = add nsw i32 %53, 1
  store i32 %54, ptr %14, align 4, !tbaa !9
  br label %59

55:                                               ; preds = %51
  %56 = landingpad { ptr, i32 }
          cleanup
  %57 = extractvalue { ptr, i32 } %56, 0
  store ptr %57, ptr %16, align 8
  %58 = extractvalue { ptr, i32 } %56, 1
  store i32 %58, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  br label %76

59:                                               ; preds = %52, %39
  br label %60

60:                                               ; preds = %59
  %61 = load i32, ptr %15, align 4, !tbaa !9
  %62 = add nsw i32 %61, 1
  store i32 %62, ptr %15, align 4, !tbaa !9
  br label %34, !llvm.loop !15

63:                                               ; preds = %38
  %64 = load i32, ptr %14, align 4, !tbaa !9
  %65 = icmp eq i32 %64, 0
  br i1 %65, label %66, label %72

66:                                               ; preds = %63
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  store i32 0, ptr %18, align 4, !tbaa !9
  invoke void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 4 dereferenceable(4) %18)
          to label %67 unwind label %68

67:                                               ; preds = %66
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  br label %72

68:                                               ; preds = %66
  %69 = landingpad { ptr, i32 }
          cleanup
  %70 = extractvalue { ptr, i32 } %69, 0
  store ptr %70, ptr %16, align 8
  %71 = extractvalue { ptr, i32 } %69, 1
  store i32 %71, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  br label %76

72:                                               ; preds = %67, %63
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  br label %73

73:                                               ; preds = %72
  %74 = load i32, ptr %12, align 4, !tbaa !9
  %75 = add nsw i32 %74, 1
  store i32 %75, ptr %12, align 4, !tbaa !9
  br label %28, !llvm.loop !17

76:                                               ; preds = %68, %55
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #5
  br label %164

77:                                               ; preds = %32
  br label %129

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

79:                                               ; preds = %124, %78
  %80 = load i32, ptr %19, align 4, !tbaa !9
  %81 = load i32, ptr %8, align 4, !tbaa !9
  %82 = icmp ult i32 %80, %81
  br i1 %82, label %84, label %83

83:                                               ; preds = %79
  store i32 8, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  br label %128

84:                                               ; preds = %79
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  store i32 0, ptr %20, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #5
  store i32 0, ptr %21, align 4, !tbaa !9
  br label %85

85:                                               ; preds = %111, %84
  %86 = load i32, ptr %21, align 4, !tbaa !9
  %87 = load i32, ptr %7, align 4, !tbaa !9
  %88 = icmp ult i32 %86, %87
  br i1 %88, label %90, label %89

89:                                               ; preds = %85
  store i32 11, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  br label %114

90:                                               ; preds = %85
  %91 = load ptr, ptr %6, align 8, !tbaa !5
  %92 = load i32, ptr %21, align 4, !tbaa !9
  %93 = load i32, ptr %8, align 4, !tbaa !9
  %94 = mul i32 %92, %93
  %95 = load i32, ptr %19, align 4, !tbaa !9
  %96 = add i32 %94, %95
  %97 = zext i32 %96 to i64
  %98 = getelementptr inbounds float, ptr %91, i64 %97
  %99 = load float, ptr %98, align 4, !tbaa !13
  %100 = fpext float %99 to double
  %101 = fcmp une double %100, 0.000000e+00
  br i1 %101, label %102, label %110

102:                                              ; preds = %90
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 4 dereferenceable(4) %21)
          to label %103 unwind label %106

103:                                              ; preds = %102
  %104 = load i32, ptr %20, align 4, !tbaa !9
  %105 = add nsw i32 %104, 1
  store i32 %105, ptr %20, align 4, !tbaa !9
  br label %110

106:                                              ; preds = %102
  %107 = landingpad { ptr, i32 }
          cleanup
  %108 = extractvalue { ptr, i32 } %107, 0
  store ptr %108, ptr %16, align 8
  %109 = extractvalue { ptr, i32 } %107, 1
  store i32 %109, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  br label %127

110:                                              ; preds = %103, %90
  br label %111

111:                                              ; preds = %110
  %112 = load i32, ptr %21, align 4, !tbaa !9
  %113 = add nsw i32 %112, 1
  store i32 %113, ptr %21, align 4, !tbaa !9
  br label %85, !llvm.loop !18

114:                                              ; preds = %89
  %115 = load i32, ptr %20, align 4, !tbaa !9
  %116 = icmp eq i32 %115, 0
  br i1 %116, label %117, label %123

117:                                              ; preds = %114
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #5
  store i32 0, ptr %22, align 4, !tbaa !9
  invoke void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 4 dereferenceable(4) %22)
          to label %118 unwind label %119

118:                                              ; preds = %117
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  br label %123

119:                                              ; preds = %117
  %120 = landingpad { ptr, i32 }
          cleanup
  %121 = extractvalue { ptr, i32 } %120, 0
  store ptr %121, ptr %16, align 8
  %122 = extractvalue { ptr, i32 } %120, 1
  store i32 %122, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  br label %127

123:                                              ; preds = %118, %114
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  br label %124

124:                                              ; preds = %123
  %125 = load i32, ptr %19, align 4, !tbaa !9
  %126 = add nsw i32 %125, 1
  store i32 %126, ptr %19, align 4, !tbaa !9
  br label %79, !llvm.loop !19

127:                                              ; preds = %119, %106
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  br label %164

128:                                              ; preds = %83
  br label %129

129:                                              ; preds = %128, %77
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #5
  %130 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #5
  %131 = call { i64, i1 } @llvm.umul.with.overflow.i64(i64 %130, i64 4)
  %132 = extractvalue { i64, i1 } %131, 1
  %133 = extractvalue { i64, i1 } %131, 0
  %134 = select i1 %132, i64 -1, i64 %133
  %135 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %134) #6
          to label %136 unwind label %146

136:                                              ; preds = %129
  store ptr %135, ptr %23, align 8, !tbaa !5
  %137 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #5
  %138 = trunc i64 %137 to i32
  %139 = load ptr, ptr %9, align 8, !tbaa !5
  store i32 %138, ptr %139, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %24) #5
  store i32 0, ptr %24, align 4, !tbaa !9
  br label %140

140:                                              ; preds = %159, %136
  %141 = load i32, ptr %24, align 4, !tbaa !9
  %142 = sext i32 %141 to i64
  %143 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %11) #5
  %144 = icmp ult i64 %142, %143
  br i1 %144, label %150, label %145

145:                                              ; preds = %140
  store i32 14, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %24) #5
  br label %162

146:                                              ; preds = %129
  %147 = landingpad { ptr, i32 }
          cleanup
  %148 = extractvalue { ptr, i32 } %147, 0
  store ptr %148, ptr %16, align 8
  %149 = extractvalue { ptr, i32 } %147, 1
  store i32 %149, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  br label %164

150:                                              ; preds = %140
  %151 = load i32, ptr %24, align 4, !tbaa !9
  %152 = sext i32 %151 to i64
  %153 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %11, i64 noundef %152) #5
  %154 = load i32, ptr %153, align 4, !tbaa !9
  %155 = load ptr, ptr %23, align 8, !tbaa !5
  %156 = load i32, ptr %24, align 4, !tbaa !9
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds i32, ptr %155, i64 %157
  store i32 %154, ptr %158, align 4, !tbaa !9
  br label %159

159:                                              ; preds = %150
  %160 = load i32, ptr %24, align 4, !tbaa !9
  %161 = add nsw i32 %160, 1
  store i32 %161, ptr %24, align 4, !tbaa !9
  br label %140, !llvm.loop !20

162:                                              ; preds = %145
  %163 = load ptr, ptr %23, align 8, !tbaa !5
  store i32 1, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #5
  ret ptr %163

164:                                              ; preds = %146, %127, %76
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %11) #5
  br label %165

165:                                              ; preds = %164
  %166 = load ptr, ptr %16, align 8
  %167 = load i32, ptr %17, align 4
  %168 = insertvalue { ptr, i32 } poison, ptr %166, 0
  %169 = insertvalue { ptr, i32 } %168, i32 %167, 1
  resume { ptr, i32 } %169
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) #3 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) #3 align 2

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #2 = { nobuiltin allocsize(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 = { 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 = { 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 }
attributes #6 = { builtin allocsize(0) }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"_ZTS15GENERATION_TYPE", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"float", !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}
!18 = distinct !{!18, !16}
!19 = distinct !{!19, !16}
!20 = distinct !{!20, !16}


; 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.4" }
%"struct.std::_Vector_base.4" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl" = type { %"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" }
%"struct.std::_Vector_base<int, std::allocator<int>>::_Vector_impl_data" = type { ptr, ptr, ptr }

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

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znam(i64 noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
define dso_local noalias noundef nonnull ptr @_Z24generateMinorIDFromDensePfjjRi15GENERATION_TYPE(ptr nocapture noundef readonly %0, i32 noundef %1, i32 noundef %2, ptr nocapture noundef nonnull writeonly align 4 dereferenceable(4) %3, i32 noundef %4) local_unnamed_addr #2 personality ptr @__gxx_personality_v0 {
  %6 = alloca %"class.std::vector.3", align 8
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #4
  call void @_ZNSt6vectorIiSaIiEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #4
  %11 = icmp eq i32 %4, 0
  br i1 %11, label %.preheader, label %.preheader47

.preheader47:                                     ; preds = %5
  %.not = icmp eq i32 %2, 0
  br i1 %.not, label %.loopexit, label %.lr.ph54

.lr.ph54:                                         ; preds = %.preheader47
  %.not72 = icmp eq i32 %1, 0
  br i1 %.not72, label %.lr.ph54.split, label %.lr.ph.us

.lr.ph.us:                                        ; preds = %.lr.ph54, %14
  %.02953.us = phi i32 [ %15, %14 ], [ 0, %.lr.ph54 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #4
  store i32 0, ptr %9, align 4, !tbaa !5
  br label %16

12:                                               ; preds = %._crit_edge.us
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #4
  store i32 0, ptr %10, align 4, !tbaa !5
  invoke void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 4 dereferenceable(4) %10)
          to label %13 unwind label %.split.us

13:                                               ; preds = %12
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #4
  br label %14

14:                                               ; preds = %13, %._crit_edge.us
  %15 = add nuw i32 %.02953.us, 1
  %exitcond.not = icmp eq i32 %15, %2
  br i1 %exitcond.not, label %.loopexit, label %.lr.ph.us, !llvm.loop !9

16:                                               ; preds = %.lr.ph.us, %26
  %.02852.us = phi i32 [ 0, %.lr.ph.us ], [ %.1.us, %26 ]
  %storemerge51.us = phi i32 [ 0, %.lr.ph.us ], [ %28, %26 ]
  %17 = mul i32 %storemerge51.us, %2
  %18 = add i32 %17, %.02953.us
  %19 = zext i32 %18 to i64
  %20 = getelementptr inbounds float, ptr %0, i64 %19
  %21 = load float, ptr %20, align 4, !tbaa !11
  %22 = fcmp une float %21, 0.000000e+00
  br i1 %22, label %23, label %26

23:                                               ; preds = %16
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 4 dereferenceable(4) %9)
          to label %24 unwind label %.split56.us

24:                                               ; preds = %23
  %25 = add nsw i32 %.02852.us, 1
  %.pre = load i32, ptr %9, align 4, !tbaa !5
  br label %26

26:                                               ; preds = %24, %16
  %27 = phi i32 [ %.pre, %24 ], [ %storemerge51.us, %16 ]
  %.1.us = phi i32 [ %25, %24 ], [ %.02852.us, %16 ]
  %28 = add nsw i32 %27, 1
  store i32 %28, ptr %9, align 4, !tbaa !5
  %29 = icmp ult i32 %28, %1
  br i1 %29, label %16, label %._crit_edge.us, !llvm.loop !13

._crit_edge.us:                                   ; preds = %26
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #4
  %30 = icmp eq i32 %.1.us, 0
  br i1 %30, label %12, label %14

.split.us:                                        ; preds = %12
  %31 = landingpad { ptr, i32 }
          cleanup
  br label %61

.split56.us:                                      ; preds = %23
  %32 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #4
  br label %78

.preheader:                                       ; preds = %5
  %.not73 = icmp eq i32 %1, 0
  br i1 %.not73, label %.loopexit, label %.lr.ph61

.lr.ph61:                                         ; preds = %.preheader
  %.not74 = icmp eq i32 %2, 0
  br i1 %.not74, label %.lr.ph61.split, label %.lr.ph.us62

.lr.ph.us62:                                      ; preds = %.lr.ph61, %36
  %.02760.us = phi i32 [ %37, %36 ], [ 0, %.lr.ph61 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %7) #4
  store i32 0, ptr %7, align 4, !tbaa !5
  %33 = mul i32 %.02760.us, %2
  br label %38

34:                                               ; preds = %._crit_edge.us63
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #4
  store i32 0, ptr %8, align 4, !tbaa !5
  invoke void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 4 dereferenceable(4) %8)
          to label %35 unwind label %.split66.us

35:                                               ; preds = %34
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #4
  br label %36

36:                                               ; preds = %35, %._crit_edge.us63
  %37 = add nuw i32 %.02760.us, 1
  %exitcond80.not = icmp eq i32 %37, %1
  br i1 %exitcond80.not, label %.loopexit, label %.lr.ph.us62, !llvm.loop !14

38:                                               ; preds = %.lr.ph.us62, %47
  %.03559.us = phi i32 [ 0, %.lr.ph.us62 ], [ %.136.us, %47 ]
  %storemerge4358.us = phi i32 [ 0, %.lr.ph.us62 ], [ %49, %47 ]
  %39 = add i32 %storemerge4358.us, %33
  %40 = zext i32 %39 to i64
  %41 = getelementptr inbounds float, ptr %0, i64 %40
  %42 = load float, ptr %41, align 4, !tbaa !11
  %43 = fcmp une float %42, 0.000000e+00
  br i1 %43, label %44, label %47

44:                                               ; preds = %38
  invoke void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 4 dereferenceable(4) %7)
          to label %45 unwind label %.split69.us

45:                                               ; preds = %44
  %46 = add nsw i32 %.03559.us, 1
  %.pre83 = load i32, ptr %7, align 4, !tbaa !5
  br label %47

47:                                               ; preds = %45, %38
  %48 = phi i32 [ %.pre83, %45 ], [ %storemerge4358.us, %38 ]
  %.136.us = phi i32 [ %46, %45 ], [ %.03559.us, %38 ]
  %49 = add nsw i32 %48, 1
  store i32 %49, ptr %7, align 4, !tbaa !5
  %50 = icmp ult i32 %49, %2
  br i1 %50, label %38, label %._crit_edge.us63, !llvm.loop !15

._crit_edge.us63:                                 ; preds = %47
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #4
  %51 = icmp eq i32 %.136.us, 0
  br i1 %51, label %34, label %36

.split66.us:                                      ; preds = %34
  %52 = landingpad { ptr, i32 }
          cleanup
  br label %57

.split69.us:                                      ; preds = %44
  %53 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %7) #4
  br label %78

.lr.ph61.split:                                   ; preds = %.lr.ph61, %54
  %.02760 = phi i32 [ %55, %54 ], [ 0, %.lr.ph61 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #4
  store i32 0, ptr %8, align 4, !tbaa !5
  invoke void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 4 dereferenceable(4) %8)
          to label %54 unwind label %.split66

54:                                               ; preds = %.lr.ph61.split
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #4
  %55 = add nuw i32 %.02760, 1
  %exitcond81.not = icmp eq i32 %55, %1
  br i1 %exitcond81.not, label %.loopexit, label %.lr.ph61.split, !llvm.loop !14

.split66:                                         ; preds = %.lr.ph61.split
  %56 = landingpad { ptr, i32 }
          cleanup
  br label %57

57:                                               ; preds = %.split66.us, %.split66
  %.us-phi67 = phi { ptr, i32 } [ %56, %.split66 ], [ %52, %.split66.us ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #4
  br label %78

.lr.ph54.split:                                   ; preds = %.lr.ph54, %58
  %.02953 = phi i32 [ %59, %58 ], [ 0, %.lr.ph54 ]
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #4
  store i32 0, ptr %10, align 4, !tbaa !5
  invoke void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24) %6, ptr noundef nonnull align 4 dereferenceable(4) %10)
          to label %58 unwind label %.split

58:                                               ; preds = %.lr.ph54.split
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #4
  %59 = add nuw i32 %.02953, 1
  %exitcond79.not = icmp eq i32 %59, %2
  br i1 %exitcond79.not, label %.loopexit, label %.lr.ph54.split, !llvm.loop !9

.split:                                           ; preds = %.lr.ph54.split
  %60 = landingpad { ptr, i32 }
          cleanup
  br label %61

61:                                               ; preds = %.split.us, %.split
  %.us-phi = phi { ptr, i32 } [ %60, %.split ], [ %31, %.split.us ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #4
  br label %78

.loopexit:                                        ; preds = %14, %58, %36, %54, %.preheader47, %.preheader
  %62 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #4
  %63 = icmp ugt i64 %62, 4611686018427387903
  %64 = shl nuw i64 %62, 2
  %65 = select i1 %63, i64 -1, i64 %64
  %66 = invoke noalias noundef nonnull ptr @_Znam(i64 noundef %65) #5
          to label %67 unwind label %71

67:                                               ; preds = %.loopexit
  %68 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #4
  %69 = trunc i64 %68 to i32
  store i32 %69, ptr %3, align 4, !tbaa !5
  %70 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #4
  %.not75 = icmp eq i64 %70, 0
  br i1 %.not75, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %.lr.ph, %67
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #4
  ret ptr %66

71:                                               ; preds = %.loopexit
  %72 = landingpad { ptr, i32 }
          cleanup
  br label %78

.lr.ph:                                           ; preds = %67, %.lr.ph
  %indvars.iv = phi i64 [ %indvars.iv.next, %.lr.ph ], [ 0, %67 ]
  %73 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIiSaIiEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %indvars.iv) #4
  %74 = load i32, ptr %73, align 4, !tbaa !5
  %75 = getelementptr inbounds i32, ptr %66, i64 %indvars.iv
  store i32 %74, ptr %75, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %76 = call noundef i64 @_ZNKSt6vectorIiSaIiEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #4
  %77 = icmp ugt i64 %76, %indvars.iv.next
  br i1 %77, label %.lr.ph, label %._crit_edge, !llvm.loop !16

78:                                               ; preds = %.split56.us, %61, %.split69.us, %57, %71
  %.pn44.pn = phi { ptr, i32 } [ %72, %71 ], [ %53, %.split69.us ], [ %.us-phi67, %57 ], [ %32, %.split56.us ], [ %.us-phi, %61 ]
  call void @_ZNSt6vectorIiSaIiEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #4
  resume { ptr, i32 } %.pn44.pn
}

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEE9push_backERKi(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIiSaIiEE9push_backEOi(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #2 align 2

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nobuiltin allocsize(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 = { 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 = { nounwind }
attributes #5 = { builtin allocsize(0) }

!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 = !{!12, !12, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = distinct !{!13, !10}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10}
!16 = distinct !{!16, !10}


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