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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZNK3DIS20DirectedEnergyDamageeqERKS0_(ptr noundef nonnull align 8 dereferenceable(90) %0, ptr noundef nonnull align 8 dereferenceable(90) %1) #0 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i8, align 1
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %6 = load ptr, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #3
  store i8 1, ptr %5, align 1, !tbaa !9
  %7 = getelementptr inbounds %"class.DIS::DirectedEnergyDamage", ptr %6, i32 0, i32 1
  %8 = load i32, ptr %7, align 8, !tbaa !11
  %9 = load ptr, ptr %4, align 8, !tbaa !5
  %10 = getelementptr inbounds %"class.DIS::DirectedEnergyDamage", ptr %9, i32 0, i32 1
  %11 = load i32, ptr %10, align 8, !tbaa !11
  %12 = icmp eq i32 %8, %11
  br i1 %12, label %14, label %13

13:                                               ; preds = %2
  store i8 0, ptr %5, align 1, !tbaa !9
  br label %14

14:                                               ; preds = %13, %2
  %15 = getelementptr inbounds %"class.DIS::DirectedEnergyDamage", ptr %6, i32 0, i32 2
  %16 = load i16, ptr %15, align 4, !tbaa !19
  %17 = zext i16 %16 to i32
  %18 = load ptr, ptr %4, align 8, !tbaa !5
  %19 = getelementptr inbounds %"class.DIS::DirectedEnergyDamage", ptr %18, i32 0, i32 2
  %20 = load i16, ptr %19, align 4, !tbaa !19
  %21 = zext i16 %20 to i32
  %22 = icmp eq i32 %17, %21
  br i1 %22, label %24, label %23

23:                                               ; preds = %14
  store i8 0, ptr %5, align 1, !tbaa !9
  br label %24

24:                                               ; preds = %23, %14
  %25 = getelementptr inbounds %"class.DIS::DirectedEnergyDamage", ptr %6, i32 0, i32 3
  %26 = load i16, ptr %25, align 2, !tbaa !20
  %27 = zext i16 %26 to i32
  %28 = load ptr, ptr %4, align 8, !tbaa !5
  %29 = getelementptr inbounds %"class.DIS::DirectedEnergyDamage", ptr %28, i32 0, i32 3
  %30 = load i16, ptr %29, align 2, !tbaa !20
  %31 = zext i16 %30 to i32
  %32 = icmp eq i32 %27, %31
  br i1 %32, label %34, label %33

33:                                               ; preds = %24
  store i8 0, ptr %5, align 1, !tbaa !9
  br label %34

34:                                               ; preds = %33, %24
  %35 = getelementptr inbounds %"class.DIS::DirectedEnergyDamage", ptr %6, i32 0, i32 4
  %36 = load ptr, ptr %4, align 8, !tbaa !5
  %37 = getelementptr inbounds %"class.DIS::DirectedEnergyDamage", ptr %36, i32 0, i32 4
  %38 = call noundef zeroext i1 @_ZNK3DIS12Vector3FloateqERKS0_(ptr noundef nonnull align 8 dereferenceable(20) %35, ptr noundef nonnull align 8 dereferenceable(20) %37)
  br i1 %38, label %40, label %39

39:                                               ; preds = %34
  store i8 0, ptr %5, align 1, !tbaa !9
  br label %40

40:                                               ; preds = %39, %34
  %41 = getelementptr inbounds %"class.DIS::DirectedEnergyDamage", ptr %6, i32 0, i32 5
  %42 = load float, ptr %41, align 8, !tbaa !21
  %43 = load ptr, ptr %4, align 8, !tbaa !5
  %44 = getelementptr inbounds %"class.DIS::DirectedEnergyDamage", ptr %43, i32 0, i32 5
  %45 = load float, ptr %44, align 8, !tbaa !21
  %46 = fcmp oeq float %42, %45
  br i1 %46, label %48, label %47

47:                                               ; preds = %40
  store i8 0, ptr %5, align 1, !tbaa !9
  br label %48

48:                                               ; preds = %47, %40
  %49 = getelementptr inbounds %"class.DIS::DirectedEnergyDamage", ptr %6, i32 0, i32 6
  %50 = load float, ptr %49, align 4, !tbaa !22
  %51 = load ptr, ptr %4, align 8, !tbaa !5
  %52 = getelementptr inbounds %"class.DIS::DirectedEnergyDamage", ptr %51, i32 0, i32 6
  %53 = load float, ptr %52, align 4, !tbaa !22
  %54 = fcmp oeq float %50, %53
  br i1 %54, label %56, label %55

55:                                               ; preds = %48
  store i8 0, ptr %5, align 1, !tbaa !9
  br label %56

56:                                               ; preds = %55, %48
  %57 = getelementptr inbounds %"class.DIS::DirectedEnergyDamage", ptr %6, i32 0, i32 7
  %58 = load i8, ptr %57, align 8, !tbaa !23
  %59 = zext i8 %58 to i32
  %60 = load ptr, ptr %4, align 8, !tbaa !5
  %61 = getelementptr inbounds %"class.DIS::DirectedEnergyDamage", ptr %60, i32 0, i32 7
  %62 = load i8, ptr %61, align 8, !tbaa !23
  %63 = zext i8 %62 to i32
  %64 = icmp eq i32 %59, %63
  br i1 %64, label %66, label %65

65:                                               ; preds = %56
  store i8 0, ptr %5, align 1, !tbaa !9
  br label %66

66:                                               ; preds = %65, %56
  %67 = getelementptr inbounds %"class.DIS::DirectedEnergyDamage", ptr %6, i32 0, i32 8
  %68 = load i8, ptr %67, align 1, !tbaa !24
  %69 = zext i8 %68 to i32
  %70 = load ptr, ptr %4, align 8, !tbaa !5
  %71 = getelementptr inbounds %"class.DIS::DirectedEnergyDamage", ptr %70, i32 0, i32 8
  %72 = load i8, ptr %71, align 1, !tbaa !24
  %73 = zext i8 %72 to i32
  %74 = icmp eq i32 %69, %73
  br i1 %74, label %76, label %75

75:                                               ; preds = %66
  store i8 0, ptr %5, align 1, !tbaa !9
  br label %76

76:                                               ; preds = %75, %66
  %77 = getelementptr inbounds %"class.DIS::DirectedEnergyDamage", ptr %6, i32 0, i32 9
  %78 = load i8, ptr %77, align 2, !tbaa !25
  %79 = zext i8 %78 to i32
  %80 = load ptr, ptr %4, align 8, !tbaa !5
  %81 = getelementptr inbounds %"class.DIS::DirectedEnergyDamage", ptr %80, i32 0, i32 9
  %82 = load i8, ptr %81, align 2, !tbaa !25
  %83 = zext i8 %82 to i32
  %84 = icmp eq i32 %79, %83
  br i1 %84, label %86, label %85

85:                                               ; preds = %76
  store i8 0, ptr %5, align 1, !tbaa !9
  br label %86

86:                                               ; preds = %85, %76
  %87 = getelementptr inbounds %"class.DIS::DirectedEnergyDamage", ptr %6, i32 0, i32 10
  %88 = load i8, ptr %87, align 1, !tbaa !26
  %89 = zext i8 %88 to i32
  %90 = load ptr, ptr %4, align 8, !tbaa !5
  %91 = getelementptr inbounds %"class.DIS::DirectedEnergyDamage", ptr %90, i32 0, i32 10
  %92 = load i8, ptr %91, align 1, !tbaa !26
  %93 = zext i8 %92 to i32
  %94 = icmp eq i32 %89, %93
  br i1 %94, label %96, label %95

95:                                               ; preds = %86
  store i8 0, ptr %5, align 1, !tbaa !9
  br label %96

96:                                               ; preds = %95, %86
  %97 = getelementptr inbounds %"class.DIS::DirectedEnergyDamage", ptr %6, i32 0, i32 12
  %98 = load ptr, ptr %4, align 8, !tbaa !5
  %99 = getelementptr inbounds %"class.DIS::DirectedEnergyDamage", ptr %98, i32 0, i32 12
  %100 = call noundef zeroext i1 @_ZNK3DIS15EventIdentifiereqERKS0_(ptr noundef nonnull align 8 dereferenceable(26) %97, ptr noundef nonnull align 8 dereferenceable(26) %99)
  br i1 %100, label %102, label %101

101:                                              ; preds = %96
  store i8 0, ptr %5, align 1, !tbaa !9
  br label %102

102:                                              ; preds = %101, %96
  %103 = getelementptr inbounds %"class.DIS::DirectedEnergyDamage", ptr %6, i32 0, i32 13
  %104 = load i16, ptr %103, align 8, !tbaa !27
  %105 = zext i16 %104 to i32
  %106 = load ptr, ptr %4, align 8, !tbaa !5
  %107 = getelementptr inbounds %"class.DIS::DirectedEnergyDamage", ptr %106, i32 0, i32 13
  %108 = load i16, ptr %107, align 8, !tbaa !27
  %109 = zext i16 %108 to i32
  %110 = icmp eq i32 %105, %109
  br i1 %110, label %112, label %111

111:                                              ; preds = %102
  store i8 0, ptr %5, align 1, !tbaa !9
  br label %112

112:                                              ; preds = %111, %102
  %113 = load i8, ptr %5, align 1, !tbaa !9, !range !28, !noundef !29
  %114 = trunc i8 %113 to i1
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #3
  ret i1 %114
}

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1

declare noundef zeroext i1 @_ZNK3DIS12Vector3FloateqERKS0_(ptr noundef nonnull align 8 dereferenceable(20), ptr noundef nonnull align 8 dereferenceable(20)) #2

declare noundef zeroext i1 @_ZNK3DIS15EventIdentifiereqERKS0_(ptr noundef nonnull align 8 dereferenceable(26), ptr noundef nonnull align 8 dereferenceable(26)) #2

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1

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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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" }
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 = !{!"bool", !7, i64 0}
!11 = !{!12, !13, i64 8}
!12 = !{!"_ZTSN3DIS20DirectedEnergyDamageE", !13, i64 8, !14, i64 12, !14, i64 14, !15, i64 16, !16, i64 40, !16, i64 44, !7, i64 48, !7, i64 49, !7, i64 50, !7, i64 51, !17, i64 56, !14, i64 88}
!13 = !{!"int", !7, i64 0}
!14 = !{!"short", !7, i64 0}
!15 = !{!"_ZTSN3DIS12Vector3FloatE", !16, i64 8, !16, i64 12, !16, i64 16}
!16 = !{!"float", !7, i64 0}
!17 = !{!"_ZTSN3DIS15EventIdentifierE", !18, i64 8, !14, i64 24}
!18 = !{!"_ZTSN3DIS17SimulationAddressE", !14, i64 8, !14, i64 10}
!19 = !{!12, !14, i64 12}
!20 = !{!12, !14, i64 14}
!21 = !{!12, !16, i64 40}
!22 = !{!12, !16, i64 44}
!23 = !{!12, !7, i64 48}
!24 = !{!12, !7, i64 49}
!25 = !{!12, !7, i64 50}
!26 = !{!12, !7, i64 51}
!27 = !{!12, !14, i64 88}
!28 = !{i8 0, i8 2}
!29 = !{}


; 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 uwtable
define dso_local noundef zeroext i1 @_ZNK3DIS20DirectedEnergyDamageeqERKS0_(ptr noundef nonnull align 8 dereferenceable(90) %0, ptr noundef nonnull align 8 dereferenceable(90) %1) local_unnamed_addr #0 align 2 {
  %3 = getelementptr inbounds i8, ptr %0, i64 8
  %4 = load i32, ptr %3, align 8, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %1, i64 8
  %6 = load i32, ptr %5, align 8, !tbaa !5
  %7 = icmp eq i32 %4, %6
  %8 = getelementptr inbounds i8, ptr %0, i64 12
  %9 = load i16, ptr %8, align 4, !tbaa !15
  %10 = getelementptr inbounds i8, ptr %1, i64 12
  %11 = load i16, ptr %10, align 4, !tbaa !15
  %12 = icmp eq i16 %9, %11
  %13 = getelementptr inbounds i8, ptr %0, i64 14
  %14 = load i16, ptr %13, align 2, !tbaa !16
  %15 = getelementptr inbounds i8, ptr %1, i64 14
  %16 = load i16, ptr %15, align 2, !tbaa !16
  %17 = icmp eq i16 %14, %16
  %18 = getelementptr inbounds i8, ptr %0, i64 16
  %19 = getelementptr inbounds i8, ptr %1, i64 16
  %20 = tail call noundef zeroext i1 @_ZNK3DIS12Vector3FloateqERKS0_(ptr noundef nonnull align 8 dereferenceable(20) %18, ptr noundef nonnull align 8 dereferenceable(20) %19)
  %21 = select i1 %20, i1 %17, i1 false
  %22 = select i1 %21, i1 %12, i1 false
  %spec.select13 = select i1 %22, i1 %7, i1 false
  %23 = getelementptr inbounds i8, ptr %0, i64 40
  %24 = load float, ptr %23, align 8, !tbaa !17
  %25 = getelementptr inbounds i8, ptr %1, i64 40
  %26 = load float, ptr %25, align 8, !tbaa !17
  %27 = fcmp oeq float %24, %26
  br i1 %27, label %29, label %28

28:                                               ; preds = %2
  br label %29

29:                                               ; preds = %28, %2
  %.3 = phi i1 [ %spec.select13, %2 ], [ false, %28 ]
  %30 = getelementptr inbounds i8, ptr %0, i64 44
  %31 = load float, ptr %30, align 4, !tbaa !18
  %32 = getelementptr inbounds i8, ptr %1, i64 44
  %33 = load float, ptr %32, align 4, !tbaa !18
  %34 = fcmp oeq float %31, %33
  %35 = getelementptr inbounds i8, ptr %0, i64 48
  %36 = getelementptr inbounds i8, ptr %1, i64 48
  %37 = load <4 x i8>, ptr %35, align 8, !tbaa !19
  %38 = load <4 x i8>, ptr %36, align 8, !tbaa !19
  %39 = icmp eq <4 x i8> %37, %38
  %40 = getelementptr inbounds i8, ptr %0, i64 56
  %41 = getelementptr inbounds i8, ptr %1, i64 56
  %42 = tail call noundef zeroext i1 @_ZNK3DIS15EventIdentifiereqERKS0_(ptr noundef nonnull align 8 dereferenceable(26) %40, ptr noundef nonnull align 8 dereferenceable(26) %41)
  %43 = getelementptr inbounds i8, ptr %0, i64 88
  %44 = load i16, ptr %43, align 8, !tbaa !20
  %45 = getelementptr inbounds i8, ptr %1, i64 88
  %46 = load i16, ptr %45, align 8, !tbaa !20
  %47 = icmp eq i16 %44, %46
  %48 = freeze <4 x i1> %39
  %49 = bitcast <4 x i1> %48 to i4
  %50 = icmp eq i4 %49, -1
  %.fr = freeze i1 %47
  %op.rdx = and i1 %50, %.fr
  %51 = freeze i1 %.3
  %52 = and i1 %op.rdx, %51
  %.fr24 = freeze i1 %34
  %op.rdx22 = and i1 %52, %.fr24
  %op.rdx23 = and i1 %op.rdx22, %42
  ret i1 %op.rdx23
}

declare noundef zeroext i1 @_ZNK3DIS12Vector3FloateqERKS0_(ptr noundef nonnull align 8 dereferenceable(20), ptr noundef nonnull align 8 dereferenceable(20)) local_unnamed_addr #1

declare noundef zeroext i1 @_ZNK3DIS15EventIdentifiereqERKS0_(ptr noundef nonnull align 8 dereferenceable(26), ptr noundef nonnull align 8 dereferenceable(26)) local_unnamed_addr #1

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

!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, !7, i64 8}
!6 = !{!"_ZTSN3DIS20DirectedEnergyDamageE", !7, i64 8, !10, i64 12, !10, i64 14, !11, i64 16, !12, i64 40, !12, i64 44, !8, i64 48, !8, i64 49, !8, i64 50, !8, i64 51, !13, i64 56, !10, i64 88}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"short", !8, i64 0}
!11 = !{!"_ZTSN3DIS12Vector3FloatE", !12, i64 8, !12, i64 12, !12, i64 16}
!12 = !{!"float", !8, i64 0}
!13 = !{!"_ZTSN3DIS15EventIdentifierE", !14, i64 8, !10, i64 24}
!14 = !{!"_ZTSN3DIS17SimulationAddressE", !10, i64 8, !10, i64 10}
!15 = !{!6, !10, i64 12}
!16 = !{!6, !10, i64 14}
!17 = !{!6, !12, i64 40}
!18 = !{!6, !12, i64 44}
!19 = !{!8, !8, i64 0}
!20 = !{!6, !10, i64 88}


; Effective O3 passes: GlobalDCEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass