; LLVM IR from sp-nitech/SPTK :: src/generation (recursive_maximum_likelihood_parameter_generation)

; 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.__gnu_cxx::__normal_iterator.10" = type { ptr }
%"class.sptk::RecursiveMaximumLikelihoodParameterGeneration" = type { %"class.sptk::InputSourceInterface", i32, i32, %"class.std::vector", ptr, i8, i32, i32, i32, %"struct.sptk::RecursiveMaximumLikelihoodParameterGeneration::Buffer" }
%"class.sptk::InputSourceInterface" = type { ptr }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<std::vector<double>, std::allocator<std::vector<double>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<double>, std::allocator<std::vector<double>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<double>, std::allocator<std::vector<double>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<double>, std::allocator<std::vector<double>>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"struct.sptk::RecursiveMaximumLikelihoodParameterGeneration::Buffer" = type { %"class.std::vector.0", %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector", %"class.std::vector.5", %"class.std::vector" }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.5" = type { %"struct.std::_Vector_base.6" }
%"struct.std::_Vector_base.6" = type { %"struct.std::_Vector_base<std::vector<std::vector<double>>, std::allocator<std::vector<std::vector<double>>>>::_Vector_impl" }
%"struct.std::_Vector_base<std::vector<std::vector<double>>, std::allocator<std::vector<std::vector<double>>>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::vector<std::vector<double>>, std::allocator<std::vector<std::vector<double>>>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::vector<std::vector<double>>, std::allocator<std::vector<std::vector<double>>>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@_ZN12_GLOBAL__N_14kInfE = external hidden constant double, align 8

; 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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4sptk45RecursiveMaximumLikelihoodParameterGeneration7ForwardEv(ptr noundef nonnull align 8 dereferenceable(232)) #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN4sptk45RecursiveMaximumLikelihoodParameterGeneration3GetEPSt6vectorIdSaIdEE(ptr noundef nonnull align 8 dereferenceable(232) %0, ptr noundef %1) unnamed_addr #3 align 2 {
  %3 = alloca i1, align 1
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca %"class.__gnu_cxx::__normal_iterator.10", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator.10", align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator.10", align 8
  %10 = alloca double, align 8
  %11 = alloca %"class.__gnu_cxx::__normal_iterator.10", align 8
  %12 = alloca %"class.__gnu_cxx::__normal_iterator.10", align 8
  %13 = alloca %"class.__gnu_cxx::__normal_iterator.10", align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  %19 = load ptr, ptr %4, align 8
  %20 = getelementptr inbounds %"class.sptk::RecursiveMaximumLikelihoodParameterGeneration", ptr %19, i32 0, i32 5
  %21 = load i8, ptr %20, align 8, !tbaa !9, !range !27, !noundef !28
  %22 = trunc i8 %21 to i1
  br i1 %22, label %23, label %26

23:                                               ; preds = %2
  %24 = load ptr, ptr %5, align 8, !tbaa !5
  %25 = icmp eq ptr null, %24
  br i1 %25, label %26, label %27

26:                                               ; preds = %23, %2
  store i1 false, ptr %3, align 1
  br label %134

27:                                               ; preds = %23
  %28 = getelementptr inbounds %"class.sptk::RecursiveMaximumLikelihoodParameterGeneration", ptr %19, i32 0, i32 4
  %29 = load ptr, ptr %28, align 8, !tbaa !29
  %30 = getelementptr inbounds %"class.sptk::RecursiveMaximumLikelihoodParameterGeneration", ptr %19, i32 0, i32 9
  %31 = getelementptr inbounds %"struct.sptk::RecursiveMaximumLikelihoodParameterGeneration::Buffer", ptr %30, i32 0, i32 0
  %32 = load ptr, ptr %29, align 8, !tbaa !30
  %33 = getelementptr inbounds ptr, ptr %32, i64 4
  %34 = load ptr, ptr %33, align 8
  %35 = call noundef zeroext i1 %34(ptr noundef nonnull align 8 dereferenceable(8) %29, ptr noundef %31)
  br i1 %35, label %85, label %36

36:                                               ; preds = %27
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  %37 = getelementptr inbounds %"class.sptk::RecursiveMaximumLikelihoodParameterGeneration", ptr %19, i32 0, i32 9
  %38 = getelementptr inbounds %"struct.sptk::RecursiveMaximumLikelihoodParameterGeneration::Buffer", ptr %37, i32 0, i32 0
  %39 = call noundef i64 @_ZNKSt6vectorIdSaIdEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %38) #4
  %40 = udiv i64 %39, 2
  %41 = trunc i64 %40 to i32
  store i32 %41, ptr %6, align 4, !tbaa !32
  %42 = getelementptr inbounds %"class.sptk::RecursiveMaximumLikelihoodParameterGeneration", ptr %19, i32 0, i32 9
  %43 = getelementptr inbounds %"struct.sptk::RecursiveMaximumLikelihoodParameterGeneration::Buffer", ptr %42, i32 0, i32 0
  %44 = call ptr @_ZNSt6vectorIdSaIdEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %43) #4
  %45 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.10", ptr %7, i32 0, i32 0
  store ptr %44, ptr %45, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  %46 = getelementptr inbounds %"class.sptk::RecursiveMaximumLikelihoodParameterGeneration", ptr %19, i32 0, i32 9
  %47 = getelementptr inbounds %"struct.sptk::RecursiveMaximumLikelihoodParameterGeneration::Buffer", ptr %46, i32 0, i32 0
  %48 = call ptr @_ZNSt6vectorIdSaIdEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %47) #4
  %49 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.10", ptr %9, i32 0, i32 0
  store ptr %48, ptr %49, align 8
  %50 = load i32, ptr %6, align 4, !tbaa !32
  %51 = sext i32 %50 to i64
  %52 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPdSt6vectorIdSaIdEEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %9, i64 noundef %51) #4
  %53 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.10", ptr %8, i32 0, i32 0
  store ptr %52, ptr %53, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  store double 0.000000e+00, ptr %10, align 8, !tbaa !33
  %54 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.10", ptr %7, i32 0, i32 0
  %55 = load ptr, ptr %54, align 8
  %56 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.10", ptr %8, i32 0, i32 0
  %57 = load ptr, ptr %56, align 8
  call void @_ZSt4fillIN9__gnu_cxx17__normal_iteratorIPdSt6vectorIdSaIdEEEEdEvT_S7_RKT0_(ptr %55, ptr %57, ptr noundef nonnull align 8 dereferenceable(8) %10)
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  %58 = getelementptr inbounds %"class.sptk::RecursiveMaximumLikelihoodParameterGeneration", ptr %19, i32 0, i32 9
  %59 = getelementptr inbounds %"struct.sptk::RecursiveMaximumLikelihoodParameterGeneration::Buffer", ptr %58, i32 0, i32 0
  %60 = call ptr @_ZNSt6vectorIdSaIdEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %59) #4
  %61 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.10", ptr %12, i32 0, i32 0
  store ptr %60, ptr %61, align 8
  %62 = load i32, ptr %6, align 4, !tbaa !32
  %63 = sext i32 %62 to i64
  %64 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPdSt6vectorIdSaIdEEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %12, i64 noundef %63) #4
  %65 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.10", ptr %11, i32 0, i32 0
  store ptr %64, ptr %65, align 8
  %66 = getelementptr inbounds %"class.sptk::RecursiveMaximumLikelihoodParameterGeneration", ptr %19, i32 0, i32 9
  %67 = getelementptr inbounds %"struct.sptk::RecursiveMaximumLikelihoodParameterGeneration::Buffer", ptr %66, i32 0, i32 0
  %68 = call ptr @_ZNSt6vectorIdSaIdEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %67) #4
  %69 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.10", ptr %13, i32 0, i32 0
  store ptr %68, ptr %69, align 8
  %70 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.10", ptr %11, i32 0, i32 0
  %71 = load ptr, ptr %70, align 8
  %72 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.10", ptr %13, i32 0, i32 0
  %73 = load ptr, ptr %72, align 8
  call void @_ZSt4fillIN9__gnu_cxx17__normal_iteratorIPdSt6vectorIdSaIdEEEEdEvT_S7_RKT0_(ptr %71, ptr %73, ptr noundef nonnull align 8 dereferenceable(8) @_ZN12_GLOBAL__N_14kInfE)
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  %74 = getelementptr inbounds %"class.sptk::RecursiveMaximumLikelihoodParameterGeneration", ptr %19, i32 0, i32 7
  %75 = load i32, ptr %74, align 8, !tbaa !35
  %76 = icmp sle i32 %75, 1
  br i1 %76, label %77, label %78

77:                                               ; preds = %36
  store i1 false, ptr %3, align 1
  store i32 1, ptr %14, align 4
  br label %82

78:                                               ; preds = %36
  %79 = getelementptr inbounds %"class.sptk::RecursiveMaximumLikelihoodParameterGeneration", ptr %19, i32 0, i32 7
  %80 = load i32, ptr %79, align 8, !tbaa !35
  %81 = add nsw i32 %80, -1
  store i32 %81, ptr %79, align 8, !tbaa !35
  store i32 0, ptr %14, align 4
  br label %82

82:                                               ; preds = %78, %77
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  %83 = load i32, ptr %14, align 4
  switch i32 %83, label %136 [
    i32 0, label %84
    i32 1, label %134
  ]

84:                                               ; preds = %82
  br label %85

85:                                               ; preds = %84, %27
  call void @_ZN4sptk45RecursiveMaximumLikelihoodParameterGeneration7ForwardEv(ptr noundef nonnull align 8 dereferenceable(232) %19)
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #4
  %86 = load ptr, ptr %19, align 8, !tbaa !30
  %87 = getelementptr inbounds ptr, ptr %86, i64 2
  %88 = load ptr, ptr %87, align 8
  %89 = call noundef i32 %88(ptr noundef nonnull align 8 dereferenceable(232) %19)
  store i32 %89, ptr %15, align 4, !tbaa !32
  %90 = load ptr, ptr %5, align 8, !tbaa !5
  %91 = call noundef i64 @_ZNKSt6vectorIdSaIdEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %90) #4
  %92 = load i32, ptr %15, align 4, !tbaa !32
  %93 = sext i32 %92 to i64
  %94 = icmp ne i64 %91, %93
  br i1 %94, label %95, label %99

95:                                               ; preds = %85
  %96 = load ptr, ptr %5, align 8, !tbaa !5
  %97 = load i32, ptr %15, align 4, !tbaa !32
  %98 = sext i32 %97 to i64
  call void @_ZNSt6vectorIdSaIdEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %96, i64 noundef %98)
  br label %99

99:                                               ; preds = %95, %85
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  %100 = getelementptr inbounds %"class.sptk::RecursiveMaximumLikelihoodParameterGeneration", ptr %19, i32 0, i32 8
  %101 = load i32, ptr %100, align 4, !tbaa !36
  %102 = getelementptr inbounds %"class.sptk::RecursiveMaximumLikelihoodParameterGeneration", ptr %19, i32 0, i32 2
  %103 = load i32, ptr %102, align 4, !tbaa !37
  %104 = sub nsw i32 %101, %103
  %105 = sub nsw i32 %104, 1
  %106 = getelementptr inbounds %"class.sptk::RecursiveMaximumLikelihoodParameterGeneration", ptr %19, i32 0, i32 6
  %107 = load i32, ptr %106, align 4, !tbaa !38
  %108 = srem i32 %105, %107
  store i32 %108, ptr %16, align 4, !tbaa !32
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #4
  %109 = load ptr, ptr %5, align 8, !tbaa !5
  %110 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %109, i64 noundef 0) #4
  store ptr %110, ptr %17, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  store i32 0, ptr %18, align 4, !tbaa !32
  br label %111

111:                                              ; preds = %130, %99
  %112 = load i32, ptr %18, align 4, !tbaa !32
  %113 = load i32, ptr %15, align 4, !tbaa !32
  %114 = icmp slt i32 %112, %113
  br i1 %114, label %116, label %115

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

116:                                              ; preds = %111
  %117 = getelementptr inbounds %"class.sptk::RecursiveMaximumLikelihoodParameterGeneration", ptr %19, i32 0, i32 9
  %118 = getelementptr inbounds %"struct.sptk::RecursiveMaximumLikelihoodParameterGeneration::Buffer", ptr %117, i32 0, i32 6
  %119 = load i32, ptr %18, align 4, !tbaa !32
  %120 = sext i32 %119 to i64
  %121 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IdSaIdEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %118, i64 noundef %120) #4
  %122 = load i32, ptr %16, align 4, !tbaa !32
  %123 = sext i32 %122 to i64
  %124 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %121, i64 noundef %123) #4
  %125 = load double, ptr %124, align 8, !tbaa !33
  %126 = load ptr, ptr %17, align 8, !tbaa !5
  %127 = load i32, ptr %18, align 4, !tbaa !32
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds double, ptr %126, i64 %128
  store double %125, ptr %129, align 8, !tbaa !33
  br label %130

130:                                              ; preds = %116
  %131 = load i32, ptr %18, align 4, !tbaa !32
  %132 = add nsw i32 %131, 1
  store i32 %132, ptr %18, align 4, !tbaa !32
  br label %111, !llvm.loop !39

133:                                              ; preds = %115
  store i1 true, ptr %3, align 1
  store i32 1, ptr %14, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  br label %134

134:                                              ; preds = %133, %82, %26
  %135 = load i1, ptr %3, align 1
  ret i1 %135

136:                                              ; preds = %82
  unreachable
}

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

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

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

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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 = { 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, !17, i64 48}
!10 = !{!"_ZTSN4sptk45RecursiveMaximumLikelihoodParameterGenerationE", !11, i64 0, !12, i64 8, !12, i64 12, !13, i64 16, !6, i64 40, !17, i64 48, !12, i64 52, !12, i64 56, !12, i64 60, !18, i64 64}
!11 = !{!"_ZTSN4sptk20InputSourceInterfaceE"}
!12 = !{!"int", !7, i64 0}
!13 = !{!"_ZTSSt6vectorIS_IdSaIdEESaIS1_EE", !14, i64 0}
!14 = !{!"_ZTSSt12_Vector_baseISt6vectorIdSaIdEESaIS2_EE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseISt6vectorIdSaIdEESaIS2_EE12_Vector_implE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseISt6vectorIdSaIdEESaIS2_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!17 = !{!"bool", !7, i64 0}
!18 = !{!"_ZTSN4sptk45RecursiveMaximumLikelihoodParameterGeneration6BufferE", !19, i64 0, !13, i64 24, !13, i64 48, !13, i64 72, !13, i64 96, !23, i64 120, !13, i64 144}
!19 = !{!"_ZTSSt6vectorIdSaIdEE", !20, i64 0}
!20 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !22, i64 0}
!22 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!23 = !{!"_ZTSSt6vectorIS_IS_IdSaIdEESaIS1_EESaIS3_EE", !24, i64 0}
!24 = !{!"_ZTSSt12_Vector_baseISt6vectorIS0_IdSaIdEESaIS2_EESaIS4_EE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseISt6vectorIS0_IdSaIdEESaIS2_EESaIS4_EE12_Vector_implE", !26, i64 0}
!26 = !{!"_ZTSNSt12_Vector_baseISt6vectorIS0_IdSaIdEESaIS2_EESaIS4_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!27 = !{i8 0, i8 2}
!28 = !{}
!29 = !{!10, !6, i64 40}
!30 = !{!31, !31, i64 0}
!31 = !{!"vtable pointer", !8, i64 0}
!32 = !{!12, !12, i64 0}
!33 = !{!34, !34, i64 0}
!34 = !{!"double", !7, i64 0}
!35 = !{!10, !12, i64 56}
!36 = !{!10, !12, i64 60}
!37 = !{!10, !12, i64 12}
!38 = !{!10, !12, i64 52}
!39 = distinct !{!39, !40}
!40 = !{!"llvm.loop.mustprogress"}


; 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.__gnu_cxx::__normal_iterator.10" = type { ptr }

@_ZN12_GLOBAL__N_14kInfE = external hidden constant double, align 8

; 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

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

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN4sptk45RecursiveMaximumLikelihoodParameterGeneration7ForwardEv(ptr noundef nonnull align 8 dereferenceable(232)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN4sptk45RecursiveMaximumLikelihoodParameterGeneration3GetEPSt6vectorIdSaIdEE(ptr noundef nonnull align 8 dereferenceable(232) %0, ptr noundef %1) unnamed_addr #3 align 2 {
  %3 = alloca %"class.__gnu_cxx::__normal_iterator.10", align 8
  %4 = alloca double, align 8
  %5 = alloca %"class.__gnu_cxx::__normal_iterator.10", align 8
  %6 = getelementptr inbounds i8, ptr %0, i64 48
  %7 = load i8, ptr %6, align 8, !tbaa !5, !range !26, !noundef !27
  %8 = trunc nuw i8 %7 to i1
  %9 = icmp ne ptr %1, null
  %or.cond.not = and i1 %9, %8
  br i1 %or.cond.not, label %10, label %.loopexit

10:                                               ; preds = %2
  %11 = getelementptr inbounds i8, ptr %0, i64 40
  %12 = load ptr, ptr %11, align 8, !tbaa !28
  %13 = getelementptr inbounds i8, ptr %0, i64 64
  %14 = load ptr, ptr %12, align 8, !tbaa !29
  %15 = getelementptr inbounds i8, ptr %14, i64 32
  %16 = load ptr, ptr %15, align 8
  %17 = tail call noundef zeroext i1 %16(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull %13)
  br i1 %17, label %32, label %18

18:                                               ; preds = %10
  %19 = tail call noundef i64 @_ZNKSt6vectorIdSaIdEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #4
  %20 = tail call ptr @_ZNSt6vectorIdSaIdEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #4
  %21 = tail call ptr @_ZNSt6vectorIdSaIdEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #4
  store ptr %21, ptr %3, align 8
  %22 = shl i64 %19, 31
  %23 = ashr i64 %22, 32
  %24 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPdSt6vectorIdSaIdEEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %3, i64 noundef %23) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  store double 0.000000e+00, ptr %4, align 8, !tbaa !31
  call void @_ZSt4fillIN9__gnu_cxx17__normal_iteratorIPdSt6vectorIdSaIdEEEEdEvT_S7_RKT0_(ptr %20, ptr %24, ptr noundef nonnull align 8 dereferenceable(8) %4)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #4
  %25 = call ptr @_ZNSt6vectorIdSaIdEE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #4
  store ptr %25, ptr %5, align 8
  %26 = call ptr @_ZNK9__gnu_cxx17__normal_iteratorIPdSt6vectorIdSaIdEEEplEl(ptr noundef nonnull align 8 dereferenceable(8) %5, i64 noundef %23) #4
  %27 = call ptr @_ZNSt6vectorIdSaIdEE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %13) #4
  call void @_ZSt4fillIN9__gnu_cxx17__normal_iteratorIPdSt6vectorIdSaIdEEEEdEvT_S7_RKT0_(ptr %26, ptr %27, ptr noundef nonnull align 8 dereferenceable(8) @_ZN12_GLOBAL__N_14kInfE)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #4
  %28 = getelementptr inbounds i8, ptr %0, i64 56
  %29 = load i32, ptr %28, align 8, !tbaa !33
  %30 = icmp slt i32 %29, 2
  br i1 %30, label %.loopexit, label %.thread

.thread:                                          ; preds = %18
  %31 = add nsw i32 %29, -1
  store i32 %31, ptr %28, align 8, !tbaa !33
  br label %32

32:                                               ; preds = %.thread, %10
  call void @_ZN4sptk45RecursiveMaximumLikelihoodParameterGeneration7ForwardEv(ptr noundef nonnull align 8 dereferenceable(232) %0)
  %33 = load ptr, ptr %0, align 8, !tbaa !29
  %34 = getelementptr inbounds i8, ptr %33, i64 16
  %35 = load ptr, ptr %34, align 8
  %36 = call noundef i32 %35(ptr noundef nonnull align 8 dereferenceable(232) %0)
  %37 = call noundef i64 @_ZNKSt6vectorIdSaIdEE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %1) #4
  %38 = sext i32 %36 to i64
  %.not = icmp eq i64 %37, %38
  br i1 %.not, label %40, label %39

39:                                               ; preds = %32
  call void @_ZNSt6vectorIdSaIdEE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef %38)
  br label %40

40:                                               ; preds = %39, %32
  %41 = getelementptr inbounds i8, ptr %0, i64 60
  %42 = load i32, ptr %41, align 4, !tbaa !34
  %43 = getelementptr inbounds i8, ptr %0, i64 12
  %44 = load i32, ptr %43, align 4, !tbaa !35
  %45 = getelementptr inbounds i8, ptr %0, i64 52
  %46 = load i32, ptr %45, align 4, !tbaa !36
  %47 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %1, i64 noundef 0) #4
  %48 = icmp sgt i32 %36, 0
  br i1 %48, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %40
  %49 = xor i32 %44, -1
  %50 = add i32 %42, %49
  %51 = srem i32 %50, %46
  %52 = getelementptr inbounds i8, ptr %0, i64 208
  %53 = sext i32 %51 to i64
  %wide.trip.count = zext nneg i32 %36 to i64
  br label %54

54:                                               ; preds = %.lr.ph, %54
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %54 ]
  %55 = call noundef nonnull align 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IdSaIdEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %52, i64 noundef %indvars.iv) #4
  %56 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %55, i64 noundef %53) #4
  %57 = load double, ptr %56, align 8, !tbaa !31
  %58 = getelementptr inbounds double, ptr %47, i64 %indvars.iv
  store double %57, ptr %58, align 8, !tbaa !31
  %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 %.loopexit, label %54, !llvm.loop !37

.loopexit:                                        ; preds = %54, %40, %18, %2
  %.1 = phi i1 [ false, %2 ], [ false, %18 ], [ true, %40 ], [ true, %54 ]
  ret i1 %.1
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(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 8 dereferenceable(24) ptr @_ZNSt6vectorIS_IdSaIdEESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 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 = { inlinehint mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 = { 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, !16, i64 48}
!6 = !{!"_ZTSN4sptk45RecursiveMaximumLikelihoodParameterGenerationE", !7, i64 0, !8, i64 8, !8, i64 12, !11, i64 16, !15, i64 40, !16, i64 48, !8, i64 52, !8, i64 56, !8, i64 60, !17, i64 64}
!7 = !{!"_ZTSN4sptk20InputSourceInterfaceE"}
!8 = !{!"int", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"_ZTSSt6vectorIS_IdSaIdEESaIS1_EE", !12, i64 0}
!12 = !{!"_ZTSSt12_Vector_baseISt6vectorIdSaIdEESaIS2_EE", !13, i64 0}
!13 = !{!"_ZTSNSt12_Vector_baseISt6vectorIdSaIdEESaIS2_EE12_Vector_implE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseISt6vectorIdSaIdEESaIS2_EE17_Vector_impl_dataE", !15, i64 0, !15, i64 8, !15, i64 16}
!15 = !{!"any pointer", !9, i64 0}
!16 = !{!"bool", !9, i64 0}
!17 = !{!"_ZTSN4sptk45RecursiveMaximumLikelihoodParameterGeneration6BufferE", !18, i64 0, !11, i64 24, !11, i64 48, !11, i64 72, !11, i64 96, !22, i64 120, !11, i64 144}
!18 = !{!"_ZTSSt6vectorIdSaIdEE", !19, i64 0}
!19 = !{!"_ZTSSt12_Vector_baseIdSaIdEE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE12_Vector_implE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIdSaIdEE17_Vector_impl_dataE", !15, i64 0, !15, i64 8, !15, i64 16}
!22 = !{!"_ZTSSt6vectorIS_IS_IdSaIdEESaIS1_EESaIS3_EE", !23, i64 0}
!23 = !{!"_ZTSSt12_Vector_baseISt6vectorIS0_IdSaIdEESaIS2_EESaIS4_EE", !24, i64 0}
!24 = !{!"_ZTSNSt12_Vector_baseISt6vectorIS0_IdSaIdEESaIS2_EESaIS4_EE12_Vector_implE", !25, i64 0}
!25 = !{!"_ZTSNSt12_Vector_baseISt6vectorIS0_IdSaIdEESaIS2_EESaIS4_EE17_Vector_impl_dataE", !15, i64 0, !15, i64 8, !15, i64 16}
!26 = !{i8 0, i8 2}
!27 = !{}
!28 = !{!6, !15, i64 40}
!29 = !{!30, !30, i64 0}
!30 = !{!"vtable pointer", !10, i64 0}
!31 = !{!32, !32, i64 0}
!32 = !{!"double", !9, i64 0}
!33 = !{!6, !8, i64 56}
!34 = !{!6, !8, i64 60}
!35 = !{!6, !8, i64 12}
!36 = !{!6, !8, i64 52}
!37 = distinct !{!37, !38}
!38 = !{!"llvm.loop.mustprogress"}


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