; LLVM IR from facebook/redex :: libredex/DexLoader.ll (ZN9DexLoader8load_dexEv)

; 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::unique_ptr" = type { %"struct.std::__uniq_ptr_data" }
%"struct.std::__uniq_ptr_data" = type { %"class.std::__uniq_ptr_impl" }
%"class.std::__uniq_ptr_impl" = type { %"class.std::tuple" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Head_base.2" }
%"struct.std::_Head_base.2" = type { ptr }
%"class.std::vector.133" = type { %"struct.std::_Vector_base.134" }
%"struct.std::_Vector_base.134" = type { %"struct.std::_Vector_base<std::__exception_ptr::exception_ptr, std::allocator<std::__exception_ptr::exception_ptr>>::_Vector_impl" }
%"struct.std::_Vector_base<std::__exception_ptr::exception_ptr, std::allocator<std::__exception_ptr::exception_ptr>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::__exception_ptr::exception_ptr, std::allocator<std::__exception_ptr::exception_ptr>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::__exception_ptr::exception_ptr, std::allocator<std::__exception_ptr::exception_ptr>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::mutex" = type { %"class.std::__mutex_base" }
%"class.std::__mutex_base" = type { %union.pthread_mutex_t }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%class.anon.138 = type { ptr, ptr, ptr }
%class.aggregate_exception = type { %"class.std::exception", %"class.std::vector.133" }
%"class.std::exception" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.139" = type { ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }
%class.DexLoader = type { ptr, %"class.std::unique_ptr", ptr, %"class.std::vector", %"class.std::unique_ptr.6", i64, ptr, %struct.dex_stats_t, i32, i32 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<DexClass *, std::allocator<DexClass *>>::_Vector_impl" }
%"struct.std::_Vector_base<DexClass *, std::allocator<DexClass *>>::_Vector_impl" = type { %"struct.std::_Vector_base<DexClass *, std::allocator<DexClass *>>::_Vector_impl_data" }
%"struct.std::_Vector_base<DexClass *, std::allocator<DexClass *>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::unique_ptr.6" = type { %"struct.std::__uniq_ptr_data.7" }
%"struct.std::__uniq_ptr_data.7" = type { %"class.std::__uniq_ptr_impl.8" }
%"class.std::__uniq_ptr_impl.8" = type { %"class.std::tuple.9" }
%"class.std::tuple.9" = type { %"struct.std::_Tuple_impl.10" }
%"struct.std::_Tuple_impl.10" = type { %"struct.std::_Tuple_impl.11", %"struct.std::_Head_base.13" }
%"struct.std::_Tuple_impl.11" = type { %"struct.std::_Head_base.12" }
%"struct.std::_Head_base.12" = type { %"class.std::function" }
%"class.std::function" = type { %"class.std::_Function_base", ptr }
%"class.std::_Function_base" = type { %"union.std::_Any_data", ptr }
%"union.std::_Any_data" = type { %"union.std::_Nocopy_types" }
%"union.std::_Nocopy_types" = type { { i64, i64 } }
%"struct.std::_Head_base.13" = type { ptr }
%struct.dex_stats_t = type { [20 x i8], i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
%struct.dex_header = type { [8 x i8], i32, [20 x i8], i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }

@_ZTI19aggregate_exception = external dso_local constant { ptr, ptr, ptr }, align 8

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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN9DexLoader8load_dexEv(ptr noundef nonnull align 8 dereferenceable(408) %0) #1 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca ptr, align 8
  %3 = alloca %"class.std::unique_ptr", align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca i64, align 8
  %7 = alloca %"class.std::vector.133", align 8
  %8 = alloca %"class.std::mutex", align 8
  %9 = alloca %class.anon.138, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca %class.aggregate_exception, align 8
  %13 = alloca %"class.std::vector.133", align 8
  %14 = alloca %"class.__gnu_cxx::__normal_iterator.139", align 8
  %15 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %16 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %17 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %18 = alloca ptr, align 8
  %19 = alloca %"class.__gnu_cxx::__normal_iterator.139", align 8
  %20 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %21 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  store ptr %0, ptr %2, align 8, !tbaa !5
  %22 = load ptr, ptr %2, align 8
  %23 = getelementptr inbounds %class.DexLoader, ptr %22, i32 0, i32 0
  %24 = load ptr, ptr %23, align 8, !tbaa !9
  %25 = getelementptr inbounds %class.DexLoader, ptr %22, i32 0, i32 5
  %26 = load i64, ptr %25, align 8, !tbaa !35
  %27 = getelementptr inbounds %class.DexLoader, ptr %22, i32 0, i32 8
  %28 = load i32, ptr %27, align 8, !tbaa !36
  call void @_ZN12_GLOBAL__N_119validate_dex_headerEPK10dex_headermi(ptr noundef %24, i64 noundef %26, i32 noundef %28)
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #5
  %29 = getelementptr inbounds %class.DexLoader, ptr %22, i32 0, i32 0
  call void @_ZSt11make_uniqueI6DexIdxJRPK10dex_headerEENSt8__detail9_MakeUniqIT_E15__single_objectEDpOT0_(ptr dead_on_unwind writable sret(%"class.std::unique_ptr") align 8 %3, ptr noundef nonnull align 8 dereferenceable(8) %29)
  %30 = getelementptr inbounds %class.DexLoader, ptr %22, i32 0, i32 1
  %31 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt10unique_ptrI6DexIdxSt14default_deleteIS0_EEaSEOS3_(ptr noundef nonnull align 8 dereferenceable(8) %30, ptr noundef nonnull align 8 dereferenceable(8) %3) #5
  call void @_ZNSt10unique_ptrI6DexIdxSt14default_deleteIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %3) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #5
  %32 = getelementptr inbounds %class.DexLoader, ptr %22, i32 0, i32 1
  %33 = call noundef ptr @_ZNKSt10unique_ptrI6DexIdxSt14default_deleteIS0_EE3getEv(ptr noundef nonnull align 8 dereferenceable(8) %32) #5
  %34 = getelementptr inbounds %class.DexLoader, ptr %22, i32 0, i32 0
  %35 = load ptr, ptr %34, align 8, !tbaa !9
  call void @_ZN12_GLOBAL__N_123validate_type_ids_tableEP6DexIdxPK10dex_header(ptr noundef %33, ptr noundef %35)
  %36 = getelementptr inbounds %class.DexLoader, ptr %22, i32 0, i32 0
  %37 = load ptr, ptr %36, align 8, !tbaa !9
  %38 = getelementptr inbounds %struct.dex_header, ptr %37, i32 0, i32 19
  %39 = load i32, ptr %38, align 1, !tbaa !37
  %40 = icmp eq i32 %39, 0
  br i1 %40, label %41, label %42

41:                                               ; preds = %1
  br label %144

42:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #5
  %43 = getelementptr inbounds %class.DexLoader, ptr %22, i32 0, i32 0
  %44 = load ptr, ptr %43, align 8, !tbaa !9
  %45 = getelementptr inbounds %struct.dex_header, ptr %44, i32 0, i32 20
  %46 = load i32, ptr %45, align 1, !tbaa !39
  %47 = zext i32 %46 to i64
  store i64 %47, ptr %4, align 8, !tbaa !40
  %48 = getelementptr inbounds %class.DexLoader, ptr %22, i32 0, i32 0
  %49 = load ptr, ptr %48, align 8, !tbaa !9
  %50 = load i64, ptr %4, align 8, !tbaa !40
  %51 = getelementptr inbounds i8, ptr %49, i64 %50
  %52 = getelementptr inbounds %class.DexLoader, ptr %22, i32 0, i32 2
  store ptr %51, ptr %52, align 8, !tbaa !41
  %53 = getelementptr inbounds %class.DexLoader, ptr %22, i32 0, i32 3
  %54 = getelementptr inbounds %class.DexLoader, ptr %22, i32 0, i32 0
  %55 = load ptr, ptr %54, align 8, !tbaa !9
  %56 = getelementptr inbounds %struct.dex_header, ptr %55, i32 0, i32 19
  %57 = load i32, ptr %56, align 1, !tbaa !37
  %58 = zext i32 %57 to i64
  call void @_ZNSt6vectorIP8DexClassSaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %53, i64 noundef %58)
  %59 = getelementptr inbounds %class.DexLoader, ptr %22, i32 0, i32 9
  %60 = load i32, ptr %59, align 4, !tbaa !42
  switch i32 %60, label %121 [
    i32 1, label %61
    i32 0, label %78
  ]

61:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #5
  store i64 0, ptr %5, align 8, !tbaa !40
  br label %62

62:                                               ; preds = %74, %61
  %63 = load i64, ptr %5, align 8, !tbaa !40
  %64 = getelementptr inbounds %class.DexLoader, ptr %22, i32 0, i32 0
  %65 = load ptr, ptr %64, align 8, !tbaa !9
  %66 = getelementptr inbounds %struct.dex_header, ptr %65, i32 0, i32 19
  %67 = load i32, ptr %66, align 1, !tbaa !37
  %68 = zext i32 %67 to i64
  %69 = icmp ult i64 %63, %68
  br i1 %69, label %71, label %70

70:                                               ; preds = %62
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #5
  br label %77

71:                                               ; preds = %62
  %72 = load i64, ptr %5, align 8, !tbaa !40
  %73 = trunc i64 %72 to i32
  call void @_ZN9DexLoader14load_dex_classEi(ptr noundef nonnull align 8 dereferenceable(408) %22, i32 noundef %73)
  br label %74

74:                                               ; preds = %71
  %75 = load i64, ptr %5, align 8, !tbaa !40
  %76 = add i64 %75, 1
  store i64 %76, ptr %5, align 8, !tbaa !40
  br label %62, !llvm.loop !43

77:                                               ; preds = %70
  br label %121

78:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #5
  %79 = call noundef i64 @_ZN14redex_parallel19default_num_threadsEv()
  store i64 %79, ptr %6, align 8, !tbaa !40
  call void @llvm.lifetime.start.p0(i64 24, ptr %7) #5
  call void @_ZNSt6vectorINSt15__exception_ptr13exception_ptrESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  call void @llvm.lifetime.start.p0(i64 40, ptr %8) #5
  call void @_ZNSt5mutexC2Ev(ptr noundef nonnull align 8 dereferenceable(40) %8) #5
  %80 = getelementptr inbounds %class.DexLoader, ptr %22, i32 0, i32 0
  %81 = load ptr, ptr %80, align 8, !tbaa !9
  %82 = getelementptr inbounds %struct.dex_header, ptr %81, i32 0, i32 19
  %83 = load i32, ptr %82, align 1, !tbaa !37
  %84 = zext i32 %83 to i64
  call void @llvm.lifetime.start.p0(i64 24, ptr %9) #5
  %85 = getelementptr inbounds %class.anon.138, ptr %9, i32 0, i32 0
  store ptr %7, ptr %85, align 8, !tbaa !5
  %86 = getelementptr inbounds %class.anon.138, ptr %9, i32 0, i32 1
  store ptr %8, ptr %86, align 8, !tbaa !5
  %87 = getelementptr inbounds %class.anon.138, ptr %9, i32 0, i32 2
  store ptr %22, ptr %87, align 8, !tbaa !45
  %88 = load i64, ptr %6, align 8, !tbaa !40
  %89 = trunc i64 %88 to i32
  invoke void @"_Z17workqueue_run_forImZN9DexLoader8load_dexEvE3$_0EvT_S2_RKT0_j"(i64 noundef 0, i64 noundef %84, ptr noundef nonnull align 8 dereferenceable(24) %9, i32 noundef %89)
          to label %90 unwind label %97

90:                                               ; preds = %78
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #5
  %91 = call noundef zeroext i1 @_ZNKSt6vectorINSt15__exception_ptr13exception_ptrESaIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  br i1 %91, label %119, label %92

92:                                               ; preds = %90
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #5
  invoke void @_ZNSt6vectorINSt15__exception_ptr13exception_ptrESaIS1_EEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %13, ptr noundef nonnull align 8 dereferenceable(24) %7)
          to label %93 unwind label %101

93:                                               ; preds = %92
  invoke void @_ZN19aggregate_exceptionC2ISt6vectorINSt15__exception_ptr13exception_ptrESaIS3_EEEET_(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef %13)
          to label %94 unwind label %105

94:                                               ; preds = %93
  call void @_ZNSt6vectorINSt15__exception_ptr13exception_ptrESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #5
  %95 = call ptr @__cxa_allocate_exception(i64 32) #5
  invoke void @_ZN19aggregate_exceptionC2EOS_(ptr noundef nonnull align 8 dereferenceable(32) %95, ptr noundef nonnull align 8 dereferenceable(32) %12)
          to label %96 unwind label %109

96:                                               ; preds = %94
  invoke void @__cxa_throw(ptr %95, ptr @_ZTI19aggregate_exception, ptr @_ZN19aggregate_exceptionD2Ev) #6
          to label %150 unwind label %113

97:                                               ; preds = %78
  %98 = landingpad { ptr, i32 }
          cleanup
  %99 = extractvalue { ptr, i32 } %98, 0
  store ptr %99, ptr %10, align 8
  %100 = extractvalue { ptr, i32 } %98, 1
  store i32 %100, ptr %11, align 4
  call void @llvm.lifetime.end.p0(i64 24, ptr %9) #5
  br label %120

101:                                              ; preds = %92
  %102 = landingpad { ptr, i32 }
          cleanup
  %103 = extractvalue { ptr, i32 } %102, 0
  store ptr %103, ptr %10, align 8
  %104 = extractvalue { ptr, i32 } %102, 1
  store i32 %104, ptr %11, align 4
  br label %118

105:                                              ; preds = %93
  %106 = landingpad { ptr, i32 }
          cleanup
  %107 = extractvalue { ptr, i32 } %106, 0
  store ptr %107, ptr %10, align 8
  %108 = extractvalue { ptr, i32 } %106, 1
  store i32 %108, ptr %11, align 4
  call void @_ZNSt6vectorINSt15__exception_ptr13exception_ptrESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #5
  br label %118

109:                                              ; preds = %94
  %110 = landingpad { ptr, i32 }
          cleanup
  %111 = extractvalue { ptr, i32 } %110, 0
  store ptr %111, ptr %10, align 8
  %112 = extractvalue { ptr, i32 } %110, 1
  store i32 %112, ptr %11, align 4
  call void @__cxa_free_exception(ptr %95) #5
  br label %117

113:                                              ; preds = %96
  %114 = landingpad { ptr, i32 }
          cleanup
  %115 = extractvalue { ptr, i32 } %114, 0
  store ptr %115, ptr %10, align 8
  %116 = extractvalue { ptr, i32 } %114, 1
  store i32 %116, ptr %11, align 4
  br label %117

117:                                              ; preds = %113, %109
  call void @_ZN19aggregate_exceptionD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #5
  br label %118

118:                                              ; preds = %117, %105, %101
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #5
  br label %120

119:                                              ; preds = %90
  call void @llvm.lifetime.end.p0(i64 40, ptr %8) #5
  call void @_ZNSt6vectorINSt15__exception_ptr13exception_ptrESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  br label %121

120:                                              ; preds = %118, %97
  call void @llvm.lifetime.end.p0(i64 40, ptr %8) #5
  call void @_ZNSt6vectorINSt15__exception_ptr13exception_ptrESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr %7) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  br label %145

121:                                              ; preds = %119, %77, %42
  call void @_ZN9DexLoader18gather_input_statsEv(ptr noundef nonnull align 8 dereferenceable(408) %22)
  %122 = getelementptr inbounds %class.DexLoader, ptr %22, i32 0, i32 3
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %123 = getelementptr inbounds %class.DexLoader, ptr %22, i32 0, i32 3
  %124 = call ptr @_ZNSt6vectorIP8DexClassSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %123) #5
  %125 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %16, i32 0, i32 0
  store ptr %124, ptr %125, align 8
  %126 = getelementptr inbounds %class.DexLoader, ptr %22, i32 0, i32 3
  %127 = call ptr @_ZNSt6vectorIP8DexClassSaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %126) #5
  %128 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %17, i32 0, i32 0
  store ptr %127, ptr %128, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  store ptr null, ptr %18, align 8, !tbaa !47
  %129 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %16, i32 0, i32 0
  %130 = load ptr, ptr %129, align 8
  %131 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %17, i32 0, i32 0
  %132 = load ptr, ptr %131, align 8
  %133 = call ptr @_ZSt6removeIN9__gnu_cxx17__normal_iteratorIPP8DexClassSt6vectorIS3_SaIS3_EEEEDnET_S9_S9_RKT0_(ptr %130, ptr %132, ptr noundef nonnull align 8 dereferenceable(8) %18)
  %134 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %15, i32 0, i32 0
  store ptr %133, ptr %134, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKP8DexClassSt6vectorIS2_SaIS2_EEEC2IPS2_vEERKNS0_IT_S7_EE(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull align 8 dereferenceable(8) %15) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  %135 = getelementptr inbounds %class.DexLoader, ptr %22, i32 0, i32 3
  %136 = call ptr @_ZNSt6vectorIP8DexClassSaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %135) #5
  %137 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %20, i32 0, i32 0
  store ptr %136, ptr %137, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKP8DexClassSt6vectorIS2_SaIS2_EEEC2IPS2_vEERKNS0_IT_S7_EE(ptr noundef nonnull align 8 dereferenceable(8) %19, ptr noundef nonnull align 8 dereferenceable(8) %20) #5
  %138 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.139", ptr %14, i32 0, i32 0
  %139 = load ptr, ptr %138, align 8
  %140 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator.139", ptr %19, i32 0, i32 0
  %141 = load ptr, ptr %140, align 8
  %142 = call ptr @_ZNSt6vectorIP8DexClassSaIS1_EE5eraseEN9__gnu_cxx17__normal_iteratorIPKS1_S3_EES8_(ptr noundef nonnull align 8 dereferenceable(24) %122, ptr %139, ptr %141)
  %143 = getelementptr inbounds %"class.__gnu_cxx::__normal_iterator", ptr %21, i32 0, i32 0
  store ptr %142, ptr %143, align 8
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #5
  br label %144

144:                                              ; preds = %121, %41
  ret void

145:                                              ; preds = %120
  %146 = load ptr, ptr %10, align 8
  %147 = load i32, ptr %11, align 4
  %148 = insertvalue { ptr, i32 } poison, ptr %146, 0
  %149 = insertvalue { ptr, i32 } %148, i32 %147, 1
  resume { ptr, i32 } %149

150:                                              ; preds = %96
  unreachable
}

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN12_GLOBAL__N_119validate_dex_headerEPK10dex_headermi(ptr noundef, i64 noundef, i32 noundef) #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt11make_uniqueI6DexIdxJRPK10dex_headerEENSt8__detail9_MakeUniqIT_E15__single_objectEDpOT0_(ptr dead_on_unwind noalias writable sret(%"class.std::unique_ptr") align 8, ptr noundef nonnull align 8 dereferenceable(8)) #3

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

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN12_GLOBAL__N_123validate_type_ids_tableEP6DexIdxPK10dex_header(ptr noundef, ptr noundef) #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIP8DexClassSaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) #1 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare hidden void @"_Z17workqueue_run_forImZN9DexLoader8load_dexEvE3$_0EvT_S2_RKT0_j"(i64 noundef, i64 noundef, ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) #1

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

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

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

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

declare ptr @__cxa_allocate_exception(i64)

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

declare void @__cxa_free_exception(ptr)

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

declare void @__cxa_throw(ptr, ptr, ptr)

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local ptr @_ZSt6removeIN9__gnu_cxx17__normal_iteratorIPP8DexClassSt6vectorIS3_SaIS3_EEEEDnET_S9_S9_RKT0_(ptr, ptr, ptr noundef nonnull align 8 dereferenceable(8)) #3

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9__gnu_cxx17__normal_iteratorIPKP8DexClassSt6vectorIS2_SaIS2_EEEC2IPS2_vEERKNS0_IT_S7_EE(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef nonnull align 8 dereferenceable(8)) unnamed_addr #2 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 = { 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 = { 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 #5 = { nounwind }
attributes #6 = { noreturn }

!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 0}
!10 = !{!"_ZTS9DexLoader", !6, i64 0, !11, i64 8, !6, i64 16, !17, i64 24, !21, i64 48, !31, i64 88, !6, i64 96, !32, i64 104, !33, i64 400, !34, i64 404}
!11 = !{!"_ZTSSt10unique_ptrI6DexIdxSt14default_deleteIS0_EE", !12, i64 0}
!12 = !{!"_ZTSSt15__uniq_ptr_dataI6DexIdxSt14default_deleteIS0_ELb1ELb1EE", !13, i64 0}
!13 = !{!"_ZTSSt15__uniq_ptr_implI6DexIdxSt14default_deleteIS0_EE", !14, i64 0}
!14 = !{!"_ZTSSt5tupleIJP6DexIdxSt14default_deleteIS0_EEE", !15, i64 0}
!15 = !{!"_ZTSSt11_Tuple_implILm0EJP6DexIdxSt14default_deleteIS0_EEE", !16, i64 0}
!16 = !{!"_ZTSSt10_Head_baseILm0EP6DexIdxLb0EE", !6, i64 0}
!17 = !{!"_ZTSSt6vectorIP8DexClassSaIS1_EE", !18, i64 0}
!18 = !{!"_ZTSSt12_Vector_baseIP8DexClassSaIS1_EE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIP8DexClassSaIS1_EE12_Vector_implE", !20, i64 0}
!20 = !{!"_ZTSNSt12_Vector_baseIP8DexClassSaIS1_EE17_Vector_impl_dataE", !6, i64 0, !6, i64 8, !6, i64 16}
!21 = !{!"_ZTSSt10unique_ptrIKhSt8functionIFvPS0_EEE", !22, i64 0}
!22 = !{!"_ZTSSt15__uniq_ptr_dataIKhSt8functionIFvPS0_EELb1ELb1EE", !23, i64 0}
!23 = !{!"_ZTSSt15__uniq_ptr_implIKhSt8functionIFvPS0_EEE", !24, i64 0}
!24 = !{!"_ZTSSt5tupleIJPKhSt8functionIFvS1_EEEE", !25, i64 0}
!25 = !{!"_ZTSSt11_Tuple_implILm0EJPKhSt8functionIFvS1_EEEE", !26, i64 0, !30, i64 32}
!26 = !{!"_ZTSSt11_Tuple_implILm1EJSt8functionIFvPKhEEEE", !27, i64 0}
!27 = !{!"_ZTSSt10_Head_baseILm1ESt8functionIFvPKhEELb0EE", !28, i64 0}
!28 = !{!"_ZTSSt8functionIFvPKhEE", !29, i64 0, !6, i64 24}
!29 = !{!"_ZTSSt14_Function_base", !7, i64 0, !6, i64 16}
!30 = !{!"_ZTSSt10_Head_baseILm0EPKhLb0EE", !6, i64 0}
!31 = !{!"long", !7, i64 0}
!32 = !{!"_ZTS11dex_stats_t", !7, i64 0, !33, i64 20, !33, i64 24, !33, i64 28, !33, i64 32, !33, i64 36, !33, i64 40, !33, i64 44, !33, i64 48, !33, i64 52, !33, i64 56, !33, i64 60, !33, i64 64, !33, i64 68, !33, i64 72, !33, i64 76, !33, i64 80, !33, i64 84, !33, i64 88, !33, i64 92, !33, i64 96, !33, i64 100, !33, i64 104, !33, i64 108, !33, i64 112, !33, i64 116, !33, i64 120, !33, i64 124, !33, i64 128, !33, i64 132, !33, i64 136, !33, i64 140, !33, i64 144, !33, i64 148, !33, i64 152, !33, i64 156, !33, i64 160, !33, i64 164, !33, i64 168, !33, i64 172, !33, i64 176, !33, i64 180, !33, i64 184, !33, i64 188, !33, i64 192, !33, i64 196, !33, i64 200, !33, i64 204, !33, i64 208, !33, i64 212, !33, i64 216, !33, i64 220, !33, i64 224, !33, i64 228, !33, i64 232, !33, i64 236, !33, i64 240, !33, i64 244, !33, i64 248, !33, i64 252, !33, i64 256, !33, i64 260, !33, i64 264, !33, i64 268, !33, i64 272, !33, i64 276, !33, i64 280, !33, i64 284, !33, i64 288, !33, i64 292}
!33 = !{!"int", !7, i64 0}
!34 = !{!"_ZTSN9DexLoader8ParallelE", !7, i64 0}
!35 = !{!10, !31, i64 88}
!36 = !{!10, !33, i64 400}
!37 = !{!38, !33, i64 96}
!38 = !{!"_ZTS10dex_header", !7, i64 0, !33, i64 8, !7, i64 12, !33, i64 32, !33, i64 36, !33, i64 40, !33, i64 44, !33, i64 48, !33, i64 52, !33, i64 56, !33, i64 60, !33, i64 64, !33, i64 68, !33, i64 72, !33, i64 76, !33, i64 80, !33, i64 84, !33, i64 88, !33, i64 92, !33, i64 96, !33, i64 100, !33, i64 104, !33, i64 108}
!39 = !{!38, !33, i64 100}
!40 = !{!31, !31, i64 0}
!41 = !{!10, !6, i64 16}
!42 = !{!10, !34, i64 404}
!43 = distinct !{!43, !44}
!44 = !{!"llvm.loop.mustprogress"}
!45 = !{!46, !6, i64 16}
!46 = !{!"_ZTSZN9DexLoader8load_dexEvE3$_0", !6, i64 0, !6, i64 8, !6, i64 16}
!47 = !{!48, !48, i64 0}
!48 = !{!"std::nullptr_t", !7, 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::unique_ptr" = type { %"struct.std::__uniq_ptr_data" }
%"struct.std::__uniq_ptr_data" = type { %"class.std::__uniq_ptr_impl" }
%"class.std::__uniq_ptr_impl" = type { %"class.std::tuple" }
%"class.std::tuple" = type { %"struct.std::_Tuple_impl" }
%"struct.std::_Tuple_impl" = type { %"struct.std::_Head_base.2" }
%"struct.std::_Head_base.2" = type { ptr }
%"class.std::vector.133" = type { %"struct.std::_Vector_base.134" }
%"struct.std::_Vector_base.134" = type { %"struct.std::_Vector_base<std::__exception_ptr::exception_ptr, std::allocator<std::__exception_ptr::exception_ptr>>::_Vector_impl" }
%"struct.std::_Vector_base<std::__exception_ptr::exception_ptr, std::allocator<std::__exception_ptr::exception_ptr>>::_Vector_impl" = type { %"struct.std::_Vector_base<std::__exception_ptr::exception_ptr, std::allocator<std::__exception_ptr::exception_ptr>>::_Vector_impl_data" }
%"struct.std::_Vector_base<std::__exception_ptr::exception_ptr, std::allocator<std::__exception_ptr::exception_ptr>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::mutex" = type { %"class.std::__mutex_base" }
%"class.std::__mutex_base" = type { %union.pthread_mutex_t }
%union.pthread_mutex_t = type { %struct.__pthread_mutex_s }
%struct.__pthread_mutex_s = type { i32, i32, i32, i32, i32, i16, i16, %struct.__pthread_internal_list }
%struct.__pthread_internal_list = type { ptr, ptr }
%class.anon.138 = type { ptr, ptr, ptr }
%class.aggregate_exception = type { %"class.std::exception", %"class.std::vector.133" }
%"class.std::exception" = type { ptr }
%"class.__gnu_cxx::__normal_iterator.139" = type { ptr }
%"class.__gnu_cxx::__normal_iterator" = type { ptr }

@_ZTI19aggregate_exception = external dso_local constant { ptr, ptr, ptr }, align 8

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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

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

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

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN9DexLoader8load_dexEv(ptr noundef nonnull align 8 dereferenceable(408) %0) local_unnamed_addr #1 align 2 personality ptr @__gxx_personality_v0 {
  %2 = alloca %"class.std::unique_ptr", align 8
  %3 = alloca %"class.std::vector.133", align 8
  %4 = alloca %"class.std::mutex", align 8
  %5 = alloca %class.anon.138, align 8
  %6 = alloca %class.aggregate_exception, align 8
  %7 = alloca %"class.std::vector.133", align 8
  %8 = alloca %"class.__gnu_cxx::__normal_iterator.139", align 8
  %9 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %10 = alloca ptr, align 8
  %11 = alloca %"class.__gnu_cxx::__normal_iterator.139", align 8
  %12 = alloca %"class.__gnu_cxx::__normal_iterator", align 8
  %13 = load ptr, ptr %0, align 8, !tbaa !5
  %14 = getelementptr inbounds i8, ptr %0, i64 88
  %15 = load i64, ptr %14, align 8, !tbaa !34
  %16 = getelementptr inbounds i8, ptr %0, i64 400
  %17 = load i32, ptr %16, align 8, !tbaa !35
  tail call void @_ZN12_GLOBAL__N_119validate_dex_headerEPK10dex_headermi(ptr noundef %13, i64 noundef %15, i32 noundef %17)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #5
  call void @_ZSt11make_uniqueI6DexIdxJRPK10dex_headerEENSt8__detail9_MakeUniqIT_E15__single_objectEDpOT0_(ptr dead_on_unwind nonnull writable sret(%"class.std::unique_ptr") align 8 %2, ptr noundef nonnull align 8 dereferenceable(8) %0)
  %18 = getelementptr inbounds i8, ptr %0, i64 8
  %19 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt10unique_ptrI6DexIdxSt14default_deleteIS0_EEaSEOS3_(ptr noundef nonnull align 8 dereferenceable(8) %18, ptr noundef nonnull align 8 dereferenceable(8) %2) #5
  call void @_ZNSt10unique_ptrI6DexIdxSt14default_deleteIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(8) %2) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #5
  %20 = call noundef ptr @_ZNKSt10unique_ptrI6DexIdxSt14default_deleteIS0_EE3getEv(ptr noundef nonnull align 8 dereferenceable(8) %18) #5
  %21 = load ptr, ptr %0, align 8, !tbaa !5
  call void @_ZN12_GLOBAL__N_123validate_type_ids_tableEP6DexIdxPK10dex_header(ptr noundef %20, ptr noundef %21)
  %22 = load ptr, ptr %0, align 8, !tbaa !5
  %23 = getelementptr inbounds i8, ptr %22, i64 96
  %24 = load i32, ptr %23, align 1, !tbaa !36
  %25 = icmp eq i32 %24, 0
  br i1 %25, label %83, label %26

26:                                               ; preds = %1
  %27 = getelementptr inbounds i8, ptr %22, i64 100
  %28 = load i32, ptr %27, align 1, !tbaa !38
  %29 = zext i32 %28 to i64
  %30 = getelementptr inbounds i8, ptr %22, i64 %29
  %31 = getelementptr inbounds i8, ptr %0, i64 16
  store ptr %30, ptr %31, align 8, !tbaa !39
  %32 = getelementptr inbounds i8, ptr %0, i64 24
  %33 = zext i32 %24 to i64
  call void @_ZNSt6vectorIP8DexClassSaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24) %32, i64 noundef %33)
  %34 = getelementptr inbounds i8, ptr %0, i64 404
  %35 = load i32, ptr %34, align 4, !tbaa !40
  switch i32 %35, label %.loopexit [
    i32 1, label %.preheader
    i32 0, label %46
  ]

.preheader:                                       ; preds = %26
  %36 = load ptr, ptr %0, align 8, !tbaa !5
  %37 = getelementptr inbounds i8, ptr %36, i64 96
  %38 = load i32, ptr %37, align 1, !tbaa !36
  %.not = icmp eq i32 %38, 0
  br i1 %.not, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader, %.lr.ph
  %.016 = phi i64 [ %40, %.lr.ph ], [ 0, %.preheader ]
  %39 = trunc nuw i64 %.016 to i32
  call void @_ZN9DexLoader14load_dex_classEi(ptr noundef nonnull align 8 dereferenceable(408) %0, i32 noundef %39)
  %40 = add nuw nsw i64 %.016, 1
  %41 = load ptr, ptr %0, align 8, !tbaa !5
  %42 = getelementptr inbounds i8, ptr %41, i64 96
  %43 = load i32, ptr %42, align 1, !tbaa !36
  %44 = zext i32 %43 to i64
  %45 = icmp ult i64 %40, %44
  br i1 %45, label %.lr.ph, label %.loopexit, !llvm.loop !41

46:                                               ; preds = %26
  %47 = call noundef i64 @_ZN14redex_parallel19default_num_threadsEv()
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %3) #5
  call void @_ZNSt6vectorINSt15__exception_ptr13exception_ptrESaIS1_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  call void @llvm.lifetime.start.p0(i64 40, ptr nonnull %4) #5
  call void @_ZNSt5mutexC2Ev(ptr noundef nonnull align 8 dereferenceable(40) %4) #5
  %48 = load ptr, ptr %0, align 8, !tbaa !5
  %49 = getelementptr inbounds i8, ptr %48, i64 96
  %50 = load i32, ptr %49, align 1, !tbaa !36
  %51 = zext i32 %50 to i64
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %5) #5
  store ptr %3, ptr %5, align 8, !tbaa !43
  %52 = getelementptr inbounds i8, ptr %5, i64 8
  store ptr %4, ptr %52, align 8, !tbaa !43
  %53 = getelementptr inbounds i8, ptr %5, i64 16
  store ptr %0, ptr %53, align 8, !tbaa !44
  %54 = trunc i64 %47 to i32
  invoke void @"_Z17workqueue_run_forImZN9DexLoader8load_dexEvE3$_0EvT_S2_RKT0_j"(i64 noundef 0, i64 noundef %51, ptr noundef nonnull align 8 dereferenceable(24) %5, i32 noundef %54)
          to label %55 unwind label %62

55:                                               ; preds = %46
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #5
  %56 = call noundef zeroext i1 @_ZNKSt6vectorINSt15__exception_ptr13exception_ptrESaIS1_EE5emptyEv(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  br i1 %56, label %74, label %57

57:                                               ; preds = %55
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #5
  invoke void @_ZNSt6vectorINSt15__exception_ptr13exception_ptrESaIS1_EEC2ERKS3_(ptr noundef nonnull align 8 dereferenceable(24) %7, ptr noundef nonnull align 8 dereferenceable(24) %3)
          to label %58 unwind label %64

58:                                               ; preds = %57
  invoke void @_ZN19aggregate_exceptionC2ISt6vectorINSt15__exception_ptr13exception_ptrESaIS3_EEEET_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull %7)
          to label %59 unwind label %66

59:                                               ; preds = %58
  call void @_ZNSt6vectorINSt15__exception_ptr13exception_ptrESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  %60 = call ptr @__cxa_allocate_exception(i64 32) #5
  invoke void @_ZN19aggregate_exceptionC2EOS_(ptr noundef nonnull align 8 dereferenceable(32) %60, ptr noundef nonnull align 8 dereferenceable(32) %6)
          to label %61 unwind label %68

61:                                               ; preds = %59
  invoke void @__cxa_throw(ptr nonnull %60, ptr nonnull @_ZTI19aggregate_exception, ptr nonnull @_ZN19aggregate_exceptionD2Ev) #6
          to label %84 unwind label %70

62:                                               ; preds = %46
  %63 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %5) #5
  br label %75

64:                                               ; preds = %57
  %65 = landingpad { ptr, i32 }
          cleanup
  br label %73

66:                                               ; preds = %58
  %67 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorINSt15__exception_ptr13exception_ptrESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %7) #5
  br label %73

68:                                               ; preds = %59
  %69 = landingpad { ptr, i32 }
          cleanup
  call void @__cxa_free_exception(ptr %60) #5
  br label %72

70:                                               ; preds = %61
  %71 = landingpad { ptr, i32 }
          cleanup
  br label %72

72:                                               ; preds = %70, %68
  %.pn = phi { ptr, i32 } [ %71, %70 ], [ %69, %68 ]
  call void @_ZN19aggregate_exceptionD2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #5
  br label %73

73:                                               ; preds = %72, %66, %64
  %.pn.pn = phi { ptr, i32 } [ %.pn, %72 ], [ %67, %66 ], [ %65, %64 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #5
  br label %75

74:                                               ; preds = %55
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %4) #5
  call void @_ZNSt6vectorINSt15__exception_ptr13exception_ptrESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #5
  br label %.loopexit

75:                                               ; preds = %73, %62
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %73 ], [ %63, %62 ]
  call void @llvm.lifetime.end.p0(i64 40, ptr nonnull %4) #5
  call void @_ZNSt6vectorINSt15__exception_ptr13exception_ptrESaIS1_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %3) #5
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %3) #5
  resume { ptr, i32 } %.pn.pn.pn

.loopexit:                                        ; preds = %.lr.ph, %.preheader, %74, %26
  call void @_ZN9DexLoader18gather_input_statsEv(ptr noundef nonnull align 8 dereferenceable(408) %0)
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #5
  %76 = call ptr @_ZNSt6vectorIP8DexClassSaIS1_EE5beginEv(ptr noundef nonnull align 8 dereferenceable(24) %32) #5
  %77 = call ptr @_ZNSt6vectorIP8DexClassSaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %32) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #5
  store ptr null, ptr %10, align 8, !tbaa !46
  %78 = call ptr @_ZSt6removeIN9__gnu_cxx17__normal_iteratorIPP8DexClassSt6vectorIS3_SaIS3_EEEEDnET_S9_S9_RKT0_(ptr %76, ptr %77, ptr noundef nonnull align 8 dereferenceable(8) %10)
  store ptr %78, ptr %9, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKP8DexClassSt6vectorIS2_SaIS2_EEEC2IPS2_vEERKNS0_IT_S7_EE(ptr noundef nonnull align 8 dereferenceable(8) %8, ptr noundef nonnull align 8 dereferenceable(8) %9) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #5
  %79 = call ptr @_ZNSt6vectorIP8DexClassSaIS1_EE3endEv(ptr noundef nonnull align 8 dereferenceable(24) %32) #5
  store ptr %79, ptr %12, align 8
  call void @_ZN9__gnu_cxx17__normal_iteratorIPKP8DexClassSt6vectorIS2_SaIS2_EEEC2IPS2_vEERKNS0_IT_S7_EE(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull align 8 dereferenceable(8) %12) #5
  %80 = load ptr, ptr %8, align 8
  %81 = load ptr, ptr %11, align 8
  %82 = call ptr @_ZNSt6vectorIP8DexClassSaIS1_EE5eraseEN9__gnu_cxx17__normal_iteratorIPKS1_S3_EES8_(ptr noundef nonnull align 8 dereferenceable(24) %32, ptr %80, ptr %81)
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  br label %83

83:                                               ; preds = %1, %.loopexit
  ret void

84:                                               ; preds = %61
  unreachable
}

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN12_GLOBAL__N_119validate_dex_headerEPK10dex_headermi(ptr noundef, i64 noundef, i32 noundef) local_unnamed_addr #1

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local void @_ZSt11make_uniqueI6DexIdxJRPK10dex_headerEENSt8__detail9_MakeUniqIT_E15__single_objectEDpOT0_(ptr dead_on_unwind noalias writable sret(%"class.std::unique_ptr") align 8, ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

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

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN12_GLOBAL__N_123validate_type_ids_tableEP6DexIdxPK10dex_header(ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorIP8DexClassSaIS1_EE6resizeEm(ptr noundef nonnull align 8 dereferenceable(24), i64 noundef) local_unnamed_addr #1 align 2

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

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

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

; Function Attrs: mustprogress uwtable
declare hidden void @"_Z17workqueue_run_forImZN9DexLoader8load_dexEvE3$_0EvT_S2_RKT0_j"(i64 noundef, i64 noundef, ptr noundef nonnull align 8 dereferenceable(24), i32 noundef) local_unnamed_addr #1

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

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

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

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

declare ptr @__cxa_allocate_exception(i64) local_unnamed_addr

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

declare void @__cxa_free_exception(ptr) local_unnamed_addr

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

declare void @__cxa_throw(ptr, ptr, ptr) local_unnamed_addr

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

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local ptr @_ZSt6removeIN9__gnu_cxx17__normal_iteratorIPP8DexClassSt6vectorIS3_SaIS3_EEEEDnET_S9_S9_RKT0_(ptr, ptr, ptr noundef nonnull align 8 dereferenceable(8)) local_unnamed_addr #3

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

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZN9__gnu_cxx17__normal_iteratorIPKP8DexClassSt6vectorIS2_SaIS2_EEEC2IPS2_vEERKNS0_IT_S7_EE(ptr noundef nonnull align 8 dereferenceable(8), 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 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 = { 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 = { 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 #5 = { nounwind }
attributes #6 = { noreturn }

!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 0}
!6 = !{!"_ZTS9DexLoader", !7, i64 0, !10, i64 8, !7, i64 16, !16, i64 24, !20, i64 48, !30, i64 88, !7, i64 96, !31, i64 104, !32, i64 400, !33, i64 404}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"_ZTSSt10unique_ptrI6DexIdxSt14default_deleteIS0_EE", !11, i64 0}
!11 = !{!"_ZTSSt15__uniq_ptr_dataI6DexIdxSt14default_deleteIS0_ELb1ELb1EE", !12, i64 0}
!12 = !{!"_ZTSSt15__uniq_ptr_implI6DexIdxSt14default_deleteIS0_EE", !13, i64 0}
!13 = !{!"_ZTSSt5tupleIJP6DexIdxSt14default_deleteIS0_EEE", !14, i64 0}
!14 = !{!"_ZTSSt11_Tuple_implILm0EJP6DexIdxSt14default_deleteIS0_EEE", !15, i64 0}
!15 = !{!"_ZTSSt10_Head_baseILm0EP6DexIdxLb0EE", !7, i64 0}
!16 = !{!"_ZTSSt6vectorIP8DexClassSaIS1_EE", !17, i64 0}
!17 = !{!"_ZTSSt12_Vector_baseIP8DexClassSaIS1_EE", !18, i64 0}
!18 = !{!"_ZTSNSt12_Vector_baseIP8DexClassSaIS1_EE12_Vector_implE", !19, i64 0}
!19 = !{!"_ZTSNSt12_Vector_baseIP8DexClassSaIS1_EE17_Vector_impl_dataE", !7, i64 0, !7, i64 8, !7, i64 16}
!20 = !{!"_ZTSSt10unique_ptrIKhSt8functionIFvPS0_EEE", !21, i64 0}
!21 = !{!"_ZTSSt15__uniq_ptr_dataIKhSt8functionIFvPS0_EELb1ELb1EE", !22, i64 0}
!22 = !{!"_ZTSSt15__uniq_ptr_implIKhSt8functionIFvPS0_EEE", !23, i64 0}
!23 = !{!"_ZTSSt5tupleIJPKhSt8functionIFvS1_EEEE", !24, i64 0}
!24 = !{!"_ZTSSt11_Tuple_implILm0EJPKhSt8functionIFvS1_EEEE", !25, i64 0, !29, i64 32}
!25 = !{!"_ZTSSt11_Tuple_implILm1EJSt8functionIFvPKhEEEE", !26, i64 0}
!26 = !{!"_ZTSSt10_Head_baseILm1ESt8functionIFvPKhEELb0EE", !27, i64 0}
!27 = !{!"_ZTSSt8functionIFvPKhEE", !28, i64 0, !7, i64 24}
!28 = !{!"_ZTSSt14_Function_base", !8, i64 0, !7, i64 16}
!29 = !{!"_ZTSSt10_Head_baseILm0EPKhLb0EE", !7, i64 0}
!30 = !{!"long", !8, i64 0}
!31 = !{!"_ZTS11dex_stats_t", !8, i64 0, !32, i64 20, !32, i64 24, !32, i64 28, !32, i64 32, !32, i64 36, !32, i64 40, !32, i64 44, !32, i64 48, !32, i64 52, !32, i64 56, !32, i64 60, !32, i64 64, !32, i64 68, !32, i64 72, !32, i64 76, !32, i64 80, !32, i64 84, !32, i64 88, !32, i64 92, !32, i64 96, !32, i64 100, !32, i64 104, !32, i64 108, !32, i64 112, !32, i64 116, !32, i64 120, !32, i64 124, !32, i64 128, !32, i64 132, !32, i64 136, !32, i64 140, !32, i64 144, !32, i64 148, !32, i64 152, !32, i64 156, !32, i64 160, !32, i64 164, !32, i64 168, !32, i64 172, !32, i64 176, !32, i64 180, !32, i64 184, !32, i64 188, !32, i64 192, !32, i64 196, !32, i64 200, !32, i64 204, !32, i64 208, !32, i64 212, !32, i64 216, !32, i64 220, !32, i64 224, !32, i64 228, !32, i64 232, !32, i64 236, !32, i64 240, !32, i64 244, !32, i64 248, !32, i64 252, !32, i64 256, !32, i64 260, !32, i64 264, !32, i64 268, !32, i64 272, !32, i64 276, !32, i64 280, !32, i64 284, !32, i64 288, !32, i64 292}
!32 = !{!"int", !8, i64 0}
!33 = !{!"_ZTSN9DexLoader8ParallelE", !8, i64 0}
!34 = !{!6, !30, i64 88}
!35 = !{!6, !32, i64 400}
!36 = !{!37, !32, i64 96}
!37 = !{!"_ZTS10dex_header", !8, i64 0, !32, i64 8, !8, i64 12, !32, i64 32, !32, i64 36, !32, i64 40, !32, i64 44, !32, i64 48, !32, i64 52, !32, i64 56, !32, i64 60, !32, i64 64, !32, i64 68, !32, i64 72, !32, i64 76, !32, i64 80, !32, i64 84, !32, i64 88, !32, i64 92, !32, i64 96, !32, i64 100, !32, i64 104, !32, i64 108}
!38 = !{!37, !32, i64 100}
!39 = !{!6, !7, i64 16}
!40 = !{!6, !33, i64 404}
!41 = distinct !{!41, !42}
!42 = !{!"llvm.loop.mustprogress"}
!43 = !{!7, !7, i64 0}
!44 = !{!45, !7, i64 16}
!45 = !{!"_ZTSZN9DexLoader8load_dexEvE3$_0", !7, i64 0, !7, i64 8, !7, i64 16}
!46 = !{!47, !47, i64 0}
!47 = !{!"std::nullptr_t", !8, i64 0}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass,TailCallElimPass