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

; 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::DirectedEnergyPrecisionAimpoint" = type { ptr, i32, i16, i16, %"class.DIS::Vector3Double", %"class.DIS::Vector3Float", %"class.DIS::Vector3Float", %"class.DIS::Vector3Float", %"class.DIS::EntityID", i8, i8, float, float, float }
%"class.DIS::Vector3Double" = type { ptr, double, double, double }
%"class.DIS::Vector3Float" = type <{ ptr, float, float, float, [4 x i8] }>
%"class.DIS::EntityID" = type <{ ptr, %"class.DIS::SimulationAddress", i16, [6 x i8] }>
%"class.DIS::SimulationAddress" = type <{ ptr, i16, i16, [4 x i8] }>

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3DIS31DirectedEnergyPrecisionAimpointC2Ev(ptr noundef nonnull align 8 dereferenceable(168) %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 @_ZTVN3DIS31DirectedEnergyPrecisionAimpointE, i32 0, i32 0, i32 2), ptr %5, align 8, !tbaa !9
  %6 = getelementptr inbounds %"class.DIS::DirectedEnergyPrecisionAimpoint", ptr %5, i32 0, i32 1
  store i32 4000, ptr %6, align 8, !tbaa !11
  %7 = getelementptr inbounds %"class.DIS::DirectedEnergyPrecisionAimpoint", ptr %5, i32 0, i32 2
  store i16 88, ptr %7, align 4, !tbaa !21
  %8 = getelementptr inbounds %"class.DIS::DirectedEnergyPrecisionAimpoint", ptr %5, i32 0, i32 3
  store i16 0, ptr %8, align 2, !tbaa !22
  %9 = getelementptr inbounds %"class.DIS::DirectedEnergyPrecisionAimpoint", ptr %5, i32 0, i32 4
  call void @_ZN3DIS13Vector3DoubleC1Ev(ptr noundef nonnull align 8 dereferenceable(32) %9)
  %10 = getelementptr inbounds %"class.DIS::DirectedEnergyPrecisionAimpoint", ptr %5, i32 0, i32 5
  invoke void @_ZN3DIS12Vector3FloatC1Ev(ptr noundef nonnull align 8 dereferenceable(20) %10)
          to label %11 unwind label %23

11:                                               ; preds = %1
  %12 = getelementptr inbounds %"class.DIS::DirectedEnergyPrecisionAimpoint", ptr %5, i32 0, i32 6
  invoke void @_ZN3DIS12Vector3FloatC1Ev(ptr noundef nonnull align 8 dereferenceable(20) %12)
          to label %13 unwind label %27

13:                                               ; preds = %11
  %14 = getelementptr inbounds %"class.DIS::DirectedEnergyPrecisionAimpoint", ptr %5, i32 0, i32 7
  invoke void @_ZN3DIS12Vector3FloatC1Ev(ptr noundef nonnull align 8 dereferenceable(20) %14)
          to label %15 unwind label %31

15:                                               ; preds = %13
  %16 = getelementptr inbounds %"class.DIS::DirectedEnergyPrecisionAimpoint", ptr %5, i32 0, i32 8
  invoke void @_ZN3DIS8EntityIDC1Ev(ptr noundef nonnull align 8 dereferenceable(26) %16)
          to label %17 unwind label %35

17:                                               ; preds = %15
  %18 = getelementptr inbounds %"class.DIS::DirectedEnergyPrecisionAimpoint", ptr %5, i32 0, i32 9
  store i8 0, ptr %18, align 8, !tbaa !23
  %19 = getelementptr inbounds %"class.DIS::DirectedEnergyPrecisionAimpoint", ptr %5, i32 0, i32 10
  store i8 0, ptr %19, align 1, !tbaa !24
  %20 = getelementptr inbounds %"class.DIS::DirectedEnergyPrecisionAimpoint", ptr %5, i32 0, i32 11
  store float 0.000000e+00, ptr %20, align 4, !tbaa !25
  %21 = getelementptr inbounds %"class.DIS::DirectedEnergyPrecisionAimpoint", ptr %5, i32 0, i32 12
  store float 0.000000e+00, ptr %21, align 8, !tbaa !26
  %22 = getelementptr inbounds %"class.DIS::DirectedEnergyPrecisionAimpoint", ptr %5, i32 0, i32 13
  store float 0.000000e+00, ptr %22, align 4, !tbaa !27
  ret void

23:                                               ; preds = %1
  %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
  br label %41

27:                                               ; preds = %11
  %28 = landingpad { ptr, i32 }
          cleanup
  %29 = extractvalue { ptr, i32 } %28, 0
  store ptr %29, ptr %3, align 8
  %30 = extractvalue { ptr, i32 } %28, 1
  store i32 %30, ptr %4, align 4
  br label %40

31:                                               ; preds = %13
  %32 = landingpad { ptr, i32 }
          cleanup
  %33 = extractvalue { ptr, i32 } %32, 0
  store ptr %33, ptr %3, align 8
  %34 = extractvalue { ptr, i32 } %32, 1
  store i32 %34, ptr %4, align 4
  br label %39

35:                                               ; preds = %15
  %36 = landingpad { ptr, i32 }
          cleanup
  %37 = extractvalue { ptr, i32 } %36, 0
  store ptr %37, ptr %3, align 8
  %38 = extractvalue { ptr, i32 } %36, 1
  store i32 %38, ptr %4, align 4
  call void @_ZN3DIS12Vector3FloatD1Ev(ptr noundef nonnull align 8 dereferenceable(20) %14) #3
  br label %39

39:                                               ; preds = %35, %31
  call void @_ZN3DIS12Vector3FloatD1Ev(ptr noundef nonnull align 8 dereferenceable(20) %12) #3
  br label %40

40:                                               ; preds = %39, %27
  call void @_ZN3DIS12Vector3FloatD1Ev(ptr noundef nonnull align 8 dereferenceable(20) %10) #3
  br label %41

41:                                               ; preds = %40, %23
  call void @_ZN3DIS13Vector3DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %9) #3
  br label %42

42:                                               ; preds = %41
  %43 = load ptr, ptr %3, align 8
  %44 = load i32, ptr %4, align 4
  %45 = insertvalue { ptr, i32 } poison, ptr %43, 0
  %46 = insertvalue { ptr, i32 } %45, i32 %44, 1
  resume { ptr, i32 } %46
}

declare void @_ZN3DIS13Vector3DoubleC1Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1

declare void @_ZN3DIS12Vector3FloatC1Ev(ptr noundef nonnull align 8 dereferenceable(20)) unnamed_addr #1

declare i32 @__gxx_personality_v0(...)

declare void @_ZN3DIS8EntityIDC1Ev(ptr noundef nonnull align 8 dereferenceable(26)) unnamed_addr #1

; Function Attrs: nounwind
declare void @_ZN3DIS12Vector3FloatD1Ev(ptr noundef nonnull align 8 dereferenceable(20)) unnamed_addr #2

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

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 = { 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 #3 = { 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, !13, i64 8}
!12 = !{!"_ZTSN3DIS31DirectedEnergyPrecisionAimpointE", !13, i64 8, !14, i64 12, !14, i64 14, !15, i64 16, !17, i64 48, !17, i64 72, !17, i64 96, !19, i64 120, !7, i64 152, !7, i64 153, !18, i64 156, !18, i64 160, !18, i64 164}
!13 = !{!"int", !7, i64 0}
!14 = !{!"short", !7, i64 0}
!15 = !{!"_ZTSN3DIS13Vector3DoubleE", !16, i64 8, !16, i64 16, !16, i64 24}
!16 = !{!"double", !7, i64 0}
!17 = !{!"_ZTSN3DIS12Vector3FloatE", !18, i64 8, !18, i64 12, !18, i64 16}
!18 = !{!"float", !7, i64 0}
!19 = !{!"_ZTSN3DIS8EntityIDE", !20, i64 8, !14, i64 24}
!20 = !{!"_ZTSN3DIS17SimulationAddressE", !14, i64 8, !14, i64 10}
!21 = !{!12, !14, i64 12}
!22 = !{!12, !14, i64 14}
!23 = !{!12, !7, i64 152}
!24 = !{!12, !7, i64 153}
!25 = !{!12, !18, i64 156}
!26 = !{!12, !18, i64 160}
!27 = !{!12, !18, i64 164}


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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3DIS31DirectedEnergyPrecisionAimpointC2Ev(ptr noundef nonnull align 8 dereferenceable(168) %0) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  store ptr getelementptr inbounds inrange(-16, 40) (i8, ptr @_ZTVN3DIS31DirectedEnergyPrecisionAimpointE, i64 16), ptr %0, align 8, !tbaa !5
  %2 = getelementptr inbounds i8, ptr %0, i64 8
  store i32 4000, ptr %2, align 8, !tbaa !8
  %3 = getelementptr inbounds i8, ptr %0, i64 12
  store i16 88, ptr %3, align 4, !tbaa !19
  %4 = getelementptr inbounds i8, ptr %0, i64 14
  store i16 0, ptr %4, align 2, !tbaa !20
  %5 = getelementptr inbounds i8, ptr %0, i64 16
  tail call void @_ZN3DIS13Vector3DoubleC1Ev(ptr noundef nonnull align 8 dereferenceable(32) %5)
  %6 = getelementptr inbounds i8, ptr %0, i64 48
  invoke void @_ZN3DIS12Vector3FloatC1Ev(ptr noundef nonnull align 8 dereferenceable(20) %6)
          to label %7 unwind label %18

7:                                                ; preds = %1
  %8 = getelementptr inbounds i8, ptr %0, i64 72
  invoke void @_ZN3DIS12Vector3FloatC1Ev(ptr noundef nonnull align 8 dereferenceable(20) %8)
          to label %9 unwind label %20

9:                                                ; preds = %7
  %10 = getelementptr inbounds i8, ptr %0, i64 96
  invoke void @_ZN3DIS12Vector3FloatC1Ev(ptr noundef nonnull align 8 dereferenceable(20) %10)
          to label %11 unwind label %22

11:                                               ; preds = %9
  %12 = getelementptr inbounds i8, ptr %0, i64 120
  invoke void @_ZN3DIS8EntityIDC1Ev(ptr noundef nonnull align 8 dereferenceable(26) %12)
          to label %13 unwind label %24

13:                                               ; preds = %11
  %14 = getelementptr inbounds i8, ptr %0, i64 152
  store i8 0, ptr %14, align 8, !tbaa !21
  %15 = getelementptr inbounds i8, ptr %0, i64 153
  store i8 0, ptr %15, align 1, !tbaa !22
  %16 = getelementptr inbounds i8, ptr %0, i64 156
  store <2 x float> zeroinitializer, ptr %16, align 4, !tbaa !23
  %17 = getelementptr inbounds i8, ptr %0, i64 164
  store float 0.000000e+00, ptr %17, align 4, !tbaa !24
  ret void

18:                                               ; preds = %1
  %19 = landingpad { ptr, i32 }
          cleanup
  br label %28

20:                                               ; preds = %7
  %21 = landingpad { ptr, i32 }
          cleanup
  br label %27

22:                                               ; preds = %9
  %23 = landingpad { ptr, i32 }
          cleanup
  br label %26

24:                                               ; preds = %11
  %25 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZN3DIS12Vector3FloatD1Ev(ptr noundef nonnull align 8 dereferenceable(20) %10) #3
  br label %26

26:                                               ; preds = %24, %22
  %.pn = phi { ptr, i32 } [ %25, %24 ], [ %23, %22 ]
  tail call void @_ZN3DIS12Vector3FloatD1Ev(ptr noundef nonnull align 8 dereferenceable(20) %8) #3
  br label %27

27:                                               ; preds = %26, %20
  %.pn.pn = phi { ptr, i32 } [ %.pn, %26 ], [ %21, %20 ]
  tail call void @_ZN3DIS12Vector3FloatD1Ev(ptr noundef nonnull align 8 dereferenceable(20) %6) #3
  br label %28

28:                                               ; preds = %27, %18
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %27 ], [ %19, %18 ]
  tail call void @_ZN3DIS13Vector3DoubleD1Ev(ptr noundef nonnull align 8 dereferenceable(32) %5) #3
  resume { ptr, i32 } %.pn.pn.pn
}

declare void @_ZN3DIS13Vector3DoubleC1Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1

declare void @_ZN3DIS12Vector3FloatC1Ev(ptr noundef nonnull align 8 dereferenceable(20)) unnamed_addr #1

declare i32 @__gxx_personality_v0(...)

declare void @_ZN3DIS8EntityIDC1Ev(ptr noundef nonnull align 8 dereferenceable(26)) unnamed_addr #1

; Function Attrs: nounwind
declare void @_ZN3DIS12Vector3FloatD1Ev(ptr noundef nonnull align 8 dereferenceable(20)) unnamed_addr #2

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

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 = { 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 #3 = { 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 = !{!"_ZTSN3DIS31DirectedEnergyPrecisionAimpointE", !10, i64 8, !12, i64 12, !12, i64 14, !13, i64 16, !15, i64 48, !15, i64 72, !15, i64 96, !17, i64 120, !11, i64 152, !11, i64 153, !16, i64 156, !16, i64 160, !16, i64 164}
!10 = !{!"int", !11, i64 0}
!11 = !{!"omnipotent char", !7, i64 0}
!12 = !{!"short", !11, i64 0}
!13 = !{!"_ZTSN3DIS13Vector3DoubleE", !14, i64 8, !14, i64 16, !14, i64 24}
!14 = !{!"double", !11, i64 0}
!15 = !{!"_ZTSN3DIS12Vector3FloatE", !16, i64 8, !16, i64 12, !16, i64 16}
!16 = !{!"float", !11, i64 0}
!17 = !{!"_ZTSN3DIS8EntityIDE", !18, i64 8, !12, i64 24}
!18 = !{!"_ZTSN3DIS17SimulationAddressE", !12, i64 8, !12, i64 10}
!19 = !{!9, !12, i64 12}
!20 = !{!9, !12, i64 14}
!21 = !{!9, !11, i64 152}
!22 = !{!9, !11, i64 153}
!23 = !{!16, !16, i64 0}
!24 = !{!9, !16, i64 164}


; Effective O3 passes: InstCombinePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass