; LLVM IR from huawei-noah/bolt :: compute/tensor/src/kl.ll (Z18compress_histogramRSt6vectorIfSaIfEEff)

; 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" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl" }
%"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl" = type { %"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl_data" }
%"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

; Function Attrs: mustprogress uwtable
define dso_local void @_Z18compress_histogramRSt6vectorIfSaIfEEff(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8 %0, ptr noundef nonnull align 8 dereferenceable(24) %1, float noundef %2, float noundef %3) #0 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca float, align 4
  %8 = alloca float, align 4
  %9 = alloca %"class.std::vector", align 8
  %10 = alloca float, align 4
  %11 = alloca %"class.std::allocator", align 1
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca float, align 4
  %17 = alloca float, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %23 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  store ptr %0, ptr %5, align 8
  store ptr %1, ptr %6, align 8, !tbaa !5
  store float %2, ptr %7, align 4, !tbaa !9
  store float %3, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 24, ptr %9) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  store float 0.000000e+00, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #5
  call void @_ZNSaIfEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #5
  invoke void @_ZNSt6vectorIfSaIfEEC2EmRKfRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef 2048, ptr noundef nonnull align 4 dereferenceable(4) %10, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %24 unwind label %34

24:                                               ; preds = %4
  call void @_ZNSt15__new_allocatorIfED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #5
  store i32 0, ptr %14, align 4, !tbaa !11
  br label %25

25:                                               ; preds = %154, %24
  %26 = load i32, ptr %14, align 4, !tbaa !11
  %27 = uitofp i32 %26 to float
  %28 = load float, ptr %7, align 4, !tbaa !9
  %29 = fdiv float 2.048000e+03, %28
  %30 = invoke noundef float @_ZSt4ceilf(float noundef %29)
          to label %31 unwind label %38

31:                                               ; preds = %25
  %32 = fcmp olt float %27, %30
  br i1 %32, label %42, label %33

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

34:                                               ; preds = %4
  %35 = landingpad { ptr, i32 }
          cleanup
  %36 = extractvalue { ptr, i32 } %35, 0
  store ptr %36, ptr %12, align 8
  %37 = extractvalue { ptr, i32 } %35, 1
  store i32 %37, ptr %13, align 4
  call void @_ZNSt15__new_allocatorIfED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  br label %177

38:                                               ; preds = %25
  %39 = landingpad { ptr, i32 }
          cleanup
  %40 = extractvalue { ptr, i32 } %39, 0
  store ptr %40, ptr %12, align 8
  %41 = extractvalue { ptr, i32 } %39, 1
  store i32 %41, ptr %13, align 4
  br label %158

42:                                               ; preds = %31
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  %43 = load i32, ptr %14, align 4, !tbaa !11
  %44 = uitofp i32 %43 to float
  %45 = load float, ptr %7, align 4, !tbaa !9
  %46 = fmul float %44, %45
  store float %46, ptr %16, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  %47 = load float, ptr %16, align 4, !tbaa !9
  %48 = load float, ptr %7, align 4, !tbaa !9
  %49 = fadd float %47, %48
  store float %49, ptr %17, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #5
  %50 = load float, ptr %16, align 4, !tbaa !9
  %51 = invoke noundef float @_ZSt4ceilf(float noundef %50)
          to label %52 unwind label %74

52:                                               ; preds = %42
  %53 = fptosi float %51 to i32
  store i32 %53, ptr %18, align 4, !tbaa !11
  %54 = load i32, ptr %18, align 4, !tbaa !11
  %55 = sitofp i32 %54 to float
  %56 = load float, ptr %16, align 4, !tbaa !9
  %57 = fcmp ogt float %55, %56
  br i1 %57, label %58, label %78

