; LLVM IR from facebook/redex :: opt/peephole/RedundantCheckCastRemover.ll (ZN25RedundantCheckCastRemover3runEv)

; 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.std::tuple.45" = type { [4 x i8] }
%"struct.m::match_t" = type { i8 }
%"struct.m::match_t.54" = type { i8 }
%"struct.m::match_t.55" = type { i8 }
%"struct.m::match_t.56" = type { i8 }
%"class.std::unordered_map.57" = type { %"class.std::_Hashtable.58" }
%"class.std::_Hashtable.58" = 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 }
%"struct.std::atomic" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { i32 }
%class.anon = type { ptr }
%"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] }
%"class.std::allocator" = type { i8 }
%class.RedundantCheckCastRemover = type { ptr, ptr }

@.str.15 = external hidden unnamed_addr constant [30 x i8], align 1

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

; 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 @_ZN25RedundantCheckCastRemover3runEv(ptr noundef nonnull align 8 dereferenceable(16) %0) #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca %"class.std::tuple.45", align 1
  %4 = alloca %"struct.m::match_t", align 1
  %5 = alloca %"struct.m::match_t", align 1
  %6 = alloca %"struct.m::match_t.54", align 1
  %7 = alloca %"struct.m::match_t.54", align 1
  %8 = alloca %"struct.m::match_t.55", align 1
  %9 = alloca %"struct.m::match_t.55", align 1
  %10 = alloca %"struct.m::match_t.56", align 1
  %11 = alloca %"struct.m::match_t.56", align 1
  %12 = alloca %"class.std::unordered_map.57", align 8
  %13 = alloca %"struct.std::atomic", align 4
  %14 = alloca %class.anon, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i32, align 4
  %17 = alloca %"class.std::__cxx11::basic_string", align 8
  %18 = alloca %"class.std::allocator", align 1
  store ptr %0, ptr %2, align 8, !tbaa !5
  %19 = load ptr, ptr %2, align 8
  call void @llvm.lifetime.start.p0(i64 4, ptr %3) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %4) #7
  call void @_ZN1m9an_invokeEv()
  call void @llvm.lifetime.start.p0(i64 1, ptr %6) #7
  call void @_ZN1m19move_result_object_Ev()
  call void @llvm.lifetime.start.p0(i64 1, ptr %8) #7
  call void @_ZN1m11check_cast_Ev()
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #7
  call void @_ZN1m26move_result_pseudo_object_Ev()
  call void @_ZSt10make_tupleIJN1m7match_tIP13IRInstructionZNS0_9an_invokeIZNS0_3anyIS3_EEDavEUlPKS2_E_EEDaNS1_IS3_T_EEEUlS7_E_EENS1_IS3_ZNS0_19move_result_object_IS8_EEDaSA_EUlS7_E_EENS1_IS3_ZNS0_11check_cast_IS8_EEDaSA_EUlS7_E_EENS1_IS3_ZNS0_26move_result_pseudo_object_IS8_EEDaSA_EUlS7_E_EEEESt5tupleIJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOSP_(ptr dead_on_unwind writable sret(%"class.std::tuple.45") align 1 %3, ptr noundef nonnull align 1 dereferenceable(1) %4, ptr noundef nonnull align 1 dereferenceable(1) %6, ptr noundef nonnull align 1 dereferenceable(1) %8, ptr noundef nonnull align 1 dereferenceable(1) %10)
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %8) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %6) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %4) #7
  call void @llvm.lifetime.start.p0(i64 56, ptr %12) #7
  call void @_ZNSt13unordered_mapIP9DexMethodSt6vectorIP13IRInstructionSaIS4_EESt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_S6_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %12) #7
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #7
  call void @llvm.memset.p0.i64(ptr align 4 %13, i8 0, i64 4, i1 false)
  %20 = getelementptr inbounds %class.RedundantCheckCastRemover, ptr %19, i32 0, i32 1
  %21 = load ptr, ptr %20, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #7
  %22 = getelementptr inbounds %class.anon, ptr %14, i32 0, i32 0
  store ptr %13, ptr %22, align 8, !tbaa !5
  %23 = invoke noundef i64 @_ZN14redex_parallel19default_num_threadsEv()
          to label %24 unwind label %32

24:                                               ; preds = %1
  invoke void @"_ZN4walk8parallel25matching_opcodes_in_blockISt6vectorIP8DexClassSaIS4_EESt5tupleIJN1m7match_tIP13IRInstructionZNS8_9an_invokeIZNS8_3anyISB_EEDavEUlPKSA_E_EEDaNS9_ISB_T_EEEUlSF_E_EENS9_ISB_ZNS8_19move_result_object_ISG_EEDaSI_EUlSF_E_EENS9_ISB_ZNS8_11check_cast_ISG_EEDaSI_EUlSF_E_EENS9_ISB_ZNS8_26move_result_pseudo_object_ISG_EEDaSI_EUlSF_E_EEEEZN25RedundantCheckCastRemover3runEvE3$_0Lm4EEEvRKSH_RKT0_RKT1_m"(ptr noundef nonnull align 8 dereferenceable(24) %21, ptr noundef nonnull align 1 dereferenceable(4) %3, ptr noundef nonnull align 8 dereferenceable(8) %14, i64 noundef %23)
          to label %25 unwind label %32

25:                                               ; preds = %24
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  %26 = getelementptr inbounds %class.RedundantCheckCastRemover, ptr %19, i32 0, i32 0
  %27 = load ptr, ptr %26, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 32, ptr %17) #7
  call void @llvm.lifetime.start.p0(i64 1, ptr %18) #7
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #7
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef @.str.15, ptr noundef nonnull align 1 dereferenceable(1) %18)
          to label %28 unwind label %36

28:                                               ; preds = %25
  %29 = call noundef i32 @_ZNKSt13__atomic_baseIjEcvjEv(ptr noundef nonnull align 4 dereferenceable(4) %13) #7
  %30 = zext i32 %29 to i64
  invoke void @_ZN11PassManager11incr_metricERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEl(ptr noundef nonnull align 8 dereferenceable(417) %27, ptr noundef nonnull align 8 dereferenceable(32) %17, i64 noundef %30)
          to label %31 unwind label %40

31:                                               ; preds = %28
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #7
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @_ZNSt13unordered_mapIP9DexMethodSt6vectorIP13IRInstructionSaIS4_EESt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_S6_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %12) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  ret void

32:                                               ; preds = %24, %1
  %33 = landingpad { ptr, i32 }
          cleanup
  %34 = extractvalue { ptr, i32 } %33, 0
  store ptr %34, ptr %15, align 8
  %35 = extractvalue { ptr, i32 } %33, 1
  store i32 %35, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #7
  br label %45

36:                                               ; preds = %25
  %37 = landingpad { ptr, i32 }
          cleanup
  %38 = extractvalue { ptr, i32 } %37, 0
  store ptr %38, ptr %15, align 8
  %39 = extractvalue { ptr, i32 } %37, 1
  store i32 %39, ptr %16, align 4
  br label %44

40:                                               ; preds = %28
  %41 = landingpad { ptr, i32 }
          cleanup
  %42 = extractvalue { ptr, i32 } %41, 0
  store ptr %42, ptr %15, align 8
  %43 = extractvalue { ptr, i32 } %41, 1
  store i32 %43, ptr %16, align 4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #7
  br label %44

44:                                               ; preds = %40, %36
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %18) #7
  call void @llvm.lifetime.end.p0(i64 1, ptr %18) #7
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #7
  br label %45

45:                                               ; preds = %44, %32
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #7
  call void @_ZNSt13unordered_mapIP9DexMethodSt6vectorIP13IRInstructionSaIS4_EESt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_S6_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %12) #7
  call void @llvm.lifetime.end.p0(i64 56, ptr %12) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %3) #7
  br label %46

