; LLVM IR from AF-GRILL/DISPluginForUnreal :: Source/ThirdParty/include/dis6 (LinearSegmentParameter)

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

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZNK3DIS22LinearSegmentParametereqERKS0_(ptr noundef nonnull align 8 dereferenceable(100) %0, ptr noundef nonnull align 8 dereferenceable(100) %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::LinearSegmentParameter", ptr %6, i32 0, i32 1
  %8 = load i8, ptr %7, align 8, !tbaa !11
  %9 = zext i8 %8 to i32
  %10 = load ptr, ptr %4, align 8, !tbaa !5
  %11 = getelementptr inbounds %"class.DIS::LinearSegmentParameter", ptr %10, i32 0, i32 1
  %12 = load i8, ptr %11, align 8, !tbaa !11
  %13 = zext i8 %12 to i32
  %14 = icmp eq i32 %9, %13
  br i1 %14, label %16, label %15

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

16:                                               ; preds = %15, %2
  %17 = getelementptr inbounds %"class.DIS::LinearSegmentParameter", ptr %6, i32 0, i32 3
  %18 = load ptr, ptr %4, align 8, !tbaa !5
  %19 = getelementptr inbounds %"class.DIS::LinearSegmentParameter", ptr %18, i32 0, i32 3
  %20 = call noundef zeroext i1 @_ZNK3DIS12SixByteChunkeqERKS0_(ptr noundef nonnull align 8 dereferenceable(14) %17, ptr noundef nonnull align 8 dereferenceable(14) %19)
  br i1 %20, label %22, label %21

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

22:                                               ; preds = %21, %16
  %23 = getelementptr inbounds %"class.DIS::LinearSegmentParameter", ptr %6, i32 0, i32 4
  %24 = load ptr, ptr %4, align 8, !tbaa !5
  %25 = getelementptr inbounds %"class.DIS::LinearSegmentParameter", ptr %24, i32 0, i32 4
  %26 = call noundef zeroext i1 @_ZNK3DIS13Vector3DoubleeqERKS0_(ptr noundef nonnull align 8 dereferenceable(32) %23, ptr noundef nonnull align 8 dereferenceable(32) %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::LinearSegmentParameter", ptr %6, i32 0, i32 5
  %30 = load ptr, ptr %4, align 8, !tbaa !5
  %31 = getelementptr inbounds %"class.DIS::LinearSegmentParameter", ptr %30, i32 0, i32 5
  %32 = call noundef zeroext i1 @_ZNK3DIS11OrientationeqERKS0_(ptr noundef nonnull align 8 dereferenceable(20) %29, ptr noundef nonnull align 8 dereferenceable(20) %31)
  br i1 %32, label %34, label %33

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

34:                                               ; preds = %33, %28
  %35 = getelementptr inbounds %"class.DIS::LinearSegmentParameter", ptr %6, i32 0, i32 6
  %36 = load i16, ptr %35, align 8, !tbaa !20
  %37 = zext i16 %36 to i32
  %38 = load ptr, ptr %4, align 8, !tbaa !5
  %39 = getelementptr inbounds %"class.DIS::LinearSegmentParameter", ptr %38, i32 0, i32 6
  %40 = load i16, ptr %39, align 8, !tbaa !20
  %41 = zext i16 %40 to i32
  %42 = icmp eq i32 %37, %41
  br i1 %42, label %44, label %43

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

44:                                               ; preds = %43, %34
  %45 = getelementptr inbounds %"class.DIS::LinearSegmentParameter", ptr %6, i32 0, i32 7
  %46 = load i16, ptr %45, align 2, !tbaa !21
  %47 = zext i16 %46 to i32
  %48 = load ptr, ptr %4, align 8, !tbaa !5
  %49 = getelementptr inbounds %"class.DIS::LinearSegmentParameter", ptr %48, i32 0, i32 7
  %50 = load i16, ptr %49, align 2, !tbaa !21
  %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::LinearSegmentParameter", ptr %6, i32 0, i32 8
  %56 = load i16, ptr %55, align 4, !tbaa !22
  %57 = zext i16 %56 to i32
  %58 = load ptr, ptr %4, align 8, !tbaa !5
  %59 = getelementptr inbounds %"class.DIS::LinearSegmentParameter", ptr %58, i32 0, i32 8
  %60 = load i16, ptr %59, align 4, !tbaa !22
  %61 = zext i16 %60 to i32
  %62 = icmp eq i32 %57, %61
  br i1 %62, label %64, label %63

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

64:                                               ; preds = %63, %54
  %65 = getelementptr inbounds %"class.DIS::LinearSegmentParameter", ptr %6, i32 0, i32 9
  %66 = load i16, ptr %65, align 2, !tbaa !23
  %67 = zext i16 %66 to i32
  %68 = load ptr, ptr %4, align 8, !tbaa !5
  %69 = getelementptr inbounds %"class.DIS::LinearSegmentParameter", ptr %68, i32 0, i32 9
  %70 = load i16, ptr %69, align 2, !tbaa !23
  %71 = zext i16 %70 to i32
  %72 = icmp eq i32 %67, %71
  br i1 %72, label %74, label %73

73:                                               ; preds = %64
  store i8 0, ptr %5, align 1, !tbaa !9
  br label %74

74:                                               ; preds = %73, %64
  %75 = getelementptr inbounds %"class.DIS::LinearSegmentParameter", ptr %6, i32 0, i32 10
  %76 = load i32, ptr %75, align 8, !tbaa !24
  %77 = load ptr, ptr %4, align 8, !tbaa !5
  %78 = getelementptr inbounds %"class.DIS::LinearSegmentParameter", ptr %77, i32 0, i32 10
  %79 = load i32, ptr %78, align 8, !tbaa !24
  %80 = icmp eq i32 %76, %79
  br i1 %80, label %82, label %81

81:                                               ; preds = %74
  store i8 0, ptr %5, align 1, !tbaa !9
  br label %82

82:                                               ; preds = %81, %74
  %83 = load i8, ptr %5, align 1, !tbaa !9, !range !25, !noundef !26
  %84 = trunc i8 %83 to i1
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #3
  ret i1 %84
}

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

declare noundef zeroext i1 @_ZNK3DIS13Vector3DoubleeqERKS0_(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef nonnull align 8 dereferenceable(32)) #2

declare noundef zeroext i1 @_ZNK3DIS11OrientationeqERKS0_(ptr noundef nonnull align 8 dereferenceable(20), ptr noundef nonnull align 8 dereferenceable(20)) #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, !7, i64 8}
!12 = !{!"_ZTSN3DIS22LinearSegmentParameterE", !7, i64 8, !13, i64 16, !14, i64 32, !16, i64 64, !18, i64 88, !18, i64 90, !18, i64 92, !18, i64 94, !19, i64 96}
!13 = !{!"_ZTSN3DIS12SixByteChunkE", !7, i64 8}
!14 = !{!"_ZTSN3DIS13Vector3DoubleE", !15, i64 8, !15, i64 16, !15, i64 24}
!15 = !{!"double", !7, i64 0}
!16 = !{!"_ZTSN3DIS11OrientationE", !17, i64 8, !17, i64 12, !17, i64 16}
!17 = !{!"float", !7, i64 0}
!18 = !{!"short", !7, i64 0}
!19 = !{!"int", !7, i64 0}
!20 = !{!12, !18, i64 88}
!21 = !{!12, !18, i64 90}
!22 = !{!12, !18, i64 92}
!23 = !{!12, !18, i64 94}
!24 = !{!12, !19, i64 96}
!25 = !{i8 0, i8 2}
!26 = !{}


; 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 @_ZNK3DIS22LinearSegmentParametereqERKS0_(ptr noundef nonnull align 8 dereferenceable(100) %0, ptr noundef nonnull align 8 dereferenceable(100) %1) local_unnamed_addr #0 align 2 {
  %3 = getelementptr inbounds i8, ptr %0, i64 8
  %4 = load i8, ptr %3, align 8, !tbaa !5
  %5 = getelementptr inbounds i8, ptr %1, i64 8
  %6 = load i8, ptr %5, align 8, !tbaa !5
  %7 = icmp eq i8 %4, %6
  %8 = getelementptr inbounds i8, ptr %0, i64 16
  %9 = getelementptr inbounds i8, ptr %1, i64 16
  %10 = tail call noundef zeroext i1 @_ZNK3DIS12SixByteChunkeqERKS0_(ptr noundef nonnull align 8 dereferenceable(14) %8, ptr noundef nonnull align 8 dereferenceable(14) %9)
  %11 = getelementptr inbounds i8, ptr %0, i64 32
  %12 = getelementptr inbounds i8, ptr %1, i64 32
  %13 = tail call noundef zeroext i1 @_ZNK3DIS13Vector3DoubleeqERKS0_(ptr noundef nonnull align 8 dereferenceable(32) %11, ptr noundef nonnull align 8 dereferenceable(32) %12)
  %14 = getelementptr inbounds i8, ptr %0, i64 64
  %15 = getelementptr inbounds i8, ptr %1, i64 64
  %16 = tail call noundef zeroext i1 @_ZNK3DIS11OrientationeqERKS0_(ptr noundef nonnull align 8 dereferenceable(20) %14, ptr noundef nonnull align 8 dereferenceable(20) %15)
  %17 = getelementptr inbounds i8, ptr %0, i64 88
  %18 = getelementptr inbounds i8, ptr %1, i64 88
  %19 = load <4 x i16>, ptr %17, align 8, !tbaa !16
  %20 = load <4 x i16>, ptr %18, align 8, !tbaa !16
  %21 = icmp eq <4 x i16> %19, %20
  %22 = getelementptr inbounds i8, ptr %0, i64 96
  %23 = load i32, ptr %22, align 8, !tbaa !17
  %24 = getelementptr inbounds i8, ptr %1, i64 96
  %25 = load i32, ptr %24, align 8, !tbaa !17
  %26 = icmp eq i32 %23, %25
  %27 = freeze <4 x i1> %21
  %28 = bitcast <4 x i1> %27 to i4
  %29 = icmp eq i4 %28, -1
  %op.rdx16 = and i1 %26, %16
  %op.rdx17 = and i1 %13, %10
  %30 = and i1 %op.rdx16, %29
  %op.rdx18 = select i1 %30, i1 %7, i1 false
  %31 = freeze i1 %op.rdx18
  %op.rdx19 = and i1 %31, %op.rdx17
  ret i1 %op.rdx19
}

declare noundef zeroext i1 @_ZNK3DIS12SixByteChunkeqERKS0_(ptr noundef nonnull align 8 dereferenceable(14), ptr noundef nonnull align 8 dereferenceable(14)) 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

declare noundef zeroext i1 @_ZNK3DIS11OrientationeqERKS0_(ptr noundef nonnull align 8 dereferenceable(20), ptr noundef nonnull align 8 dereferenceable(20)) 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 = !{!"_ZTSN3DIS22LinearSegmentParameterE", !7, i64 8, !9, i64 16, !10, i64 32, !12, i64 64, !14, i64 88, !14, i64 90, !14, i64 92, !14, i64 94, !15, i64 96}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!"_ZTSN3DIS12SixByteChunkE", !7, i64 8}
!10 = !{!"_ZTSN3DIS13Vector3DoubleE", !11, i64 8, !11, i64 16, !11, i64 24}
!11 = !{!"double", !7, i64 0}
!12 = !{!"_ZTSN3DIS11OrientationE", !13, i64 8, !13, i64 12, !13, i64 16}
!13 = !{!"float", !7, i64 0}
!14 = !{!"short", !7, i64 0}
!15 = !{!"int", !7, i64 0}
!16 = !{!14, !14, i64 0}
!17 = !{!6, !15, i64 96}


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