; LLVM IR from facebook/redex :: tools/oatmeal/vdex.ll (ZN8VdexFileC2ER14VdexFileHeader11ConstBuffer)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.ConstBuffer = type { ptr, i64 }
%struct.DexFileHeader = type { i32, i32, i32, [20 x i8], i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
%class.VdexFile = type { %struct.VdexFileHeader, %"class.std::vector", %"class.std::vector.0" }
%struct.VdexFileHeader = type { [4 x i8], [4 x i8], i32, i32, i32, i32 }
%"class.std::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<DexFileHeader, std::allocator<DexFileHeader>>::_Vector_impl" }
%"struct.std::_Vector_base<DexFileHeader, std::allocator<DexFileHeader>>::_Vector_impl" = type { %"struct.std::_Vector_base<DexFileHeader, std::allocator<DexFileHeader>>::_Vector_impl_data" }
%"struct.std::_Vector_base<DexFileHeader, std::allocator<DexFileHeader>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<ConstBuffer, std::allocator<ConstBuffer>>::_Vector_impl" }
%"struct.std::_Vector_base<ConstBuffer, std::allocator<ConstBuffer>>::_Vector_impl" = type { %"struct.std::_Vector_base<ConstBuffer, std::allocator<ConstBuffer>>::_Vector_impl_data" }
%"struct.std::_Vector_base<ConstBuffer, std::allocator<ConstBuffer>>::_Vector_impl_data" = type { ptr, ptr, ptr }

@stderr = external global ptr, align 8
@.str = external hidden unnamed_addr constant [15 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [12 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8VdexFileC2ER14VdexFileHeader11ConstBuffer(ptr noundef nonnull align 8 dereferenceable(72) %0, ptr noundef nonnull align 1 dereferenceable(24) %1, ptr %2, i64 %3) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %struct.ConstBuffer, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca %struct.ConstBuffer, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i32, align 4
  %11 = alloca i64, align 8
  %12 = alloca i32, align 4
  %13 = alloca %struct.DexFileHeader, align 1
  %14 = alloca %struct.ConstBuffer, align 8
  %15 = alloca %struct.ConstBuffer, align 8
  %16 = alloca %struct.ConstBuffer, align 8
  %17 = getelementptr inbounds { ptr, i64 }, ptr %5, i32 0, i32 0
  store ptr %2, ptr %17, align 8
  %18 = getelementptr inbounds { ptr, i64 }, ptr %5, i32 0, i32 1
  store i64 %3, ptr %18, align 8
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  %19 = load ptr, ptr %6, align 8
  %20 = getelementptr inbounds %class.VdexFile, ptr %19, i32 0, i32 0
  %21 = load ptr, ptr %7, align 8, !tbaa !5
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %20, ptr align 1 %21, i64 24, i1 false), !tbaa.struct !9
  %22 = getelementptr inbounds %class.VdexFile, ptr %19, i32 0, i32 1
  call void @_ZNSt6vectorI13DexFileHeaderSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %22) #6
  %23 = getelementptr inbounds %class.VdexFile, ptr %19, i32 0, i32 2
  call void @_ZNSt6vectorI11ConstBufferSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %23) #6
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #6
  %24 = load ptr, ptr %7, align 8, !tbaa !5
  %25 = invoke noundef i64 @_ZN12_GLOBAL__N_125size_of_checksums_sectionERK14VdexFileHeader(ptr noundef nonnull align 1 dereferenceable(24) %24)
          to label %26 unwind label %42

26:                                               ; preds = %4
  %27 = add i64 24, %25
  %28 = invoke { ptr, i64 } @_ZNK11ConstBuffer5sliceEm(ptr noundef nonnull align 8 dereferenceable(16) %5, i64 noundef %27)
          to label %29 unwind label %42

29:                                               ; preds = %26
  %30 = getelementptr inbounds { ptr, i64 }, ptr %8, i32 0, i32 0
  %31 = extractvalue { ptr, i64 } %28, 0
  store ptr %31, ptr %30, align 8
  %32 = getelementptr inbounds { ptr, i64 }, ptr %8, i32 0, i32 1
  %33 = extractvalue { ptr, i64 } %28, 1
  store i64 %33, ptr %32, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #6
  store i64 0, ptr %11, align 8, !tbaa !13
  br label %34

34:                                               ; preds = %91, %29
  %35 = load i64, ptr %11, align 8, !tbaa !13
  %36 = load ptr, ptr %7, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.VdexFileHeader, ptr %36, i32 0, i32 2
  %38 = load i32, ptr %37, align 1, !tbaa !15
  %39 = zext i32 %38 to i64
  %40 = icmp ult i64 %35, %39
  br i1 %40, label %46, label %41

41:                                               ; preds = %34
  store i32 2, ptr %12, align 4
  br label %104

42:                                               ; preds = %26, %4
  %43 = landingpad { ptr, i32 }
          cleanup
  %44 = extractvalue { ptr, i32 } %43, 0
  store ptr %44, ptr %9, align 8
  %45 = extractvalue { ptr, i32 } %43, 1
  store i32 %45, ptr %10, align 4
  br label %110

46:                                               ; preds = %34
  call void @llvm.lifetime.start.p0(i64 112, ptr %13) #6
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %14, ptr align 8 %8, i64 16, i1 false), !tbaa.struct !17
  %47 = getelementptr inbounds { ptr, i64 }, ptr %14, i32 0, i32 0
  %48 = load ptr, ptr %47, align 8
  %49 = getelementptr inbounds { ptr, i64 }, ptr %14, i32 0, i32 1
  %50 = load i64, ptr %49, align 8
  invoke void @_ZN13DexFileHeader5parseE11ConstBuffer(ptr dead_on_unwind writable sret(%struct.DexFileHeader) align 1 %13, ptr %48, i64 %50)
          to label %51 unwind label %60

51:                                               ; preds = %46
  %52 = getelementptr inbounds %class.VdexFile, ptr %19, i32 0, i32 1
  invoke void @_ZNSt6vectorI13DexFileHeaderSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %52, ptr noundef nonnull align 1 dereferenceable(112) %13)
          to label %53 unwind label %60

53:                                               ; preds = %51
  %54 = getelementptr inbounds %struct.DexFileHeader, ptr %13, i32 0, i32 0
  %55 = load i32, ptr %54, align 1, !tbaa !18
  %56 = icmp ne i32 %55, 175662436
  br i1 %56, label %57, label %64

57:                                               ; preds = %53
  %58 = load ptr, ptr @stderr, align 8, !tbaa !5
  %59 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %58, ptr noundef @.str) #6
  store i32 1, ptr %12, align 4
  br label %88

60:                                               ; preds = %64, %51, %46
  %61 = landingpad { ptr, i32 }
          cleanup
  %62 = extractvalue { ptr, i32 } %61, 0
  store ptr %62, ptr %9, align 8
  %63 = extractvalue { ptr, i32 } %61, 1
  store i32 %63, ptr %10, align 4
  br label %103

64:                                               ; preds = %53
  %65 = getelementptr inbounds %struct.DexFileHeader, ptr %13, i32 0, i32 1
  %66 = invoke i32 (ptr, ...) @printf(ptr noundef @.str.1, ptr noundef %65)
          to label %67 unwind label %60

67:                                               ; preds = %64
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #6
  %68 = getelementptr inbounds %struct.DexFileHeader, ptr %13, i32 0, i32 4
  %69 = load i32, ptr %68, align 1, !tbaa !20
  %70 = zext i32 %69 to i64
  %71 = invoke { ptr, i64 } @_ZNK11ConstBuffer8truncateEm(ptr noundef nonnull align 8 dereferenceable(16) %8, i64 noundef %70)
          to label %72 unwind label %94

72:                                               ; preds = %67
  %73 = getelementptr inbounds { ptr, i64 }, ptr %15, i32 0, i32 0
  %74 = extractvalue { ptr, i64 } %71, 0
  store ptr %74, ptr %73, align 8
  %75 = getelementptr inbounds { ptr, i64 }, ptr %15, i32 0, i32 1
  %76 = extractvalue { ptr, i64 } %71, 1
  store i64 %76, ptr %75, align 8
  %77 = getelementptr inbounds %class.VdexFile, ptr %19, i32 0, i32 2
  invoke void @_ZNSt6vectorI11ConstBufferSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %77, ptr noundef nonnull align 8 dereferenceable(16) %15)
          to label %78 unwind label %94

78:                                               ; preds = %72
  call void @llvm.lifetime.start.p0(i64 16, ptr %16) #6
  %79 = getelementptr inbounds %struct.DexFileHeader, ptr %13, i32 0, i32 4
  %80 = load i32, ptr %79, align 1, !tbaa !20
  %81 = zext i32 %80 to i64
  %82 = invoke { ptr, i64 } @_ZNK11ConstBuffer5sliceEm(ptr noundef nonnull align 8 dereferenceable(16) %8, i64 noundef %81)
          to label %83 unwind label %98

83:                                               ; preds = %78
  %84 = getelementptr inbounds { ptr, i64 }, ptr %16, i32 0, i32 0
  %85 = extractvalue { ptr, i64 } %82, 0
  store ptr %85, ptr %84, align 8
  %86 = getelementptr inbounds { ptr, i64 }, ptr %16, i32 0, i32 1
  %87 = extractvalue { ptr, i64 } %82, 1
  store i64 %87, ptr %86, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %8, ptr align 8 %16, i64 16, i1 false), !tbaa.struct !17
  call void @llvm.lifetime.end.p0(i64 16, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #6
  store i32 0, ptr %12, align 4
  br label %88

88:                                               ; preds = %83, %57
  call void @llvm.lifetime.end.p0(i64 112, ptr %13) #6
  %89 = load i32, ptr %12, align 4
  switch i32 %89, label %104 [
    i32 0, label %90
  ]

90:                                               ; preds = %88
  br label %91

91:                                               ; preds = %90
  %92 = load i64, ptr %11, align 8, !tbaa !13
  %93 = add i64 %92, 1
  store i64 %93, ptr %11, align 8, !tbaa !13
  br label %34, !llvm.loop !21

94:                                               ; preds = %72, %67
  %95 = landingpad { ptr, i32 }
          cleanup
  %96 = extractvalue { ptr, i32 } %95, 0
  store ptr %96, ptr %9, align 8
  %97 = extractvalue { ptr, i32 } %95, 1
  store i32 %97, ptr %10, align 4
  br label %102

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

102:                                              ; preds = %98, %94
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #6
  br label %103

103:                                              ; preds = %102, %60
  call void @llvm.lifetime.end.p0(i64 112, ptr %13) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  br label %110

104:                                              ; preds = %88, %41
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #6
  %105 = load i32, ptr %12, align 4
  switch i32 %105, label %107 [
    i32 2, label %106
  ]

106:                                              ; preds = %104
  store i32 0, ptr %12, align 4
  br label %107

107:                                              ; preds = %106, %104
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #6
  %108 = load i32, ptr %12, align 4
  switch i32 %108, label %116 [
    i32 0, label %109
    i32 1, label %109
  ]

109:                                              ; preds = %107, %107
  ret void

110:                                              ; preds = %103, %42
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #6
  call void @_ZNSt6vectorI11ConstBufferSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %23) #6
  call void @_ZNSt6vectorI13DexFileHeaderSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %22) #6
  br label %111

111:                                              ; preds = %110
  %112 = load ptr, ptr %9, align 8
  %113 = load i32, ptr %10, align 4
  %114 = insertvalue { ptr, i32 } poison, ptr %112, 0
  %115 = insertvalue { ptr, i32 } %114, i32 %113, 1
  resume { ptr, i32 } %115

116:                                              ; preds = %107
  unreachable
}

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i64 } @_ZNK11ConstBuffer5sliceEm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i64 @_ZN12_GLOBAL__N_125size_of_checksums_sectionERK14VdexFileHeader(ptr noundef nonnull align 1 dereferenceable(24)) #2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN13DexFileHeader5parseE11ConstBuffer(ptr dead_on_unwind noalias writable sret(%struct.DexFileHeader) align 1, ptr, i64) #0 align 2

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

; Function Attrs: nounwind
declare i32 @fprintf(ptr noundef, ptr noundef, ...) #4

declare i32 @printf(ptr noundef, ...) #5

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorI11ConstBufferSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(16)) #0 align 2

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

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

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

attributes #0 = { 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 #1 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nounwind "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 = { "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, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{i64 0, i64 4, !10, i64 4, i64 4, !10, i64 8, i64 4, !11, i64 12, i64 4, !11, i64 16, i64 4, !11, i64 20, i64 4, !11}
!10 = !{!7, !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"long", !7, i64 0}
!15 = !{!16, !12, i64 8}
!16 = !{!"_ZTS14VdexFileHeader", !7, i64 0, !7, i64 4, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20}
!17 = !{i64 0, i64 8, !5, i64 8, i64 8, !13}
!18 = !{!19, !12, i64 0}
!19 = !{!"_ZTS13DexFileHeader", !12, i64 0, !12, i64 4, !12, i64 8, !7, i64 12, !12, i64 32, !12, i64 36, !12, i64 40, !12, i64 44, !12, i64 48, !12, i64 52, !12, i64 56, !12, i64 60, !12, i64 64, !12, i64 68, !12, i64 72, !12, i64 76, !12, i64 80, !12, i64 84, !12, i64 88, !12, i64 92, !12, i64 96, !12, i64 100, !12, i64 104, !12, i64 108}
!20 = !{!19, !12, i64 32}
!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"

%struct.ConstBuffer = type { ptr, i64 }
%struct.DexFileHeader = type { i32, i32, i32, [20 x i8], i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }

@stderr = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [15 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [12 x i8], align 1

; Function Attrs: mustprogress uwtable
define dso_local void @_ZN8VdexFileC2ER14VdexFileHeader11ConstBuffer(ptr noundef nonnull align 8 dereferenceable(72) %0, ptr noundef nonnull align 1 dereferenceable(24) %1, ptr %2, i64 %3) unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %5 = alloca %struct.ConstBuffer, align 8
  %6 = alloca %struct.ConstBuffer, align 8
  %7 = alloca %struct.DexFileHeader, align 4
  %8 = alloca %struct.ConstBuffer, align 8
  store ptr %2, ptr %5, align 8
  %9 = getelementptr inbounds i8, ptr %5, i64 8
  store i64 %3, ptr %9, align 8
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(24) %0, ptr noundef nonnull align 1 dereferenceable(24) %1, i64 24, i1 false), !tbaa.struct !5
  %10 = getelementptr inbounds i8, ptr %0, i64 24
  tail call void @_ZNSt6vectorI13DexFileHeaderSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  %11 = getelementptr inbounds i8, ptr %0, i64 48
  tail call void @_ZNSt6vectorI11ConstBufferSaIS0_EEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %6) #5
  %12 = tail call noundef i64 @_ZN12_GLOBAL__N_125size_of_checksums_sectionERK14VdexFileHeader(ptr noundef nonnull align 1 dereferenceable(24) %1)
  %13 = add i64 %12, 24
  %14 = invoke { ptr, i64 } @_ZNK11ConstBuffer5sliceEm(ptr noundef nonnull align 8 dereferenceable(16) %5, i64 noundef %13)
          to label %15 unwind label %24

15:                                               ; preds = %4
  %16 = extractvalue { ptr, i64 } %14, 0
  store ptr %16, ptr %6, align 8
  %17 = getelementptr inbounds i8, ptr %6, i64 8
  %18 = extractvalue { ptr, i64 } %14, 1
  store i64 %18, ptr %17, align 8
  %19 = getelementptr inbounds i8, ptr %1, i64 8
  %20 = load i32, ptr %19, align 1, !tbaa !11
  %.not21 = icmp eq i32 %20, 0
  br i1 %.not21, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %15
  %21 = getelementptr inbounds i8, ptr %7, i64 4
  %22 = getelementptr inbounds i8, ptr %7, i64 32
  %23 = getelementptr inbounds i8, ptr %8, i64 8
  br label %26

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

26:                                               ; preds = %.lr.ph, %46
  %.sroa.2.0.copyload = phi i64 [ %18, %.lr.ph ], [ %48, %46 ]
  %.sroa.02.0.copyload = phi ptr [ %16, %.lr.ph ], [ %47, %46 ]
  %.01420 = phi i64 [ 0, %.lr.ph ], [ %49, %46 ]
  call void @llvm.lifetime.start.p0(i64 112, ptr nonnull %7) #5
  invoke void @_ZN13DexFileHeader5parseE11ConstBuffer(ptr dead_on_unwind nonnull writable sret(%struct.DexFileHeader) align 1 %7, ptr %.sroa.02.0.copyload, i64 %.sroa.2.0.copyload)
          to label %27 unwind label %30

27:                                               ; preds = %26
  invoke void @_ZNSt6vectorI13DexFileHeaderSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %10, ptr noundef nonnull align 1 dereferenceable(112) %7)
          to label %28 unwind label %30

28:                                               ; preds = %27
  %29 = load i32, ptr %7, align 4, !tbaa !13
  %.not = icmp eq i32 %29, 175662436
  br i1 %.not, label %32, label %43

30:                                               ; preds = %27, %26
  %31 = landingpad { ptr, i32 }
          cleanup
  br label %58

32:                                               ; preds = %28
  %33 = call i32 (ptr, ...) @printf(ptr noundef nonnull dereferenceable(1) @.str.1, ptr noundef nonnull %21)
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #5
  %34 = load i32, ptr %22, align 4, !tbaa !15
  %35 = zext i32 %34 to i64
  %36 = call { ptr, i64 } @_ZNK11ConstBuffer8truncateEm(ptr noundef nonnull align 8 dereferenceable(16) %6, i64 noundef %35)
  %37 = extractvalue { ptr, i64 } %36, 0
  store ptr %37, ptr %8, align 8
  %38 = extractvalue { ptr, i64 } %36, 1
  store i64 %38, ptr %23, align 8
  invoke void @_ZNSt6vectorI11ConstBufferSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24) %11, ptr noundef nonnull align 8 dereferenceable(16) %8)
          to label %39 unwind label %53

39:                                               ; preds = %32
  %40 = load i32, ptr %22, align 4, !tbaa !15
  %41 = zext i32 %40 to i64
  %42 = invoke { ptr, i64 } @_ZNK11ConstBuffer5sliceEm(ptr noundef nonnull align 8 dereferenceable(16) %6, i64 noundef %41)
          to label %46 unwind label %55

43:                                               ; preds = %28
  %44 = load ptr, ptr @stderr, align 8, !tbaa !16
  %45 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %44, ptr noundef nonnull @.str) #6
  call void @llvm.lifetime.end.p0(i64 112, ptr nonnull %7) #5
  br label %.loopexit

46:                                               ; preds = %39
  %47 = extractvalue { ptr, i64 } %42, 0
  %48 = extractvalue { ptr, i64 } %42, 1
  store ptr %47, ptr %6, align 8, !tbaa !16
  store i64 %48, ptr %17, align 8, !tbaa !18
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 112, ptr nonnull %7) #5
  %49 = add nuw nsw i64 %.01420, 1
  %50 = load i32, ptr %19, align 1, !tbaa !11
  %51 = zext i32 %50 to i64
  %52 = icmp ult i64 %49, %51
  br i1 %52, label %26, label %.loopexit, !llvm.loop !20

53:                                               ; preds = %32
  %54 = landingpad { ptr, i32 }
          cleanup
  br label %57

55:                                               ; preds = %39
  %56 = landingpad { ptr, i32 }
          cleanup
  br label %57

57:                                               ; preds = %55, %53
  %.pn = phi { ptr, i32 } [ %56, %55 ], [ %54, %53 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #5
  br label %58

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

.loopexit:                                        ; preds = %46, %15, %43
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #5
  ret void

59:                                               ; preds = %58, %24
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %58 ], [ %25, %24 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %6) #5
  call void @_ZNSt6vectorI11ConstBufferSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %11) #5
  call void @_ZNSt6vectorI13DexFileHeaderSaIS0_EED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %10) #5
  resume { ptr, i32 } %.pn.pn.pn
}

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #1

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

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

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

; Function Attrs: mustprogress uwtable
declare dso_local { ptr, i64 } @_ZNK11ConstBuffer5sliceEm(ptr noundef nonnull align 8 dereferenceable(16), i64 noundef) local_unnamed_addr #0 align 2

; Function Attrs: mustprogress nounwind uwtable
declare hidden noundef i64 @_ZN12_GLOBAL__N_125size_of_checksums_sectionERK14VdexFileHeader(ptr noundef nonnull align 1 dereferenceable(24)) local_unnamed_addr #2

declare i32 @__gxx_personality_v0(...)

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZN13DexFileHeader5parseE11ConstBuffer(ptr dead_on_unwind noalias writable sret(%struct.DexFileHeader) align 1, ptr, i64) local_unnamed_addr #0 align 2

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

; Function Attrs: nofree nounwind
declare noundef i32 @fprintf(ptr nocapture noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #4

; Function Attrs: nofree nounwind
declare noundef i32 @printf(ptr nocapture noundef readonly, ...) local_unnamed_addr #4

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

; Function Attrs: mustprogress uwtable
declare dso_local void @_ZNSt6vectorI11ConstBufferSaIS0_EE9push_backERKS0_(ptr noundef nonnull align 8 dereferenceable(24), ptr noundef nonnull align 8 dereferenceable(16)) local_unnamed_addr #0 align 2

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

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

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

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { mustprogress nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { nofree nounwind "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 = { cold 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 = !{i64 0, i64 4, !6, i64 4, i64 4, !6, i64 8, i64 4, !9, i64 12, i64 4, !9, i64 16, i64 4, !9, i64 20, i64 4, !9}
!6 = !{!7, !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !10, i64 8}
!12 = !{!"_ZTS14VdexFileHeader", !7, i64 0, !7, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20}
!13 = !{!14, !10, i64 0}
!14 = !{!"_ZTS13DexFileHeader", !10, i64 0, !10, i64 4, !10, i64 8, !7, i64 12, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !10, i64 48, !10, i64 52, !10, i64 56, !10, i64 60, !10, i64 64, !10, i64 68, !10, i64 72, !10, i64 76, !10, i64 80, !10, i64 84, !10, i64 88, !10, i64 92, !10, i64 96, !10, i64 100, !10, i64 104, !10, i64 108}
!15 = !{!14, !10, i64 32}
!16 = !{!17, !17, i64 0}
!17 = !{!"any pointer", !7, i64 0}
!18 = !{!19, !19, i64 0}
!19 = !{!"long", !7, i64 0}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}


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