58:                                               ; preds = %52
  %59 = load i32, ptr %18, align 4, !tbaa !11
  %60 = sitofp i32 %59 to float
  %61 = load float, ptr %16, align 4, !tbaa !9
  %62 = fsub float %60, %61
  %63 = load ptr, ptr %6, align 8, !tbaa !5
  %64 = load i32, ptr %18, align 4, !tbaa !11
  %65 = sub nsw i32 %64, 1
  %66 = sext i32 %65 to i64
  %67 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %63, i64 noundef %66) #5
  %68 = load float, ptr %67, align 4, !tbaa !9
  %69 = load i32, ptr %14, align 4, !tbaa !11
  %70 = zext i32 %69 to i64
  %71 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %70) #5
  %72 = load float, ptr %71, align 4, !tbaa !9
  %73 = call float @llvm.fmuladd.f32(float %62, float %68, float %72)
  store float %73, ptr %71, align 4, !tbaa !9
  br label %78

74:                                               ; preds = %42
  %75 = landingpad { ptr, i32 }
          cleanup
  %76 = extractvalue { ptr, i32 } %75, 0
  store ptr %76, ptr %12, align 8
  %77 = extractvalue { ptr, i32 } %75, 1
  store i32 %77, ptr %13, align 4
  br label %157

78:                                               ; preds = %58, %52
  %79 = load float, ptr %17, align 4, !tbaa !9
  %80 = load float, ptr %8, align 4, !tbaa !9
  %81 = fcmp ole float %79, %80
  br i1 %81, label %82, label %132

82:                                               ; preds = %78
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #5
  %83 = load float, ptr %17, align 4, !tbaa !9
  %84 = invoke noundef float @_ZSt5floorf(float noundef %83)
          to label %85 unwind label %106

85:                                               ; preds = %82
  %86 = fptosi float %84 to i32
  store i32 %86, ptr %19, align 4, !tbaa !11
  %87 = load i32, ptr %19, align 4, !tbaa !11
  %88 = sitofp i32 %87 to float
  %89 = load float, ptr %17, align 4, !tbaa !9
  %90 = fcmp olt float %88, %89
  br i1 %90, label %91, label %110

91:                                               ; preds = %85
  %92 = load float, ptr %17, align 4, !tbaa !9
  %93 = load i32, ptr %19, align 4, !tbaa !11
  %94 = sitofp i32 %93 to float
  %95 = fsub float %92, %94
  %96 = load ptr, ptr %6, align 8, !tbaa !5
  %97 = load i32, ptr %19, align 4, !tbaa !11
  %98 = sext i32 %97 to i64
  %99 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %96, i64 noundef %98) #5
  %100 = load float, ptr %99, align 4, !tbaa !9
  %101 = load i32, ptr %14, align 4, !tbaa !11
  %102 = zext i32 %101 to i64
  %103 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %102) #5
  %104 = load float, ptr %103, align 4, !tbaa !9
  %105 = call float @llvm.fmuladd.f32(float %95, float %100, float %104)
  store float %105, ptr %103, align 4, !tbaa !9
  br label %110

106:                                              ; preds = %82
  %107 = landingpad { ptr, i32 }
          cleanup
  %108 = extractvalue { ptr, i32 } %107, 0
  store ptr %108, ptr %12, align 8
  %109 = extractvalue { ptr, i32 } %107, 1
  store i32 %109, ptr %13, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  br label %157

110:                                              ; preds = %91, %85
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #5
  %111 = load i32, ptr %18, align 4, !tbaa !11
  store i32 %111, ptr %20, align 4, !tbaa !11
  br label %112

112:                                              ; preds = %128, %110
  %113 = load i32, ptr %20, align 4, !tbaa !11
  %114 = load i32, ptr %19, align 4, !tbaa !11
  %115 = icmp slt i32 %113, %114
  br i1 %115, label %117, label %116

116:                                              ; preds = %112
  store i32 5, ptr %15, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #5
  br label %131

117:                                              ; preds = %112
  %118 = load ptr, ptr %6, align 8, !tbaa !5
  %119 = load i32, ptr %20, align 4, !tbaa !11
  %120 = sext i32 %119 to i64
  %121 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %118, i64 noundef %120) #5
  %122 = load float, ptr %121, align 4, !tbaa !9
  %123 = load i32, ptr %14, align 4, !tbaa !11
  %124 = zext i32 %123 to i64
  %125 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %124) #5
  %126 = load float, ptr %125, align 4, !tbaa !9
  %127 = fadd float %126, %122
  store float %127, ptr %125, align 4, !tbaa !9
  br label %128

128:                                              ; preds = %117
  %129 = load i32, ptr %20, align 4, !tbaa !11
  %130 = add nsw i32 %129, 1
  store i32 %130, ptr %20, align 4, !tbaa !11
  br label %112, !llvm.loop !13

131:                                              ; preds = %116
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  br label %153

132:                                              ; preds = %78
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #5
  %133 = load i32, ptr %18, align 4, !tbaa !11
  store i32 %133, ptr %21, align 4, !tbaa !11
  br label %134

134:                                              ; preds = %149, %132
  %135 = load i32, ptr %21, align 4, !tbaa !11
  %136 = icmp slt i32 %135, 2048
  br i1 %136, label %138, label %137

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

138:                                              ; preds = %134
  %139 = load ptr, ptr %6, align 8, !tbaa !5
  %140 = load i32, ptr %21, align 4, !tbaa !11
  %141 = sext i32 %140 to i64
  %142 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %139, i64 noundef %141) #5
  %143 = load float, ptr %142, align 4, !tbaa !9
  %144 = load i32, ptr %14, align 4, !tbaa !11
  %145 = zext i32 %144 to i64
  %146 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %9, i64 noundef %145) #5
  %147 = load float, ptr %146, align 4, !tbaa !9
  %148 = fadd float %147, %143
  store float %148, ptr %146, align 4, !tbaa !9
  br label %149

149:                                              ; preds = %138
  %150 = load i32, ptr %21, align 4, !tbaa !11
  %151 = add nsw i32 %150, 1
  store i32 %151, ptr %21, align 4, !tbaa !11
  br label %134, !llvm.loop !15

152:                                              ; preds = %137
  br label %153

153:                                              ; preds = %152, %131
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  br label %154

154:                                              ; preds = %153
  %155 = load i32, ptr %14, align 4, !tbaa !11
  %156 = add i32 %155, 1
  store i32 %156, ptr %14, align 4, !tbaa !11
  br label %25, !llvm.loop !16

157:                                              ; preds = %106, %74
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  br label %158

158:                                              ; preds = %157, %38
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #5
  br label %176

159:                                              ; preds = %33
  %160 = load ptr, ptr %6, align 8, !tbaa !5
  %161 = call ptr @_ZNSt6vectorIfSaIfEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #5
  %162 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %22, i32 0, i32 0
  store ptr %161, ptr %162, align 8
  %163 = call ptr @_ZNSt6vectorIfSaIfEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %9) #5
  %164 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %23, i32 0, i32 0
  store ptr %163, ptr %164, align 8
  %165 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %22, i32 0, i32 0
  %166 = load ptr, ptr %165, align 8
  %167 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %23, i32 0, i32 0
  %168 = load ptr, ptr %167, align 8
  invoke void @_ZNSt6vectorIfSaIfEE6assignIN9__gnu_cxx17__normal_iteratorIPfS1_EEvEEvT_S7_(ptr noundef nonnull align 8 dereferenceable(24) %160, ptr %166, ptr %168)
          to label %169 unwind label %172

169:                                              ; preds = %159
  %170 = load ptr, ptr %6, align 8, !tbaa !5
  invoke void @_ZNSt6vectorIfSaIfEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %170)
          to label %171 unwind label %172

171:                                              ; preds = %169
  store i32 1, ptr %15, align 4
  call void @_ZNSt6vectorIfSaIfEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #5
  ret void

172:                                              ; preds = %169, %159
  %173 = landingpad { ptr, i32 }
          cleanup
  %174 = extractvalue { ptr, i32 } %173, 0
  store ptr %174, ptr %12, align 8
  %175 = extractvalue { ptr, i32 } %173, 1
  store i32 %175, ptr %13, align 4
  br label %176

176:                                              ; preds = %172, %158
  call void @_ZNSt6vectorIfSaIfEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %9) #5
  br label %177

177:                                              ; preds = %176, %34
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #5
  br label %178

178:                                              ; preds = %177
  %179 = load ptr, ptr %12, align 8
  %180 = load i32, ptr %13, align 4
  %181 = insertvalue { ptr, i32 } poison, ptr %179, 0
  %182 = insertvalue { ptr, i32 } %181, i32 %180, 1
  resume { ptr, i32 } %182
}

; 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 void @_ZNSaIfEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

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

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) #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt4ceilf(float noundef) #3

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt5floorf(float noundef) #3

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIfSaIfEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #0 align 2

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

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { 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 = { 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 #4 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = !{!"float", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}
!16 = distinct !{!16, !14}


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

%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl" }
%"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl" = type { %"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl_data" }
%"struct.std::_Vector_base<float, std::allocator<float>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::allocator" = type { i8 }

; Function Attrs: mustprogress uwtable
define dso_local void @_Z18compress_histogramRSt6vectorIfSaIfEEff(ptr dead_on_unwind noalias writable sret(%"class.std::vector") align 8 %0, ptr noundef nonnull align 8 dereferenceable(24) %1, float noundef %2, float noundef %3) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"class.std::vector", align 8
  %6 = alloca float, align 4
  %7 = alloca %"class.std::allocator", align 1
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %6) #5
  store float 0.000000e+00, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %7) #5
  call void @_ZNSaIfEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  invoke void @_ZNSt6vectorIfSaIfEEC2EmRKfRKS0_(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef 2048, ptr noundef nonnull align 4 dereferenceable(4) %6, ptr noundef nonnull align 1 dereferenceable(1) %7)
          to label %8 unwind label %14

8:                                                ; preds = %4
  call void @_ZNSt15__new_allocatorIfED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  %9 = fdiv float 2.048000e+03, %2
  %10 = call noundef float @_ZSt4ceilf(float noundef %9)
  %11 = fcmp ogt float %10, 0.000000e+00
  br i1 %11, label %.lr.ph58, label %._crit_edge

._crit_edge:                                      ; preds = %.loopexit, %8
  %12 = call ptr @_ZNSt6vectorIfSaIfEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  %13 = call ptr @_ZNSt6vectorIfSaIfEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  invoke void @_ZNSt6vectorIfSaIfEE6assignIN9__gnu_cxx17__normal_iteratorIPfS1_EEvEEvT_S7_(ptr noundef nonnull align 8 dereferenceable(24) %1, ptr %12, ptr %13)
          to label %73 unwind label %75

14:                                               ; preds = %4
  %15 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt15__new_allocatorIfED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %7) #5
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  br label %77

.lr.ph58:                                         ; preds = %8, %.loopexit
  %16 = phi float [ %70, %.loopexit ], [ 0.000000e+00, %8 ]
  %.04556 = phi i32 [ %69, %.loopexit ], [ 0, %8 ]
  %17 = fmul float %16, %2
  %18 = fadd float %17, %2
  %19 = call noundef float @_ZSt4ceilf(float noundef %17)
  %20 = fptosi float %19 to i32
  %21 = sitofp i32 %20 to float
  %22 = fcmp olt float %17, %21
  br i1 %22, label %23, label %33

23:                                               ; preds = %.lr.ph58
  %24 = fsub float %21, %17
  %25 = add nsw i32 %20, -1
  %26 = sext i32 %25 to i64
  %27 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %26) #5
  %28 = load float, ptr %27, align 4, !tbaa !5
  %29 = zext i32 %.04556 to i64
  %30 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %29) #5
  %31 = load float, ptr %30, align 4, !tbaa !5
  %32 = call float @llvm.fmuladd.f32(float %24, float %28, float %31)
  store float %32, ptr %30, align 4, !tbaa !5
  br label %33

33:                                               ; preds = %23, %.lr.ph58
  %34 = fcmp ugt float %18, %3
  br i1 %34, label %.preheader, label %38

.preheader:                                       ; preds = %33
  %35 = icmp slt i32 %20, 2048
  br i1 %35, label %.lr.ph55, label %.loopexit

.lr.ph55:                                         ; preds = %.preheader
  %36 = zext i32 %.04556 to i64
  %37 = sext i32 %20 to i64
  br label %62

38:                                               ; preds = %33
  %39 = call noundef float @_ZSt5floorf(float noundef %18)
  %40 = fptosi float %39 to i32
  %41 = sitofp i32 %40 to float
  %42 = fcmp ogt float %18, %41
  br i1 %42, label %43, label %52

43:                                               ; preds = %38
  %44 = fsub float %18, %41
  %45 = sext i32 %40 to i64
  %46 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %45) #5
  %47 = load float, ptr %46, align 4, !tbaa !5
  %48 = zext i32 %.04556 to i64
  %49 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %48) #5
  %50 = load float, ptr %49, align 4, !tbaa !5
  %51 = call float @llvm.fmuladd.f32(float %44, float %47, float %50)
  store float %51, ptr %49, align 4, !tbaa !5
  br label %52

52:                                               ; preds = %43, %38
  %53 = icmp slt i32 %20, %40
  br i1 %53, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %52
  %54 = zext i32 %.04556 to i64
  %55 = sext i32 %20 to i64
  br label %56

56:                                               ; preds = %.lr.ph, %56
  %indvars.iv = phi i64 [ %55, %.lr.ph ], [ %indvars.iv.next, %56 ]
  %57 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv) #5
  %58 = load float, ptr %57, align 4, !tbaa !5
  %59 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %54) #5
  %60 = load float, ptr %59, align 4, !tbaa !5
  %61 = fadd float %58, %60
  store float %61, ptr %59, align 4, !tbaa !5
  %indvars.iv.next = add nsw i64 %indvars.iv, 1
  %lftr.wideiv = trunc i64 %indvars.iv.next to i32
  %exitcond.not = icmp eq i32 %lftr.wideiv, %40
  br i1 %exitcond.not, label %.loopexit, label %56, !llvm.loop !9

62:                                               ; preds = %.lr.ph55, %62
  %indvars.iv61 = phi i64 [ %37, %.lr.ph55 ], [ %indvars.iv.next62, %62 ]
  %63 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %indvars.iv61) #5
  %64 = load float, ptr %63, align 4, !tbaa !5
  %65 = call noundef nonnull align 4 dereferenceable(4) ptr @_ZNSt6vectorIfSaIfEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %5, i64 noundef %36) #5
  %66 = load float, ptr %65, align 4, !tbaa !5
  %67 = fadd float %64, %66
  store float %67, ptr %65, align 4, !tbaa !5
  %indvars.iv.next62 = add nsw i64 %indvars.iv61, 1
  %68 = and i64 %indvars.iv.next62, 4294967295
  %exitcond65.not = icmp eq i64 %68, 2048
  br i1 %exitcond65.not, label %.loopexit, label %62, !llvm.loop !11

.loopexit:                                        ; preds = %56, %62, %52, %.preheader
  %69 = add i32 %.04556, 1
  %70 = uitofp i32 %69 to float
  %71 = call noundef float @_ZSt4ceilf(float noundef %9)
  %72 = fcmp ogt float %71, %70
  br i1 %72, label %.lr.ph58, label %._crit_edge, !llvm.loop !12

73:                                               ; preds = %._crit_edge
  invoke void @_ZNSt6vectorIfSaIfEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 8 dereferenceable(24) %1)
          to label %74 unwind label %75

74:                                               ; preds = %73
  call void @_ZNSt6vectorIfSaIfEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #5
  ret void

75:                                               ; preds = %73, %._crit_edge
  %76 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIfSaIfEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %5) #5
  br label %77

77:                                               ; preds = %75, %14
  %.pn = phi { ptr, i32 } [ %76, %75 ], [ %15, %14 ]
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #5
  resume { ptr, i32 } %.pn
}

; 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 void @_ZNSaIfEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #2 align 2

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

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) #1

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt4ceilf(float noundef) local_unnamed_addr #3

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare float @llvm.fmuladd.f32(float, float, float) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt5floorf(float noundef) local_unnamed_addr #3

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIfSaIfEEC2ERKS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #0 align 2

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

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

attributes #0 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress 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 = { 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 #4 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = !{!"float", !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,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass