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

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZNK3DIS22LaunchedMunitionRecordeqERKS0_(ptr noundef nonnull align 8 dereferenceable(160) %0, ptr noundef nonnull align 8 dereferenceable(160) %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::LaunchedMunitionRecord", ptr %6, i32 0, i32 1
  %8 = load ptr, ptr %4, align 8, !tbaa !5
  %9 = getelementptr inbounds %"class.DIS::LaunchedMunitionRecord", ptr %8, i32 0, i32 1
  %10 = call noundef zeroext i1 @_ZNK3DIS15EventIdentifiereqERKS0_(ptr noundef nonnull align 8 dereferenceable(26) %7, ptr noundef nonnull align 8 dereferenceable(26) %9)
  br i1 %10, label %12, label %11

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

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

21:                                               ; preds = %12
  store i8 0, ptr %5, align 1, !tbaa !9
  br label %22

22:                                               ; preds = %21, %12
  %23 = getelementptr inbounds %"class.DIS::LaunchedMunitionRecord", ptr %6, i32 0, i32 4
  %24 = load ptr, ptr %4, align 8, !tbaa !5
  %25 = getelementptr inbounds %"class.DIS::LaunchedMunitionRecord", ptr %24, i32 0, i32 4
  %26 = call noundef zeroext i1 @_ZNK3DIS15EventIdentifiereqERKS0_(ptr noundef nonnull align 8 dereferenceable(26) %23, ptr noundef nonnull align 8 dereferenceable(26) %25)
  br i1 %26, label %28, label %27

27:                                               ; preds = %22
  store i8 0, ptr %5, align 1, !tbaa !9
  br label %28

28:                                               ; preds = %27, %22
  %29 = getelementptr inbounds %"class.DIS::LaunchedMunitionRecord", ptr %6, i32 0, i32 5
  %30 = load i16, ptr %29, align 8, !tbaa !18
  %31 = zext i16 %30 to i32
  %32 = load ptr, ptr %4, align 8, !tbaa !5
  %33 = getelementptr inbounds %"class.DIS::LaunchedMunitionRecord", ptr %32, i32 0, i32 5
  %34 = load i16, ptr %33, align 8, !tbaa !18
  %35 = zext i16 %34 to i32
  %36 = icmp eq i32 %31, %35
  br i1 %36, label %38, label %37

37:                                               ; preds = %28
  store i8 0, ptr %5, align 1, !tbaa !9
  br label %38

38:                                               ; preds = %37, %28
  %39 = getelementptr inbounds %"class.DIS::LaunchedMunitionRecord", ptr %6, i32 0, i32 7
  %40 = load ptr, ptr %4, align 8, !tbaa !5
  %41 = getelementptr inbounds %"class.DIS::LaunchedMunitionRecord", ptr %40, i32 0, i32 7
  %42 = call noundef zeroext i1 @_ZNK3DIS15EventIdentifiereqERKS0_(ptr noundef nonnull align 8 dereferenceable(26) %39, ptr noundef nonnull align 8 dereferenceable(26) %41)
  br i1 %42, label %44, label %43

43:                                               ; preds = %38
  store i8 0, ptr %5, align 1, !tbaa !9
  br label %44

44:                                               ; preds = %43, %38
  %45 = getelementptr inbounds %"class.DIS::LaunchedMunitionRecord", ptr %6, i32 0, i32 8
  %46 = load i16, ptr %45, align 8, !tbaa !19
  %47 = zext i16 %46 to i32
  %48 = load ptr, ptr %4, align 8, !tbaa !5
  %49 = getelementptr inbounds %"class.DIS::LaunchedMunitionRecord", ptr %48, i32 0, i32 8
  %50 = load i16, ptr %49, align 8, !tbaa !19
  %51 = zext i16 %50 to i32
  %52 = icmp eq i32 %47, %51
  br i1 %52, label %54, label %53

53:                                               ; preds = %44
  store i8 0, ptr %5, align 1, !tbaa !9
  br label %54

54:                                               ; preds = %53, %44
  %55 = getelementptr inbounds %"class.DIS::LaunchedMunitionRecord", ptr %6, i32 0, i32 9
  %56 = load ptr, ptr %4, align 8, !tbaa !5
  %57 = getelementptr inbounds %"class.DIS::LaunchedMunitionRecord", ptr %56, i32 0, i32 9
  %58 = call noundef zeroext i1 @_ZNK3DIS13Vector3DoubleeqERKS0_(ptr noundef nonnull align 8 dereferenceable(32) %55, ptr noundef nonnull align 8 dereferenceable(32) %57)
  br i1 %58, label %60, label %59

59:                                               ; preds = %54
  store i8 0, ptr %5, align 1, !tbaa !9
  br label %60

60:                                               ; preds = %59, %54
  %61 = load i8, ptr %5, align 1, !tbaa !9, !range !20, !noundef !21
  %62 = trunc i8 %61 to i1
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #3
  ret i1 %62
}

; 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 @_ZNK3DIS15EventIdentifiereqERKS0_(ptr noundef nonnull align 8 dereferenceable(26), ptr noundef nonnull align 8 dereferenceable(26)) #2

declare noundef zeroext i1 @_ZNK3DIS13Vector3DoubleeqERKS0_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) #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, !15, i64 40}
!12 = !{!"_ZTSN3DIS22LaunchedMunitionRecordE", !13, i64 8, !15, i64 40, !13, i64 48, !15, i64 80, !13, i64 88, !15, i64 120, !16, i64 128}
!13 = !{!"_ZTSN3DIS15EventIdentifierE", !14, i64 8, !15, i64 24}
!14 = !{!"_ZTSN3DIS17SimulationAddressE", !15, i64 8, !15, i64 10}
!15 = !{!"short", !7, i64 0}
!16 = !{!"_ZTSN3DIS13Vector3DoubleE", !17, i64 8, !17, i64 16, !17, i64 24}
!17 = !{!"double", !7, i64 0}
!18 = !{!12, !15, i64 80}
!19 = !{!12, !15, i64 120}
!20 = !{i8 0, i8 2}
!21 = !{}


; 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 @_ZNK3DIS22LaunchedMunitionRecordeqERKS0_(ptr noundef nonnull align 8 dereferenceable(160) %0, ptr noundef nonnull align 8 dereferenceable(160) %1) local_unnamed_addr #0 align 2 {
  %3 = getelementptr inbounds i8, ptr %0, i64 8
  %4 = getelementptr inbounds i8, ptr %1, i64 8
  %5 = tail call noundef zeroext i1 @_ZNK3DIS15EventIdentifiereqERKS0_(ptr noundef nonnull align 8 dereferenceable(26) %3, ptr noundef nonnull align 8 dereferenceable(26) %4)
  %6 = getelementptr inbounds i8, ptr %0, i64 40
  %7 = load i16, ptr %6, align 8, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %1, i64 40
  %9 = load i16, ptr %8, align 8, !tbaa !5
  %10 = icmp eq i16 %7, %9
  %.1 = and i1 %5, %10
  %11 = getelementptr inbounds i8, ptr %0, i64 48
  %12 = getelementptr inbounds i8, ptr %1, i64 48
  %13 = tail call noundef zeroext i1 @_ZNK3DIS15EventIdentifiereqERKS0_(ptr noundef nonnull align 8 dereferenceable(26) %11, ptr noundef nonnull align 8 dereferenceable(26) %12)
  %14 = getelementptr inbounds i8, ptr %0, i64 80
  %15 = load i16, ptr %14, align 8, !tbaa !14
  %16 = getelementptr inbounds i8, ptr %1, i64 80
  %17 = load i16, ptr %16, align 8, !tbaa !14
  %18 = icmp eq i16 %15, %17
  %19 = and i1 %13, %18
  %20 = getelementptr inbounds i8, ptr %0, i64 88
  %21 = getelementptr inbounds i8, ptr %1, i64 88
  %22 = tail call noundef zeroext i1 @_ZNK3DIS15EventIdentifiereqERKS0_(ptr noundef nonnull align 8 dereferenceable(26) %20, ptr noundef nonnull align 8 dereferenceable(26) %21)
  %23 = getelementptr inbounds i8, ptr %0, i64 120
  %24 = load i16, ptr %23, align 8, !tbaa !15
  %25 = getelementptr inbounds i8, ptr %1, i64 120
  %26 = load i16, ptr %25, align 8, !tbaa !15
  %27 = icmp eq i16 %24, %26
  %28 = and i1 %22, %27
  %29 = getelementptr inbounds i8, ptr %0, i64 128
  %30 = getelementptr inbounds i8, ptr %1, i64 128
  %31 = tail call noundef zeroext i1 @_ZNK3DIS13Vector3DoubleeqERKS0_(ptr noundef nonnull align 8 dereferenceable(32) %29, ptr noundef nonnull align 8 dereferenceable(32) %30)
  %32 = select i1 %31, i1 %28, i1 false
  %33 = select i1 %32, i1 %19, i1 false
  %spec.select11 = select i1 %33, i1 %.1, i1 false
  ret i1 %spec.select11
}

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

declare noundef zeroext i1 @_ZNK3DIS13Vector3DoubleeqERKS0_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) 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, !9, i64 40}
!6 = !{!"_ZTSN3DIS22LaunchedMunitionRecordE", !7, i64 8, !9, i64 40, !7, i64 48, !9, i64 80, !7, i64 88, !9, i64 120, !12, i64 128}
!7 = !{!"_ZTSN3DIS15EventIdentifierE", !8, i64 8, !9, i64 24}
!8 = !{!"_ZTSN3DIS17SimulationAddressE", !9, i64 8, !9, i64 10}
!9 = !{!"short", !10, i64 0}
!10 = !{!"omnipotent char", !11, i64 0}
!11 = !{!"Simple C++ TBAA"}
!12 = !{!"_ZTSN3DIS13Vector3DoubleE", !13, i64 8, !13, i64 16, !13, i64 24}
!13 = !{!"double", !10, i64 0}
!14 = !{!6, !9, i64 80}
!15 = !{!6, !9, i64 120}


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