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

; 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::UnsignedDISInteger" = type <{ ptr, i32, [4 x i8] }>
%"class.DIS::DataQueryDatumSpecification" = type { ptr, i32, i32, %"class.std::vector", %"class.std::vector" }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<DIS::UnsignedDISInteger, std::allocator<DIS::UnsignedDISInteger>>::_Vector_impl" }
%"struct.std::_Vector_base<DIS::UnsignedDISInteger, std::allocator<DIS::UnsignedDISInteger>>::_Vector_impl" = type { %"struct.std::_Vector_base<DIS::UnsignedDISInteger, std::allocator<DIS::UnsignedDISInteger>>::_Vector_impl_data" }
%"struct.std::_Vector_base<DIS::UnsignedDISInteger, std::allocator<DIS::UnsignedDISInteger>>::_Vector_impl_data" = type { ptr, ptr, ptr }

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIN3DIS18UnsignedDISIntegerESaIS1_EE4sizeEv(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

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

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

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nounwind
declare void @_ZN3DIS18UnsignedDISIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(12)) unnamed_addr #3

; 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 noundef i32 @_ZNK3DIS27DataQueryDatumSpecification17getMarshalledSizeEv(ptr noundef nonnull align 8 dereferenceable(64) %0) unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca i32, align 4
  %4 = alloca i64, align 8
  %5 = alloca %"class.DIS::UnsignedDISInteger", align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca i64, align 8
  %9 = alloca %"class.DIS::UnsignedDISInteger", align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %10 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #6
  store i32 0, ptr %3, align 4, !tbaa !9
  %11 = load i32, ptr %3, align 4, !tbaa !9
  %12 = add nsw i32 %11, 4
  store i32 %12, ptr %3, align 4, !tbaa !9
  %13 = load i32, ptr %3, align 4, !tbaa !9
  %14 = add nsw i32 %13, 4
  store i32 %14, ptr %3, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #6
  store i64 0, ptr %4, align 8, !tbaa !11
  br label %15

15:                                               ; preds = %29, %1
  %16 = load i64, ptr %4, align 8, !tbaa !11
  %17 = getelementptr inbounds %"class.DIS::DataQueryDatumSpecification", ptr %10, i32 0, i32 3
  %18 = call noundef i64 @_ZNKSt6vectorIN3DIS18UnsignedDISIntegerESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %17) #6
  %19 = icmp ult i64 %16, %18
  br i1 %19, label %21, label %20

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

21:                                               ; preds = %15
  call void @llvm.lifetime.start.p0(i64 16, ptr %5) #6
  %22 = getelementptr inbounds %"class.DIS::DataQueryDatumSpecification", ptr %10, i32 0, i32 3
  %23 = load i64, ptr %4, align 8, !tbaa !11
  %24 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZNKSt6vectorIN3DIS18UnsignedDISIntegerESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %22, i64 noundef %23) #6
  call void @_ZN3DIS18UnsignedDISIntegerC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(12) %5, ptr noundef nonnull align 8 dereferenceable(12) %24) #6
  %25 = load i32, ptr %3, align 4, !tbaa !9
  %26 = invoke noundef i32 @_ZNK3DIS18UnsignedDISInteger17getMarshalledSizeEv(ptr noundef nonnull align 8 dereferenceable(12) %5)
          to label %27 unwind label %32

27:                                               ; preds = %21
  %28 = add nsw i32 %25, %26
  store i32 %28, ptr %3, align 4, !tbaa !9
  call void @_ZN3DIS18UnsignedDISIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(12) %5) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %5) #6
  br label %29

29:                                               ; preds = %27
  %30 = load i64, ptr %4, align 8, !tbaa !11
  %31 = add i64 %30, 1
  store i64 %31, ptr %4, align 8, !tbaa !11
  br label %15, !llvm.loop !13

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

36:                                               ; preds = %20
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #6
  store i64 0, ptr %8, align 8, !tbaa !11
  br label %37

37:                                               ; preds = %51, %36
  %38 = load i64, ptr %8, align 8, !tbaa !11
  %39 = getelementptr inbounds %"class.DIS::DataQueryDatumSpecification", ptr %10, i32 0, i32 4
  %40 = call noundef i64 @_ZNKSt6vectorIN3DIS18UnsignedDISIntegerESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %39) #6
  %41 = icmp ult i64 %38, %40
  br i1 %41, label %43, label %42

42:                                               ; preds = %37
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %58

43:                                               ; preds = %37
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #6
  %44 = getelementptr inbounds %"class.DIS::DataQueryDatumSpecification", ptr %10, i32 0, i32 4
  %45 = load i64, ptr %8, align 8, !tbaa !11
  %46 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZNKSt6vectorIN3DIS18UnsignedDISIntegerESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %44, i64 noundef %45) #6
  call void @_ZN3DIS18UnsignedDISIntegerC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(12) %9, ptr noundef nonnull align 8 dereferenceable(12) %46) #6
  %47 = load i32, ptr %3, align 4, !tbaa !9
  %48 = invoke noundef i32 @_ZNK3DIS18UnsignedDISInteger17getMarshalledSizeEv(ptr noundef nonnull align 8 dereferenceable(12) %9)
          to label %49 unwind label %54

49:                                               ; preds = %43
  %50 = add nsw i32 %47, %48
  store i32 %50, ptr %3, align 4, !tbaa !9
  call void @_ZN3DIS18UnsignedDISIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(12) %9) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #6
  br label %51

51:                                               ; preds = %49
  %52 = load i64, ptr %8, align 8, !tbaa !11
  %53 = add i64 %52, 1
  store i64 %53, ptr %8, align 8, !tbaa !11
  br label %37, !llvm.loop !15

54:                                               ; preds = %43
  %55 = landingpad { ptr, i32 }
          cleanup
  %56 = extractvalue { ptr, i32 } %55, 0
  store ptr %56, ptr %6, align 8
  %57 = extractvalue { ptr, i32 } %55, 1
  store i32 %57, ptr %7, align 4
  call void @_ZN3DIS18UnsignedDISIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(12) %9) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #6
  br label %60

58:                                               ; preds = %42
  %59 = load i32, ptr %3, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  ret i32 %59

60:                                               ; preds = %54, %32
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #6
  br label %61

61:                                               ; preds = %60
  %62 = load ptr, ptr %6, align 8
  %63 = load i32, ptr %7, align 4
  %64 = insertvalue { ptr, i32 } poison, ptr %62, 0
  %65 = insertvalue { ptr, i32 } %64, i32 %63, 1
  resume { ptr, i32 } %65
}

declare noundef i32 @_ZNK3DIS18UnsignedDISInteger17getMarshalledSizeEv(ptr noundef nonnull align 8 dereferenceable(12)) unnamed_addr #5

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 = { 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 #3 = { 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 #4 = { 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 #5 = { "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 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long long", !7, i64 0}
!13 = distinct !{!13, !14}
!14 = !{!"llvm.loop.mustprogress"}
!15 = distinct !{!15, !14}


; 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::UnsignedDISInteger" = type <{ ptr, i32, [4 x i8] }>

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNKSt6vectorIN3DIS18UnsignedDISIntegerESaIS1_EE4sizeEv(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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(12) ptr @_ZNKSt6vectorIN3DIS18UnsignedDISIntegerESaIS1_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 @_ZN3DIS18UnsignedDISIntegerC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(12), ptr noundef nonnull align 8 dereferenceable(12)) unnamed_addr #2 align 2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nounwind
declare void @_ZN3DIS18UnsignedDISIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(12)) unnamed_addr #3

; 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 noundef i32 @_ZNK3DIS27DataQueryDatumSpecification17getMarshalledSizeEv(ptr noundef nonnull align 8 dereferenceable(64) %0) unnamed_addr #4 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.DIS::UnsignedDISInteger", align 8
  %3 = alloca %"class.DIS::UnsignedDISInteger", align 8
  %4 = getelementptr inbounds i8, ptr %0, i64 16
  %5 = tail call noundef i64 @_ZNKSt6vectorIN3DIS18UnsignedDISIntegerESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  %.not = icmp eq i64 %5, 0
  br i1 %.not, label %.preheader, label %.lr.ph

.preheader:                                       ; preds = %10, %1
  %.016.lcssa = phi i32 [ 8, %1 ], [ %11, %10 ]
  %6 = getelementptr inbounds i8, ptr %0, i64 40
  %7 = call noundef i64 @_ZNKSt6vectorIN3DIS18UnsignedDISIntegerESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  %.not26 = icmp eq i64 %7, 0
  br i1 %.not26, label %._crit_edge, label %.lr.ph24

.lr.ph:                                           ; preds = %1, %10
  %.01521 = phi i64 [ %12, %10 ], [ 0, %1 ]
  %.01620 = phi i32 [ %11, %10 ], [ 8, %1 ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %2) #6
  %8 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZNKSt6vectorIN3DIS18UnsignedDISIntegerESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %4, i64 noundef %.01521) #6
  call void @_ZN3DIS18UnsignedDISIntegerC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(12) %2, ptr noundef nonnull align 8 dereferenceable(12) %8) #6
  %9 = invoke noundef i32 @_ZNK3DIS18UnsignedDISInteger17getMarshalledSizeEv(ptr noundef nonnull align 8 dereferenceable(12) %2)
          to label %10 unwind label %15

10:                                               ; preds = %.lr.ph
  %11 = add nsw i32 %9, %.01620
  call void @_ZN3DIS18UnsignedDISIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(12) %2) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %2) #6
  %12 = add nuw i64 %.01521, 1
  %13 = call noundef i64 @_ZNKSt6vectorIN3DIS18UnsignedDISIntegerESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %4) #6
  %14 = icmp ult i64 %12, %13
  br i1 %14, label %.lr.ph, label %.preheader, !llvm.loop !5

15:                                               ; preds = %.lr.ph
  %16 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3DIS18UnsignedDISIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(12) %2) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %2) #6
  br label %26

._crit_edge:                                      ; preds = %19, %.preheader
  %.1.lcssa = phi i32 [ %.016.lcssa, %.preheader ], [ %20, %19 ]
  ret i32 %.1.lcssa

.lr.ph24:                                         ; preds = %.preheader, %19
  %.023 = phi i64 [ %21, %19 ], [ 0, %.preheader ]
  %.122 = phi i32 [ %20, %19 ], [ %.016.lcssa, %.preheader ]
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #6
  %17 = call noundef nonnull align 8 dereferenceable(12) ptr @_ZNKSt6vectorIN3DIS18UnsignedDISIntegerESaIS1_EEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef %.023) #6
  call void @_ZN3DIS18UnsignedDISIntegerC2ERKS0_(ptr noundef nonnull align 8 dereferenceable(12) %3, ptr noundef nonnull align 8 dereferenceable(12) %17) #6
  %18 = invoke noundef i32 @_ZNK3DIS18UnsignedDISInteger17getMarshalledSizeEv(ptr noundef nonnull align 8 dereferenceable(12) %3)
          to label %19 unwind label %24

19:                                               ; preds = %.lr.ph24
  %20 = add nsw i32 %18, %.122
  call void @_ZN3DIS18UnsignedDISIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(12) %3) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #6
  %21 = add nuw i64 %.023, 1
  %22 = call noundef i64 @_ZNKSt6vectorIN3DIS18UnsignedDISIntegerESaIS1_EE4sizeEv(ptr noundef nonnull align 8 dereferenceable(24) %6) #6
  %23 = icmp ult i64 %21, %22
  br i1 %23, label %.lr.ph24, label %._crit_edge, !llvm.loop !7

24:                                               ; preds = %.lr.ph24
  %25 = landingpad { ptr, i32 }
          cleanup
  call void @_ZN3DIS18UnsignedDISIntegerD1Ev(ptr noundef nonnull align 8 dereferenceable(12) %3) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #6
  br label %26

26:                                               ; preds = %24, %15
  %.pn = phi { ptr, i32 } [ %16, %15 ], [ %25, %24 ]
  resume { ptr, i32 } %.pn
}

declare noundef i32 @_ZNK3DIS18UnsignedDISInteger17getMarshalledSizeEv(ptr noundef nonnull align 8 dereferenceable(12)) unnamed_addr #5

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 = { 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 #3 = { 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 #4 = { 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 #5 = { "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"}
!7 = distinct !{!7, !6}


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