; LLVM IR from EdoPro98/SimSiPM :: src/SiPMProperties.ll (ZN4sipm14SiPMPropertiesC2Ev)

; 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.sipm::SiPMProperties" = type <{ double, double, i32, i32, i32, [4 x i8], double, double, i32, [4 x i8], double, double, double, double, double, double, double, double, double, double, double, double, double, float, [4 x i8], double, float, [4 x i8], double, double, %"class.std::map", i32, i8, i8, i8, i8, i8, [7 x i8] }>
%"class.std::map" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<double, std::pair<const double, double>, std::_Select1st<std::pair<const double, double>>, std::less<double>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<double, std::pair<const double, double>, std::_Select1st<std::pair<const double, double>>, std::less<double>>::_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 }

; Function Attrs: mustprogress nounwind uwtable
define dso_local void @_ZN4sipm14SiPMPropertiesC2Ev(ptr noundef nonnull align 8 dereferenceable(257) %0) unnamed_addr #0 align 2 {
  %2 = alloca ptr, align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %3 = load ptr, ptr %2, align 8
  %4 = getelementptr inbounds %"class.sipm::SiPMProperties", ptr %3, i32 0, i32 0
  store double 1.000000e+00, ptr %4, align 8, !tbaa !9
  %5 = getelementptr inbounds %"class.sipm::SiPMProperties", ptr %3, i32 0, i32 1
  store double 2.500000e+01, ptr %5, align 8, !tbaa !26
  %6 = getelementptr inbounds %"class.sipm::SiPMProperties", ptr %3, i32 0, i32 4
  store i32 0, ptr %6, align 8, !tbaa !27
  %7 = getelementptr inbounds %"class.sipm::SiPMProperties", ptr %3, i32 0, i32 6
  store double 1.000000e+00, ptr %7, align 8, !tbaa !28
  %8 = getelementptr inbounds %"class.sipm::SiPMProperties", ptr %3, i32 0, i32 7
  store double 5.000000e+02, ptr %8, align 8, !tbaa !29
  %9 = getelementptr inbounds %"class.sipm::SiPMProperties", ptr %3, i32 0, i32 8
  store i32 0, ptr %9, align 8, !tbaa !30
  %10 = getelementptr inbounds %"class.sipm::SiPMProperties", ptr %3, i32 0, i32 10
  store double 1.000000e+00, ptr %10, align 8, !tbaa !31
  %11 = getelementptr inbounds %"class.sipm::SiPMProperties", ptr %3, i32 0, i32 11
  store double 5.000000e+01, ptr %11, align 8, !tbaa !32
  %12 = getelementptr inbounds %"class.sipm::SiPMProperties", ptr %3, i32 0, i32 12
  store double 1.000000e+02, ptr %12, align 8, !tbaa !33
  %13 = getelementptr inbounds %"class.sipm::SiPMProperties", ptr %3, i32 0, i32 13
  store double 2.000000e-01, ptr %13, align 8, !tbaa !34
  %14 = getelementptr inbounds %"class.sipm::SiPMProperties", ptr %3, i32 0, i32 14
  store double 5.000000e+01, ptr %14, align 8, !tbaa !35
  %15 = getelementptr inbounds %"class.sipm::SiPMProperties", ptr %3, i32 0, i32 15
  store double 2.000000e+05, ptr %15, align 8, !tbaa !36
  %16 = getelementptr inbounds %"class.sipm::SiPMProperties", ptr %3, i32 0, i32 16
  store double 5.000000e-02, ptr %16, align 8, !tbaa !37
  %17 = getelementptr inbounds %"class.sipm::SiPMProperties", ptr %3, i32 0, i32 17
  store double 5.000000e-02, ptr %17, align 8, !tbaa !38
  %18 = getelementptr inbounds %"class.sipm::SiPMProperties", ptr %3, i32 0, i32 18
  store double 1.500000e+01, ptr %18, align 8, !tbaa !39
  %19 = getelementptr inbounds %"class.sipm::SiPMProperties", ptr %3, i32 0, i32 19
  store double 3.000000e-02, ptr %19, align 8, !tbaa !40
  %20 = getelementptr inbounds %"class.sipm::SiPMProperties", ptr %3, i32 0, i32 20
  store double 1.000000e+01, ptr %20, align 8, !tbaa !41
  %21 = getelementptr inbounds %"class.sipm::SiPMProperties", ptr %3, i32 0, i32 21
  store double 8.000000e+01, ptr %21, align 8, !tbaa !42
  %22 = getelementptr inbounds %"class.sipm::SiPMProperties", ptr %3, i32 0, i32 22
  store double 5.000000e-01, ptr %22, align 8, !tbaa !43
  %23 = getelementptr inbounds %"class.sipm::SiPMProperties", ptr %3, i32 0, i32 23
  store float 0x3FA99999A0000000, ptr %23, align 8, !tbaa !44
  %24 = getelementptr inbounds %"class.sipm::SiPMProperties", ptr %3, i32 0, i32 25
  store double 3.000000e+01, ptr %24, align 8, !tbaa !45
  %25 = getelementptr inbounds %"class.sipm::SiPMProperties", ptr %3, i32 0, i32 26
  store float 1.000000e+00, ptr %25, align 8, !tbaa !46
  %26 = getelementptr inbounds %"class.sipm::SiPMProperties", ptr %3, i32 0, i32 29
  store double 1.000000e+00, ptr %26, align 8, !tbaa !47
  %27 = getelementptr inbounds %"class.sipm::SiPMProperties", ptr %3, i32 0, i32 30
  call void @_ZNSt3mapIddSt4lessIdESaISt4pairIKddEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %27) #2
  %28 = getelementptr inbounds %"class.sipm::SiPMProperties", ptr %3, i32 0, i32 31
  store i32 0, ptr %28, align 8, !tbaa !48
  %29 = getelementptr inbounds %"class.sipm::SiPMProperties", ptr %3, i32 0, i32 32
  store i8 1, ptr %29, align 4, !tbaa !49
  %30 = getelementptr inbounds %"class.sipm::SiPMProperties", ptr %3, i32 0, i32 33
  store i8 1, ptr %30, align 1, !tbaa !50
  %31 = getelementptr inbounds %"class.sipm::SiPMProperties", ptr %3, i32 0, i32 34
  store i8 0, ptr %31, align 2, !tbaa !51
  %32 = getelementptr inbounds %"class.sipm::SiPMProperties", ptr %3, i32 0, i32 35
  store i8 1, ptr %32, align 1, !tbaa !52
  %33 = getelementptr inbounds %"class.sipm::SiPMProperties", ptr %3, i32 0, i32 36
  store i8 0, ptr %33, align 8, !tbaa !53
  %34 = getelementptr inbounds %"class.sipm::SiPMProperties", ptr %3, i32 0, i32 0
  %35 = load double, ptr %34, align 8, !tbaa !9
  %36 = fmul double 1.000000e+03, %35
  %37 = getelementptr inbounds %"class.sipm::SiPMProperties", ptr %3, i32 0, i32 1
  %38 = load double, ptr %37, align 8, !tbaa !26
  %39 = fdiv double %36, %38
  %40 = fptoui double %39 to i32
  %41 = getelementptr inbounds %"class.sipm::SiPMProperties", ptr %3, i32 0, i32 3
  store i32 %40, ptr %41, align 4, !tbaa !54
  %42 = getelementptr inbounds %"class.sipm::SiPMProperties", ptr %3, i32 0, i32 3
  %43 = load i32, ptr %42, align 4, !tbaa !54
  %44 = getelementptr inbounds %"class.sipm::SiPMProperties", ptr %3, i32 0, i32 3
  %45 = load i32, ptr %44, align 4, !tbaa !54
  %46 = mul i32 %43, %45
  %47 = getelementptr inbounds %"class.sipm::SiPMProperties", ptr %3, i32 0, i32 2
  store i32 %46, ptr %47, align 8, !tbaa !55
  %48 = getelementptr inbounds %"class.sipm::SiPMProperties", ptr %3, i32 0, i32 7
  %49 = load double, ptr %48, align 8, !tbaa !29
  %50 = getelementptr inbounds %"class.sipm::SiPMProperties", ptr %3, i32 0, i32 6
  %51 = load double, ptr %50, align 8, !tbaa !28
  %52 = fdiv double %49, %51
  %53 = fptoui double %52 to i32
  %54 = getelementptr inbounds %"class.sipm::SiPMProperties", ptr %3, i32 0, i32 8
  store i32 %53, ptr %54, align 8, !tbaa !30
  %55 = getelementptr inbounds %"class.sipm::SiPMProperties", ptr %3, i32 0, i32 25
  %56 = load double, ptr %55, align 8, !tbaa !45
  %57 = fneg double %56
  %58 = fdiv double %57, 2.000000e+01
  %59 = call double @pow(double noundef 1.000000e+01, double noundef %58) #2
  %60 = getelementptr inbounds %"class.sipm::SiPMProperties", ptr %3, i32 0, i32 28
  store double %59, ptr %60, align 8, !tbaa !56
  ret void
}

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

; Function Attrs: nounwind
declare double @pow(double noundef, double noundef) #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 = { nounwind "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 = { 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, !11, i64 0}
!10 = !{!"_ZTSN4sipm14SiPMPropertiesE", !11, i64 0, !11, i64 8, !12, i64 16, !12, i64 20, !13, i64 24, !11, i64 32, !11, i64 40, !12, i64 48, !11, i64 56, !11, i64 64, !11, i64 72, !11, i64 80, !11, i64 88, !11, i64 96, !11, i64 104, !11, i64 112, !11, i64 120, !11, i64 128, !11, i64 136, !11, i64 144, !11, i64 152, !14, i64 160, !11, i64 168, !14, i64 176, !11, i64 184, !11, i64 192, !15, i64 200, !24, i64 248, !25, i64 252, !25, i64 253, !25, i64 254, !25, i64 255, !25, i64 256}
!11 = !{!"double", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!"_ZTSN4sipm14SiPMProperties15HitDistributionE", !7, i64 0}
!14 = !{!"float", !7, i64 0}
!15 = !{!"_ZTSSt3mapIddSt4lessIdESaISt4pairIKddEEE", !16, i64 0}
!16 = !{!"_ZTSSt8_Rb_treeIdSt4pairIKddESt10_Select1stIS2_ESt4lessIdESaIS2_EE", !17, i64 0}
!17 = !{!"_ZTSNSt8_Rb_treeIdSt4pairIKddESt10_Select1stIS2_ESt4lessIdESaIS2_EE13_Rb_tree_implIS6_Lb1EEE", !18, i64 0, !20, i64 8}
!18 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIdEE", !19, i64 0}
!19 = !{!"_ZTSSt4lessIdE"}
!20 = !{!"_ZTSSt15_Rb_tree_header", !21, i64 0, !23, i64 32}
!21 = !{!"_ZTSSt18_Rb_tree_node_base", !22, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!22 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!23 = !{!"long", !7, i64 0}
!24 = !{!"_ZTSN4sipm14SiPMProperties7PdeTypeE", !7, i64 0}
!25 = !{!"bool", !7, i64 0}
!26 = !{!10, !11, i64 8}
!27 = !{!10, !13, i64 24}
!28 = !{!10, !11, i64 32}
!29 = !{!10, !11, i64 40}
!30 = !{!10, !12, i64 48}
!31 = !{!10, !11, i64 56}
!32 = !{!10, !11, i64 64}
!33 = !{!10, !11, i64 72}
!34 = !{!10, !11, i64 80}
!35 = !{!10, !11, i64 88}
!36 = !{!10, !11, i64 96}
!37 = !{!10, !11, i64 104}
!38 = !{!10, !11, i64 112}
!39 = !{!10, !11, i64 120}
!40 = !{!10, !11, i64 128}
!41 = !{!10, !11, i64 136}
!42 = !{!10, !11, i64 144}
!43 = !{!10, !11, i64 152}
!44 = !{!10, !14, i64 160}
!45 = !{!10, !11, i64 168}
!46 = !{!10, !14, i64 176}
!47 = !{!10, !11, i64 192}
!48 = !{!10, !24, i64 248}
!49 = !{!10, !25, i64 252}
!50 = !{!10, !25, i64 253}
!51 = !{!10, !25, i64 254}
!52 = !{!10, !25, i64 255}
!53 = !{!10, !25, i64 256}
!54 = !{!10, !12, i64 20}
!55 = !{!10, !12, i64 16}
!56 = !{!10, !11, i64 184}


; 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 @_ZN4sipm14SiPMPropertiesC2Ev(ptr noundef nonnull align 8 dereferenceable(257) %0) unnamed_addr #0 align 2 {
  %2 = getelementptr inbounds i8, ptr %0, i64 8
  store <2 x double> <double 1.000000e+00, double 2.500000e+01>, ptr %0, align 8, !tbaa !5
  %3 = getelementptr inbounds i8, ptr %0, i64 24
  store i32 0, ptr %3, align 8, !tbaa !9
  %4 = getelementptr inbounds i8, ptr %0, i64 32
  %5 = getelementptr inbounds i8, ptr %0, i64 40
  store <2 x double> <double 1.000000e+00, double 5.000000e+02>, ptr %4, align 8, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %0, i64 48
  store i32 0, ptr %6, align 8, !tbaa !26
  %7 = getelementptr inbounds i8, ptr %0, i64 56
  store <2 x double> <double 1.000000e+00, double 5.000000e+01>, ptr %7, align 8, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %0, i64 72
  store <2 x double> <double 1.000000e+02, double 2.000000e-01>, ptr %8, align 8, !tbaa !5
  %9 = getelementptr inbounds i8, ptr %0, i64 88
  store <2 x double> <double 5.000000e+01, double 2.000000e+05>, ptr %9, align 8, !tbaa !5
  %10 = getelementptr inbounds i8, ptr %0, i64 104
  store <2 x double> <double 5.000000e-02, double 5.000000e-02>, ptr %10, align 8, !tbaa !5
  %11 = getelementptr inbounds i8, ptr %0, i64 120
  store <2 x double> <double 1.500000e+01, double 3.000000e-02>, ptr %11, align 8, !tbaa !5
  %12 = getelementptr inbounds i8, ptr %0, i64 136
  store <2 x double> <double 1.000000e+01, double 8.000000e+01>, ptr %12, align 8, !tbaa !5
  %13 = getelementptr inbounds i8, ptr %0, i64 152
  store double 5.000000e-01, ptr %13, align 8, !tbaa !27
  %14 = getelementptr inbounds i8, ptr %0, i64 160
  store float 0x3FA99999A0000000, ptr %14, align 8, !tbaa !28
  %15 = getelementptr inbounds i8, ptr %0, i64 168
  store double 3.000000e+01, ptr %15, align 8, !tbaa !29
  %16 = getelementptr inbounds i8, ptr %0, i64 176
  store float 1.000000e+00, ptr %16, align 8, !tbaa !30
  %17 = getelementptr inbounds i8, ptr %0, i64 192
  store double 1.000000e+00, ptr %17, align 8, !tbaa !31
  %18 = getelementptr inbounds i8, ptr %0, i64 200
  tail call void @_ZNSt3mapIddSt4lessIdESaISt4pairIKddEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(48) %18) #2
  %19 = getelementptr inbounds i8, ptr %0, i64 248
  store i32 0, ptr %19, align 8, !tbaa !32
  %20 = getelementptr inbounds i8, ptr %0, i64 252
  store <4 x i8> <i8 1, i8 1, i8 0, i8 1>, ptr %20, align 4, !tbaa !33
  %21 = getelementptr inbounds i8, ptr %0, i64 256
  store i8 0, ptr %21, align 8, !tbaa !34
  %22 = load double, ptr %0, align 8, !tbaa !35
  %23 = fmul double %22, 1.000000e+03
  %24 = load double, ptr %2, align 8, !tbaa !36
  %25 = fdiv double %23, %24
  %26 = fptoui double %25 to i32
  %27 = getelementptr inbounds i8, ptr %0, i64 20
  store i32 %26, ptr %27, align 4, !tbaa !37
  %28 = mul i32 %26, %26
  %29 = getelementptr inbounds i8, ptr %0, i64 16
  store i32 %28, ptr %29, align 8, !tbaa !38
  %30 = load double, ptr %5, align 8, !tbaa !39
  %31 = load double, ptr %4, align 8, !tbaa !40
  %32 = fdiv double %30, %31
  %33 = fptoui double %32 to i32
  store i32 %33, ptr %6, align 8, !tbaa !26
  %34 = load double, ptr %15, align 8, !tbaa !29
  %35 = fdiv double %34, -2.000000e+01
  %36 = tail call double @pow(double noundef 1.000000e+01, double noundef %35) #2
  %37 = getelementptr inbounds i8, ptr %0, i64 184
  store double %36, ptr %37, align 8, !tbaa !41
  ret void
}

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @pow(double noundef, double noundef) local_unnamed_addr #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 = { mustprogress nofree nounwind willreturn memory(write) "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 = { 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 = !{!"double", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !12, i64 24}
!10 = !{!"_ZTSN4sipm14SiPMPropertiesE", !6, i64 0, !6, i64 8, !11, i64 16, !11, i64 20, !12, i64 24, !6, i64 32, !6, i64 40, !11, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !13, i64 160, !6, i64 168, !13, i64 176, !6, i64 184, !6, i64 192, !14, i64 200, !24, i64 248, !25, i64 252, !25, i64 253, !25, i64 254, !25, i64 255, !25, i64 256}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_ZTSN4sipm14SiPMProperties15HitDistributionE", !7, i64 0}
!13 = !{!"float", !7, i64 0}
!14 = !{!"_ZTSSt3mapIddSt4lessIdESaISt4pairIKddEEE", !15, i64 0}
!15 = !{!"_ZTSSt8_Rb_treeIdSt4pairIKddESt10_Select1stIS2_ESt4lessIdESaIS2_EE", !16, i64 0}
!16 = !{!"_ZTSNSt8_Rb_treeIdSt4pairIKddESt10_Select1stIS2_ESt4lessIdESaIS2_EE13_Rb_tree_implIS6_Lb1EEE", !17, i64 0, !19, i64 8}
!17 = !{!"_ZTSSt20_Rb_tree_key_compareISt4lessIdEE", !18, i64 0}
!18 = !{!"_ZTSSt4lessIdE"}
!19 = !{!"_ZTSSt15_Rb_tree_header", !20, i64 0, !23, i64 32}
!20 = !{!"_ZTSSt18_Rb_tree_node_base", !21, i64 0, !22, i64 8, !22, i64 16, !22, i64 24}
!21 = !{!"_ZTSSt14_Rb_tree_color", !7, i64 0}
!22 = !{!"any pointer", !7, i64 0}
!23 = !{!"long", !7, i64 0}
!24 = !{!"_ZTSN4sipm14SiPMProperties7PdeTypeE", !7, i64 0}
!25 = !{!"bool", !7, i64 0}
!26 = !{!10, !11, i64 48}
!27 = !{!10, !6, i64 152}
!28 = !{!10, !13, i64 160}
!29 = !{!10, !6, i64 168}
!30 = !{!10, !13, i64 176}
!31 = !{!10, !6, i64 192}
!32 = !{!10, !24, i64 248}
!33 = !{!25, !25, i64 0}
!34 = !{!10, !25, i64 256}
!35 = !{!10, !6, i64 0}
!36 = !{!10, !6, i64 8}
!37 = !{!10, !11, i64 20}
!38 = !{!10, !11, i64 16}
!39 = !{!10, !6, i64 40}
!40 = !{!10, !6, i64 32}
!41 = !{!10, !6, i64 184}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,SLPVectorizerPass,SROAPass,TailCallElimPass