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

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3DIS16AggregateMarking9unmarshalERNS_10DataStreamE(ptr noundef nonnull align 8 dereferenceable(40) %0, ptr noundef nonnull align 8 dereferenceable(48) %1) unnamed_addr #1 align 2 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i64, align 8
  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
  %7 = load ptr, ptr %4, align 8, !tbaa !5
  %8 = getelementptr inbounds %"class.DIS::AggregateMarking", ptr %6, i32 0, i32 1
  %9 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZN3DIS10DataStreamrsERh(ptr noundef nonnull align 8 dereferenceable(48) %7, ptr noundef nonnull align 1 dereferenceable(1) %8)
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #3
  store i64 0, ptr %5, align 8, !tbaa !9
  br label %10

10:                                               ; preds = %20, %2
  %11 = load i64, ptr %5, align 8, !tbaa !9
  %12 = icmp ult i64 %11, 31
  br i1 %12, label %14, label %13

13:                                               ; preds = %10
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #3
  br label %23

14:                                               ; preds = %10
  %15 = load ptr, ptr %4, align 8, !tbaa !5
  %16 = getelementptr inbounds %"class.DIS::AggregateMarking", ptr %6, i32 0, i32 2
  %17 = load i64, ptr %5, align 8, !tbaa !9
  %18 = getelementptr inbounds [31 x i8], ptr %16, i64 0, i64 %17
  %19 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZN3DIS10DataStreamrsERc(ptr noundef nonnull align 8 dereferenceable(48) %15, ptr noundef nonnull align 1 dereferenceable(1) %18)
  br label %20

20:                                               ; preds = %14
  %21 = load i64, ptr %5, align 8, !tbaa !9
  %22 = add i64 %21, 1
  store i64 %22, ptr %5, align 8, !tbaa !9
  br label %10, !llvm.loop !11

23:                                               ; preds = %13
  ret void
}

declare noundef nonnull align 8 dereferenceable(48) ptr @_ZN3DIS10DataStreamrsERh(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 1 dereferenceable(1)) #2

declare noundef nonnull align 8 dereferenceable(48) ptr @_ZN3DIS10DataStreamrsERc(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 1 dereferenceable(1)) #2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN3DIS16AggregateMarking9unmarshalERNS_10DataStreamE(ptr noundef nonnull align 8 dereferenceable(40) %0, ptr noundef nonnull align 8 dereferenceable(48) %1) unnamed_addr #0 align 2 {
  %3 = getelementptr inbounds i8, ptr %0, i64 8
  %4 = tail call noundef nonnull align 8 dereferenceable(48) ptr @_ZN3DIS10DataStreamrsERh(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 1 dereferenceable(1) %3)
  %5 = getelementptr inbounds i8, ptr %0, i64 9
  %6 = tail call noundef nonnull align 8 dereferenceable(48) ptr @_ZN3DIS10DataStreamrsERc(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 1 dereferenceable(1) %5)
  %7 = getelementptr inbounds i8, ptr %0, i64 10
  %8 = tail call noundef nonnull align 8 dereferenceable(48) ptr @_ZN3DIS10DataStreamrsERc(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 1 dereferenceable(1) %7)
  %9 = getelementptr inbounds i8, ptr %0, i64 11
  %10 = tail call noundef nonnull align 8 dereferenceable(48) ptr @_ZN3DIS10DataStreamrsERc(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 1 dereferenceable(1) %9)
  %11 = getelementptr inbounds i8, ptr %0, i64 12
  %12 = tail call noundef nonnull align 8 dereferenceable(48) ptr @_ZN3DIS10DataStreamrsERc(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 1 dereferenceable(1) %11)
  %13 = getelementptr inbounds i8, ptr %0, i64 13
  %14 = tail call noundef nonnull align 8 dereferenceable(48) ptr @_ZN3DIS10DataStreamrsERc(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 1 dereferenceable(1) %13)
  %15 = getelementptr inbounds i8, ptr %0, i64 14
  %16 = tail call noundef nonnull align 8 dereferenceable(48) ptr @_ZN3DIS10DataStreamrsERc(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 1 dereferenceable(1) %15)
  %17 = getelementptr inbounds i8, ptr %0, i64 15
  %18 = tail call noundef nonnull align 8 dereferenceable(48) ptr @_ZN3DIS10DataStreamrsERc(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 1 dereferenceable(1) %17)
  %19 = getelementptr inbounds i8, ptr %0, i64 16
  %20 = tail call noundef nonnull align 8 dereferenceable(48) ptr @_ZN3DIS10DataStreamrsERc(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 1 dereferenceable(1) %19)
  %21 = getelementptr inbounds i8, ptr %0, i64 17
  %22 = tail call noundef nonnull align 8 dereferenceable(48) ptr @_ZN3DIS10DataStreamrsERc(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 1 dereferenceable(1) %21)
  %23 = getelementptr inbounds i8, ptr %0, i64 18
  %24 = tail call noundef nonnull align 8 dereferenceable(48) ptr @_ZN3DIS10DataStreamrsERc(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 1 dereferenceable(1) %23)
  %25 = getelementptr inbounds i8, ptr %0, i64 19
  %26 = tail call noundef nonnull align 8 dereferenceable(48) ptr @_ZN3DIS10DataStreamrsERc(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 1 dereferenceable(1) %25)
  %27 = getelementptr inbounds i8, ptr %0, i64 20
  %28 = tail call noundef nonnull align 8 dereferenceable(48) ptr @_ZN3DIS10DataStreamrsERc(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 1 dereferenceable(1) %27)
  %29 = getelementptr inbounds i8, ptr %0, i64 21
  %30 = tail call noundef nonnull align 8 dereferenceable(48) ptr @_ZN3DIS10DataStreamrsERc(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 1 dereferenceable(1) %29)
  %31 = getelementptr inbounds i8, ptr %0, i64 22
  %32 = tail call noundef nonnull align 8 dereferenceable(48) ptr @_ZN3DIS10DataStreamrsERc(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 1 dereferenceable(1) %31)
  %33 = getelementptr inbounds i8, ptr %0, i64 23
  %34 = tail call noundef nonnull align 8 dereferenceable(48) ptr @_ZN3DIS10DataStreamrsERc(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 1 dereferenceable(1) %33)
  %35 = getelementptr inbounds i8, ptr %0, i64 24
  %36 = tail call noundef nonnull align 8 dereferenceable(48) ptr @_ZN3DIS10DataStreamrsERc(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 1 dereferenceable(1) %35)
  %37 = getelementptr inbounds i8, ptr %0, i64 25
  %38 = tail call noundef nonnull align 8 dereferenceable(48) ptr @_ZN3DIS10DataStreamrsERc(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 1 dereferenceable(1) %37)
  %39 = getelementptr inbounds i8, ptr %0, i64 26
  %40 = tail call noundef nonnull align 8 dereferenceable(48) ptr @_ZN3DIS10DataStreamrsERc(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 1 dereferenceable(1) %39)
  %41 = getelementptr inbounds i8, ptr %0, i64 27
  %42 = tail call noundef nonnull align 8 dereferenceable(48) ptr @_ZN3DIS10DataStreamrsERc(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 1 dereferenceable(1) %41)
  %43 = getelementptr inbounds i8, ptr %0, i64 28
  %44 = tail call noundef nonnull align 8 dereferenceable(48) ptr @_ZN3DIS10DataStreamrsERc(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 1 dereferenceable(1) %43)
  %45 = getelementptr inbounds i8, ptr %0, i64 29
  %46 = tail call noundef nonnull align 8 dereferenceable(48) ptr @_ZN3DIS10DataStreamrsERc(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 1 dereferenceable(1) %45)
  %47 = getelementptr inbounds i8, ptr %0, i64 30
  %48 = tail call noundef nonnull align 8 dereferenceable(48) ptr @_ZN3DIS10DataStreamrsERc(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 1 dereferenceable(1) %47)
  %49 = getelementptr inbounds i8, ptr %0, i64 31
  %50 = tail call noundef nonnull align 8 dereferenceable(48) ptr @_ZN3DIS10DataStreamrsERc(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 1 dereferenceable(1) %49)
  %51 = getelementptr inbounds i8, ptr %0, i64 32
  %52 = tail call noundef nonnull align 8 dereferenceable(48) ptr @_ZN3DIS10DataStreamrsERc(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 1 dereferenceable(1) %51)
  %53 = getelementptr inbounds i8, ptr %0, i64 33
  %54 = tail call noundef nonnull align 8 dereferenceable(48) ptr @_ZN3DIS10DataStreamrsERc(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 1 dereferenceable(1) %53)
  %55 = getelementptr inbounds i8, ptr %0, i64 34
  %56 = tail call noundef nonnull align 8 dereferenceable(48) ptr @_ZN3DIS10DataStreamrsERc(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 1 dereferenceable(1) %55)
  %57 = getelementptr inbounds i8, ptr %0, i64 35
  %58 = tail call noundef nonnull align 8 dereferenceable(48) ptr @_ZN3DIS10DataStreamrsERc(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 1 dereferenceable(1) %57)
  %59 = getelementptr inbounds i8, ptr %0, i64 36
  %60 = tail call noundef nonnull align 8 dereferenceable(48) ptr @_ZN3DIS10DataStreamrsERc(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 1 dereferenceable(1) %59)
  %61 = getelementptr inbounds i8, ptr %0, i64 37
  %62 = tail call noundef nonnull align 8 dereferenceable(48) ptr @_ZN3DIS10DataStreamrsERc(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 1 dereferenceable(1) %61)
  %63 = getelementptr inbounds i8, ptr %0, i64 38
  %64 = tail call noundef nonnull align 8 dereferenceable(48) ptr @_ZN3DIS10DataStreamrsERc(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 1 dereferenceable(1) %63)
  %65 = getelementptr inbounds i8, ptr %0, i64 39
  %66 = tail call noundef nonnull align 8 dereferenceable(48) ptr @_ZN3DIS10DataStreamrsERc(ptr noundef nonnull align 8 dereferenceable(48) %1, ptr noundef nonnull align 1 dereferenceable(1) %65)
  ret void
}

declare noundef nonnull align 8 dereferenceable(48) ptr @_ZN3DIS10DataStreamrsERh(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #1

declare noundef nonnull align 8 dereferenceable(48) ptr @_ZN3DIS10DataStreamrsERc(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 1 dereferenceable(1)) 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)"}


; Effective O3 passes: GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LICMPass,LoopRotatePass,SROAPass,SimplifyCFGPass,TailCallElimPass