; LLVM IR from facebook/redex :: tools/oatmeal (dex)

; 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::__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::unordered_map" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = 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.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 }
%struct.dex_class_def = type { i32, i32, i32, i32, i32, i32, i32, i32 }

@.str.10 = external hidden unnamed_addr constant [7 x i8], align 1

; 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 @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(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

declare i32 @__gxx_personality_v0(...)

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

declare void @_Z11read_stringB5cxx11PKh(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef) #2

; Function Attrs: mustprogress nounwind uwtable
declare noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEPKcm(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, i64 noundef) #1 align 2

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN12_GLOBAL__N_120load_class_data_itemEPKhRSt13unordered_mapIjjSt4hashIjESt8equal_toIjESaISt4pairIKjjEEE(ptr noundef, ptr noundef nonnull align 8 dereferenceable(56)) #3

; 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 uwtable
declare dso_local noundef i64 @_ZNKSt13unordered_mapIjjSt4hashIjESt8equal_toIjESaISt4pairIKjjEEE5countERS5_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 4 dereferenceable(4)) #3 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6stream10stream_dexEPKhmRKSt8functionIFv9DexOpcodePKtEERKS2_IFvS1_EE(ptr noundef %0, i64 noundef %1, ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull align 8 dereferenceable(32) %3) #3 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca %"class.std::unordered_map", align 8
  %12 = alloca %"class.std::__cxx11::basic_string", align 8
  %13 = alloca i64, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca %"class.std::__cxx11::basic_string", align 8
  %18 = alloca ptr, align 8
  %19 = alloca i32, align 4
  %20 = alloca i64, align 8
  %21 = alloca i32, align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i64 %1, ptr %6, align 8, !tbaa !9
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #5
  %22 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %22, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #5
  %23 = load ptr, ptr %9, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.dex_header, ptr %23, i32 0, i32 20
  %25 = load i32, ptr %24, align 1, !tbaa !11
  store i32 %25, ptr %10, align 4, !tbaa !14
  call void @llvm.lifetime.start.p0(i64 56, ptr %11) #5
  call void @_ZNSt13unordered_mapIjjSt4hashIjESt8equal_toIjESaISt4pairIKjjEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %11) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr %12) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  store i64 0, ptr %13, align 8, !tbaa !9
  br label %26

26:                                               ; preds = %135, %4
  %27 = load i64, ptr %13, align 8, !tbaa !9
  %28 = load i64, ptr %6, align 8, !tbaa !9
  %29 = icmp ult i64 %27, %28
  br i1 %29, label %31, label %30

30:                                               ; preds = %26
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  br label %139

31:                                               ; preds = %26
  %32 = load i64, ptr %13, align 8, !tbaa !9
  %33 = load i32, ptr %10, align 4, !tbaa !14
  %34 = zext i32 %33 to i64
  %35 = icmp uge i64 %32, %34
  br i1 %35, label %36, label %109

36:                                               ; preds = %31
  %37 = load i64, ptr %13, align 8, !tbaa !9
  %38 = load i32, ptr %10, align 4, !tbaa !14
  %39 = zext i32 %38 to i64
  %40 = load ptr, ptr %9, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.dex_header, ptr %40, i32 0, i32 19
  %42 = load i32, ptr %41, align 1, !tbaa !15
  %43 = zext i32 %42 to i64
  %44 = mul i64 %43, 32
  %45 = add i64 %39, %44
  %46 = icmp ult i64 %37, %45
  br i1 %46, label %47, label %109

47:                                               ; preds = %36
  %48 = load i64, ptr %13, align 8, !tbaa !9
  %49 = load i32, ptr %10, align 4, !tbaa !14
  %50 = zext i32 %49 to i64
  %51 = sub i64 %48, %50
  %52 = urem i64 %51, 32
  %53 = icmp eq i64 %52, 0
  br i1 %53, label %54, label %109

54:                                               ; preds = %47
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  %55 = load ptr, ptr %5, align 8, !tbaa !5
  %56 = load i64, ptr %13, align 8, !tbaa !9
  %57 = getelementptr inbounds i8, ptr %55, i64 %56
  store ptr %57, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  %58 = load ptr, ptr %5, align 8, !tbaa !5
  %59 = load ptr, ptr %9, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.dex_header, ptr %59, i32 0, i32 12
  %61 = load i32, ptr %60, align 1, !tbaa !16
  %62 = zext i32 %61 to i64
  %63 = getelementptr inbounds i8, ptr %58, i64 %62
  %64 = load ptr, ptr %14, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.dex_class_def, ptr %64, i32 0, i32 0
  %66 = load i32, ptr %65, align 1, !tbaa !17
  %67 = zext i32 %66 to i64
  %68 = mul i64 %67, 4
  %69 = getelementptr inbounds i8, ptr %63, i64 %68
  store ptr %69, ptr %15, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  %70 = load ptr, ptr %5, align 8, !tbaa !5
  %71 = load ptr, ptr %9, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.dex_header, ptr %71, i32 0, i32 10
  %73 = load i32, ptr %72, align 1, !tbaa !19
  %74 = zext i32 %73 to i64
  %75 = getelementptr inbounds i8, ptr %70, i64 %74
  %76 = load ptr, ptr %15, align 8, !tbaa !5
  %77 = load i32, ptr %76, align 4, !tbaa !14
  %78 = zext i32 %77 to i64
  %79 = mul i64 %78, 4
  %80 = getelementptr inbounds i8, ptr %75, i64 %79
  store ptr %80, ptr %16, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 32, ptr %17) #5
  %81 = load ptr, ptr %5, align 8, !tbaa !5
  %82 = load ptr, ptr %16, align 8, !tbaa !5
  %83 = load i32, ptr %82, align 4, !tbaa !14
  %84 = zext i32 %83 to i64
  %85 = getelementptr inbounds i8, ptr %81, i64 %84
  invoke void @_Z11read_stringB5cxx11PKh(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8 %17, ptr noundef %85)
          to label %86 unwind label %92

86:                                               ; preds = %54
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  %87 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEPKcm(ptr noundef nonnull align 8 dereferenceable(32) %17, ptr noundef @.str.10, i64 noundef 0) #5
  store i64 %87, ptr %20, align 8, !tbaa !9
  %88 = load i64, ptr %20, align 8, !tbaa !9
  %89 = icmp ne i64 %88, -1
  br i1 %89, label %90, label %96

90:                                               ; preds = %86
  %91 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %12, ptr noundef nonnull align 8 dereferenceable(32) %17) #5
  br label %96

92:                                               ; preds = %54
  %93 = landingpad { ptr, i32 }
          cleanup
  %94 = extractvalue { ptr, i32 } %93, 0
  store ptr %94, ptr %18, align 8
  %95 = extractvalue { ptr, i32 } %93, 1
  store i32 %95, ptr %19, align 4
  br label %108

96:                                               ; preds = %90, %86
  %97 = load ptr, ptr %5, align 8, !tbaa !5
  %98 = load ptr, ptr %14, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.dex_class_def, ptr %98, i32 0, i32 6
  %100 = load i32, ptr %99, align 1, !tbaa !20
  %101 = zext i32 %100 to i64
  %102 = getelementptr inbounds i8, ptr %97, i64 %101
  invoke void @_ZN12_GLOBAL__N_120load_class_data_itemEPKhRSt13unordered_mapIjjSt4hashIjESt8equal_toIjESaISt4pairIKjjEEE(ptr noundef %102, ptr noundef nonnull align 8 dereferenceable(56) %11)
          to label %103 unwind label %104

103:                                              ; preds = %96
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  br label %109

104:                                              ; preds = %96
  %105 = landingpad { ptr, i32 }
          cleanup
  %106 = extractvalue { ptr, i32 } %105, 0
  store ptr %106, ptr %18, align 8
  %107 = extractvalue { ptr, i32 } %105, 1
  store i32 %107, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %17) #5
  br label %108

108:                                              ; preds = %104, %92
  call void @llvm.lifetime.end.p0(i64 32, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  br label %138

109:                                              ; preds = %103, %47, %36, %31
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #5
  %110 = load i64, ptr %13, align 8, !tbaa !9
  %111 = trunc i64 %110 to i32
  store i32 %111, ptr %21, align 4, !tbaa !14
  %112 = invoke noundef i64 @_ZNKSt13unordered_mapIjjSt4hashIjESt8equal_toIjESaISt4pairIKjjEEE5countERS5_(ptr noundef nonnull align 8 dereferenceable(56) %11, ptr noundef nonnull align 4 dereferenceable(4) %21)
          to label %113 unwind label %126

113:                                              ; preds = %109
  %114 = icmp ne i64 %112, 0
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  br i1 %114, label %115, label %134

115:                                              ; preds = %113
  %116 = load ptr, ptr %8, align 8, !tbaa !5
  %117 = load ptr, ptr %5, align 8, !tbaa !5
  %118 = load i64, ptr %13, align 8, !tbaa !9
  %119 = getelementptr inbounds i8, ptr %117, i64 %118
  invoke void @_ZNKSt8functionIFvPKhEEclES1_(ptr noundef nonnull align 8 dereferenceable(32) %116, ptr noundef %119)
          to label %120 unwind label %130

120:                                              ; preds = %115
  %121 = load ptr, ptr %5, align 8, !tbaa !5
  %122 = load i64, ptr %13, align 8, !tbaa !9
  %123 = getelementptr inbounds i8, ptr %121, i64 %122
  %124 = load ptr, ptr %7, align 8, !tbaa !5
  invoke void @_ZN12_GLOBAL__N_117process_code_itemEPKhRKSt8functionIFv9DexOpcodePKtEE(ptr noundef %123, ptr noundef nonnull align 8 dereferenceable(32) %124)
          to label %125 unwind label %130

125:                                              ; preds = %120
  br label %134

126:                                              ; preds = %109
  %127 = landingpad { ptr, i32 }
          cleanup
  %128 = extractvalue { ptr, i32 } %127, 0
  store ptr %128, ptr %18, align 8
  %129 = extractvalue { ptr, i32 } %127, 1
  store i32 %129, ptr %19, align 4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  br label %138

130:                                              ; preds = %120, %115
  %131 = landingpad { ptr, i32 }
          cleanup
  %132 = extractvalue { ptr, i32 } %131, 0
  store ptr %132, ptr %18, align 8
  %133 = extractvalue { ptr, i32 } %131, 1
  store i32 %133, ptr %19, align 4
  br label %138

134:                                              ; preds = %125, %113
  br label %135

135:                                              ; preds = %134
  %136 = load i64, ptr %13, align 8, !tbaa !9
  %137 = add i64 %136, 1
  store i64 %137, ptr %13, align 8, !tbaa !9
  br label %26, !llvm.loop !21

138:                                              ; preds = %130, %126, %108
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #5
  call void @_ZNSt13unordered_mapIjjSt4hashIjESt8equal_toIjESaISt4pairIKjjEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %11) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  br label %140

139:                                              ; preds = %30
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %12) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr %12) #5
  call void @_ZNSt13unordered_mapIjjSt4hashIjESt8equal_toIjESaISt4pairIKjjEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %11) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #5
  ret void

140:                                              ; preds = %138
  %141 = load ptr, ptr %18, align 8
  %142 = load i32, ptr %19, align 4
  %143 = insertvalue { ptr, i32 } poison, ptr %141, 0
  %144 = insertvalue { ptr, i32 } %143, i32 %142, 1
  resume { ptr, i32 } %144
}

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN12_GLOBAL__N_117process_code_itemEPKhRKSt8functionIFv9DexOpcodePKtEE(ptr noundef, ptr noundef nonnull align 8 dereferenceable(32)) #3

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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long", !7, i64 0}
!11 = !{!12, !13, i64 100}
!12 = !{!"_ZTS10dex_header", !7, i64 0, !13, i64 8, !7, i64 12, !13, i64 32, !13, i64 36, !13, i64 40, !13, i64 44, !13, i64 48, !13, i64 52, !13, i64 56, !13, i64 60, !13, i64 64, !13, i64 68, !13, i64 72, !13, i64 76, !13, i64 80, !13, i64 84, !13, i64 88, !13, i64 92, !13, i64 96, !13, i64 100, !13, i64 104, !13, i64 108}
!13 = !{!"int", !7, i64 0}
!14 = !{!13, !13, i64 0}
!15 = !{!12, !13, i64 96}
!16 = !{!12, !13, i64 68}
!17 = !{!18, !13, i64 0}
!18 = !{!"_ZTS13dex_class_def", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !13, i64 16, !13, i64 20, !13, i64 24, !13, i64 28}
!19 = !{!12, !13, i64 60}
!20 = !{!18, !13, i64 24}
!21 = distinct !{!21, !22}
!22 = !{!"llvm.loop.mustprogress"}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%"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::unordered_map" = type { %"class.std::_Hashtable" }
%"class.std::_Hashtable" = 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 }

@.str.10 = external hidden unnamed_addr constant [7 x i8], align 1

; 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 @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(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

declare i32 @__gxx_personality_v0(...)

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

declare void @_Z11read_stringB5cxx11PKh(ptr dead_on_unwind writable sret(%"class.std::__cxx11::basic_string") align 8, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind uwtable
declare noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEPKcm(ptr noundef nonnull align 8 dereferenceable(32), ptr noundef, i64 noundef) local_unnamed_addr #1 align 2

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN12_GLOBAL__N_120load_class_data_itemEPKhRSt13unordered_mapIjjSt4hashIjESt8equal_toIjESaISt4pairIKjjEEE(ptr noundef, ptr noundef nonnull align 8 dereferenceable(56)) local_unnamed_addr #3

; 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 uwtable
declare dso_local noundef i64 @_ZNKSt13unordered_mapIjjSt4hashIjESt8equal_toIjESaISt4pairIKjjEEE5countERS5_(ptr noundef nonnull align 8 dereferenceable(56), ptr noundef nonnull align 4 dereferenceable(4)) local_unnamed_addr #3 align 2

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

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN6stream10stream_dexEPKhmRKSt8functionIFv9DexOpcodePKtEERKS2_IFvS1_EE(ptr noundef %0, i64 noundef %1, ptr noundef nonnull align 8 dereferenceable(32) %2, ptr noundef nonnull align 8 dereferenceable(32) %3) local_unnamed_addr #3 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %"class.std::unordered_map", align 8
  %6 = alloca %"class.std::__cxx11::basic_string", align 8
  %7 = alloca %"class.std::__cxx11::basic_string", align 8
  %8 = alloca i32, align 4
  %9 = getelementptr inbounds i8, ptr %0, i64 100
  %10 = load i32, ptr %9, align 1, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 56, ptr nonnull %5) #5
  call void @_ZNSt13unordered_mapIjjSt4hashIjESt8equal_toIjESaISt4pairIKjjEEEC2Ev(ptr noundef nonnull align 8 dereferenceable(56) %5) #5
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %6) #5
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #5
  %.not43 = icmp eq i64 %1, 0
  br i1 %.not43, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %4
  %11 = zext i32 %10 to i64
  %12 = getelementptr inbounds i8, ptr %0, i64 96
  %13 = getelementptr inbounds i8, ptr %0, i64 68
  %14 = getelementptr inbounds i8, ptr %0, i64 60
  br label %15

._crit_edge:                                      ; preds = %71, %4
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #5
  call void @_ZNSt13unordered_mapIjjSt4hashIjESt8equal_toIjESaISt4pairIKjjEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %5) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %5) #5
  ret void

15:                                               ; preds = %.lr.ph, %71
  %.042 = phi i64 [ 0, %.lr.ph ], [ %72, %71 ]
  %.not = icmp ult i64 %.042, %11
  br i1 %.not, label %60, label %16

16:                                               ; preds = %15
  %17 = load i32, ptr %12, align 1, !tbaa !10
  %18 = zext i32 %17 to i64
  %19 = shl nuw nsw i64 %18, 5
  %20 = add nuw nsw i64 %19, %11
  %21 = icmp ult i64 %.042, %20
  br i1 %21, label %22, label %60

22:                                               ; preds = %16
  %23 = sub nsw i64 %.042, %11
  %24 = and i64 %23, 31
  %25 = icmp eq i64 %24, 0
  br i1 %25, label %26, label %60

26:                                               ; preds = %22
  %27 = getelementptr inbounds i8, ptr %0, i64 %.042
  %28 = load i32, ptr %13, align 1, !tbaa !11
  %29 = zext i32 %28 to i64
  %30 = getelementptr inbounds i8, ptr %0, i64 %29
  %31 = load i32, ptr %27, align 1, !tbaa !12
  %32 = zext i32 %31 to i64
  %33 = shl nuw nsw i64 %32, 2
  %34 = getelementptr inbounds i8, ptr %30, i64 %33
  %35 = load i32, ptr %14, align 1, !tbaa !14
  %36 = zext i32 %35 to i64
  %37 = getelementptr inbounds i8, ptr %0, i64 %36
  %38 = load i32, ptr %34, align 4, !tbaa !15
  %39 = zext i32 %38 to i64
  %40 = shl nuw nsw i64 %39, 2
  %41 = getelementptr inbounds i8, ptr %37, i64 %40
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %7) #5
  %42 = load i32, ptr %41, align 4, !tbaa !15
  %43 = zext i32 %42 to i64
  %44 = getelementptr inbounds i8, ptr %0, i64 %43
  invoke void @_Z11read_stringB5cxx11PKh(ptr dead_on_unwind nonnull writable sret(%"class.std::__cxx11::basic_string") align 8 %7, ptr noundef nonnull %44)
          to label %45 unwind label %49

45:                                               ; preds = %26
  %46 = call noundef i64 @_ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE4findEPKcm(ptr noundef nonnull align 8 dereferenceable(32) %7, ptr noundef nonnull @.str.10, i64 noundef 0) #5
  %.not37 = icmp eq i64 %46, -1
  br i1 %.not37, label %51, label %47

47:                                               ; preds = %45
  %48 = call noundef nonnull align 8 dereferenceable(32) ptr @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEaSEOS4_(ptr noundef nonnull align 8 dereferenceable(32) %6, ptr noundef nonnull align 8 dereferenceable(32) %7) #5
  br label %51

49:                                               ; preds = %26
  %50 = landingpad { ptr, i32 }
          cleanup
  br label %59

51:                                               ; preds = %47, %45
  %52 = getelementptr inbounds i8, ptr %27, i64 24
  %53 = load i32, ptr %52, align 1, !tbaa !16
  %54 = zext i32 %53 to i64
  %55 = getelementptr inbounds i8, ptr %0, i64 %54
  invoke void @_ZN12_GLOBAL__N_120load_class_data_itemEPKhRSt13unordered_mapIjjSt4hashIjESt8equal_toIjESaISt4pairIKjjEEE(ptr noundef nonnull %55, ptr noundef nonnull align 8 dereferenceable(56) %5)
          to label %56 unwind label %57

56:                                               ; preds = %51
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #5
  br label %60

57:                                               ; preds = %51
  %58 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %7) #5
  br label %59

59:                                               ; preds = %57, %49
  %.pn = phi { ptr, i32 } [ %58, %57 ], [ %50, %49 ]
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %7) #5
  br label %73

60:                                               ; preds = %56, %22, %16, %15
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #5
  %61 = trunc i64 %.042 to i32
  store i32 %61, ptr %8, align 4, !tbaa !15
  %62 = invoke noundef i64 @_ZNKSt13unordered_mapIjjSt4hashIjESt8equal_toIjESaISt4pairIKjjEEE5countERS5_(ptr noundef nonnull align 8 dereferenceable(56) %5, ptr noundef nonnull align 4 dereferenceable(4) %8)
          to label %63 unwind label %67

63:                                               ; preds = %60
  %.not39 = icmp eq i64 %62, 0
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #5
  br i1 %.not39, label %71, label %64

64:                                               ; preds = %63
  %65 = getelementptr inbounds i8, ptr %0, i64 %.042
  invoke void @_ZNKSt8functionIFvPKhEEclES1_(ptr noundef nonnull align 8 dereferenceable(32) %3, ptr noundef %65)
          to label %66 unwind label %69

66:                                               ; preds = %64
  invoke void @_ZN12_GLOBAL__N_117process_code_itemEPKhRKSt8functionIFv9DexOpcodePKtEE(ptr noundef %65, ptr noundef nonnull align 8 dereferenceable(32) %2)
          to label %71 unwind label %69

67:                                               ; preds = %60
  %68 = landingpad { ptr, i32 }
          cleanup
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #5
  br label %73

69:                                               ; preds = %66, %64
  %70 = landingpad { ptr, i32 }
          cleanup
  br label %73

71:                                               ; preds = %63, %66
  %72 = add nuw i64 %.042, 1
  %exitcond.not = icmp eq i64 %72, %1
  br i1 %exitcond.not, label %._crit_edge, label %15, !llvm.loop !17

73:                                               ; preds = %69, %67, %59
  %.pn40 = phi { ptr, i32 } [ %70, %69 ], [ %68, %67 ], [ %.pn, %59 ]
  call void @_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEED2Ev(ptr noundef nonnull align 8 dereferenceable(32) %6) #5
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %6) #5
  call void @_ZNSt13unordered_mapIjjSt4hashIjESt8equal_toIjESaISt4pairIKjjEEED2Ev(ptr noundef nonnull align 8 dereferenceable(56) %5) #5
  call void @llvm.lifetime.end.p0(i64 56, ptr nonnull %5) #5
  resume { ptr, i32 } %.pn40
}

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

; Function Attrs: mustprogress uwtable
declare hidden void @_ZN12_GLOBAL__N_117process_code_itemEPKhRKSt8functionIFv9DexOpcodePKtEE(ptr noundef, ptr noundef nonnull align 8 dereferenceable(32)) local_unnamed_addr #3

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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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 }

!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, !9, i64 100}
!6 = !{!"_ZTS10dex_header", !7, i64 0, !9, i64 8, !7, i64 12, !9, i64 32, !9, i64 36, !9, i64 40, !9, i64 44, !9, i64 48, !9, i64 52, !9, i64 56, !9, i64 60, !9, i64 64, !9, i64 68, !9, i64 72, !9, i64 76, !9, i64 80, !9, i64 84, !9, i64 88, !9, i64 92, !9, i64 96, !9, i64 100, !9, i64 104, !9, i64 108}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!"int", !7, i64 0}
!10 = !{!6, !9, i64 96}
!11 = !{!6, !9, i64 68}
!12 = !{!13, !9, i64 0}
!13 = !{!"_ZTS13dex_class_def", !9, i64 0, !9, i64 4, !9, i64 8, !9, i64 12, !9, i64 16, !9, i64 20, !9, i64 24, !9, i64 28}
!14 = !{!6, !9, i64 60}
!15 = !{!9, !9, i64 0}
!16 = !{!13, !9, i64 24}
!17 = distinct !{!17, !18}
!18 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass