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

; 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::TwoByteChunk" = type <{ ptr, [2 x i8], [6 x i8] }>
%"class.DIS::GridAxisRecordRepresentation1" = type { %"class.DIS::GridAxisRecord.base", float, float, i16, %"class.std::vector" }
%"class.DIS::GridAxisRecord.base" = type <{ ptr, i16, i16 }>
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<DIS::TwoByteChunk, std::allocator<DIS::TwoByteChunk>>::_Vector_impl" }
%"struct.std::_Vector_base<DIS::TwoByteChunk, std::allocator<DIS::TwoByteChunk>>::_Vector_impl" = type { %"struct.std::_Vector_base<DIS::TwoByteChunk, std::allocator<DIS::TwoByteChunk>>::_Vector_impl_data" }
%"struct.std::_Vector_base<DIS::TwoByteChunk, std::allocator<DIS::TwoByteChunk>>::_Vector_impl_data" = type { ptr, ptr, ptr }

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIN3DIS12TwoByteChunkESaIS1_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24)) #0 align 2

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3DIS29GridAxisRecordRepresentation19unmarshalERNS_10DataStreamE(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(48) %1) unnamed_addr #3 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::TwoByteChunk", 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 @_ZN3DIS14GridAxisRecord9unmarshalERNS_10DataStreamE(ptr noundef nonnull align 8 dereferenceable(12) %9, ptr noundef nonnull align 8 dereferenceable(48) %10)
  %11 = load ptr, ptr %4, align 8, !tbaa !5
  %12 = getelementptr inbounds %"class.DIS::GridAxisRecordRepresentation1", ptr %9, i32 0, i32 1
  %13 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZN3DIS10DataStreamrsERf(ptr noundef nonnull align 8 dereferenceable(48) %11, ptr noundef nonnull align 4 dereferenceable(4) %12)
  %14 = load ptr, ptr %4, align 8, !tbaa !5
  %15 = getelementptr inbounds %"class.DIS::GridAxisRecordRepresentation1", ptr %9, i32 0, i32 2
  %16 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZN3DIS10DataStreamrsERf(ptr noundef nonnull align 8 dereferenceable(48) %14, ptr noundef nonnull align 4 dereferenceable(4) %15)
  %17 = load ptr, ptr %4, align 8, !tbaa !5
  %18 = getelementptr inbounds %"class.DIS::GridAxisRecordRepresentation1", ptr %9, i32 0, i32 3
  %19 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZN3DIS10DataStreamrsERt(ptr noundef nonnull align 8 dereferenceable(48) %17, ptr noundef nonnull align 2 dereferenceable(2) %18)
  %20 = getelementptr inbounds %"class.DIS::GridAxisRecordRepresentation1", ptr %9, i32 0, i32 4
  call void @_ZNSt6vectorIN3DIS12TwoByteChunkESaIS1_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %20) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  store i64 0, ptr %5, align 8, !tbaa !9
  br label %21

21:                                               ; preds = %33, %2
  %22 = load i64, ptr %5, align 8, !tbaa !9
  %23 = getelementptr inbounds %"class.DIS::GridAxisRecordRepresentation1", ptr %9, i32 0, i32 3
  %24 = load i16, ptr %23, align 4, !tbaa !11
  %25 = zext i16 %24 to i64
  %26 = icmp ult i64 %22, %25
  br i1 %26, label %28, label %27

27:                                               ; preds = %21
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  br label %40

28:                                               ; preds = %21
  call void @llvm.lifetime.start.p0(i64 16, ptr %6) #5
  call void @_ZN3DIS12TwoByteChunkC1Ev(ptr noundef nonnull align 8 dereferenceable(10) %6)
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  invoke void @_ZN3DIS12TwoByteChunk9unmarshalERNS_10DataStreamE(ptr noundef nonnull align 8 dereferenceable(10) %6, ptr noundef nonnull align 8 dereferenceable(48) %29)
          to label %30 unwind label %36

30:                                               ; preds = %28
  %31 = getelementptr inbounds %"class.DIS::GridAxisRecordRepresentation1", ptr %9, i32 0, i32 4
  invoke void @_ZNSt6vectorIN3DIS12TwoByteChunkESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %31, ptr noundef nonnull align 8 dereferenceable(10) %6)
          to label %32 unwind label %36

32:                                               ; preds = %30
  call void @_ZN3DIS12TwoByteChunkD1Ev(ptr noundef nonnull align 8 dereferenceable(10) %6) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #5
  br label %33

33:                                               ; preds = %32
  %34 = load i64, ptr %5, align 8, !tbaa !9
  %35 = add i64 %34, 1
  store i64 %35, ptr %5, align 8, !tbaa !9
  br label %21, !llvm.loop !20

36:                                               ; preds = %30, %28
  %37 = landingpad { ptr, i32 }
          cleanup
  %38 = extractvalue { ptr, i32 } %37, 0
  store ptr %38, ptr %7, align 8
  %39 = extractvalue { ptr, i32 } %37, 1
  store i32 %39, ptr %8, align 4
  call void @_ZN3DIS12TwoByteChunkD1Ev(ptr noundef nonnull align 8 dereferenceable(10) %6) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  br label %41

40:                                               ; preds = %27
  ret void

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

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

declare noundef nonnull align 8 dereferenceable(48) ptr @_ZN3DIS10DataStreamrsERf(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) #4

declare noundef nonnull align 8 dereferenceable(48) ptr @_ZN3DIS10DataStreamrsERt(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 2 dereferenceable(2)) #4

declare void @_ZN3DIS12TwoByteChunkC1Ev(ptr noundef nonnull align 8 dereferenceable(10)) unnamed_addr #4

declare void @_ZN3DIS12TwoByteChunk9unmarshalERNS_10DataStreamE(ptr noundef nonnull align 8 dereferenceable(10), ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIN3DIS12TwoByteChunkESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(10)) #3 align 2

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #4 = { "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 }

!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 = !{!12, !14, i64 20}
!12 = !{!"_ZTSN3DIS29GridAxisRecordRepresentation1E", !13, i64 0, !15, i64 12, !15, i64 16, !14, i64 20, !16, i64 24}
!13 = !{!"_ZTSN3DIS14GridAxisRecordE", !14, i64 8, !14, i64 10}
!14 = !{!"short", !7, i64 0}
!15 = !{!"float", !7, i64 0}
!16 = !{!"_ZTSSt6vectorIN3DIS12TwoByteChunkESaIS1_EE", !17, i64 0}
!17 = !{!"_ZTSSt12_Vector_baseIN3DIS12TwoByteChunkESaIS1_EE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIN3DIS12TwoByteChunkESaIS1_EE12_Vector_implE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIN3DIS12TwoByteChunkESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!20 = distinct !{!20, !21}
!21 = !{!"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::TwoByteChunk" = type <{ ptr, [2 x i8], [6 x i8] }>

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIN3DIS12TwoByteChunkESaIS1_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0 align 2

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

declare i32 @__gxx_personality_v0(...)

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3DIS29GridAxisRecordRepresentation19unmarshalERNS_10DataStreamE(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(48) %1) unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.DIS::TwoByteChunk", align 8
  tail call void @_ZN3DIS14GridAxisRecord9unmarshalERNS_10DataStreamE(ptr noundef nonnull align 8 dereferenceable(12) %0, ptr noundef nonnull align 8 dereferenceable(48) %1)
  %4 = getelementptr inbounds i8, ptr %0, i64 12
  %5 = tail call noundef nonnull align 8 dereferenceable(48) ptr @_ZN3DIS10DataStreamrsERf(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 4 dereferenceable(4) %4)
  %6 = getelementptr inbounds i8, ptr %0, i64 16
  %7 = tail call noundef nonnull align 8 dereferenceable(48) ptr @_ZN3DIS10DataStreamrsERf(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 4 dereferenceable(4) %6)
  %8 = getelementptr inbounds i8, ptr %0, i64 20
  %9 = tail call noundef nonnull align 8 dereferenceable(48) ptr @_ZN3DIS10DataStreamrsERt(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 2 dereferenceable(2) %8)
  %10 = getelementptr inbounds i8, ptr %0, i64 24
  tail call void @_ZNSt6vectorIN3DIS12TwoByteChunkESaIS1_EE5clearEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  %11 = load i16, ptr %8, align 4, !tbaa !5
  %.not = icmp eq i16 %11, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

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

.lr.ph:                                           ; preds = %2, %13
  %.09 = phi i64 [ %14, %13 ], [ 0, %2 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #5
  call void @_ZN3DIS12TwoByteChunkC1Ev(ptr noundef nonnull align 8 dereferenceable(10) %3)
  invoke void @_ZN3DIS12TwoByteChunk9unmarshalERNS_10DataStreamE(ptr noundef nonnull align 8 dereferenceable(10) %3, ptr noundef nonnull align 8 dereferenceable(48) %1)
          to label %12 unwind label %18

12:                                               ; preds = %.lr.ph
  invoke void @_ZNSt6vectorIN3DIS12TwoByteChunkESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 8 dereferenceable(10) %3)
          to label %13 unwind label %18

13:                                               ; preds = %12
  call void @_ZN3DIS12TwoByteChunkD1Ev(ptr noundef nonnull align 8 dereferenceable(10) %3) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #5
  %14 = add nuw nsw i64 %.09, 1
  %15 = load i16, ptr %8, align 4, !tbaa !5
  %16 = zext i16 %15 to i64
  %17 = icmp ult i64 %14, %16
  br i1 %17, label %.lr.ph, label %._crit_edge, !llvm.loop !17

18:                                               ; preds = %12, %.lr.ph
  %19 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3DIS12TwoByteChunkD1Ev(ptr noundef nonnull align 8 dereferenceable(10) %3) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #5
  resume { ptr, i32 } %19
}

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

declare noundef nonnull align 8 dereferenceable(48) ptr @_ZN3DIS10DataStreamrsERf(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #4

declare noundef nonnull align 8 dereferenceable(48) ptr @_ZN3DIS10DataStreamrsERt(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 2 dereferenceable(2)) local_unnamed_addr #4

declare void @_ZN3DIS12TwoByteChunkC1Ev(ptr noundef nonnull align 8 dereferenceable(10)) unnamed_addr #4

declare void @_ZN3DIS12TwoByteChunk9unmarshalERNS_10DataStreamE(ptr noundef nonnull align 8 dereferenceable(10), ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #4

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIN3DIS12TwoByteChunkESaIS1_EE9push_backERKS1_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(10)) local_unnamed_addr #3 align 2

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { 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 #4 = { "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 }

!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, !8, i64 20}
!6 = !{!"_ZTSN3DIS29GridAxisRecordRepresentation1E", !7, i64 0, !11, i64 12, !11, i64 16, !8, i64 20, !12, i64 24}
!7 = !{!"_ZTSN3DIS14GridAxisRecordE", !8, i64 8, !8, i64 10}
!8 = !{!"short", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"float", !9, i64 0}
!12 = !{!"_ZTSSt6vectorIN3DIS12TwoByteChunkESaIS1_EE", !13, i64 0}
!13 = !{!"_ZTSSt12_Vector_baseIN3DIS12TwoByteChunkESaIS1_EE", !14, i64 0}
!14 = !{!"_ZTSNSt12_Vector_baseIN3DIS12TwoByteChunkESaIS1_EE12_Vector_implE", !15, i64 0}
!15 = !{!"_ZTSNSt12_Vector_baseIN3DIS12TwoByteChunkESaIS1_EE17_Vector_impl_dataE", !16, i64 0, !16, i64 8, !16, i64 16}
!16 = !{!"any pointer", !9, i64 0}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}


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