; LLVM IR from AF-GRILL/DISPluginForUnreal :: Source/ThirdParty/include/utils (IncomingMessage)

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

%"struct.std::pair.13" = type { %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator" }
%"struct.std::_Rb_tree_iterator" = type { ptr }
%"class.DIS::IncomingMessage" = type { %"class.DIS::IBufferProcessor", %"class.std::multimap", %"class.std::multimap.0" }
%"class.DIS::IBufferProcessor" = type { ptr }
%"class.std::multimap" = type { %"class.std::_Rb_tree" }
%"class.std::_Rb_tree" = type { %"struct.std::_Rb_tree<unsigned char, std::pair<const unsigned char, DIS::IPacketProcessor *>, std::_Select1st<std::pair<const unsigned char, DIS::IPacketProcessor *>>, std::less<unsigned char>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<unsigned char, std::pair<const unsigned char, DIS::IPacketProcessor *>, std::_Select1st<std::pair<const unsigned char, DIS::IPacketProcessor *>>, std::less<unsigned char>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::_Rb_tree_header" = type { %"struct.std::_Rb_tree_node_base", i64 }
%"struct.std::_Rb_tree_node_base" = type { i32, ptr, ptr, ptr }
%"class.std::multimap.0" = type { %"class.std::_Rb_tree.1" }
%"class.std::_Rb_tree.1" = type { %"struct.std::_Rb_tree<unsigned char, std::pair<const unsigned char, DIS::IPduBank *>, std::_Select1st<std::pair<const unsigned char, DIS::IPduBank *>>, std::less<unsigned char>>::_Rb_tree_impl" }
%"struct.std::_Rb_tree<unsigned char, std::pair<const unsigned char, DIS::IPduBank *>, std::_Select1st<std::pair<const unsigned char, DIS::IPduBank *>>, std::less<unsigned char>>::_Rb_tree_impl" = type { [8 x i8], %"struct.std::_Rb_tree_header" }
%"struct.std::pair" = type { i8, ptr }

; 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 nounwind uwtable
declare dso_local noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKhPN3DIS8IPduBankEEES8_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKhPN3DIS8IPduBankEEEptEv(ptr noundef nonnull align 8 dereferenceable(8)) #1 align 2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN3DIS15IncomingMessage20FindPduBankContainerEhPKNS_8IPduBankERSt17_Rb_tree_iteratorISt4pairIKhPS1_EE(ptr noundef nonnull align 8 dereferenceable(104) %0, i8 noundef zeroext %1, ptr noundef %2, ptr noundef nonnull align 8 dereferenceable(8) %3) #3 align 2 {
  %5 = alloca i1, align 1
  %6 = alloca ptr, align 8
  %7 = alloca i8, align 1
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca %"struct.std::pair.13", align 8
  %11 = alloca i32, align 4
  %12 = alloca %"struct.std::_Rb_tree_iterator", align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store i8 %1, ptr %7, align 1, !tbaa !9
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  %13 = load ptr, ptr %6, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %10) #4
  %14 = getelementptr inbounds %"class.DIS::IncomingMessage", ptr %13, i32 0, i32 2
  %15 = call { ptr, ptr } @_ZNSt8multimapIhPN3DIS8IPduBankESt4lessIhESaISt4pairIKhS2_EEE11equal_rangeERS6_(ptr noundef nonnull align 8 dereferenceable(48) %14, ptr noundef nonnull align 1 dereferenceable(1) %7)
  %16 = getelementptr inbounds { ptr, ptr }, ptr %10, i32 0, i32 0
  %17 = extractvalue { ptr, ptr } %15, 0
  store ptr %17, ptr %16, align 8
  %18 = getelementptr inbounds { ptr, ptr }, ptr %10, i32 0, i32 1
  %19 = extractvalue { ptr, ptr } %15, 1
  store ptr %19, ptr %18, align 8
  br label %20

20:                                               ; preds = %34, %4
  %21 = getelementptr inbounds %"struct.std::pair.13", ptr %10, i32 0, i32 0
  %22 = getelementptr inbounds %"struct.std::pair.13", ptr %10, i32 0, i32 1
  %23 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKhPN3DIS8IPduBankEEES8_(ptr noundef nonnull align 8 dereferenceable(8) %21, ptr noundef nonnull align 8 dereferenceable(8) %22) #4
  br i1 %23, label %24, label %38

24:                                               ; preds = %20
  %25 = getelementptr inbounds %"struct.std::pair.13", ptr %10, i32 0, i32 0
  %26 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKhPN3DIS8IPduBankEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %25) #4
  %27 = getelementptr inbounds %"struct.std::pair", ptr %26, i32 0, i32 1
  %28 = load ptr, ptr %27, align 8, !tbaa !10
  %29 = load ptr, ptr %8, align 8, !tbaa !5
  %30 = icmp eq ptr %28, %29
  br i1 %30, label %31, label %34

31:                                               ; preds = %24
  %32 = getelementptr inbounds %"struct.std::pair.13", ptr %10, i32 0, i32 0
  %33 = load ptr, ptr %9, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %33, ptr align 8 %32, i64 8, i1 false), !tbaa.struct !12
  store i1 true, ptr %5, align 1
  store i32 1, ptr %11, align 4
  br label %39

34:                                               ; preds = %24
  %35 = getelementptr inbounds %"struct.std::pair.13", ptr %10, i32 0, i32 0
  %36 = call ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKhPN3DIS8IPduBankEEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %35, i32 noundef 0) #4
  %37 = getelementptr inbounds %"struct.std::_Rb_tree_iterator", ptr %12, i32 0, i32 0
  store ptr %36, ptr %37, align 8
  br label %20, !llvm.loop !13

38:                                               ; preds = %20
  store i1 false, ptr %5, align 1
  store i32 1, ptr %11, align 4
  br label %39

39:                                               ; preds = %38, %31
  call void @llvm.lifetime.end.p0(i64 16, ptr %10) #4
  %40 = load i1, ptr %5, align 1
  ret i1 %40
}

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, ptr } @_ZNSt8multimapIhPN3DIS8IPduBankESt4lessIhESaISt4pairIKhS2_EEE11equal_rangeERS6_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 1 dereferenceable(1)) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKhPN3DIS8IPduBankEEEppEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #1 align 2

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
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 = { 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 = !{!7, !7, i64 0}
!10 = !{!11, !6, i64 8}
!11 = !{!"_ZTSSt4pairIKhPN3DIS8IPduBankEE", !7, i64 0, !6, i64 8}
!12 = !{i64 0, i64 8, !5}
!13 = distinct !{!13, !14}
!14 = !{!"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"

%"struct.std::pair.13" = type { %"struct.std::_Rb_tree_iterator", %"struct.std::_Rb_tree_iterator" }
%"struct.std::_Rb_tree_iterator" = type { ptr }

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKhPN3DIS8IPduBankEEES8_(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKhPN3DIS8IPduBankEEEptEv(ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #1 align 2

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN3DIS15IncomingMessage20FindPduBankContainerEhPKNS_8IPduBankERSt17_Rb_tree_iteratorISt4pairIKhPS1_EE(ptr noundef nonnull align 8 dereferenceable(104) %0, i8 noundef zeroext %1, ptr noundef readnone %2, ptr nocapture noundef nonnull writeonly align 8 dereferenceable(8) %3) local_unnamed_addr #2 align 2 {
  %5 = alloca i8, align 1
  %6 = alloca %"struct.std::pair.13", align 8
  store i8 %1, ptr %5, align 1, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #3
  %7 = getelementptr inbounds i8, ptr %0, i64 56
  %8 = call { ptr, ptr } @_ZNSt8multimapIhPN3DIS8IPduBankESt4lessIhESaISt4pairIKhS2_EEE11equal_rangeERS6_(ptr noundef nonnull align 8 dereferenceable(48) %7, ptr noundef nonnull align 1 dereferenceable(1) %5)
  %9 = extractvalue { ptr, ptr } %8, 0
  store ptr %9, ptr %6, align 8
  %10 = getelementptr inbounds i8, ptr %6, i64 8
  %11 = extractvalue { ptr, ptr } %8, 1
  store ptr %11, ptr %10, align 8
  %12 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKhPN3DIS8IPduBankEEES8_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %10) #3
  br i1 %12, label %.lr.ph, label %.loopexit

.lr.ph:                                           ; preds = %4, %19
  %13 = call noundef ptr @_ZNKSt17_Rb_tree_iteratorISt4pairIKhPN3DIS8IPduBankEEEptEv(ptr noundef nonnull align 8 dereferenceable(8) %6) #3
  %14 = getelementptr inbounds i8, ptr %13, i64 8
  %15 = load ptr, ptr %14, align 8, !tbaa !8
  %16 = icmp eq ptr %15, %2
  br i1 %16, label %17, label %19

17:                                               ; preds = %.lr.ph
  %18 = load i64, ptr %6, align 8, !tbaa !11
  store i64 %18, ptr %3, align 8, !tbaa !11
  br label %.loopexit

19:                                               ; preds = %.lr.ph
  %20 = call ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKhPN3DIS8IPduBankEEEppEi(ptr noundef nonnull align 8 dereferenceable(8) %6, i32 noundef 0) #3
  %21 = call noundef zeroext i1 @_ZStneRKSt17_Rb_tree_iteratorISt4pairIKhPN3DIS8IPduBankEEES8_(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull align 8 dereferenceable(8) %10) #3
  br i1 %21, label %.lr.ph, label %.loopexit, !llvm.loop !12

.loopexit:                                        ; preds = %19, %4, %17
  %22 = phi i1 [ true, %17 ], [ false, %4 ], [ false, %19 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #3
  ret i1 %22
}

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, ptr } @_ZNSt8multimapIhPN3DIS8IPduBankESt4lessIhESaISt4pairIKhS2_EEE11equal_rangeERS6_(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local ptr @_ZNSt17_Rb_tree_iteratorISt4pairIKhPN3DIS8IPduBankEEEppEi(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #1 align 2

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { 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 #2 = { 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 #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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = !{!9, !10, i64 8}
!9 = !{!"_ZTSSt4pairIKhPN3DIS8IPduBankEE", !6, i64 0, !10, i64 8}
!10 = !{!"any pointer", !6, i64 0}
!11 = !{!10, !10, i64 0}
!12 = distinct !{!12, !13}
!13 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass