; LLVM IR from buresjan/optim_lbm :: nomad/ext/sgtelib/src/Surrogate.ll (ZN7SGTELIB9Surrogate14eval_objectiveEv)

; 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.SGTELIB::Surrogate" = type <{ ptr, ptr, %"class.SGTELIB::Surrogate_Parameters", i32, i32, i32, i32, i32, i32, i8, [7 x i8], ptr, ptr, ptr, ptr, %"class.std::__cxx11::list", %"class.std::map", double, %"class.std::basic_ofstream", i8, [7 x i8] }>
%"class.SGTELIB::Surrogate_Parameters" = type { ptr, i32, i32, i32, i32, i32, double, i32, double, i32, i32, i32, %"class.SGTELIB::Matrix", i32, i32, i32, double, double, double, double, %"class.SGTELIB::Matrix", i32, i32, %"class.std::__cxx11::basic_string", %"class.std::__cxx11::basic_string", i32, i32 }
%"class.SGTELIB::Matrix" = type { ptr, %"class.std::__cxx11::basic_string", i32, i32, ptr }
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }
%"class.std::__cxx11::list" = type { %"class.std::__cxx11::_List_base" }
%"class.std::__cxx11::_List_base" = type { %"struct.std::__cxx11::_List_base<int, std::allocator<int>>::_List_impl" }
%"struct.std::__cxx11::_List_base<int, std::allocator<int>>::_List_impl" = type { %"struct.std::__detail::_List_node_header" }
%"struct.std::__detail::_List_node_header" = type { %"struct.std::__detail::_List_node_base", i64 }
%"struct.std::__detail::_List_node_base" = type { ptr, ptr }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<SGTELIB::metric_t, std::pair<const SGTELIB::metric_t, SGTELIB::Matrix>, std::_Select1st<std::pair<const SGTELIB::metric_t, SGTELIB::Matrix>>, std::less<SGTELIB::metric_t>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<SGTELIB::metric_t, std::pair<const SGTELIB::metric_t, SGTELIB::Matrix>, std::_Select1st<std::pair<const SGTELIB::metric_t, SGTELIB::Matrix>>, std::less<SGTELIB::metric_t>>::_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.std::basic_ofstream" = type { %"class.std::basic_ostream.base", %"class.std::basic_filebuf", %"class.std::basic_ios" }
%"class.std::basic_ostream.base" = type { ptr }
%"class.std::basic_filebuf" = type { %"class.std::basic_streambuf", %union.pthread_mutex_t, %"class.std::__basic_file", i32, %struct.__mbstate_t, %struct.__mbstate_t, %struct.__mbstate_t, ptr, i64, i8, i8, i8, i8, ptr, ptr, i8, ptr, ptr, i64, ptr, ptr }
%"class.std::basic_streambuf" = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, %"class.std::locale" }
%"class.std::locale" = type { ptr }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%"class.std::__basic_file" = type <{ ptr, i8, [7 x i8] }>
%struct.__mbstate_t = type { i32, %union.anon.6 }
%union.anon.6 = type { i32 }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZN7SGTELIB9Surrogate10get_metricENS_8metric_tEi(ptr noundef nonnull align 8 dereferenceable(985), i32 noundef, i32 noundef) #2 align 2

declare noundef zeroext i1 @_ZN7SGTELIB24one_metric_value_per_bboENS_8metric_tE(i32 noundef) #3

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZSt5isnand(double noundef) #1

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_ZN7SGTELIB9Surrogate14eval_objectiveEv(ptr noundef nonnull align 8 dereferenceable(985) %0) #2 align 2 {
  %2 = alloca double, align 8
  %3 = alloca ptr, align 8
  %4 = alloca i8, align 1
  %5 = alloca i32, align 4
  %6 = alloca i32, align 4
  %7 = alloca double, align 8
  %8 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  %9 = load ptr, ptr %3, align 8
  call void @_ZN7SGTELIB9Surrogate13reset_metricsEv(ptr noundef nonnull align 8 dereferenceable(985) %9)
  call void @llvm.lifetime.start.p0(i64 1, ptr %4) #4
  %10 = load ptr, ptr %9, align 8, !tbaa !9
  %11 = getelementptr inbounds ptr, ptr %10, i64 0
  %12 = load ptr, ptr %11, align 8
  %13 = call noundef zeroext i1 %12(ptr noundef nonnull align 8 dereferenceable(985) %9)
  %14 = zext i1 %13 to i8
  store i8 %14, ptr %4, align 1, !tbaa !11
  %15 = load i8, ptr %4, align 1, !tbaa !11, !range !13, !noundef !14
  %16 = trunc i8 %15 to i1
  br i1 %16, label %18, label %17

17:                                               ; preds = %1
  store double 0x7FEFFFFFFFFFFFFF, ptr %2, align 8
  store i32 1, ptr %5, align 4
  br label %54

18:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #4
  %19 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %9, i32 0, i32 2
  %20 = call noundef i32 @_ZNK7SGTELIB20Surrogate_Parameters15get_metric_typeEv(ptr noundef nonnull align 8 dereferenceable(312) %19)
  store i32 %20, ptr %6, align 4, !tbaa !15
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #4
  store double 0.000000e+00, ptr %7, align 8, !tbaa !17
  %21 = load i32, ptr %6, align 4, !tbaa !15
  %22 = call noundef zeroext i1 @_ZN7SGTELIB24one_metric_value_per_bboENS_8metric_tE(i32 noundef %21)
  br i1 %22, label %23, label %40

23:                                               ; preds = %18
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #4
  store i32 0, ptr %8, align 4, !tbaa !19
  br label %24

24:                                               ; preds = %36, %23
  %25 = load i32, ptr %8, align 4, !tbaa !19
  %26 = getelementptr inbounds %"class.SGTELIB::Surrogate", ptr %9, i32 0, i32 4
  %27 = load i32, ptr %26, align 4, !tbaa !21
  %28 = icmp slt i32 %25, %27
  br i1 %28, label %30, label %29

29:                                               ; preds = %24
  store i32 2, ptr %5, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #4
  br label %39

30:                                               ; preds = %24
  %31 = load i32, ptr %6, align 4, !tbaa !15
  %32 = load i32, ptr %8, align 4, !tbaa !19
  %33 = call noundef double @_ZN7SGTELIB9Surrogate10get_metricENS_8metric_tEi(ptr noundef nonnull align 8 dereferenceable(985) %9, i32 noundef %31, i32 noundef %32)
  %34 = load double, ptr %7, align 8, !tbaa !17
  %35 = fadd double %34, %33
  store double %35, ptr %7, align 8, !tbaa !17
  br label %36

36:                                               ; preds = %30
  %37 = load i32, ptr %8, align 4, !tbaa !19
  %38 = add nsw i32 %37, 1
  store i32 %38, ptr %8, align 4, !tbaa !19
  br label %24, !llvm.loop !55

39:                                               ; preds = %29
  br label %43

40:                                               ; preds = %18
  %41 = load i32, ptr %6, align 4, !tbaa !15
  %42 = call noundef double @_ZN7SGTELIB9Surrogate10get_metricENS_8metric_tEi(ptr noundef nonnull align 8 dereferenceable(985) %9, i32 noundef %41, i32 noundef 0)
  store double %42, ptr %7, align 8, !tbaa !17
  br label %43

43:                                               ; preds = %40, %39
  %44 = load double, ptr %7, align 8, !tbaa !17
  %45 = call noundef zeroext i1 @_ZSt5isnand(double noundef %44)
  br i1 %45, label %46, label %47

46:                                               ; preds = %43
  store double 0x7FEFFFFFFFFFFFFF, ptr %2, align 8
  store i32 1, ptr %5, align 4
  br label %53

47:                                               ; preds = %43
  %48 = load double, ptr %7, align 8, !tbaa !17
  %49 = call noundef zeroext i1 @_ZSt5isinfd(double noundef %48)
  br i1 %49, label %50, label %51

50:                                               ; preds = %47
  store double 0x7FEFFFFFFFFFFFFF, ptr %2, align 8
  store i32 1, ptr %5, align 4
  br label %53

51:                                               ; preds = %47
  %52 = load double, ptr %7, align 8, !tbaa !17
  store double %52, ptr %2, align 8
  store i32 1, ptr %5, align 4
  br label %53

53:                                               ; preds = %51, %50, %46
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #4
  br label %54

54:                                               ; preds = %53, %17
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #4
  %55 = load double, ptr %2, align 8
  ret double %55
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZSt5isinfd(double noundef) #1

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 = { 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 = { "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 = !{!"vtable pointer", !8, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}
!15 = !{!16, !16, i64 0}
!16 = !{!"_ZTSN7SGTELIB8metric_tE", !7, i64 0}
!17 = !{!18, !18, i64 0}
!18 = !{!"double", !7, i64 0}
!19 = !{!20, !20, i64 0}
!20 = !{!"int", !7, i64 0}
!21 = !{!22, !20, i64 332}
!22 = !{!"_ZTSN7SGTELIB9SurrogateE", !6, i64 8, !23, i64 16, !20, i64 328, !20, i64 332, !20, i64 336, !20, i64 340, !20, i64 344, !20, i64 348, !12, i64 352, !6, i64 360, !6, i64 368, !6, i64 376, !6, i64 384, !34, i64 392, !39, i64 416, !18, i64 464, !47, i64 472, !12, i64 984}
!23 = !{!"_ZTSN7SGTELIB20Surrogate_ParametersE", !24, i64 8, !20, i64 12, !25, i64 16, !26, i64 20, !25, i64 24, !18, i64 32, !25, i64 40, !18, i64 48, !25, i64 56, !27, i64 60, !25, i64 64, !28, i64 72, !32, i64 128, !25, i64 132, !33, i64 136, !18, i64 144, !18, i64 152, !18, i64 160, !18, i64 168, !28, i64 176, !25, i64 232, !16, i64 236, !29, i64 240, !29, i64 272, !20, i64 304, !20, i64 308}
!24 = !{!"_ZTSN7SGTELIB7model_tE", !7, i64 0}
!25 = !{!"_ZTSN7SGTELIB14param_status_tE", !7, i64 0}
!26 = !{!"_ZTSN7SGTELIB8kernel_tE", !7, i64 0}
!27 = !{!"_ZTSN7SGTELIB10distance_tE", !7, i64 0}
!28 = !{!"_ZTSN7SGTELIB6MatrixE", !29, i64 8, !20, i64 40, !20, i64 44, !6, i64 48}
!29 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !30, i64 0, !31, i64 8, !7, i64 16}
!30 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!31 = !{!"long", !7, i64 0}
!32 = !{!"_ZTSN7SGTELIB8weight_tE", !7, i64 0}
!33 = !{!"_ZTSN7SGTELIB13uncertainty_tE", !7, i64 0}
!34 = !{!"_ZTSNSt7__cxx114listIiSaIiEEE", !35, i64 0}
!35 = !{!"_ZTSNSt7__cxx1110_List_baseIiSaIiEEE", !36, i64 0}
!36 = !{!"_ZTSNSt7__cxx1110_List_baseIiSaIiEE10_List_implE", !37, i64 0}
!37 = !{!"_ZTSNSt8__detail17_List_node_headerE", !38, i64 0, !31, i64 16}
!38 = !{!"_ZTSNSt8__detail15_List_node_baseE", !6, i64 0, !6, i64 8}
!39 = !{!"_ZTSSt3mapIN7SGTELIB8metric_tENS0_6MatrixESt4lessIS1_ESaISt4pairIKS1_S2_EEE", !40, i64 0}
!40 = !{!"_ZTSSt8_Rb_treeIN7SGTELIB8metric_tESt4pairIKS1_NS0_6MatrixEESt10_Select1stIS5_ESt4lessIS1_ESaIS5_EE", !41, i64 0}
!41 = !{!"_ZTSNSt8_Rb_treeIN7SGTELIB8metric_tESt4pairIKS1_NS0_6MatrixEESt10_Select1stIS5_ESt4lessIS1_ESaIS5_EE13_Rb_tree_implIS9_Lb1EEE", !42, i64 0, !44, i64 8}
!42 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIN7SGTELIB8metric_tEEE", !43, i64 0}
!43 = !{!"_ZTSSt4lessIN7SGTELIB8metric_tEE"}
!44 = !{!"_ZTSSt15_Rb_tree_header", !45, i64 0, !31, i64 32}
!45 = !{!"_ZTSSt18_Rb_tree_node_base", !46, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!46 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!47 = !{!"_ZTSSt14basic_ofstreamIcSt11char_traitsIcEE", !48, i64 0, !49, i64 8}
!48 = !{!"_ZTSSo"}
!49 = !{!"_ZTSSt13basic_filebufIcSt11char_traitsIcEE", !50, i64 0, !7, i64 64, !52, i64 104, !53, i64 120, !54, i64 124, !54, i64 132, !54, i64 140, !6, i64 152, !31, i64 160, !12, i64 168, !12, i64 169, !12, i64 170, !7, i64 171, !6, i64 176, !6, i64 184, !12, i64 192, !6, i64 200, !6, i64 208, !31, i64 216, !6, i64 224, !6, i64 232}
!50 = !{!"_ZTSSt15basic_streambufIcSt11char_traitsIcEE", !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !51, i64 56}
!51 = !{!"_ZTSSt6locale", !6, i64 0}
!52 = !{!"_ZTSSt12__basic_fileIcE", !6, i64 0, !12, i64 8}
!53 = !{!"_ZTSSt13_Ios_Openmode", !7, i64 0}
!54 = !{!"_ZTS11__mbstate_t", !20, i64 0, !7, i64 4}
!55 = distinct !{!55, !56}
!56 = !{!"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"

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7SGTELIB9Surrogate13reset_metricsEv(ptr noundef nonnull align 8 dereferenceable(985)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
declare dso_local noundef double @_ZN7SGTELIB9Surrogate10get_metricENS_8metric_tEi(ptr noundef nonnull align 8 dereferenceable(985), i32 noundef, i32 noundef) local_unnamed_addr #1 align 2

declare noundef zeroext i1 @_ZN7SGTELIB24one_metric_value_per_bboENS_8metric_tE(i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZSt5isnand(double noundef) local_unnamed_addr #0

; Function Attrs: mustprogress uwtable
define dso_local noundef double @_ZN7SGTELIB9Surrogate14eval_objectiveEv(ptr noundef nonnull align 8 dereferenceable(985) %0) local_unnamed_addr #1 align 2 {
  tail call void @_ZN7SGTELIB9Surrogate13reset_metricsEv(ptr noundef nonnull align 8 dereferenceable(985) %0)
  %2 = load ptr, ptr %0, align 8, !tbaa !5
  %3 = load ptr, ptr %2, align 8
  %4 = tail call noundef zeroext i1 %3(ptr noundef nonnull align 8 dereferenceable(985) %0)
  br i1 %4, label %5, label %22

5:                                                ; preds = %1
  %6 = getelementptr inbounds i8, ptr %0, i64 16
  %7 = tail call noundef i32 @_ZNK7SGTELIB20Surrogate_Parameters15get_metric_typeEv(ptr noundef nonnull align 8 dereferenceable(312) %6)
  %8 = tail call noundef zeroext i1 @_ZN7SGTELIB24one_metric_value_per_bboENS_8metric_tE(i32 noundef %7)
  br i1 %8, label %.preheader, label %17

.preheader:                                       ; preds = %5
  %9 = getelementptr inbounds i8, ptr %0, i64 332
  %10 = load i32, ptr %9, align 4, !tbaa !8
  %11 = icmp sgt i32 %10, 0
  br i1 %11, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %.preheader, %.lr.ph
  %.016 = phi i32 [ %14, %.lr.ph ], [ 0, %.preheader ]
  %.01215 = phi double [ %13, %.lr.ph ], [ 0.000000e+00, %.preheader ]
  %12 = tail call noundef double @_ZN7SGTELIB9Surrogate10get_metricENS_8metric_tEi(ptr noundef nonnull align 8 dereferenceable(985) %0, i32 noundef %7, i32 noundef %.016)
  %13 = fadd double %.01215, %12
  %14 = add nuw nsw i32 %.016, 1
  %15 = load i32, ptr %9, align 4, !tbaa !8
  %16 = icmp slt i32 %14, %15
  br i1 %16, label %.lr.ph, label %.loopexit, !llvm.loop !48

17:                                               ; preds = %5
  %18 = tail call noundef double @_ZN7SGTELIB9Surrogate10get_metricENS_8metric_tEi(ptr noundef nonnull align 8 dereferenceable(985) %0, i32 noundef %7, i32 noundef 0)
  br label %.loopexit

.loopexit:                                        ; preds = %.lr.ph, %.preheader, %17
  %.1 = phi double [ %18, %17 ], [ 0.000000e+00, %.preheader ], [ %13, %.lr.ph ]
  %19 = tail call noundef zeroext i1 @_ZSt5isnand(double noundef %.1)
  br i1 %19, label %22, label %20

20:                                               ; preds = %.loopexit
  %21 = tail call noundef zeroext i1 @_ZSt5isinfd(double noundef %.1)
  %..1 = select i1 %21, double 0x7FEFFFFFFFFFFFFF, double %.1
  br label %22

22:                                               ; preds = %.loopexit, %20, %1
  %.114 = phi double [ 0x7FEFFFFFFFFFFFFF, %1 ], [ 0x7FEFFFFFFFFFFFFF, %.loopexit ], [ %..1, %20 ]
  ret double %.114
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i32 @_ZNK7SGTELIB20Surrogate_Parameters15get_metric_typeEv(ptr noundef nonnull align 8 dereferenceable(312)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZSt5isinfd(double noundef) local_unnamed_addr #0

attributes #0 = { 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 #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 = { "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" }

!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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !14, i64 332}
!9 = !{!"_ZTSN7SGTELIB9SurrogateE", !10, i64 8, !12, i64 16, !14, i64 328, !14, i64 332, !14, i64 336, !14, i64 340, !14, i64 344, !14, i64 348, !26, i64 352, !10, i64 360, !10, i64 368, !10, i64 376, !10, i64 384, !27, i64 392, !32, i64 416, !17, i64 464, !40, i64 472, !26, i64 984}
!10 = !{!"any pointer", !11, i64 0}
!11 = !{!"omnipotent char", !7, i64 0}
!12 = !{!"_ZTSN7SGTELIB20Surrogate_ParametersE", !13, i64 8, !14, i64 12, !15, i64 16, !16, i64 20, !15, i64 24, !17, i64 32, !15, i64 40, !17, i64 48, !15, i64 56, !18, i64 60, !15, i64 64, !19, i64 72, !23, i64 128, !15, i64 132, !24, i64 136, !17, i64 144, !17, i64 152, !17, i64 160, !17, i64 168, !19, i64 176, !15, i64 232, !25, i64 236, !20, i64 240, !20, i64 272, !14, i64 304, !14, i64 308}
!13 = !{!"_ZTSN7SGTELIB7model_tE", !11, i64 0}
!14 = !{!"int", !11, i64 0}
!15 = !{!"_ZTSN7SGTELIB14param_status_tE", !11, i64 0}
!16 = !{!"_ZTSN7SGTELIB8kernel_tE", !11, i64 0}
!17 = !{!"double", !11, i64 0}
!18 = !{!"_ZTSN7SGTELIB10distance_tE", !11, i64 0}
!19 = !{!"_ZTSN7SGTELIB6MatrixE", !20, i64 8, !14, i64 40, !14, i64 44, !10, i64 48}
!20 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !21, i64 0, !22, i64 8, !11, i64 16}
!21 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !10, i64 0}
!22 = !{!"long", !11, i64 0}
!23 = !{!"_ZTSN7SGTELIB8weight_tE", !11, i64 0}
!24 = !{!"_ZTSN7SGTELIB13uncertainty_tE", !11, i64 0}
!25 = !{!"_ZTSN7SGTELIB8metric_tE", !11, i64 0}
!26 = !{!"bool", !11, i64 0}
!27 = !{!"_ZTSNSt7__cxx114listIiSaIiEEE", !28, i64 0}
!28 = !{!"_ZTSNSt7__cxx1110_List_baseIiSaIiEEE", !29, i64 0}
!29 = !{!"_ZTSNSt7__cxx1110_List_baseIiSaIiEE10_List_implE", !30, i64 0}
!30 = !{!"_ZTSNSt8__detail17_List_node_headerE", !31, i64 0, !22, i64 16}
!31 = !{!"_ZTSNSt8__detail15_List_node_baseE", !10, i64 0, !10, i64 8}
!32 = !{!"_ZTSSt3mapIN7SGTELIB8metric_tENS0_6MatrixESt4lessIS1_ESaISt4pairIKS1_S2_EEE", !33, i64 0}
!33 = !{!"_ZTSSt8_Rb_treeIN7SGTELIB8metric_tESt4pairIKS1_NS0_6MatrixEESt10_Select1stIS5_ESt4lessIS1_ESaIS5_EE", !34, i64 0}
!34 = !{!"_ZTSNSt8_Rb_treeIN7SGTELIB8metric_tESt4pairIKS1_NS0_6MatrixEESt10_Select1stIS5_ESt4lessIS1_ESaIS5_EE13_Rb_tree_implIS9_Lb1EEE", !35, i64 0, !37, i64 8}
!35 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIN7SGTELIB8metric_tEEE", !36, i64 0}
!36 = !{!"_ZTSSt4lessIN7SGTELIB8metric_tEE"}
!37 = !{!"_ZTSSt15_Rb_tree_header", !38, i64 0, !22, i64 32}
!38 = !{!"_ZTSSt18_Rb_tree_node_base", !39, i64 0, !10, i64 8, !10, i64 16, !10, i64 24}
!39 = !{!"_ZTSSt14_Rb_tree_color", !11, i64 0}
!40 = !{!"_ZTSSt14basic_ofstreamIcSt11char_traitsIcEE", !41, i64 0, !42, i64 8}
!41 = !{!"_ZTSSo"}
!42 = !{!"_ZTSSt13basic_filebufIcSt11char_traitsIcEE", !43, i64 0, !11, i64 64, !45, i64 104, !46, i64 120, !47, i64 124, !47, i64 132, !47, i64 140, !10, i64 152, !22, i64 160, !26, i64 168, !26, i64 169, !26, i64 170, !11, i64 171, !10, i64 176, !10, i64 184, !26, i64 192, !10, i64 200, !10, i64 208, !22, i64 216, !10, i64 224, !10, i64 232}
!43 = !{!"_ZTSSt15basic_streambufIcSt11char_traitsIcEE", !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !44, i64 56}
!44 = !{!"_ZTSSt6locale", !10, i64 0}
!45 = !{!"_ZTSSt12__basic_fileIcE", !10, i64 0, !26, i64 8}
!46 = !{!"_ZTSSt13_Ios_Openmode", !11, i64 0}
!47 = !{!"_ZTS11__mbstate_t", !14, i64 0, !11, i64 4}
!48 = distinct !{!48, !49}
!49 = !{!"llvm.loop.mustprogress"}


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