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

; 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::FundamentalParameterDataIff" = type <{ ptr, float, float, float, float, i32, i8, i8, i16, i8, [7 x i8] }>
%"class.DIS::IffAtcNavAidsLayer2Pdu" = type { %"class.DIS::IffAtcNavAidsLayer1Pdu", %"class.DIS::LayerHeader", %"class.DIS::BeamData", %"class.DIS::BeamData", %"class.std::vector" }
%"class.DIS::IffAtcNavAidsLayer1Pdu" = type { %"class.DIS::DistributedEmissionsFamilyPdu.base", [4 x i8], %"class.DIS::EntityID", %"class.DIS::EventID", %"class.DIS::Vector3Float", %"class.DIS::SystemID", i16, %"class.DIS::IffFundamentalData" }
%"class.DIS::DistributedEmissionsFamilyPdu.base" = type { %"class.DIS::Pdu.base" }
%"class.DIS::Pdu.base" = type <{ ptr, i8, i8, i8, i8, i32, i16, i16 }>
%"class.DIS::EntityID" = type <{ ptr, i16, i16, i16, [2 x i8] }>
%"class.DIS::EventID" = type <{ ptr, i16, i16, i16, [2 x i8] }>
%"class.DIS::Vector3Float" = type <{ ptr, float, float, float, [4 x i8] }>
%"class.DIS::SystemID" = type <{ ptr, i16, i16, i8, i8, [2 x i8] }>
%"class.DIS::IffFundamentalData" = type { ptr, i8, i8, i8, i8, i16, i16, i16, i16, i16, i16 }
%"class.DIS::LayerHeader" = type <{ ptr, i8, i8, i16, [4 x i8] }>
%"class.DIS::BeamData" = type <{ ptr, float, float, float, float, float, [4 x i8] }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<DIS::FundamentalParameterDataIff, std::allocator<DIS::FundamentalParameterDataIff>>::_Vector_impl" }
%"struct.std::_Vector_base<DIS::FundamentalParameterDataIff, std::allocator<DIS::FundamentalParameterDataIff>>::_Vector_impl" = type { %"struct.std::_Vector_base<DIS::FundamentalParameterDataIff, std::allocator<DIS::FundamentalParameterDataIff>>::_Vector_impl_data" }
%"struct.std::_Vector_base<DIS::FundamentalParameterDataIff, std::allocator<DIS::FundamentalParameterDataIff>>::_Vector_impl_data" = type { ptr, ptr, ptr }

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3DIS22IffAtcNavAidsLayer2Pdu7marshalERNS_10DataStreamE(ptr noundef nonnull align 8 dereferenceable(232) %0, ptr noundef nonnull align 8 dereferenceable(48) %1) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i64, align 8
  %6 = alloca %"class.DIS::FundamentalParameterDataIff", align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  %9 = load ptr, ptr %3, align 8
  %10 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZNK3DIS22IffAtcNavAidsLayer1Pdu7marshalERNS_10DataStreamE(ptr noundef nonnull align 8 dereferenceable(128) %9, ptr noundef nonnull align 8 dereferenceable(48) %10)
  %11 = getelementptr inbounds %"class.DIS::IffAtcNavAidsLayer2Pdu", ptr %9, i32 0, i32 1
  %12 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZNK3DIS11LayerHeader7marshalERNS_10DataStreamE(ptr noundef nonnull align 8 dereferenceable(12) %11, ptr noundef nonnull align 8 dereferenceable(48) %12)
  %13 = getelementptr inbounds %"class.DIS::IffAtcNavAidsLayer2Pdu", ptr %9, i32 0, i32 2
  %14 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZNK3DIS8BeamData7marshalERNS_10DataStreamE(ptr noundef nonnull align 8 dereferenceable(28) %13, ptr noundef nonnull align 8 dereferenceable(48) %14)
  %15 = getelementptr inbounds %"class.DIS::IffAtcNavAidsLayer2Pdu", ptr %9, i32 0, i32 3
  %16 = load ptr, ptr %4, align 8, !tbaa !5
  call void @_ZNK3DIS8BeamData7marshalERNS_10DataStreamE(ptr noundef nonnull align 8 dereferenceable(28) %15, ptr noundef nonnull align 8 dereferenceable(48) %16)
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  store i64 0, ptr %5, align 8, !tbaa !9
  br label %17

17:                                               ; preds = %29, %2
  %18 = load i64, ptr %5, align 8, !tbaa !9
  %19 = getelementptr inbounds %"class.DIS::IffAtcNavAidsLayer2Pdu", ptr %9, i32 0, i32 4
  %20 = call noundef i64 @_ZNKSt6vectorIN3DIS27FundamentalParameterDataIffESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %19) #6
  %21 = icmp ult i64 %18, %20
  br i1 %21, label %23, label %22

22:                                               ; preds = %17
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  br label %36

23:                                               ; preds = %17
  call void @llvm.lifetime.start.p0(i64 40, ptr %6) #6
  %24 = getelementptr inbounds %"class.DIS::IffAtcNavAidsLayer2Pdu", ptr %9, i32 0, i32 4
  %25 = load i64, ptr %5, align 8, !tbaa !9
  %26 = call noundef nonnull align 8 dereferenceable(33) ptr @_ZNKSt6vectorIN3DIS27FundamentalParameterDataIffESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %24, i64 noundef %25) #6
  call void @_ZN3DIS27FundamentalParameterDataIffC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(33) %6, ptr noundef nonnull align 8 dereferenceable(33) %26) #6
  %27 = load ptr, ptr %4, align 8, !tbaa !5
  invoke void @_ZNK3DIS27FundamentalParameterDataIff7marshalERNS_10DataStreamE(ptr noundef nonnull align 8 dereferenceable(33) %6, ptr noundef nonnull align 8 dereferenceable(48) %27)
          to label %28 unwind label %32

28:                                               ; preds = %23
  call void @_ZN3DIS27FundamentalParameterDataIffD1Ev(ptr noundef nonnull align 8 dereferenceable(33) %6) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr %6) #6
  br label %29

29:                                               ; preds = %28
  %30 = load i64, ptr %5, align 8, !tbaa !9
  %31 = add i64 %30, 1
  store i64 %31, ptr %5, align 8, !tbaa !9
  br label %17, !llvm.loop !11

32:                                               ; preds = %23
  %33 = landingpad { ptr, i32 }
          cleanup
  %34 = extractvalue { ptr, i32 } %33, 0
  store ptr %34, ptr %7, align 8
  %35 = extractvalue { ptr, i32 } %33, 1
  store i32 %35, ptr %8, align 4
  call void @_ZN3DIS27FundamentalParameterDataIffD1Ev(ptr noundef nonnull align 8 dereferenceable(33) %6) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #6
  br label %37

36:                                               ; preds = %22
  ret void

37:                                               ; preds = %32
  %38 = load ptr, ptr %7, align 8
  %39 = load i32, ptr %8, align 4
  %40 = insertvalue { ptr, i32 } poison, ptr %38, 0
  %41 = insertvalue { ptr, i32 } %40, i32 %39, 1
  resume { ptr, i32 } %41
}

declare void @_ZNK3DIS22IffAtcNavAidsLayer1Pdu7marshalERNS_10DataStreamE(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #1

declare void @_ZNK3DIS11LayerHeader7marshalERNS_10DataStreamE(ptr noundef nonnull align 8 dereferenceable(12), ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #1

declare void @_ZNK3DIS8BeamData7marshalERNS_10DataStreamE(ptr noundef nonnull align 8 dereferenceable(28), ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #1

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIN3DIS27FundamentalParameterDataIffESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(33) ptr @_ZNKSt6vectorIN3DIS27FundamentalParameterDataIffESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3DIS27FundamentalParameterDataIffC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(33), ptr noundef nonnull align 8 dereferenceable(33)) unnamed_addr #4 align 2

declare void @_ZNK3DIS27FundamentalParameterDataIff7marshalERNS_10DataStreamE(ptr noundef nonnull align 8 dereferenceable(33), ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #1

; Function Attrs: nounwind
declare void @_ZN3DIS27FundamentalParameterDataIffD1Ev(ptr noundef nonnull align 8 dereferenceable(33)) unnamed_addr #5

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { inlinehint 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 #5 = { 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 #6 = { 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 = !{!"long", !7, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}


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

%"class.DIS::FundamentalParameterDataIff" = type <{ ptr, float, float, float, float, i32, i8, i8, i16, i8, [7 x i8] }>

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3DIS22IffAtcNavAidsLayer2Pdu7marshalERNS_10DataStreamE(ptr noundef nonnull align 8 dereferenceable(232) %0, ptr noundef nonnull align 8 dereferenceable(48) %1) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.DIS::FundamentalParameterDataIff", align 8
  tail call void @_ZNK3DIS22IffAtcNavAidsLayer1Pdu7marshalERNS_10DataStreamE(ptr noundef nonnull align 8 dereferenceable(128) %0, ptr noundef nonnull align 8 dereferenceable(48) %1)
  %4 = getelementptr inbounds i8, ptr %0, i64 128
  tail call void @_ZNK3DIS11LayerHeader7marshalERNS_10DataStreamE(ptr noundef nonnull align 8 dereferenceable(12) %4, ptr noundef nonnull align 8 dereferenceable(48) %1)
  %5 = getelementptr inbounds i8, ptr %0, i64 144
  tail call void @_ZNK3DIS8BeamData7marshalERNS_10DataStreamE(ptr noundef nonnull align 8 dereferenceable(28) %5, ptr noundef nonnull align 8 dereferenceable(48) %1)
  %6 = getelementptr inbounds i8, ptr %0, i64 176
  tail call void @_ZNK3DIS8BeamData7marshalERNS_10DataStreamE(ptr noundef nonnull align 8 dereferenceable(28) %6, ptr noundef nonnull align 8 dereferenceable(48) %1)
  %7 = getelementptr inbounds i8, ptr %0, i64 208
  %8 = tail call noundef i64 @_ZNKSt6vectorIN3DIS27FundamentalParameterDataIffESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  %.not = icmp eq i64 %8, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %10, %2
  ret void

.lr.ph:                                           ; preds = %2, %10
  %.010 = phi i64 [ %11, %10 ], [ 0, %2 ]
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %3) #6
  %9 = call noundef nonnull align 8 dereferenceable(33) ptr @_ZNKSt6vectorIN3DIS27FundamentalParameterDataIffESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %7, i64 noundef %.010) #6
  call void @_ZN3DIS27FundamentalParameterDataIffC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(33) %3, ptr noundef nonnull align 8 dereferenceable(33) %9) #6
  invoke void @_ZNK3DIS27FundamentalParameterDataIff7marshalERNS_10DataStreamE(ptr noundef nonnull align 8 dereferenceable(33) %3, ptr noundef nonnull align 8 dereferenceable(48) %1)
          to label %10 unwind label %14

10:                                               ; preds = %.lr.ph
  call void @_ZN3DIS27FundamentalParameterDataIffD1Ev(ptr noundef nonnull align 8 dereferenceable(33) %3) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %3) #6
  %11 = add nuw i64 %.010, 1
  %12 = call noundef i64 @_ZNKSt6vectorIN3DIS27FundamentalParameterDataIffESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #6
  %13 = icmp ult i64 %11, %12
  br i1 %13, label %.lr.ph, label %._crit_edge, !llvm.loop !5

14:                                               ; preds = %.lr.ph
  %15 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3DIS27FundamentalParameterDataIffD1Ev(ptr noundef nonnull align 8 dereferenceable(33) %3) #6
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %3) #6
  resume { ptr, i32 } %15
}

declare void @_ZNK3DIS22IffAtcNavAidsLayer1Pdu7marshalERNS_10DataStreamE(ptr noundef nonnull align 8 dereferenceable(128), ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #1

declare void @_ZNK3DIS11LayerHeader7marshalERNS_10DataStreamE(ptr noundef nonnull align 8 dereferenceable(12), ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #1

declare void @_ZNK3DIS8BeamData7marshalERNS_10DataStreamE(ptr noundef nonnull align 8 dereferenceable(28), ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #1

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIN3DIS27FundamentalParameterDataIffESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(33) ptr @_ZNKSt6vectorIN3DIS27FundamentalParameterDataIffESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN3DIS27FundamentalParameterDataIffC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(33), ptr noundef nonnull align 8 dereferenceable(33)) unnamed_addr #4 align 2

declare void @_ZNK3DIS27FundamentalParameterDataIff7marshalERNS_10DataStreamE(ptr noundef nonnull align 8 dereferenceable(33), ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #1

; Function Attrs: nounwind
declare void @_ZN3DIS27FundamentalParameterDataIffD1Ev(ptr noundef nonnull align 8 dereferenceable(33)) unnamed_addr #5

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { 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 #4 = { inlinehint 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 #5 = { 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 #6 = { 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 = distinct !{!5, !6}
!6 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass