; LLVM IR from buresjan/optim_lbm :: nomad/src/Algos/Projection.ll (ZN9NOMAD_4_310Projection13buildIndexSetEm)

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

%"struct.std::pair" = type <{ %"struct.std::_Rb_tree_const_iterator", i8, [7 x i8] }>
%"struct.std::_Rb_tree_const_iterator" = type { ptr }
%"class.NOMAD_4_3::Projection" = type { %"class.NOMAD_4_3::Step.base", %"class.NOMAD_4_3::IterationUtils", %"class.std::set", i32, %"class.std::vector.23", %"class.std::shared_ptr.28", %"class.std::shared_ptr.31", %"class.std::set.34", i64 }
%"class.NOMAD_4_3::Step.base" = type <{ ptr, ptr, i32, [4 x i8], %"class.std::shared_ptr", %"class.std::shared_ptr.3", %"class.std::shared_ptr.6", %"class.NOMAD_4_3::SuccessStats", i32 }>
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.std::shared_ptr.3" = type { %"class.std::__shared_ptr.4" }
%"class.std::__shared_ptr.4" = type { ptr, %"class.std::__shared_count" }
%"class.std::shared_ptr.6" = type { %"class.std::__shared_ptr.7" }
%"class.std::__shared_ptr.7" = type { ptr, %"class.std::__shared_count" }
%"class.NOMAD_4_3::SuccessStats" = type { %"class.std::map", i64, i64 }
%"class.std::map" = type { %"class.std::_Rb_tree.9" }
%"class.std::_Rb_tree.9" = type { %"struct.std::_Rb_tree<std::pair<NOMAD_4_3::StepType, NOMAD_4_3::SuccessType>, std::pair<const std::pair<NOMAD_4_3::StepType, NOMAD_4_3::SuccessType>, unsigned long>, std::_Select1st<std::pair<const std::pair<NOMAD_4_3::StepType, NOMAD_4_3::SuccessType>, unsigned long>>, std::less<std::pair<NOMAD_4_3::StepType, NOMAD_4_3::SuccessType>>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<std::pair<NOMAD_4_3::StepType, NOMAD_4_3::SuccessType>, std::pair<const std::pair<NOMAD_4_3::StepType, NOMAD_4_3::SuccessType>, unsigned long>, std::_Select1st<std::pair<const std::pair<NOMAD_4_3::StepType, NOMAD_4_3::SuccessType>, unsigned long>>, std::less<std::pair<NOMAD_4_3::StepType, NOMAD_4_3::SuccessType>>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.NOMAD_4_3::IterationUtils" = type { ptr, %"class.std::set", i64, ptr, ptr, ptr, %"class.NOMAD_4_3::TrialPointStats", i8, i32 }
%"class.NOMAD_4_3::TrialPointStats" = type { ptr, %"class.std::vector", %"class.std::map.17", %"class.std::map.17", %"class.std::map.17", %"class.std::map.17", i64 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<NOMAD_4_3::EvalType, std::allocator<NOMAD_4_3::EvalType>>::_Vector_impl" }
%"struct.std::_Vector_base<NOMAD_4_3::EvalType, std::allocator<NOMAD_4_3::EvalType>>::_Vector_impl" = type { %"struct.std::_Vector_base<NOMAD_4_3::EvalType, std::allocator<NOMAD_4_3::EvalType>>::_Vector_impl_data" }
%"struct.std::_Vector_base<NOMAD_4_3::EvalType, std::allocator<NOMAD_4_3::EvalType>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::map.17" = type { %"class.std::_Rb_tree.18" }
%"class.std::_Rb_tree.18" = type { %"struct.std::_Rb_tree<NOMAD_4_3::EvalType, std::pair<const NOMAD_4_3::EvalType, unsigned long>, std::_Select1st<std::pair<const NOMAD_4_3::EvalType, unsigned long>>, std::less<NOMAD_4_3::EvalType>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<NOMAD_4_3::EvalType, std::pair<const NOMAD_4_3::EvalType, unsigned long>, std::_Select1st<std::pair<const NOMAD_4_3::EvalType, unsigned long>>, std::less<NOMAD_4_3::EvalType>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::set" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<NOMAD_4_3::EvalPoint, NOMAD_4_3::EvalPoint, std::_Identity<NOMAD_4_3::EvalPoint>, NOMAD_4_3::EvalPointCompare>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<NOMAD_4_3::EvalPoint, NOMAD_4_3::EvalPoint, std::_Identity<NOMAD_4_3::EvalPoint>, NOMAD_4_3::EvalPointCompare>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"class.std::vector.23" = type { %"struct.std::_Vector_base.24" }
%"struct.std::_Vector_base.24" = type { %"struct.std::_Vector_base<NOMAD_4_3::EvalPoint, std::allocator<NOMAD_4_3::EvalPoint>>::_Vector_impl" }
%"struct.std::_Vector_base<NOMAD_4_3::EvalPoint, std::allocator<NOMAD_4_3::EvalPoint>>::_Vector_impl" = type { %"struct.std::_Vector_base<NOMAD_4_3::EvalPoint, std::allocator<NOMAD_4_3::EvalPoint>>::_Vector_impl_data" }
%"struct.std::_Vector_base<NOMAD_4_3::EvalPoint, std::allocator<NOMAD_4_3::EvalPoint>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::shared_ptr.28" = type { %"class.std::__shared_ptr.29" }
%"class.std::__shared_ptr.29" = type { ptr, %"class.std::__shared_count" }
%"class.std::shared_ptr.31" = type { %"class.std::__shared_ptr.32" }
%"class.std::__shared_ptr.32" = type { ptr, %"class.std::__shared_count" }
%"class.std::set.34" = type { %"class.std::_Rb_tree.35" }
%"class.std::_Rb_tree.35" = type { %"struct.std::_Rb_tree<unsigned long, unsigned long, std::_Identity<unsigned long>, std::less<unsigned long>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<unsigned long, unsigned long, std::_Identity<unsigned long>, std::less<unsigned long>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }

; 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 uwtable
define dso_local void @_ZN9NOMAD_4_310Projection13buildIndexSetEm(ptr noundef nonnull align 8 dereferenceable(640) %0, i64 noundef %1) #1 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca i64, align 8
  %8 = alloca %"struct.std::pair", align 8
  %9 = alloca i64, align 8
  %10 = alloca %"struct.std::pair", align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store i64 %1, ptr %4, align 8, !tbaa !9
  %11 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #4
  %12 = load i64, ptr %4, align 8, !tbaa !9
  %13 = call noundef double @_ZSt3powIdmEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(double noundef 2.000000e+00, i64 noundef %12)
  %14 = fptoui double %13 to i64
  store i64 %14, ptr %5, align 8, !tbaa !9
  %15 = getelementptr inbounds %"class.NOMAD_4_3::Projection", ptr %11, i32 0, i32 8
  %16 = load i64, ptr %15, align 8, !tbaa !11
  %17 = uitofp i64 %16 to double
  %18 = load i64, ptr %5, align 8, !tbaa !9
  %19 = uitofp i64 %18 to double
  %20 = fmul double %19, 1.300000e+00
  %21 = fcmp olt double %17, %20
  br i1 %21, label %22, label %44

22:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #4
  store i64 0, ptr %6, align 8, !tbaa !9
  br label %23

23:                                               ; preds = %40, %22
  %24 = load i64, ptr %6, align 8, !tbaa !9
  %25 = getelementptr inbounds %"class.NOMAD_4_3::Projection", ptr %11, i32 0, i32 8
  %26 = load i64, ptr %25, align 8, !tbaa !11
  %27 = icmp ult i64 %24, %26
  br i1 %27, label %29, label %28

28:                                               ; preds = %23
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  br label %43

29:                                               ; preds = %23
  %30 = getelementptr inbounds %"class.NOMAD_4_3::Projection", ptr %11, i32 0, i32 7
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  %31 = call noundef i32 @_ZN9NOMAD_4_33RNG4randEv()
  %32 = zext i32 %31 to i64
  %33 = load i64, ptr %5, align 8, !tbaa !9
  %34 = urem i64 %32, %33
  store i64 %34, ptr %7, align 8, !tbaa !9
  %35 = call { ptr, i8 } @_ZNSt3setImSt4lessImESaImEE6insertEOm(ptr noundef nonnull align 8 dereferenceable(48) %30, ptr noundef nonnull align 8 dereferenceable(8) %7)
  %36 = getelementptr inbounds { ptr, i8 }, ptr %8, i32 0, i32 0
  %37 = extractvalue { ptr, i8 } %35, 0
  store ptr %37, ptr %36, align 8
  %38 = getelementptr inbounds { ptr, i8 }, ptr %8, i32 0, i32 1
  %39 = extractvalue { ptr, i8 } %35, 1
  store i8 %39, ptr %38, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  br label %40

40:                                               ; preds = %29
  %41 = load i64, ptr %6, align 8, !tbaa !9
  %42 = add i64 %41, 1
  store i64 %42, ptr %6, align 8, !tbaa !9
  br label %23, !llvm.loop !63

43:                                               ; preds = %28
  br label %61

44:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #4
  store i64 0, ptr %9, align 8, !tbaa !9
  br label %45

45:                                               ; preds = %57, %44
  %46 = load i64, ptr %9, align 8, !tbaa !9
  %47 = load i64, ptr %5, align 8, !tbaa !9
  %48 = icmp ult i64 %46, %47
  br i1 %48, label %50, label %49

49:                                               ; preds = %45
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #4
  br label %60

50:                                               ; preds = %45
  %51 = getelementptr inbounds %"class.NOMAD_4_3::Projection", ptr %11, i32 0, i32 7
  %52 = call { ptr, i8 } @_ZNSt3setImSt4lessImESaImEE6insertERKm(ptr noundef nonnull align 8 dereferenceable(48) %51, ptr noundef nonnull align 8 dereferenceable(8) %9)
  %53 = getelementptr inbounds { ptr, i8 }, ptr %10, i32 0, i32 0
  %54 = extractvalue { ptr, i8 } %52, 0
  store ptr %54, ptr %53, align 8
  %55 = getelementptr inbounds { ptr, i8 }, ptr %10, i32 0, i32 1
  %56 = extractvalue { ptr, i8 } %52, 1
  store i8 %56, ptr %55, align 8
  br label %57

57:                                               ; preds = %50
  %58 = load i64, ptr %9, align 8, !tbaa !9
  %59 = add i64 %58, 1
  store i64 %59, ptr %9, align 8, !tbaa !9
  br label %45, !llvm.loop !65

60:                                               ; preds = %49
  br label %61

61:                                               ; preds = %60, %43
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #4
  ret void
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt3powIdmEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(double noundef, i64 noundef) #2

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3setImSt4lessImESaImEE6insertEOm(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(8)) #1 align 2

declare noundef i32 @_ZN9NOMAD_4_33RNG4randEv() #3

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3setImSt4lessImESaImEE6insertERKm(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(8)) #1 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "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, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !10, i64 632}
!12 = !{!"_ZTSN9NOMAD_4_310ProjectionE", !13, i64 0, !32, i64 144, !33, i64 472, !49, i64 520, !50, i64 528, !54, i64 552, !56, i64 568, !58, i64 584, !10, i64 632}
!13 = !{!"_ZTSN9NOMAD_4_34StepE", !6, i64 8, !14, i64 16, !15, i64 24, !18, i64 40, !20, i64 56, !22, i64 72, !31, i64 136}
!14 = !{!"_ZTSN9NOMAD_4_38StepTypeE", !7, i64 0}
!15 = !{!"_ZTSSt10shared_ptrIN9NOMAD_4_314AllStopReasonsEE", !16, i64 0}
!16 = !{!"_ZTSSt12__shared_ptrIN9NOMAD_4_314AllStopReasonsELN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0, !17, i64 8}
!17 = !{!"_ZTSSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0}
!18 = !{!"_ZTSSt10shared_ptrIN9NOMAD_4_313RunParametersEE", !19, i64 0}
!19 = !{!"_ZTSSt12__shared_ptrIN9NOMAD_4_313RunParametersELN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0, !17, i64 8}
!20 = !{!"_ZTSSt10shared_ptrIN9NOMAD_4_312PbParametersEE", !21, i64 0}
!21 = !{!"_ZTSSt12__shared_ptrIN9NOMAD_4_312PbParametersELN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0, !17, i64 8}
!22 = !{!"_ZTSN9NOMAD_4_312SuccessStatsE", !23, i64 0, !10, i64 48, !10, i64 56}
!23 = !{!"_ZTSSt3mapISt4pairIN9NOMAD_4_38StepTypeENS1_11SuccessTypeEEmSt4lessIS4_ESaIS0_IKS4_mEEE", !24, i64 0}
!24 = !{!"_ZTSSt8_Rb_treeISt4pairIN9NOMAD_4_38StepTypeENS1_11SuccessTypeEES0_IKS4_mESt10_Select1stIS6_ESt4lessIS4_ESaIS6_EE", !25, i64 0}
!25 = !{!"_ZTSNSt8_Rb_treeISt4pairIN9NOMAD_4_38StepTypeENS1_11SuccessTypeEES0_IKS4_mESt10_Select1stIS6_ESt4lessIS4_ESaIS6_EE13_Rb_tree_implISA_Lb1EEE", !26, i64 0, !28, i64 8}
!26 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessISt4pairIN9NOMAD_4_38StepTypeENS2_11SuccessTypeEEEE", !27, i64 0}
!27 = !{!"_ZTSSt4lessISt4pairIN9NOMAD_4_38StepTypeENS1_11SuccessTypeEEE"}
!28 = !{!"_ZTSSt15_Rb_tree_header", !29, i64 0, !10, i64 32}
!29 = !{!"_ZTSSt18_Rb_tree_node_base", !30, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!30 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!31 = !{!"_ZTSN9NOMAD_4_311SuccessTypeE", !7, i64 0}
!32 = !{!"_ZTSN9NOMAD_4_314IterationUtilsE", !33, i64 8, !10, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !38, i64 88, !48, i64 320, !31, i64 324}
!33 = !{!"_ZTSSt3setIN9NOMAD_4_39EvalPointENS0_16EvalPointCompareESaIS1_EE", !34, i64 0}
!34 = !{!"_ZTSSt8_Rb_treeIN9NOMAD_4_39EvalPointES1_St9_IdentityIS1_ENS0_16EvalPointCompareESaIS1_EE", !35, i64 0}
!35 = !{!"_ZTSNSt8_Rb_treeIN9NOMAD_4_39EvalPointES1_St9_IdentityIS1_ENS0_16EvalPointCompareESaIS1_EE13_Rb_tree_implIS4_Lb1EEE", !36, i64 0, !28, i64 8}
!36 = !{!"_ZTSSt20_Rb_tree_key_compareIN9NOMAD_4_316EvalPointCompareEE", !37, i64 0}
!37 = !{!"_ZTSN9NOMAD_4_316EvalPointCompareE"}
!38 = !{!"_ZTSN9NOMAD_4_315TrialPointStatsE", !6, i64 0, !39, i64 8, !43, i64 32, !43, i64 80, !43, i64 128, !43, i64 176, !10, i64 224}
!39 = !{!"_ZTSSt6vectorIN9NOMAD_4_38EvalTypeESaIS1_EE", !40, i64 0}
!40 = !{!"_ZTSSt12_Vector_baseIN9NOMAD_4_38EvalTypeESaIS1_EE", !41, i64 0}
!41 = !{!"_ZTSNSt12_Vector_baseIN9NOMAD_4_38EvalTypeESaIS1_EE12_Vector_implE", !42, i64 0}
!42 = !{!"_ZTSNSt12_Vector_baseIN9NOMAD_4_38EvalTypeESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!43 = !{!"_ZTSSt3mapIN9NOMAD_4_38EvalTypeEmSt4lessIS1_ESaISt4pairIKS1_mEEE", !44, i64 0}
!44 = !{!"_ZTSSt8_Rb_treeIN9NOMAD_4_38EvalTypeESt4pairIKS1_mESt10_Select1stIS4_ESt4lessIS1_ESaIS4_EE", !45, i64 0}
!45 = !{!"_ZTSNSt8_Rb_treeIN9NOMAD_4_38EvalTypeESt4pairIKS1_mESt10_Select1stIS4_ESt4lessIS1_ESaIS4_EE13_Rb_tree_implIS8_Lb1EEE", !46, i64 0, !28, i64 8}
!46 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIN9NOMAD_4_38EvalTypeEEE", !47, i64 0}
!47 = !{!"_ZTSSt4lessIN9NOMAD_4_38EvalTypeEE"}
!48 = !{!"bool", !7, i64 0}
!49 = !{!"_ZTSN9NOMAD_4_311OutputLevelE", !7, i64 0}
!50 = !{!"_ZTSSt6vectorIN9NOMAD_4_39EvalPointESaIS1_EE", !51, i64 0}
!51 = !{!"_ZTSSt12_Vector_baseIN9NOMAD_4_39EvalPointESaIS1_EE", !52, i64 0}
!52 = !{!"_ZTSNSt12_Vector_baseIN9NOMAD_4_39EvalPointESaIS1_EE12_Vector_implE", !53, i64 0}
!53 = !{!"_ZTSNSt12_Vector_baseIN9NOMAD_4_39EvalPointESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!54 = !{!"_ZTSSt10shared_ptrIN9NOMAD_4_38MeshBaseEE", !55, i64 0}
!55 = !{!"_ZTSSt12__shared_ptrIN9NOMAD_4_38MeshBaseELN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0, !17, i64 8}
!56 = !{!"_ZTSSt10shared_ptrIN9NOMAD_4_39EvalPointEE", !57, i64 0}
!57 = !{!"_ZTSSt12__shared_ptrIN9NOMAD_4_39EvalPointELN9__gnu_cxx12_Lock_policyE2EE", !6, i64 0, !17, i64 8}
!58 = !{!"_ZTSSt3setImSt4lessImESaImEE", !59, i64 0}
!59 = !{!"_ZTSSt8_Rb_treeImmSt9_IdentityImESt4lessImESaImEE", !60, i64 0}
!60 = !{!"_ZTSNSt8_Rb_treeImmSt9_IdentityImESt4lessImESaImEE13_Rb_tree_implIS3_Lb1EEE", !61, i64 0, !28, i64 8}
!61 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessImEE", !62, i64 0}
!62 = !{!"_ZTSSt4lessImE"}
!63 = distinct !{!63, !64}
!64 = !{!"llvm.loop.mustprogress"}
!65 = distinct !{!65, !64}


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

; Function Attrs: mustprogress 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 uwtable
define dso_local void @_ZN9NOMAD_4_310Projection13buildIndexSetEm(ptr noundef nonnull align 8 dereferenceable(640) %0, i64 noundef %1) local_unnamed_addr #1 align 2 {
  %3 = alloca i64, align 8
  %4 = alloca i64, align 8
  %5 = tail call noundef double @_ZSt3powIdmEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(double noundef 2.000000e+00, i64 noundef %1)
  %6 = fptoui double %5 to i64
  %7 = getelementptr inbounds i8, ptr %0, i64 632
  %8 = load i64, ptr %7, align 8, !tbaa !5
  %9 = uitofp i64 %8 to double
  %10 = uitofp i64 %6 to double
  %11 = fmul double %10, 1.300000e+00
  %12 = fcmp ogt double %11, %9
  br i1 %12, label %.preheader, label %22

.preheader:                                       ; preds = %2
  %.not10 = icmp eq i64 %8, 0
  br i1 %.not10, label %.loopexit, label %.lr.ph9

.lr.ph9:                                          ; preds = %.preheader
  %13 = getelementptr inbounds i8, ptr %0, i64 584
  br label %14

14:                                               ; preds = %.lr.ph9, %14
  %.08 = phi i64 [ 0, %.lr.ph9 ], [ %19, %14 ]
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #4
  %15 = call noundef i32 @_ZN9NOMAD_4_33RNG4randEv()
  %16 = zext i32 %15 to i64
  %17 = urem i64 %16, %6
  store i64 %17, ptr %3, align 8, !tbaa !61
  %18 = call { ptr, i8 } @_ZNSt3setImSt4lessImESaImEE6insertEOm(ptr noundef nonnull align 8 dereferenceable(48) %13, ptr noundef nonnull align 8 dereferenceable(8) %3)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #4
  %19 = add nuw i64 %.08, 1
  %20 = load i64, ptr %7, align 8, !tbaa !5
  %21 = icmp ult i64 %19, %20
  br i1 %21, label %14, label %.loopexit, !llvm.loop !62

22:                                               ; preds = %2
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  store i64 0, ptr %4, align 8, !tbaa !61
  %.not = icmp eq i64 %6, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %22
  %23 = getelementptr inbounds i8, ptr %0, i64 584
  br label %24

._crit_edge:                                      ; preds = %24, %22
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  br label %.loopexit

24:                                               ; preds = %.lr.ph, %24
  %25 = call { ptr, i8 } @_ZNSt3setImSt4lessImESaImEE6insertERKm(ptr noundef nonnull align 8 dereferenceable(48) %23, ptr noundef nonnull align 8 dereferenceable(8) %4)
  %26 = load i64, ptr %4, align 8, !tbaa !61
  %27 = add i64 %26, 1
  store i64 %27, ptr %4, align 8, !tbaa !61
  %28 = icmp ult i64 %27, %6
  br i1 %28, label %24, label %._crit_edge, !llvm.loop !64

.loopexit:                                        ; preds = %14, %.preheader, %._crit_edge
  ret void
}

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef double @_ZSt3powIdmEN9__gnu_cxx9__promoteIDTplcvNS1_IT_Xsr3std12__is_integerIS2_EE7__valueEE6__typeELi0EcvNS1_IT0_Xsr3std12__is_integerIS5_EE7__valueEE6__typeELi0EEXsr3std12__is_integerIS8_EE7__valueEE6__typeES2_S5_(double noundef, i64 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3setImSt4lessImESaImEE6insertEOm(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

declare noundef i32 @_ZN9NOMAD_4_33RNG4randEv() local_unnamed_addr #3

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i8 } @_ZNSt3setImSt4lessImESaImEE6insertERKm(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { inlinehint mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { "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, !28, i64 632}
!6 = !{!"_ZTSN9NOMAD_4_310ProjectionE", !7, i64 0, !30, i64 144, !31, i64 472, !47, i64 520, !48, i64 528, !52, i64 552, !54, i64 568, !56, i64 584, !28, i64 632}
!7 = !{!"_ZTSN9NOMAD_4_34StepE", !8, i64 8, !11, i64 16, !12, i64 24, !15, i64 40, !17, i64 56, !19, i64 72, !29, i64 136}
!8 = !{!"any pointer", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"_ZTSN9NOMAD_4_38StepTypeE", !9, i64 0}
!12 = !{!"_ZTSSt10shared_ptrIN9NOMAD_4_314AllStopReasonsEE", !13, i64 0}
!13 = !{!"_ZTSSt12__shared_ptrIN9NOMAD_4_314AllStopReasonsELN9__gnu_cxx12_Lock_policyE2EE", !8, i64 0, !14, i64 8}
!14 = !{!"_ZTSSt14__shared_countILN9__gnu_cxx12_Lock_policyE2EE", !8, i64 0}
!15 = !{!"_ZTSSt10shared_ptrIN9NOMAD_4_313RunParametersEE", !16, i64 0}
!16 = !{!"_ZTSSt12__shared_ptrIN9NOMAD_4_313RunParametersELN9__gnu_cxx12_Lock_policyE2EE", !8, i64 0, !14, i64 8}
!17 = !{!"_ZTSSt10shared_ptrIN9NOMAD_4_312PbParametersEE", !18, i64 0}
!18 = !{!"_ZTSSt12__shared_ptrIN9NOMAD_4_312PbParametersELN9__gnu_cxx12_Lock_policyE2EE", !8, i64 0, !14, i64 8}
!19 = !{!"_ZTSN9NOMAD_4_312SuccessStatsE", !20, i64 0, !28, i64 48, !28, i64 56}
!20 = !{!"_ZTSSt3mapISt4pairIN9NOMAD_4_38StepTypeENS1_11SuccessTypeEEmSt4lessIS4_ESaIS0_IKS4_mEEE", !21, i64 0}
!21 = !{!"_ZTSSt8_Rb_treeISt4pairIN9NOMAD_4_38StepTypeENS1_11SuccessTypeEES0_IKS4_mESt10_Select1stIS6_ESt4lessIS4_ESaIS6_EE", !22, i64 0}
!22 = !{!"_ZTSNSt8_Rb_treeISt4pairIN9NOMAD_4_38StepTypeENS1_11SuccessTypeEES0_IKS4_mESt10_Select1stIS6_ESt4lessIS4_ESaIS6_EE13_Rb_tree_implISA_Lb1EEE", !23, i64 0, !25, i64 8}
!23 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessISt4pairIN9NOMAD_4_38StepTypeENS2_11SuccessTypeEEEE", !24, i64 0}
!24 = !{!"_ZTSSt4lessISt4pairIN9NOMAD_4_38StepTypeENS1_11SuccessTypeEEE"}
!25 = !{!"_ZTSSt15_Rb_tree_header", !26, i64 0, !28, i64 32}
!26 = !{!"_ZTSSt18_Rb_tree_node_base", !27, i64 0, !8, i64 8, !8, i64 16, !8, i64 24}
!27 = !{!"_ZTSSt14_Rb_tree_color", !9, i64 0}
!28 = !{!"long", !9, i64 0}
!29 = !{!"_ZTSN9NOMAD_4_311SuccessTypeE", !9, i64 0}
!30 = !{!"_ZTSN9NOMAD_4_314IterationUtilsE", !31, i64 8, !28, i64 56, !8, i64 64, !8, i64 72, !8, i64 80, !36, i64 88, !46, i64 320, !29, i64 324}
!31 = !{!"_ZTSSt3setIN9NOMAD_4_39EvalPointENS0_16EvalPointCompareESaIS1_EE", !32, i64 0}
!32 = !{!"_ZTSSt8_Rb_treeIN9NOMAD_4_39EvalPointES1_St9_IdentityIS1_ENS0_16EvalPointCompareESaIS1_EE", !33, i64 0}
!33 = !{!"_ZTSNSt8_Rb_treeIN9NOMAD_4_39EvalPointES1_St9_IdentityIS1_ENS0_16EvalPointCompareESaIS1_EE13_Rb_tree_implIS4_Lb1EEE", !34, i64 0, !25, i64 8}
!34 = !{!"_ZTSSt20_Rb_tree_key_compareIN9NOMAD_4_316EvalPointCompareEE", !35, i64 0}
!35 = !{!"_ZTSN9NOMAD_4_316EvalPointCompareE"}
!36 = !{!"_ZTSN9NOMAD_4_315TrialPointStatsE", !8, i64 0, !37, i64 8, !41, i64 32, !41, i64 80, !41, i64 128, !41, i64 176, !28, i64 224}
!37 = !{!"_ZTSSt6vectorIN9NOMAD_4_38EvalTypeESaIS1_EE", !38, i64 0}
!38 = !{!"_ZTSSt12_Vector_baseIN9NOMAD_4_38EvalTypeESaIS1_EE", !39, i64 0}
!39 = !{!"_ZTSNSt12_Vector_baseIN9NOMAD_4_38EvalTypeESaIS1_EE12_Vector_implE", !40, i64 0}
!40 = !{!"_ZTSNSt12_Vector_baseIN9NOMAD_4_38EvalTypeESaIS1_EE17_Vector_impl_dataE", !8, i64 0, !8, i64 8, !8, i64 16}
!41 = !{!"_ZTSSt3mapIN9NOMAD_4_38EvalTypeEmSt4lessIS1_ESaISt4pairIKS1_mEEE", !42, i64 0}
!42 = !{!"_ZTSSt8_Rb_treeIN9NOMAD_4_38EvalTypeESt4pairIKS1_mESt10_Select1stIS4_ESt4lessIS1_ESaIS4_EE", !43, i64 0}
!43 = !{!"_ZTSNSt8_Rb_treeIN9NOMAD_4_38EvalTypeESt4pairIKS1_mESt10_Select1stIS4_ESt4lessIS1_ESaIS4_EE13_Rb_tree_implIS8_Lb1EEE", !44, i64 0, !25, i64 8}
!44 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIN9NOMAD_4_38EvalTypeEEE", !45, i64 0}
!45 = !{!"_ZTSSt4lessIN9NOMAD_4_38EvalTypeEE"}
!46 = !{!"bool", !9, i64 0}
!47 = !{!"_ZTSN9NOMAD_4_311OutputLevelE", !9, i64 0}
!48 = !{!"_ZTSSt6vectorIN9NOMAD_4_39EvalPointESaIS1_EE", !49, i64 0}
!49 = !{!"_ZTSSt12_Vector_baseIN9NOMAD_4_39EvalPointESaIS1_EE", !50, i64 0}
!50 = !{!"_ZTSNSt12_Vector_baseIN9NOMAD_4_39EvalPointESaIS1_EE12_Vector_implE", !51, i64 0}
!51 = !{!"_ZTSNSt12_Vector_baseIN9NOMAD_4_39EvalPointESaIS1_EE17_Vector_impl_dataE", !8, i64 0, !8, i64 8, !8, i64 16}
!52 = !{!"_ZTSSt10shared_ptrIN9NOMAD_4_38MeshBaseEE", !53, i64 0}
!53 = !{!"_ZTSSt12__shared_ptrIN9NOMAD_4_38MeshBaseELN9__gnu_cxx12_Lock_policyE2EE", !8, i64 0, !14, i64 8}
!54 = !{!"_ZTSSt10shared_ptrIN9NOMAD_4_39EvalPointEE", !55, i64 0}
!55 = !{!"_ZTSSt12__shared_ptrIN9NOMAD_4_39EvalPointELN9__gnu_cxx12_Lock_policyE2EE", !8, i64 0, !14, i64 8}
!56 = !{!"_ZTSSt3setImSt4lessImESaImEE", !57, i64 0}
!57 = !{!"_ZTSSt8_Rb_treeImmSt9_IdentityImESt4lessImESaImEE", !58, i64 0}
!58 = !{!"_ZTSNSt8_Rb_treeImmSt9_IdentityImESt4lessImESaImEE13_Rb_tree_implIS3_Lb1EEE", !59, i64 0, !25, i64 8}
!59 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessImEE", !60, i64 0}
!60 = !{!"_ZTSSt4lessImE"}
!61 = !{!28, !28, i64 0}
!62 = distinct !{!62, !63}
!63 = !{!"llvm.loop.mustprogress"}
!64 = distinct !{!64, !63}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass