; LLVM IR from facebook/redex :: libredex (PointsToSemantics)

; 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.UnorderedMap.9 = type { %"class.std::unordered_map.11" }
%"class.std::unordered_map.11" = type { %"class.std::_Hashtable.12" }
%"class.std::_Hashtable.12" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"class.boost::optional.34" = type { %"class.boost::optional_detail::tc_optional_base" }
%"class.boost::optional_detail::tc_optional_base" = type { i8, i32 }
%"class.UnorderedMap<std::__cxx11::basic_string<char>, PointsToOperationKind>::FixedIterator" = type { %"struct.std::__detail::_Node_iterator.35" }
%"struct.std::__detail::_Node_iterator.35" = type { %"struct.std::__detail::_Node_iterator_base.36" }
%"struct.std::__detail::_Node_iterator_base.36" = type { ptr }
%"struct.std::pair.32" = type <{ %"class.std::__cxx11::basic_string", i32, [4 x i8] }>
%"class.std::__cxx11::basic_string" = type { %"struct.std::__cxx11::basic_string<char>::_Alloc_hider", i64, %union.anon }
%"struct.std::__cxx11::basic_string<char>::_Alloc_hider" = type { ptr }
%union.anon = type { i64, [8 x i8] }

@_ZN8pts_impl18string_to_op_tableB5cxx11E = external dso_local global %class.UnorderedMap.9, align 8

; 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 i64 @_ZN8pts_impl17string_to_op_kindERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32) %0) #1 {
  %2 = alloca %"class.boost::optional.34", align 4
  %3 = alloca ptr, align 8
  %4 = alloca %"class.UnorderedMap<std::__cxx11::basic_string<char>, PointsToOperationKind>::FixedIterator", align 8
  %5 = alloca %"class.UnorderedMap<std::__cxx11::basic_string<char>, PointsToOperationKind>::FixedIterator", align 8
  %6 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #3
  %7 = load ptr, ptr %3, align 8, !tbaa !5
  %8 = call ptr @_ZN12UnorderedMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE21PointsToOperationKindSt4hashIS5_ESt8equal_toIS5_EE4findERKS5_(ptr noundef nonnull align 8 dereferenceable(56) @_ZN8pts_impl18string_to_op_tableB5cxx11E, ptr noundef nonnull align 8 dereferenceable(32) %7)
  %9 = getelementptr inbounds %"class.UnorderedMap<std::__cxx11::basic_string<char>, PointsToOperationKind>::FixedIterator", ptr %4, i32 0, i32 0
  %10 = getelementptr inbounds %"struct.std::__detail::_Node_iterator.35", ptr %9, i32 0, i32 0
  %11 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base.36", ptr %10, i32 0, i32 0
  store ptr %8, ptr %11, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #3
  %12 = call ptr @_ZN12UnorderedMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE21PointsToOperationKindSt4hashIS5_ESt8equal_toIS5_EE3endEv(ptr noundef nonnull align 8 dereferenceable(56) @_ZN8pts_impl18string_to_op_tableB5cxx11E)
  %13 = getelementptr inbounds %"class.UnorderedMap<std::__cxx11::basic_string<char>, PointsToOperationKind>::FixedIterator", ptr %5, i32 0, i32 0
  %14 = getelementptr inbounds %"struct.std::__detail::_Node_iterator.35", ptr %13, i32 0, i32 0
  %15 = getelementptr inbounds %"struct.std::__detail::_Node_iterator_base.36", ptr %14, i32 0, i32 0
  store ptr %12, ptr %15, align 8
  %16 = call noundef zeroext i1 @_ZNK12UnorderedMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE21PointsToOperationKindSt4hashIS5_ESt8equal_toIS5_EE13FixedIteratoreqERKSC_(ptr noundef nonnull align 8 dereferenceable(8) %4, ptr noundef nonnull align 8 dereferenceable(8) %5)
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #3
  br i1 %16, label %17, label %18

17:                                               ; preds = %1
  call void @_ZN5boost8optionalI21PointsToOperationKindEC2Ev(ptr noundef nonnull align 4 dereferenceable(8) %2) #3
  store i32 1, ptr %6, align 4
  br label %21

18:                                               ; preds = %1
  %19 = call noundef ptr @_ZNK12UnorderedMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE21PointsToOperationKindSt4hashIS5_ESt8equal_toIS5_EE13FixedIteratorptEv(ptr noundef nonnull align 8 dereferenceable(8) %4)
  %20 = getelementptr inbounds %"struct.std::pair.32", ptr %19, i32 0, i32 1
  call void @_ZN5boost8optionalI21PointsToOperationKindEC2ERKS1_(ptr noundef nonnull align 4 dereferenceable(8) %2, ptr noundef nonnull align 4 dereferenceable(4) %20)
  store i32 1, ptr %6, align 4
  br label %21

21:                                               ; preds = %18, %17
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #3
  %22 = getelementptr inbounds %"class.boost::optional.34", ptr %2, i32 0, i32 0
  %23 = load i64, ptr %22, align 4
  ret i64 %23
}

; Function Attrs: mustprogress uwtable
declare dso_local ptr @_ZN12UnorderedMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE21PointsToOperationKindSt4hashIS5_ESt8equal_toIS5_EE4findERKS5_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(32)) #1 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5boost8optionalI21PointsToOperationKindEC2ERKS1_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #1 align 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 = { 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 }

!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"}


; 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.UnorderedMap.9 = type { %"class.std::unordered_map.11" }
%"class.std::unordered_map.11" = type { %"class.std::_Hashtable.12" }
%"class.std::_Hashtable.12" = type { ptr, i64, %"struct.std::__detail::_Hash_node_base", i64, %"struct.std::__detail::_Prime_rehash_policy", ptr }
%"struct.std::__detail::_Hash_node_base" = type { ptr }
%"struct.std::__detail::_Prime_rehash_policy" = type { float, i64 }
%"class.boost::optional.34" = type { %"class.boost::optional_detail::tc_optional_base" }
%"class.boost::optional_detail::tc_optional_base" = type { i8, i32 }
%"class.UnorderedMap<std::__cxx11::basic_string<char>, PointsToOperationKind>::FixedIterator" = type { %"struct.std::__detail::_Node_iterator.35" }
%"struct.std::__detail::_Node_iterator.35" = type { %"struct.std::__detail::_Node_iterator_base.36" }
%"struct.std::__detail::_Node_iterator_base.36" = type { ptr }

@_ZN8pts_impl18string_to_op_tableB5cxx11E = external dso_local global %class.UnorderedMap.9, align 8

; 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 uwtable
define dso_local i64 @_ZN8pts_impl17string_to_op_kindERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE(ptr noundef nonnull align 8 dereferenceable(32) %0) local_unnamed_addr #1 {
  %2 = alloca %"class.boost::optional.34", align 8
  %3 = alloca %"class.UnorderedMap<std::__cxx11::basic_string<char>, PointsToOperationKind>::FixedIterator", align 8
  %4 = alloca %"class.UnorderedMap<std::__cxx11::basic_string<char>, PointsToOperationKind>::FixedIterator", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #3
  %5 = tail call ptr @_ZN12UnorderedMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE21PointsToOperationKindSt4hashIS5_ESt8equal_toIS5_EE4findERKS5_(ptr noundef nonnull align 8 dereferenceable(56) @_ZN8pts_impl18string_to_op_tableB5cxx11E, ptr noundef nonnull align 8 dereferenceable(32) %0)
  store ptr %5, ptr %3, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #3
  %6 = tail call ptr @_ZN12UnorderedMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE21PointsToOperationKindSt4hashIS5_ESt8equal_toIS5_EE3endEv(ptr noundef nonnull align 8 dereferenceable(56) @_ZN8pts_impl18string_to_op_tableB5cxx11E)
  store ptr %6, ptr %4, align 8
  %7 = call noundef zeroext i1 @_ZNK12UnorderedMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE21PointsToOperationKindSt4hashIS5_ESt8equal_toIS5_EE13FixedIteratoreqERKSC_(ptr noundef nonnull align 8 dereferenceable(8) %3, ptr noundef nonnull align 8 dereferenceable(8) %4)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #3
  br i1 %7, label %8, label %9

8:                                                ; preds = %1
  call void @_ZN5boost8optionalI21PointsToOperationKindEC2Ev(ptr noundef nonnull align 4 dereferenceable(8) %2) #3
  br label %12

9:                                                ; preds = %1
  %10 = call noundef ptr @_ZNK12UnorderedMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE21PointsToOperationKindSt4hashIS5_ESt8equal_toIS5_EE13FixedIteratorptEv(ptr noundef nonnull align 8 dereferenceable(8) %3)
  %11 = getelementptr inbounds i8, ptr %10, i64 32
  call void @_ZN5boost8optionalI21PointsToOperationKindEC2ERKS1_(ptr noundef nonnull align 4 dereferenceable(8) %2, ptr noundef nonnull align 4 dereferenceable(4) %11)
  br label %12

12:                                               ; preds = %9, %8
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #3
  %13 = load i64, ptr %2, align 8
  ret i64 %13
}

; Function Attrs: mustprogress uwtable
declare dso_local ptr @_ZN12UnorderedMapINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE21PointsToOperationKindSt4hashIS5_ESt8equal_toIS5_EE4findERKS5_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #1 align 2

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

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN5boost8optionalI21PointsToOperationKindEC2ERKS1_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(4)) unnamed_addr #1 align 2

attributes #0 = { mustprogress 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 = { 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 }

!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: EarlyCSEPass,GlobalOptPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,TailCallElimPass