; LLVM IR from opset/openset :: src/attributes.ll (ZN7openset2db10Attributes4swapEilPNS0_9IndexBitsE)

; 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.312" = type <{ %"class.robin_hood::detail::unordered_map<true, 80, openset::db::attr_key_s, openset::db::Attr_s *, robin_hood::hash<openset::db::attr_key_s>, std::equal_to<openset::db::attr_key_s>>::Iter", i8, [7 x i8] }>
%"class.robin_hood::detail::unordered_map<true, 80, openset::db::attr_key_s, openset::db::Attr_s *, robin_hood::hash<openset::db::attr_key_s>, std::equal_to<openset::db::attr_key_s>>::Iter" = type { ptr, ptr }
%"struct.openset::db::attr_key_s" = type <{ i32, i64 }>
%"struct.robin_hood::pair" = type { %"struct.openset::db::attr_key_s", ptr }
%"class.openset::db::Attributes" = type <{ %"class.robin_hood::detail::unordered_map", %"class.robin_hood::detail::unordered_map.292", ptr, ptr, ptr, i32, [4 x i8] }>
%"class.robin_hood::detail::unordered_map" = type { ptr, ptr, i64, i64, i64, i32, i32 }
%"class.robin_hood::detail::unordered_map.292" = type { ptr, ptr, i64, i64, i64, i32, i32 }
%"struct.openset::db::Attr_s" = type <{ ptr, i32, i32, i32, i32, i32, [1 x i8] }>
%"class.openset::db::IndexBits" = type <{ ptr, i32, i8, [3 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: 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) #1

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(48) ptr @_ZN7PoolMem7getPoolEv() #3 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7openset2db10attr_key_sC2Eil(ptr noundef nonnull align 1 dereferenceable(12), i32 noundef, i64 noundef) unnamed_addr #2 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef zeroext i1 @_ZNK10robin_hood6detail13unordered_mapILb1ELm80EN7openset2db10attr_key_sEPNS3_6Attr_sENS_4hashIS4_EESt8equal_toIS4_EE4IterILb0EEeqILb0EEEbRKNSC_IXT_EEE(ptr noundef nonnull align 8 dereferenceable(16), ptr noundef nonnull align 8 dereferenceable(16)) #2 align 2

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10robin_hood6detail13unordered_mapILb1ELm80EN7openset2db10attr_key_sEPNS3_6Attr_sENS_4hashIS4_EESt8equal_toIS4_EE6insertEONS_4pairIS4_S6_EE(ptr dead_on_unwind noalias writable sret(%"struct.std::pair.312") align 8, ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(24)) #3 align 2

declare noundef ptr @_ZN7openset2db9IndexBits5storeERlS2_RiS3_i(ptr noundef nonnull align 8 dereferenceable(13), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) #4

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7openset2db10Attributes4swapEilPNS0_9IndexBitsE(ptr noundef nonnull align 8 dereferenceable(124) %0, i32 noundef %1, i64 noundef %2, ptr noundef %3) #3 align 2 {
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i64, align 8
  %8 = alloca ptr, align 8
  %9 = alloca %"class.robin_hood::detail::unordered_map<true, 80, openset::db::attr_key_s, openset::db::Attr_s *, robin_hood::hash<openset::db::attr_key_s>, std::equal_to<openset::db::attr_key_s>>::Iter", align 8
  %10 = alloca %"struct.openset::db::attr_key_s", align 1
  %11 = alloca %"class.robin_hood::detail::unordered_map<true, 80, openset::db::attr_key_s, openset::db::Attr_s *, robin_hood::hash<openset::db::attr_key_s>, std::equal_to<openset::db::attr_key_s>>::Iter", align 8
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca %"struct.robin_hood::pair", align 8
  %21 = alloca %"struct.openset::db::attr_key_s", align 1
  %22 = alloca %"struct.std::pair.312", align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !9
  store i64 %2, ptr %7, align 8, !tbaa !11
  store ptr %3, ptr %8, align 8, !tbaa !5
  %23 = load ptr, ptr %5, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr %9) #5
  %24 = getelementptr inbounds %"class.openset::db::Attributes", ptr %23, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 12, ptr %10) #5
  %25 = load i32, ptr %6, align 4, !tbaa !9
  %26 = load i64, ptr %7, align 8, !tbaa !11
  call void @_ZN7openset2db10attr_key_sC2Eil(ptr noundef nonnull align 1 dereferenceable(12) %10, i32 noundef %25, i64 noundef %26)
  %27 = call { ptr, ptr } @_ZN10robin_hood6detail13unordered_mapILb1ELm80EN7openset2db10attr_key_sEPNS3_6Attr_sENS_4hashIS4_EESt8equal_toIS4_EE4findERKS4_(ptr noundef nonnull align 8 dereferenceable(48) %24, ptr noundef nonnull align 1 dereferenceable(12) %10)
  %28 = getelementptr inbounds { ptr, ptr }, ptr %9, i32 0, i32 0
  %29 = extractvalue { ptr, ptr } %27, 0
  store ptr %29, ptr %28, align 8
  %30 = getelementptr inbounds { ptr, ptr }, ptr %9, i32 0, i32 1
  %31 = extractvalue { ptr, ptr } %27, 1
  store ptr %31, ptr %30, align 8
  call void @llvm.lifetime.end.p0(i64 12, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %11) #5
  %32 = getelementptr inbounds %"class.openset::db::Attributes", ptr %23, i32 0, i32 0
  %33 = call { ptr, ptr } @_ZN10robin_hood6detail13unordered_mapILb1ELm80EN7openset2db10attr_key_sEPNS3_6Attr_sENS_4hashIS4_EESt8equal_toIS4_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %32)
  %34 = getelementptr inbounds { ptr, ptr }, ptr %11, i32 0, i32 0
  %35 = extractvalue { ptr, ptr } %33, 0
  store ptr %35, ptr %34, align 8
  %36 = getelementptr inbounds { ptr, ptr }, ptr %11, i32 0, i32 1
  %37 = extractvalue { ptr, ptr } %33, 1
  store ptr %37, ptr %36, align 8
  %38 = call noundef zeroext i1 @_ZNK10robin_hood6detail13unordered_mapILb1ELm80EN7openset2db10attr_key_sEPNS3_6Attr_sENS_4hashIS4_EESt8equal_toIS4_EE4IterILb0EEeqILb0EEEbRKNSC_IXT_EEE(ptr noundef nonnull align 8 dereferenceable(16) %9, ptr noundef nonnull align 8 dereferenceable(16) %11) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %11) #5
  br i1 %38, label %39, label %40

39:                                               ; preds = %4
  store i32 1, ptr %12, align 4
  br label %98

40:                                               ; preds = %4
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  %41 = call noundef ptr @_ZNK10robin_hood6detail13unordered_mapILb1ELm80EN7openset2db10attr_key_sEPNS3_6Attr_sENS_4hashIS4_EESt8equal_toIS4_EE4IterILb0EEptEv(ptr noundef nonnull align 8 dereferenceable(16) %9)
  %42 = getelementptr inbounds %"struct.robin_hood::pair", ptr %41, i32 0, i32 1
  %43 = load ptr, ptr %42, align 8, !tbaa !13
  store ptr %43, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  store i64 0, ptr %14, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  store i64 -1, ptr %15, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  %44 = load ptr, ptr %8, align 8, !tbaa !5
  %45 = call noundef ptr @_ZN7openset2db9IndexBits5storeERlS2_RiS3_i(ptr noundef nonnull align 8 dereferenceable(13) %44, ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15, ptr noundef nonnull align 4 dereferenceable(4) %17, ptr noundef nonnull align 4 dereferenceable(4) %16, i32 noundef 1)
  store ptr %45, ptr %18, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  %46 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZN7PoolMem7getPoolEv()
  %47 = load i64, ptr %14, align 8, !tbaa !11
  %48 = add i64 29, %47
  %49 = call noundef ptr @_ZN7PoolMem6getPtrEl(ptr noundef nonnull align 8 dereferenceable(48) %46, i64 noundef %48)
  store ptr %49, ptr %19, align 8, !tbaa !5
  %50 = load ptr, ptr %19, align 8, !tbaa !5
  %51 = load ptr, ptr %13, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %50, ptr align 1 %51, i64 29, i1 false)
  %52 = load ptr, ptr %18, align 8, !tbaa !5
  %53 = icmp ne ptr %52, null
  br i1 %53, label %54, label %62

54:                                               ; preds = %40
  %55 = load ptr, ptr %19, align 8, !tbaa !5
  %56 = getelementptr inbounds %"struct.openset::db::Attr_s", ptr %55, i32 0, i32 6
  %57 = getelementptr inbounds [1 x i8], ptr %56, i64 0, i64 0
  %58 = load ptr, ptr %18, align 8, !tbaa !5
  %59 = load i64, ptr %14, align 8, !tbaa !11
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %57, ptr align 1 %58, i64 %59, i1 false)
  %60 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZN7PoolMem7getPoolEv()
  %61 = load ptr, ptr %18, align 8, !tbaa !5
  call void @_ZN7PoolMem7freePtrEPv(ptr noundef nonnull align 8 dereferenceable(48) %60, ptr noundef %61)
  br label %62

62:                                               ; preds = %54, %40
  %63 = load ptr, ptr %13, align 8, !tbaa !5
  %64 = getelementptr inbounds %"struct.openset::db::Attr_s", ptr %63, i32 0, i32 0
  %65 = load ptr, ptr %64, align 1, !tbaa !16
  %66 = load ptr, ptr %19, align 8, !tbaa !5
  %67 = getelementptr inbounds %"struct.openset::db::Attr_s", ptr %66, i32 0, i32 0
  store ptr %65, ptr %67, align 1, !tbaa !16
  %68 = load i64, ptr %14, align 8, !tbaa !11
  %69 = icmp ne i64 %68, 0
  br i1 %69, label %70, label %74

70:                                               ; preds = %62
  %71 = load ptr, ptr %8, align 8, !tbaa !5
  %72 = getelementptr inbounds %"class.openset::db::IndexBits", ptr %71, i32 0, i32 1
  %73 = load i32, ptr %72, align 8, !tbaa !18
  br label %75

74:                                               ; preds = %62
  br label %75

75:                                               ; preds = %74, %70
  %76 = phi i32 [ %73, %70 ], [ 0, %74 ]
  %77 = load ptr, ptr %19, align 8, !tbaa !5
  %78 = getelementptr inbounds %"struct.openset::db::Attr_s", ptr %77, i32 0, i32 1
  store i32 %76, ptr %78, align 1, !tbaa !21
  %79 = load i64, ptr %14, align 8, !tbaa !11
  %80 = trunc i64 %79 to i32
  %81 = load ptr, ptr %19, align 8, !tbaa !5
  %82 = getelementptr inbounds %"struct.openset::db::Attr_s", ptr %81, i32 0, i32 4
  store i32 %80, ptr %82, align 1, !tbaa !22
  %83 = load i64, ptr %15, align 8, !tbaa !11
  %84 = trunc i64 %83 to i32
  %85 = load ptr, ptr %19, align 8, !tbaa !5
  %86 = getelementptr inbounds %"struct.openset::db::Attr_s", ptr %85, i32 0, i32 5
  store i32 %84, ptr %86, align 1, !tbaa !23
  %87 = load i32, ptr %17, align 4, !tbaa !9
  %88 = load ptr, ptr %19, align 8, !tbaa !5
  %89 = getelementptr inbounds %"struct.openset::db::Attr_s", ptr %88, i32 0, i32 2
  store i32 %87, ptr %89, align 1, !tbaa !24
  %90 = load i32, ptr %16, align 4, !tbaa !9
  %91 = load ptr, ptr %19, align 8, !tbaa !5
  %92 = getelementptr inbounds %"struct.openset::db::Attr_s", ptr %91, i32 0, i32 3
  store i32 %90, ptr %92, align 1, !tbaa !25
  %93 = getelementptr inbounds %"class.openset::db::Attributes", ptr %23, i32 0, i32 0
  call void @llvm.lifetime.start.p0(i64 24, ptr %20) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr %21) #5
  %94 = load i32, ptr %6, align 4, !tbaa !9
  %95 = load i64, ptr %7, align 8, !tbaa !11
  call void @_ZN7openset2db10attr_key_sC2Eil(ptr noundef nonnull align 1 dereferenceable(12) %21, i32 noundef %94, i64 noundef %95)
  call void @_ZN10robin_hood4pairIN7openset2db10attr_key_sEPNS2_6Attr_sEEC2IS3_RS5_EEOT_OT0_(ptr noundef nonnull align 8 dereferenceable(24) %20, ptr noundef nonnull align 1 dereferenceable(12) %21, ptr noundef nonnull align 8 dereferenceable(8) %19) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr %22) #5
  call void @_ZN10robin_hood6detail13unordered_mapILb1ELm80EN7openset2db10attr_key_sEPNS3_6Attr_sENS_4hashIS4_EESt8equal_toIS4_EE6insertEONS_4pairIS4_S6_EE(ptr dead_on_unwind writable sret(%"struct.std::pair.312") align 8 %22, ptr noundef nonnull align 8 dereferenceable(48) %93, ptr noundef nonnull align 8 dereferenceable(24) %20)
  call void @llvm.lifetime.end.p0(i64 24, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %20) #5
  %96 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZN7PoolMem7getPoolEv()
  %97 = load ptr, ptr %13, align 8, !tbaa !5
  call void @_ZN7PoolMem7freePtrEPv(ptr noundef nonnull align 8 dereferenceable(48) %96, ptr noundef %97)
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  store i32 0, ptr %12, align 4
  br label %98

98:                                               ; preds = %75, %39
  call void @llvm.lifetime.end.p0(i64 16, ptr %9) #5
  %99 = load i32, ptr %12, align 4
  switch i32 %99, label %101 [
    i32 0, label %100
    i32 1, label %100
  ]

100:                                              ; preds = %98, %98
  ret void

101:                                              ; preds = %98
  unreachable
}

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 = { 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 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!14, !6, i64 16}
!14 = !{!"_ZTSN10robin_hood4pairIN7openset2db10attr_key_sEPNS2_6Attr_sEEE", !15, i64 0, !6, i64 16}
!15 = !{!"_ZTSN7openset2db10attr_key_sE", !10, i64 0, !12, i64 4}
!16 = !{!17, !6, i64 0}
!17 = !{!"_ZTSN7openset2db6Attr_sE", !6, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !7, i64 28}
!18 = !{!19, !10, i64 8}
!19 = !{!"_ZTSN7openset2db9IndexBitsE", !6, i64 0, !10, i64 8, !20, i64 12}
!20 = !{!"bool", !7, i64 0}
!21 = !{!17, !10, i64 8}
!22 = !{!17, !10, i64 20}
!23 = !{!17, !10, i64 24}
!24 = !{!17, !10, i64 12}
!25 = !{!17, !10, i64 16}


; 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.312" = type <{ %"class.robin_hood::detail::unordered_map<true, 80, openset::db::attr_key_s, openset::db::Attr_s *, robin_hood::hash<openset::db::attr_key_s>, std::equal_to<openset::db::attr_key_s>>::Iter", i8, [7 x i8] }>
%"class.robin_hood::detail::unordered_map<true, 80, openset::db::attr_key_s, openset::db::Attr_s *, robin_hood::hash<openset::db::attr_key_s>, std::equal_to<openset::db::attr_key_s>>::Iter" = type { ptr, ptr }
%"struct.openset::db::attr_key_s" = type <{ i32, i64 }>
%"struct.robin_hood::pair" = type { %"struct.openset::db::attr_key_s", 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 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) #1

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef nonnull align 8 dereferenceable(48) ptr @_ZN7PoolMem7getPoolEv() local_unnamed_addr #3 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN7openset2db10attr_key_sC2Eil(ptr noundef nonnull align 1 dereferenceable(12), i32 noundef, i64 noundef) unnamed_addr #2 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN10robin_hood6detail13unordered_mapILb1ELm80EN7openset2db10attr_key_sEPNS3_6Attr_sENS_4hashIS4_EESt8equal_toIS4_EE6insertEONS_4pairIS4_S6_EE(ptr dead_on_unwind noalias writable sret(%"struct.std::pair.312") align 8, ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(24)) local_unnamed_addr #3 align 2

declare noundef ptr @_ZN7openset2db9IndexBits5storeERlS2_RiS3_i(ptr noundef nonnull align 8 dereferenceable(13), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4), ptr noundef nonnull align 4 dereferenceable(4), i32 noundef) local_unnamed_addr #4

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN7openset2db10Attributes4swapEilPNS0_9IndexBitsE(ptr noundef nonnull align 8 dereferenceable(124) %0, i32 noundef %1, i64 noundef %2, ptr noundef %3) local_unnamed_addr #3 align 2 {
  %5 = alloca %"class.robin_hood::detail::unordered_map<true, 80, openset::db::attr_key_s, openset::db::Attr_s *, robin_hood::hash<openset::db::attr_key_s>, std::equal_to<openset::db::attr_key_s>>::Iter", align 8
  %6 = alloca %"struct.openset::db::attr_key_s", align 1
  %7 = alloca %"class.robin_hood::detail::unordered_map<true, 80, openset::db::attr_key_s, openset::db::Attr_s *, robin_hood::hash<openset::db::attr_key_s>, std::equal_to<openset::db::attr_key_s>>::Iter", align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = alloca %"struct.robin_hood::pair", align 8
  %14 = alloca %"struct.openset::db::attr_key_s", align 1
  %15 = alloca %"struct.std::pair.312", align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %6) #5
  call void @_ZN7openset2db10attr_key_sC2Eil(ptr noundef nonnull align 1 dereferenceable(12) %6, i32 noundef %1, i64 noundef %2)
  %16 = call { ptr, ptr } @_ZN10robin_hood6detail13unordered_mapILb1ELm80EN7openset2db10attr_key_sEPNS3_6Attr_sENS_4hashIS4_EESt8equal_toIS4_EE4findERKS4_(ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 1 dereferenceable(12) %6)
  %17 = extractvalue { ptr, ptr } %16, 0
  store ptr %17, ptr %5, align 8
  %18 = getelementptr inbounds i8, ptr %5, i64 8
  %19 = extractvalue { ptr, ptr } %16, 1
  store ptr %19, ptr %18, align 8
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %6) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %7) #5
  %20 = call { ptr, ptr } @_ZN10robin_hood6detail13unordered_mapILb1ELm80EN7openset2db10attr_key_sEPNS3_6Attr_sENS_4hashIS4_EESt8equal_toIS4_EE3endEv(ptr noundef nonnull align 8 dereferenceable(48) %0)
  %21 = extractvalue { ptr, ptr } %20, 0
  store ptr %21, ptr %7, align 8
  %22 = getelementptr inbounds i8, ptr %7, i64 8
  %23 = extractvalue { ptr, ptr } %20, 1
  store ptr %23, ptr %22, align 8
  %24 = call noundef zeroext i1 @_ZNK10robin_hood6detail13unordered_mapILb1ELm80EN7openset2db10attr_key_sEPNS3_6Attr_sENS_4hashIS4_EESt8equal_toIS4_EE4IterILb0EEeqILb0EEEbRKNSC_IXT_EEE(ptr noundef nonnull align 8 dereferenceable(16) %5, ptr noundef nonnull align 8 dereferenceable(16) %7) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #5
  br i1 %24, label %57, label %25

25:                                               ; preds = %4
  %26 = call noundef ptr @_ZNK10robin_hood6detail13unordered_mapILb1ELm80EN7openset2db10attr_key_sEPNS3_6Attr_sENS_4hashIS4_EESt8equal_toIS4_EE4IterILb0EEptEv(ptr noundef nonnull align 8 dereferenceable(16) %5)
  %27 = getelementptr inbounds i8, ptr %26, i64 16
  %28 = load ptr, ptr %27, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #5
  store i64 0, ptr %8, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #5
  store i64 -1, ptr %9, align 8, !tbaa !13
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #5
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %11) #5
  %29 = call noundef ptr @_ZN7openset2db9IndexBits5storeERlS2_RiS3_i(ptr noundef nonnull align 8 dereferenceable(13) %3, ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull align 4 dereferenceable(4) %11, ptr noundef nonnull align 4 dereferenceable(4) %10, i32 noundef 1)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #5
  %30 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZN7PoolMem7getPoolEv()
  %31 = load i64, ptr %8, align 8, !tbaa !13
  %32 = add i64 %31, 29
  %33 = call noundef ptr @_ZN7PoolMem6getPtrEl(ptr noundef nonnull align 8 dereferenceable(48) %30, i64 noundef %32)
  store ptr %33, ptr %12, align 8, !tbaa !14
  call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 1 dereferenceable(29) %33, ptr noundef nonnull align 1 dereferenceable(29) %28, i64 29, i1 false)
  %.not = icmp eq ptr %29, null
  br i1 %.not, label %38, label %34

34:                                               ; preds = %25
  %35 = getelementptr inbounds i8, ptr %33, i64 28
  %36 = load i64, ptr %8, align 8, !tbaa !13
  call void @llvm.memcpy.p0.p0.i64(ptr nonnull align 1 %35, ptr nonnull align 1 %29, i64 %36, i1 false)
  %37 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZN7PoolMem7getPoolEv()
  call void @_ZN7PoolMem7freePtrEPv(ptr noundef nonnull align 8 dereferenceable(48) %37, ptr noundef nonnull %29)
  br label %38

38:                                               ; preds = %34, %25
  %39 = load ptr, ptr %28, align 1, !tbaa !15
  store ptr %39, ptr %33, align 1, !tbaa !15
  %40 = load i64, ptr %8, align 8, !tbaa !13
  %.not12 = icmp eq i64 %40, 0
  br i1 %.not12, label %44, label %41

41:                                               ; preds = %38
  %42 = getelementptr inbounds i8, ptr %3, i64 8
  %43 = load i32, ptr %42, align 8, !tbaa !17
  br label %44

44:                                               ; preds = %38, %41
  %45 = phi i32 [ %43, %41 ], [ 0, %38 ]
  %46 = getelementptr inbounds i8, ptr %33, i64 8
  store i32 %45, ptr %46, align 1, !tbaa !20
  %47 = trunc i64 %40 to i32
  %48 = getelementptr inbounds i8, ptr %33, i64 20
  store i32 %47, ptr %48, align 1, !tbaa !21
  %49 = load i64, ptr %9, align 8, !tbaa !13
  %50 = trunc i64 %49 to i32
  %51 = getelementptr inbounds i8, ptr %33, i64 24
  store i32 %50, ptr %51, align 1, !tbaa !22
  %52 = load i32, ptr %11, align 4, !tbaa !23
  %53 = getelementptr inbounds i8, ptr %33, i64 12
  store i32 %52, ptr %53, align 1, !tbaa !24
  %54 = load i32, ptr %10, align 4, !tbaa !23
  %55 = getelementptr inbounds i8, ptr %33, i64 16
  store i32 %54, ptr %55, align 1, !tbaa !25
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %13) #5
  call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %14) #5
  call void @_ZN7openset2db10attr_key_sC2Eil(ptr noundef nonnull align 1 dereferenceable(12) %14, i32 noundef %1, i64 noundef %2)
  call void @_ZN10robin_hood4pairIN7openset2db10attr_key_sEPNS2_6Attr_sEEC2IS3_RS5_EEOT_OT0_(ptr noundef nonnull align 8 dereferenceable(24) %13, ptr noundef nonnull align 1 dereferenceable(12) %14, ptr noundef nonnull align 8 dereferenceable(8) %12) #5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %15) #5
  call void @_ZN10robin_hood6detail13unordered_mapILb1ELm80EN7openset2db10attr_key_sEPNS3_6Attr_sENS_4hashIS4_EESt8equal_toIS4_EE6insertEONS_4pairIS4_S6_EE(ptr dead_on_unwind nonnull writable sret(%"struct.std::pair.312") align 8 %15, ptr noundef nonnull align 8 dereferenceable(48) %0, ptr noundef nonnull align 8 dereferenceable(24) %13)
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %15) #5
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %14) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %13) #5
  %56 = call noundef nonnull align 8 dereferenceable(48) ptr @_ZN7PoolMem7getPoolEv()
  call void @_ZN7PoolMem7freePtrEPv(ptr noundef nonnull align 8 dereferenceable(48) %56, ptr noundef nonnull %28)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #5
  br label %57

57:                                               ; preds = %4, %44
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #5
  ret void
}

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 = { 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, !12, i64 16}
!6 = !{!"_ZTSN10robin_hood4pairIN7openset2db10attr_key_sEPNS2_6Attr_sEEE", !7, i64 0, !12, i64 16}
!7 = !{!"_ZTSN7openset2db10attr_key_sE", !8, i64 0, !11, i64 4}
!8 = !{!"int", !9, i64 0}
!9 = !{!"omnipotent char", !10, i64 0}
!10 = !{!"Simple C++ TBAA"}
!11 = !{!"long", !9, i64 0}
!12 = !{!"any pointer", !9, i64 0}
!13 = !{!11, !11, i64 0}
!14 = !{!12, !12, i64 0}
!15 = !{!16, !12, i64 0}
!16 = !{!"_ZTSN7openset2db6Attr_sE", !12, i64 0, !8, i64 8, !8, i64 12, !8, i64 16, !8, i64 20, !8, i64 24, !9, i64 28}
!17 = !{!18, !8, i64 8}
!18 = !{!"_ZTSN7openset2db9IndexBitsE", !12, i64 0, !8, i64 8, !19, i64 12}
!19 = !{!"bool", !9, i64 0}
!20 = !{!16, !8, i64 8}
!21 = !{!16, !8, i64 20}
!22 = !{!16, !8, i64 24}
!23 = !{!8, !8, i64 0}
!24 = !{!16, !8, i64 12}
!25 = !{!16, !8, i64 16}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass