; 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 noundef i64 @_ZNKSt6vectorIN3DIS12TwoByteChunkESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3DIS29GridAxisRecordRepresentation17marshalERNS_10DataStreamE(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(48) %1) unnamed_addr #1 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 @_ZNK3DIS14GridAxisRecord7marshalERNS_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 = load float, ptr %12, align 4, !tbaa !9
  %14 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZN3DIS10DataStreamlsEf(ptr noundef nonnull align 8 dereferenceable(48) %11, float noundef %13)
  %15 = load ptr, ptr %4, align 8, !tbaa !5
  %16 = getelementptr inbounds %"class.DIS::GridAxisRecordRepresentation1", ptr %9, i32 0, i32 2
  %17 = load float, ptr %16, align 8, !tbaa !18
  %18 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZN3DIS10DataStreamlsEf(ptr noundef nonnull align 8 dereferenceable(48) %15, float noundef %17)
  %19 = load ptr, ptr %4, align 8, !tbaa !5
  %20 = getelementptr inbounds %"class.DIS::GridAxisRecordRepresentation1", ptr %9, i32 0, i32 4
  %21 = call noundef i64 @_ZNKSt6vectorIN3DIS12TwoByteChunkESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %20) #6
  %22 = trunc i64 %21 to i16
  %23 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZN3DIS10DataStreamlsEt(ptr noundef nonnull align 8 dereferenceable(48) %19, i16 noundef zeroext %22)
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #6
  store i64 0, ptr %5, align 8, !tbaa !19
  br label %24

24:                                               ; preds = %36, %2
  %25 = load i64, ptr %5, align 8, !tbaa !19
  %26 = getelementptr inbounds %"class.DIS::GridAxisRecordRepresentation1", ptr %9, i32 0, i32 4
  %27 = call noundef i64 @_ZNKSt6vectorIN3DIS12TwoByteChunkESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %26) #6
  %28 = icmp ult i64 %25, %27
  br i1 %28, label %30, label %29

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

30:                                               ; preds = %24
  call void @llvm.lifetime.start.p0(i64 16, ptr %6) #6
  %31 = getelementptr inbounds %"class.DIS::GridAxisRecordRepresentation1", ptr %9, i32 0, i32 4
  %32 = load i64, ptr %5, align 8, !tbaa !19
  %33 = call noundef nonnull align 8 dereferenceable(10) ptr @_ZNKSt6vectorIN3DIS12TwoByteChunkESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %31, i64 noundef %32) #6
  call void @_ZN3DIS12TwoByteChunkC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(10) %6, ptr noundef nonnull align 8 dereferenceable(10) %33) #6
  %34 = load ptr, ptr %4, align 8, !tbaa !5
  invoke void @_ZNK3DIS12TwoByteChunk7marshalERNS_10DataStreamE(ptr noundef nonnull align 8 dereferenceable(10) %6, ptr noundef nonnull align 8 dereferenceable(48) %34)
          to label %35 unwind label %39

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

36:                                               ; preds = %35
  %37 = load i64, ptr %5, align 8, !tbaa !19
  %38 = add i64 %37, 1
  store i64 %38, ptr %5, align 8, !tbaa !19
  br label %24, !llvm.loop !21

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

43:                                               ; preds = %29
  ret void

44:                                               ; preds = %39
  %45 = load ptr, ptr %7, align 8
  %46 = load i32, ptr %8, align 4
  %47 = insertvalue { ptr, i32 } poison, ptr %45, 0
  %48 = insertvalue { ptr, i32 } %47, i32 %46, 1
  resume { ptr, i32 } %48
}

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

declare noundef nonnull align 8 dereferenceable(48) ptr @_ZN3DIS10DataStreamlsEf(ptr noundef nonnull align 8 dereferenceable(48), float noundef) #2

declare noundef nonnull align 8 dereferenceable(48) ptr @_ZN3DIS10DataStreamlsEt(ptr noundef nonnull align 8 dereferenceable(48), i16 noundef zeroext) #2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(10) ptr @_ZNKSt6vectorIN3DIS12TwoByteChunkESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #0 align 2

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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 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 #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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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, !13, i64 12}
!10 = !{!"_ZTSN3DIS29GridAxisRecordRepresentation1E", !11, i64 0, !13, i64 12, !13, i64 16, !12, i64 20, !14, i64 24}
!11 = !{!"_ZTSN3DIS14GridAxisRecordE", !12, i64 8, !12, i64 10}
!12 = !{!"short", !7, i64 0}
!13 = !{!"float", !7, i64 0}
!14 = !{!"_ZTSSt6vectorIN3DIS12TwoByteChunkESaIS1_EE", !15, i64 0}
!15 = !{!"_ZTSSt12_Vector_baseIN3DIS12TwoByteChunkESaIS1_EE", !16, i64 0}
!16 = !{!"_ZTSNSt12_Vector_baseIN3DIS12TwoByteChunkESaIS1_EE12_Vector_implE", !17, i64 0}
!17 = !{!"_ZTSNSt12_Vector_baseIN3DIS12TwoByteChunkESaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!18 = !{!10, !13, i64 16}
!19 = !{!20, !20, i64 0}
!20 = !{!"long", !7, i64 0}
!21 = distinct !{!21, !22}
!22 = !{!"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 noundef i64 @_ZNKSt6vectorIN3DIS12TwoByteChunkESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress uwtable
define dso_local void @_ZNK3DIS29GridAxisRecordRepresentation17marshalERNS_10DataStreamE(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(48) %1) unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.DIS::TwoByteChunk", align 8
  tail call void @_ZNK3DIS14GridAxisRecord7marshalERNS_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 = load float, ptr %4, align 4, !tbaa !5
  %6 = tail call noundef nonnull align 8 dereferenceable(48) ptr @_ZN3DIS10DataStreamlsEf(ptr noundef nonnull align 8 dereferenceable(48) %1, float noundef %5)
  %7 = getelementptr inbounds i8, ptr %0, i64 16
  %8 = load float, ptr %7, align 8, !tbaa !17
  %9 = tail call noundef nonnull align 8 dereferenceable(48) ptr @_ZN3DIS10DataStreamlsEf(ptr noundef nonnull align 8 dereferenceable(48) %1, float noundef %8)
  %10 = getelementptr inbounds i8, ptr %0, i64 24
  %11 = tail call noundef i64 @_ZNKSt6vectorIN3DIS12TwoByteChunkESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #6
  %12 = trunc i64 %11 to i16
  %13 = tail call noundef nonnull align 8 dereferenceable(48) ptr @_ZN3DIS10DataStreamlsEt(ptr noundef nonnull align 8 dereferenceable(48) %1, i16 noundef zeroext %12)
  %14 = tail call noundef i64 @_ZNKSt6vectorIN3DIS12TwoByteChunkESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #6
  %.not = icmp eq i64 %14, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

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

.lr.ph:                                           ; preds = %2, %16
  %.010 = phi i64 [ %17, %16 ], [ 0, %2 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #6
  %15 = call noundef nonnull align 8 dereferenceable(10) ptr @_ZNKSt6vectorIN3DIS12TwoByteChunkESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %10, i64 noundef %.010) #6
  call void @_ZN3DIS12TwoByteChunkC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(10) %3, ptr noundef nonnull align 8 dereferenceable(10) %15) #6
  invoke void @_ZNK3DIS12TwoByteChunk7marshalERNS_10DataStreamE(ptr noundef nonnull align 8 dereferenceable(10) %3, ptr noundef nonnull align 8 dereferenceable(48) %1)
          to label %16 unwind label %20

16:                                               ; preds = %.lr.ph
  call void @_ZN3DIS12TwoByteChunkD1Ev(ptr noundef nonnull align 8 dereferenceable(10) %3) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #6
  %17 = add nuw i64 %.010, 1
  %18 = call noundef i64 @_ZNKSt6vectorIN3DIS12TwoByteChunkESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %10) #6
  %19 = icmp ult i64 %17, %18
  br i1 %19, label %.lr.ph, label %._crit_edge, !llvm.loop !18

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

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

declare noundef nonnull align 8 dereferenceable(48) ptr @_ZN3DIS10DataStreamlsEf(ptr noundef nonnull align 8 dereferenceable(48), float noundef) local_unnamed_addr #2

declare noundef nonnull align 8 dereferenceable(48) ptr @_ZN3DIS10DataStreamlsEt(ptr noundef nonnull align 8 dereferenceable(48), i16 noundef zeroext) local_unnamed_addr #2

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

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

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

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

declare i32 @__gxx_personality_v0(...)

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

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

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 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 #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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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, !11, i64 12}
!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 = !{!6, !11, i64 16}
!18 = distinct !{!18, !19}
!19 = !{!"llvm.loop.mustprogress"}


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