; LLVM IR from NTHU-LSALAB/Gemini :: src/scheduler.ll (ZN10ClientInfoC2Eddddd)

; 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.ClientInfo = type { %"class.std::map", %"class.std::__cxx11::basic_string", i64, double, double, double, double, double, double, double, double, double }
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<unsigned long long, std::pair<const unsigned long long, unsigned long>, std::_Select1st<std::pair<const unsigned long long, unsigned long>>, std::less<unsigned long long>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<unsigned long long, std::pair<const unsigned long long, unsigned long>, std::_Select1st<std::pair<const unsigned long long, unsigned long>>, std::less<unsigned long long>>::_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::__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] }

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN10ClientInfoC2Eddddd(ptr noundef nonnull align 8 dereferenceable(160) %0, double noundef %1, double noundef %2, double noundef %3, double noundef %4, double noundef %5) unnamed_addr #0 align 2 {
  %7 = alloca ptr, align 8
  %8 = alloca double, align 8
  %9 = alloca double, align 8
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  %12 = alloca double, align 8
  store ptr %0, ptr %7, align 8, !tbaa !5
  store double %1, ptr %8, align 8, !tbaa !9
  store double %2, ptr %9, align 8, !tbaa !9
  store double %3, ptr %10, align 8, !tbaa !9
  store double %4, ptr %11, align 8, !tbaa !9
  store double %5, ptr %12, align 8, !tbaa !9
  %13 = load ptr, ptr %7, align 8
  %14 = getelementptr inbounds %class.ClientInfo, ptr %13, i32 0, i32 0
  call void @_ZNSt3mapIymSt4lessIyESaISt4pairIKymEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %14) #1
  %15 = getelementptr inbounds %class.ClientInfo, ptr %13, i32 0, i32 1
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %15) #1
  %16 = getelementptr inbounds %class.ClientInfo, ptr %13, i32 0, i32 3
  %17 = load double, ptr %11, align 8, !tbaa !9
  store double %17, ptr %16, align 8, !tbaa !11
  %18 = getelementptr inbounds %class.ClientInfo, ptr %13, i32 0, i32 4
  %19 = load double, ptr %12, align 8, !tbaa !9
  store double %19, ptr %18, align 8, !tbaa !24
  %20 = getelementptr inbounds %class.ClientInfo, ptr %13, i32 0, i32 5
  %21 = load double, ptr %8, align 8, !tbaa !9
  store double %21, ptr %20, align 8, !tbaa !25
  %22 = getelementptr inbounds %class.ClientInfo, ptr %13, i32 0, i32 6
  %23 = load double, ptr %9, align 8, !tbaa !9
  store double %23, ptr %22, align 8, !tbaa !26
  %24 = getelementptr inbounds %class.ClientInfo, ptr %13, i32 0, i32 7
  %25 = load double, ptr %10, align 8, !tbaa !9
  store double %25, ptr %24, align 8, !tbaa !27
  %26 = getelementptr inbounds %class.ClientInfo, ptr %13, i32 0, i32 5
  %27 = load double, ptr %26, align 8, !tbaa !25
  %28 = getelementptr inbounds %class.ClientInfo, ptr %13, i32 0, i32 8
  store double %27, ptr %28, align 8, !tbaa !28
  %29 = getelementptr inbounds %class.ClientInfo, ptr %13, i32 0, i32 9
  store double 0.000000e+00, ptr %29, align 8, !tbaa !29
  %30 = getelementptr inbounds %class.ClientInfo, ptr %13, i32 0, i32 10
  store double 0.000000e+00, ptr %30, align 8, !tbaa !30
  %31 = getelementptr inbounds %class.ClientInfo, ptr %13, i32 0, i32 11
  store double 0.000000e+00, ptr %31, align 8, !tbaa !31
  ret void
}

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #0 align 2

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 = { 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 = !{!"double", !7, i64 0}
!11 = !{!12, !10, i64 88}
!12 = !{!"_ZTS10ClientInfo", !13, i64 0, !22, i64 48, !21, i64 80, !10, i64 88, !10, i64 96, !10, i64 104, !10, i64 112, !10, i64 120, !10, i64 128, !10, i64 136, !10, i64 144, !10, i64 152}
!13 = !{!"_ZTSSt3mapIymSt4lessIyESaISt4pairIKymEEE", !14, i64 0}
!14 = !{!"_ZTSSt8_Rb_treeIySt4pairIKymESt10_Select1stIS2_ESt4lessIyESaIS2_EE", !15, i64 0}
!15 = !{!"_ZTSNSt8_Rb_treeIySt4pairIKymESt10_Select1stIS2_ESt4lessIyESaIS2_EE13_Rb_tree_implIS6_Lb1EEE", !16, i64 0, !18, i64 8}
!16 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIyEE", !17, i64 0}
!17 = !{!"_ZTSSt4lessIyE"}
!18 = !{!"_ZTSSt15_Rb_tree_header", !19, i64 0, !21, i64 32}
!19 = !{!"_ZTSSt18_Rb_tree_node_base", !20, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!20 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!21 = !{!"long", !7, i64 0}
!22 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !23, i64 0, !21, i64 8, !7, i64 16}
!23 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !6, i64 0}
!24 = !{!12, !10, i64 96}
!25 = !{!12, !10, i64 104}
!26 = !{!12, !10, i64 112}
!27 = !{!12, !10, i64 120}
!28 = !{!12, !10, i64 128}
!29 = !{!12, !10, i64 136}
!30 = !{!12, !10, i64 144}
!31 = !{!12, !10, i64 152}


; 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
define dso_local void @_ZN10ClientInfoC2Eddddd(ptr noundef nonnull align 8 dereferenceable(160) %0, double noundef %1, double noundef %2, double noundef %3, double noundef %4, double noundef %5) unnamed_addr #0 align 2 {
  tail call void @_ZNSt3mapIymSt4lessIyESaISt4pairIKymEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %0) #2
  %7 = getelementptr inbounds i8, ptr %0, i64 48
  tail call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #2
  %8 = getelementptr inbounds i8, ptr %0, i64 88
  store double %4, ptr %8, align 8, !tbaa !5
  %9 = getelementptr inbounds i8, ptr %0, i64 96
  store double %5, ptr %9, align 8, !tbaa !22
  %10 = getelementptr inbounds i8, ptr %0, i64 104
  store double %1, ptr %10, align 8, !tbaa !23
  %11 = getelementptr inbounds i8, ptr %0, i64 112
  store double %2, ptr %11, align 8, !tbaa !24
  %12 = getelementptr inbounds i8, ptr %0, i64 120
  store double %3, ptr %12, align 8, !tbaa !25
  %13 = getelementptr inbounds i8, ptr %0, i64 128
  store double %1, ptr %13, align 8, !tbaa !26
  %14 = getelementptr inbounds i8, ptr %0, i64 136
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %14, i8 0, i64 24, i1 false)
  ret void
}

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #0 align 2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #1

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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #2 = { 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, !21, i64 88}
!6 = !{!"_ZTS10ClientInfo", !7, i64 0, !19, i64 48, !18, i64 80, !21, i64 88, !21, i64 96, !21, i64 104, !21, i64 112, !21, i64 120, !21, i64 128, !21, i64 136, !21, i64 144, !21, i64 152}
!7 = !{!"_ZTSSt3mapIymSt4lessIyESaISt4pairIKymEEE", !8, i64 0}
!8 = !{!"_ZTSSt8_Rb_treeIySt4pairIKymESt10_Select1stIS2_ESt4lessIyESaIS2_EE", !9, i64 0}
!9 = !{!"_ZTSNSt8_Rb_treeIySt4pairIKymESt10_Select1stIS2_ESt4lessIyESaIS2_EE13_Rb_tree_implIS6_Lb1EEE", !10, i64 0, !12, i64 8}
!10 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIyEE", !11, i64 0}
!11 = !{!"_ZTSSt4lessIyE"}
!12 = !{!"_ZTSSt15_Rb_tree_header", !13, i64 0, !18, i64 32}
!13 = !{!"_ZTSSt18_Rb_tree_node_base", !14, i64 0, !17, i64 8, !17, i64 16, !17, i64 24}
!14 = !{!"_ZTSSt14_Rb_tree_color", !15, i64 0}
!15 = !{!"omnipotent char", !16, i64 0}
!16 = !{!"Simple C++ TBAA"}
!17 = !{!"any pointer", !15, i64 0}
!18 = !{!"long", !15, i64 0}
!19 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", !20, i64 0, !18, i64 8, !15, i64 16}
!20 = !{!"_ZTSNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE12_Alloc_hiderE", !17, i64 0}
!21 = !{!"double", !15, i64 0}
!22 = !{!6, !21, i64 96}
!23 = !{!6, !21, i64 104}
!24 = !{!6, !21, i64 112}
!25 = !{!6, !21, i64 120}
!26 = !{!6, !21, i64 128}


; Effective O3 passes: EarlyCSEPass,InstCombinePass,MemCpyOptPass,SROAPass,TailCallElimPass