46:                                               ; preds = %45
  %47 = load ptr, ptr %15, align 8
  %48 = load i32, ptr %16, align 4
  %49 = insertvalue { ptr, i32 } poison, ptr %47, 0
  %50 = insertvalue { ptr, i32 } %49, i32 %48, 1
  resume { ptr, i32 } %50
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZSt10make_tupleIJN1m7match_tIP13IRInstructionZNS0_9an_invokeIZNS0_3anyIS3_EEDavEUlPKS2_E_EEDaNS1_IS3_T_EEEUlS7_E_EENS1_IS3_ZNS0_19move_result_object_IS8_EEDaSA_EUlS7_E_EENS1_IS3_ZNS0_11check_cast_IS8_EEDaSA_EUlS7_E_EENS1_IS3_ZNS0_26move_result_pseudo_object_IS8_EEDaSA_EUlS7_E_EEEESt5tupleIJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOSP_(ptr dead_on_unwind noalias writable sret(%"class.std::tuple.45") align 1, ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(1)) #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN1m9an_invokeEv() #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN1m19move_result_object_Ev() #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN1m11check_cast_Ev() #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN1m26move_result_pseudo_object_Ev() #3

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

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #4

; Function Attrs: mustprogress uwtable
declare hidden void @"_ZN4walk8parallel25matching_opcodes_in_blockISt6vectorIP8DexClassSaIS4_EESt5tupleIJN1m7match_tIP13IRInstructionZNS8_9an_invokeIZNS8_3anyISB_EEDavEUlPKSA_E_EEDaNS9_ISB_T_EEEUlSF_E_EENS9_ISB_ZNS8_19move_result_object_ISG_EEDaSI_EUlSF_E_EENS9_ISB_ZNS8_11check_cast_ISG_EEDaSI_EUlSF_E_EENS9_ISB_ZNS8_26move_result_pseudo_object_ISG_EEDaSI_EUlSF_E_EEEEZN25RedundantCheckCastRemover3runEvE3$_0Lm4EEEvRKSH_RKT0_RKT1_m"(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 1 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i64 @_ZN14redex_parallel19default_num_threadsEv() #3

declare void @_ZN11PassManager11incr_metricERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEl(ptr noundef nonnull align 8 dereferenceable(417), ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) #5

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt13unordered_mapIP9DexMethodSt6vectorIP13IRInstructionSaIS4_EESt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_S6_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #6 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #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 = { 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 = { inlinehint 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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 = { 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 #7 = { 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, !6, i64 8}
!10 = !{!"_ZTS25RedundantCheckCastRemover", !6, i64 0, !6, i64 8}
!11 = !{!10, !6, i64 0}


; 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.std::tuple.45" = type { [4 x i8] }
%"struct.m::match_t" = type { i8 }
%"struct.m::match_t.54" = type { i8 }
%"struct.m::match_t.55" = type { i8 }
%"struct.m::match_t.56" = type { i8 }
%"class.std::unordered_map.57" = type { %"class.std::_Hashtable.58" }
%"class.std::_Hashtable.58" = 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 }
%"struct.std::atomic" = type { %"struct.std::__atomic_base" }
%"struct.std::__atomic_base" = type { i32 }
%class.anon = type { ptr }
%"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] }
%"class.std::allocator" = type { i8 }

@.str.15 = external hidden unnamed_addr constant [30 x i8], align 1

declare i32 @__gxx_personality_v0(...)

; 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 nounwind uwtable
declare void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1)) unnamed_addr #1 align 2

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

; Function Attrs: mustprogress nounwind uwtable
declare void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32)) unnamed_addr #1 align 2

; 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 void @_ZN25RedundantCheckCastRemover3runEv(ptr nocapture noundef nonnull readonly align 8 dereferenceable(16) %0) local_unnamed_addr #2 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.std::tuple.45", align 1
  %3 = alloca %"struct.m::match_t", align 1
  %4 = alloca %"struct.m::match_t.54", align 1
  %5 = alloca %"struct.m::match_t.55", align 1
  %6 = alloca %"struct.m::match_t.56", align 1
  %7 = alloca %"class.std::unordered_map.57", align 8
  %8 = alloca %"struct.std::atomic", align 4
  %9 = alloca %class.anon, align 8
  %10 = alloca %"class.std::__cxx11::basic_string", align 8
  %11 = alloca %"class.std::allocator", align 1
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %2) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %3) #6
  tail call void @_ZN1m9an_invokeEv()
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %4) #6
  tail call void @_ZN1m19move_result_object_Ev()
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %5) #6
  tail call void @_ZN1m11check_cast_Ev()
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %6) #6
  tail call void @_ZN1m26move_result_pseudo_object_Ev()
  call void @_ZSt10make_tupleIJN1m7match_tIP13IRInstructionZNS0_9an_invokeIZNS0_3anyIS3_EEDavEUlPKS2_E_EEDaNS1_IS3_T_EEEUlS7_E_EENS1_IS3_ZNS0_19move_result_object_IS8_EEDaSA_EUlS7_E_EENS1_IS3_ZNS0_11check_cast_IS8_EEDaSA_EUlS7_E_EENS1_IS3_ZNS0_26move_result_pseudo_object_IS8_EEDaSA_EUlS7_E_EEEESt5tupleIJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOSP_(ptr dead_on_unwind nonnull writable sret(%"class.std::tuple.45") align 1 %2, ptr noundef nonnull align 1 dereferenceable(1) %3, ptr noundef nonnull align 1 dereferenceable(1) %4, ptr noundef nonnull align 1 dereferenceable(1) %5, ptr noundef nonnull align 1 dereferenceable(1) %6)
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %5) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %4) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %3) #6
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %7) #6
  call void @_ZNSt13unordered_mapIP9DexMethodSt6vectorIP13IRInstructionSaIS4_EESt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_S6_EEEC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %7) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #6
  store i32 0, ptr %8, align 4
  %12 = getelementptr inbounds i8, ptr %0, i64 8
  %13 = load ptr, ptr %12, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #6
  store ptr %8, ptr %9, align 8, !tbaa !10
  %14 = invoke noundef i64 @_ZN14redex_parallel19default_num_threadsEv()
          to label %15 unwind label %22

15:                                               ; preds = %1
  invoke void @"_ZN4walk8parallel25matching_opcodes_in_blockISt6vectorIP8DexClassSaIS4_EESt5tupleIJN1m7match_tIP13IRInstructionZNS8_9an_invokeIZNS8_3anyISB_EEDavEUlPKSA_E_EEDaNS9_ISB_T_EEEUlSF_E_EENS9_ISB_ZNS8_19move_result_object_ISG_EEDaSI_EUlSF_E_EENS9_ISB_ZNS8_11check_cast_ISG_EEDaSI_EUlSF_E_EENS9_ISB_ZNS8_26move_result_pseudo_object_ISG_EEDaSI_EUlSF_E_EEEEZN25RedundantCheckCastRemover3runEvE3$_0Lm4EEEvRKSH_RKT0_RKT1_m"(ptr noundef nonnull align 8 dereferenceable(24) %13, ptr noundef nonnull align 1 dereferenceable(4) %2, ptr noundef nonnull align 8 dereferenceable(8) %9, i64 noundef %14)
          to label %16 unwind label %22

16:                                               ; preds = %15
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  %17 = load ptr, ptr %0, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %10) #6
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %11) #6
  call void @_ZNSaIcEC2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #6
  invoke void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2IS3_EEPKcRKS3_(ptr noundef nonnull align 8 dereferenceable(32) %10, ptr noundef nonnull @.str.15, ptr noundef nonnull align 1 dereferenceable(1) %11)
          to label %18 unwind label %24

18:                                               ; preds = %16
  %19 = call noundef i32 @_ZNKSt13__atomic_baseIjEcvjEv(ptr noundef nonnull align 4 dereferenceable(4) %8) #6
  %20 = zext i32 %19 to i64
  invoke void @_ZN11PassManager11incr_metricERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEl(ptr noundef nonnull align 8 dereferenceable(417) %17, ptr noundef nonnull align 8 dereferenceable(32) %10, i64 noundef %20)
          to label %21 unwind label %26

21:                                               ; preds = %18
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #6
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #6
  call void @_ZNSt13unordered_mapIP9DexMethodSt6vectorIP13IRInstructionSaIS4_EESt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_S6_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %7) #6
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  ret void

22:                                               ; preds = %15, %1
  %23 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #6
  br label %29

24:                                               ; preds = %16
  %25 = landingpad { ptr, i32 }
          cleanup
  br label %28

26:                                               ; preds = %18
  %27 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %10) #6
  br label %28

28:                                               ; preds = %26, %24
  %.pn = phi { ptr, i32 } [ %27, %26 ], [ %25, %24 ]
  call void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1) %11) #6
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %10) #6
  br label %29

29:                                               ; preds = %28, %22
  %.pn.pn = phi { ptr, i32 } [ %.pn, %28 ], [ %23, %22 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #6
  call void @_ZNSt13unordered_mapIP9DexMethodSt6vectorIP13IRInstructionSaIS4_EESt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_S6_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %7) #6
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %2) #6
  resume { ptr, i32 } %.pn.pn
}

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZSt10make_tupleIJN1m7match_tIP13IRInstructionZNS0_9an_invokeIZNS0_3anyIS3_EEDavEUlPKS2_E_EEDaNS1_IS3_T_EEEUlS7_E_EENS1_IS3_ZNS0_19move_result_object_IS8_EEDaSA_EUlS7_E_EENS1_IS3_ZNS0_11check_cast_IS8_EEDaSA_EUlS7_E_EENS1_IS3_ZNS0_26move_result_pseudo_object_IS8_EEDaSA_EUlS7_E_EEEESt5tupleIJDpNSt25__strip_reference_wrapperINSt5decayIT_E4typeEE6__typeEEEDpOSP_(ptr dead_on_unwind noalias writable sret(%"class.std::tuple.45") align 1, ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(1), ptr noundef nonnull align 1 dereferenceable(1)) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN1m9an_invokeEv() local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN1m19move_result_object_Ev() local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN1m11check_cast_Ev() local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZN1m26move_result_pseudo_object_Ev() local_unnamed_addr #3

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

; Function Attrs: mustprogress uwtable
declare hidden void @"_ZN4walk8parallel25matching_opcodes_in_blockISt6vectorIP8DexClassSaIS4_EESt5tupleIJN1m7match_tIP13IRInstructionZNS8_9an_invokeIZNS8_3anyISB_EEDavEUlPKSA_E_EEDaNS9_ISB_T_EEEUlSF_E_EENS9_ISB_ZNS8_19move_result_object_ISG_EEDaSI_EUlSF_E_EENS9_ISB_ZNS8_11check_cast_ISG_EEDaSI_EUlSF_E_EENS9_ISB_ZNS8_26move_result_pseudo_object_ISG_EEDaSI_EUlSF_E_EEEEZN25RedundantCheckCastRemover3runEvE3$_0Lm4EEEvRKSH_RKT0_RKT1_m"(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 1 dereferenceable(4), ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) local_unnamed_addr #2 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef i64 @_ZN14redex_parallel19default_num_threadsEv() local_unnamed_addr #3

declare void @_ZN11PassManager11incr_metricERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEl(ptr noundef nonnull align 8 dereferenceable(417), ptr noundef nonnull align 8 dereferenceable(32), i64 noundef) local_unnamed_addr #4

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZNSt13unordered_mapIP9DexMethodSt6vectorIP13IRInstructionSaIS4_EESt4hashIS1_ESt8equal_toIS1_ESaISt4pairIKS1_S6_EEED2Ev(ptr noundef nonnull align 8 dereferenceable(56)) unnamed_addr #5 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt15__new_allocatorIcED2Ev(ptr noundef nonnull align 1 dereferenceable(1)) 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 = { inlinehint 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 = { 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 #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, !7, i64 8}
!6 = !{!"_ZTS25RedundantCheckCastRemover", !7, i64 0, !7, i64 8}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!7, !7, i64 0}
!11 = !{!6, !7, i64 0}


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