; LLVM IR from AF-GRILL/DISPluginForUnreal :: Source/ThirdParty/include/dis7 (ElectromagneticEmissionBeamData)

; 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.DIS::ElectromagneticEmissionBeamData" = type { ptr, i8, i8, i16, [4 x i8], %"class.DIS::EEFundamentalParameterData", %"class.DIS::BeamData", i8, i8, i8, i8, [4 x i8], %"class.DIS::JammingTechnique", %"class.std::vector" }
%"class.DIS::EEFundamentalParameterData" = type <{ ptr, float, float, float, float, float, [4 x i8] }>
%"class.DIS::BeamData" = type <{ ptr, float, float, float, float, float, [4 x i8] }>
%"class.DIS::JammingTechnique" = type <{ ptr, i8, i8, i8, i8, [4 x i8] }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<DIS::TrackJamData, std::allocator<DIS::TrackJamData>>::_Vector_impl" }
%"struct.std::_Vector_base<DIS::TrackJamData, std::allocator<DIS::TrackJamData>>::_Vector_impl" = type { %"struct.std::_Vector_base<DIS::TrackJamData, std::allocator<DIS::TrackJamData>>::_Vector_impl_data" }
%"struct.std::_Vector_base<DIS::TrackJamData, std::allocator<DIS::TrackJamData>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@_ZTVN3DIS31ElectromagneticEmissionBeamDataE = external dso_local unnamed_addr constant { [7 x ptr] }, align 8

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3DIS31ElectromagneticEmissionBeamDataC2Ev(ptr noundef nonnull align 8 dereferenceable(128) %0) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  %5 = load ptr, ptr %2, align 8
  store ptr getelementptr inbounds inrange(-16, 40) ({ [7 x ptr] }, ptr @_ZTVN3DIS31ElectromagneticEmissionBeamDataE, i32 0, i32 0, i32 2), ptr %5, align 8, !tbaa !9
  %6 = getelementptr inbounds %"class.DIS::ElectromagneticEmissionBeamData", ptr %5, i32 0, i32 1
  store i8 0, ptr %6, align 8, !tbaa !11
  %7 = getelementptr inbounds %"class.DIS::ElectromagneticEmissionBeamData", ptr %5, i32 0, i32 2
  store i8 0, ptr %7, align 1, !tbaa !22
  %8 = getelementptr inbounds %"class.DIS::ElectromagneticEmissionBeamData", ptr %5, i32 0, i32 3
  store i16 0, ptr %8, align 2, !tbaa !23
  %9 = getelementptr inbounds %"class.DIS::ElectromagneticEmissionBeamData", ptr %5, i32 0, i32 5
  call void @_ZN3DIS26EEFundamentalParameterDataC1Ev(ptr noundef nonnull align 8 dereferenceable(28) %9)
  %10 = getelementptr inbounds %"class.DIS::ElectromagneticEmissionBeamData", ptr %5, i32 0, i32 6
  invoke void @_ZN3DIS8BeamDataC1Ev(ptr noundef nonnull align 8 dereferenceable(28) %10)
          to label %11 unwind label %19

11:                                               ; preds = %1
  %12 = getelementptr inbounds %"class.DIS::ElectromagneticEmissionBeamData", ptr %5, i32 0, i32 7
  store i8 0, ptr %12, align 8, !tbaa !24
  %13 = getelementptr inbounds %"class.DIS::ElectromagneticEmissionBeamData", ptr %5, i32 0, i32 8
  store i8 0, ptr %13, align 1, !tbaa !25
  %14 = getelementptr inbounds %"class.DIS::ElectromagneticEmissionBeamData", ptr %5, i32 0, i32 9
  store i8 0, ptr %14, align 2, !tbaa !26
  %15 = getelementptr inbounds %"class.DIS::ElectromagneticEmissionBeamData", ptr %5, i32 0, i32 10
  store i8 0, ptr %15, align 1, !tbaa !27
  %16 = getelementptr inbounds %"class.DIS::ElectromagneticEmissionBeamData", ptr %5, i32 0, i32 12
  invoke void @_ZN3DIS16JammingTechniqueC1Ev(ptr noundef nonnull align 8 dereferenceable(12) %16)
          to label %17 unwind label %23

17:                                               ; preds = %11
  %18 = getelementptr inbounds %"class.DIS::ElectromagneticEmissionBeamData", ptr %5, i32 0, i32 13
  call void @_ZNSt6vectorIN3DIS12TrackJamDataESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %18) #4
  ret void

19:                                               ; preds = %1
  %20 = landingpad { ptr, i32 }
          cleanup
  %21 = extractvalue { ptr, i32 } %20, 0
  store ptr %21, ptr %3, align 8
  %22 = extractvalue { ptr, i32 } %20, 1
  store i32 %22, ptr %4, align 4
  br label %27

23:                                               ; preds = %11
  %24 = landingpad { ptr, i32 }
          cleanup
  %25 = extractvalue { ptr, i32 } %24, 0
  store ptr %25, ptr %3, align 8
  %26 = extractvalue { ptr, i32 } %24, 1
  store i32 %26, ptr %4, align 4
  call void @_ZN3DIS8BeamDataD1Ev(ptr noundef nonnull align 8 dereferenceable(28) %10) #4
  br label %27

27:                                               ; preds = %23, %19
  call void @_ZN3DIS26EEFundamentalParameterDataD1Ev(ptr noundef nonnull align 8 dereferenceable(28) %9) #4
  br label %28

28:                                               ; preds = %27
  %29 = load ptr, ptr %3, align 8
  %30 = load i32, ptr %4, align 4
  %31 = insertvalue { ptr, i32 } poison, ptr %29, 0
  %32 = insertvalue { ptr, i32 } %31, i32 %30, 1
  resume { ptr, i32 } %32
}

declare void @_ZN3DIS26EEFundamentalParameterDataC1Ev(ptr noundef nonnull align 8 dereferenceable(28)) unnamed_addr #1

declare void @_ZN3DIS8BeamDataC1Ev(ptr noundef nonnull align 8 dereferenceable(28)) unnamed_addr #1

declare i32 @__gxx_personality_v0(...)

declare void @_ZN3DIS16JammingTechniqueC1Ev(ptr noundef nonnull align 8 dereferenceable(12)) unnamed_addr #1

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

; Function Attrs: nounwind
declare void @_ZN3DIS8BeamDataD1Ev(ptr noundef nonnull align 8 dereferenceable(28)) unnamed_addr #3

; Function Attrs: nounwind
declare void @_ZN3DIS26EEFundamentalParameterDataD1Ev(ptr noundef nonnull align 8 dereferenceable(28)) unnamed_addr #3

attributes #0 = { 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 #1 = { "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 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 = { 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 #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, !7, i64 8}
!12 = !{!"_ZTSN3DIS31ElectromagneticEmissionBeamDataE", !7, i64 8, !7, i64 9, !13, i64 10, !14, i64 16, !16, i64 48, !7, i64 80, !7, i64 81, !7, i64 82, !7, i64 83, !17, i64 88, !18, i64 104}
!13 = !{!"short", !7, i64 0}
!14 = !{!"_ZTSN3DIS26EEFundamentalParameterDataE", !15, i64 8, !15, i64 12, !15, i64 16, !15, i64 20, !15, i64 24}
!15 = !{!"float", !7, i64 0}
!16 = !{!"_ZTSN3DIS8BeamDataE", !15, i64 8, !15, i64 12, !15, i64 16, !15, i64 20, !15, i64 24}
!17 = !{!"_ZTSN3DIS16JammingTechniqueE", !7, i64 8, !7, i64 9, !7, i64 10, !7, i64 11}
!18 = !{!"_ZTSSt6vectorIN3DIS12TrackJamDataESaIS1_EE", !19, i64 0}
!19 = !{!"_ZTSSt12_Vector_baseIN3DIS12TrackJamDataESaIS1_EE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIN3DIS12TrackJamDataESaIS1_EE12_Vector_implE", !21, i64 0}
!21 = !{!"_ZTSNSt12_Vector_baseIN3DIS12TrackJamDataESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!22 = !{!12, !7, i64 9}
!23 = !{!12, !13, i64 10}
!24 = !{!12, !7, i64 80}
!25 = !{!12, !7, i64 81}
!26 = !{!12, !7, i64 82}
!27 = !{!12, !7, i64 83}


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

@_ZTVN3DIS31ElectromagneticEmissionBeamDataE = external dso_local unnamed_addr constant { [7 x ptr] }, align 8

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3DIS31ElectromagneticEmissionBeamDataC2Ev(ptr noundef nonnull align 8 dereferenceable(128) %0) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  store ptr getelementptr inbounds inrange(-16, 40) (i8, ptr @_ZTVN3DIS31ElectromagneticEmissionBeamDataE, i64 16), ptr %0, align 8, !tbaa !5
  %2 = getelementptr inbounds i8, ptr %0, i64 8
  store i8 0, ptr %2, align 8, !tbaa !8
  %3 = getelementptr inbounds i8, ptr %0, i64 9
  store i8 0, ptr %3, align 1, !tbaa !21
  %4 = getelementptr inbounds i8, ptr %0, i64 10
  store i16 0, ptr %4, align 2, !tbaa !22
  %5 = getelementptr inbounds i8, ptr %0, i64 16
  tail call void @_ZN3DIS26EEFundamentalParameterDataC1Ev(ptr noundef nonnull align 8 dereferenceable(28) %5)
  %6 = getelementptr inbounds i8, ptr %0, i64 48
  invoke void @_ZN3DIS8BeamDataC1Ev(ptr noundef nonnull align 8 dereferenceable(28) %6)
          to label %7 unwind label %12

7:                                                ; preds = %1
  %8 = getelementptr inbounds i8, ptr %0, i64 80
  %9 = getelementptr inbounds i8, ptr %0, i64 88
  store i32 0, ptr %8, align 8
  invoke void @_ZN3DIS16JammingTechniqueC1Ev(ptr noundef nonnull align 8 dereferenceable(12) %9)
          to label %10 unwind label %14

10:                                               ; preds = %7
  %11 = getelementptr inbounds i8, ptr %0, i64 104
  tail call void @_ZNSt6vectorIN3DIS12TrackJamDataESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #4
  ret void

12:                                               ; preds = %1
  %13 = landingpad { ptr, i32 }
          cleanup
  br label %16

14:                                               ; preds = %7
  %15 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZN3DIS8BeamDataD1Ev(ptr noundef nonnull align 8 dereferenceable(28) %6) #4
  br label %16

16:                                               ; preds = %14, %12
  %.pn = phi { ptr, i32 } [ %15, %14 ], [ %13, %12 ]
  tail call void @_ZN3DIS26EEFundamentalParameterDataD1Ev(ptr noundef nonnull align 8 dereferenceable(28) %5) #4
  resume { ptr, i32 } %.pn
}

declare void @_ZN3DIS26EEFundamentalParameterDataC1Ev(ptr noundef nonnull align 8 dereferenceable(28)) unnamed_addr #1

declare void @_ZN3DIS8BeamDataC1Ev(ptr noundef nonnull align 8 dereferenceable(28)) unnamed_addr #1

declare i32 @__gxx_personality_v0(...)

declare void @_ZN3DIS16JammingTechniqueC1Ev(ptr noundef nonnull align 8 dereferenceable(12)) unnamed_addr #1

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

; Function Attrs: nounwind
declare void @_ZN3DIS8BeamDataD1Ev(ptr noundef nonnull align 8 dereferenceable(28)) unnamed_addr #3

; Function Attrs: nounwind
declare void @_ZN3DIS26EEFundamentalParameterDataD1Ev(ptr noundef nonnull align 8 dereferenceable(28)) unnamed_addr #3

attributes #0 = { 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 #1 = { "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 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 = { 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 #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 = !{!"vtable pointer", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !10, i64 8}
!9 = !{!"_ZTSN3DIS31ElectromagneticEmissionBeamDataE", !10, i64 8, !10, i64 9, !11, i64 10, !12, i64 16, !14, i64 48, !10, i64 80, !10, i64 81, !10, i64 82, !10, i64 83, !15, i64 88, !16, i64 104}
!10 = !{!"omnipotent char", !7, i64 0}
!11 = !{!"short", !10, i64 0}
!12 = !{!"_ZTSN3DIS26EEFundamentalParameterDataE", !13, i64 8, !13, i64 12, !13, i64 16, !13, i64 20, !13, i64 24}
!13 = !{!"float", !10, i64 0}
!14 = !{!"_ZTSN3DIS8BeamDataE", !13, i64 8, !13, i64 12, !13, i64 16, !13, i64 20, !13, i64 24}
!15 = !{!"_ZTSN3DIS16JammingTechniqueE", !10, i64 8, !10, i64 9, !10, i64 10, !10, i64 11}
!16 = !{!"_ZTSSt6vectorIN3DIS12TrackJamDataESaIS1_EE", !17, i64 0}
!17 = !{!"_ZTSSt12_Vector_baseIN3DIS12TrackJamDataESaIS1_EE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIN3DIS12TrackJamDataESaIS1_EE12_Vector_implE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIN3DIS12TrackJamDataESaIS1_EE17_Vector_impl_dataE", !20, i64 0, !20, i64 8, !20, i64 16}
!20 = !{!"any pointer", !10, i64 0}
!21 = !{!9, !10, i64 9}
!22 = !{!9, !11, i64 10}


; Effective O3 passes: GlobalOptPass,InstCombinePass,MemCpyOptPass,SROAPass,SimplifyCFGPass,TailCallElimPass