; LLVM IR from facebook/redex :: tools/common/DexCommon.ll (Z13open_dex_filePKcP10ddump_data)

; 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.stat = type { i64, i64, i64, i32, i32, i32, i32, i64, i64, i64, i64, %struct.timespec, %struct.timespec, %struct.timespec, [3 x i64] }
%struct.timespec = type { i64, i64 }
%struct.ddump_data = type { i64, i64, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%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 }

@stderr = external global ptr, align 8
@.str = external hidden unnamed_addr constant [35 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [51 x i8], align 1
@_ZL21dex_v35_header_string = external hidden global ptr, align 8
@_ZL21dex_v37_header_string = external hidden global ptr, align 8
@_ZL21dex_v38_header_string = external hidden global ptr, align 8
@_ZL21dex_v39_header_string = external hidden global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [24 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: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress uwtable
define dso_local void @_Z13open_dex_filePKcP10ddump_data(ptr noundef %0, ptr noundef %1) #1 {
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  %6 = alloca %struct.stat, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store ptr %1, ptr %4, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %5) #6
  %7 = load ptr, ptr %3, align 8, !tbaa !5
  %8 = call i32 (ptr, i32, ...) @open(ptr noundef %7, i32 noundef 2)
  store i32 %8, ptr %5, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 144, ptr %6) #6
  %9 = load ptr, ptr %3, align 8, !tbaa !5
  %10 = load ptr, ptr %4, align 8, !tbaa !5
  %11 = getelementptr inbounds %struct.ddump_data, ptr %10, i32 0, i32 12
  store ptr %9, ptr %11, align 8, !tbaa !11
  %12 = load i32, ptr %5, align 4, !tbaa !9
  %13 = icmp slt i32 %12, 0
  br i1 %13, label %14, label %18

14:                                               ; preds = %2
  %15 = load ptr, ptr @stderr, align 8, !tbaa !5
  %16 = load ptr, ptr %3, align 8, !tbaa !5
  %17 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %15, ptr noundef @.str, ptr noundef %16) #6
  call void @exit(i32 noundef 1) #7
  unreachable

18:                                               ; preds = %2
  %19 = load i32, ptr %5, align 4, !tbaa !9
  %20 = call i32 @fstat(i32 noundef %19, ptr noundef %6) #6
  %21 = icmp ne i32 %20, 0
  br i1 %21, label %22, label %26

22:                                               ; preds = %18
  %23 = load ptr, ptr @stderr, align 8, !tbaa !5
  %24 = load ptr, ptr %3, align 8, !tbaa !5
  %25 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %23, ptr noundef @.str.1, ptr noundef %24) #6
  call void @exit(i32 noundef 1) #7
  unreachable

26:                                               ; preds = %18
  %27 = getelementptr inbounds %struct.stat, ptr %6, i32 0, i32 8
  %28 = load i64, ptr %27, align 8, !tbaa !14
  %29 = load ptr, ptr %4, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct.ddump_data, ptr %29, i32 0, i32 1
  store i64 %28, ptr %30, align 8, !tbaa !17
  %31 = load ptr, ptr %4, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.ddump_data, ptr %31, i32 0, i32 1
  %33 = load i64, ptr %32, align 8, !tbaa !17
  %34 = load i32, ptr %5, align 4, !tbaa !9
  %35 = call ptr @mmap(ptr noundef null, i64 noundef %33, i32 noundef 3, i32 noundef 1, i32 noundef %34, i64 noundef 0) #6
  %36 = load ptr, ptr %4, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.ddump_data, ptr %36, i32 0, i32 2
  store ptr %35, ptr %37, align 8, !tbaa !18
  %38 = load i32, ptr %5, align 4, !tbaa !9
  %39 = call i32 @close(i32 noundef %38)
  %40 = load ptr, ptr %4, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.ddump_data, ptr %40, i32 0, i32 2
  %42 = load ptr, ptr %41, align 8, !tbaa !18
  %43 = icmp eq ptr %42, null
  br i1 %43, label %44, label %47

44:                                               ; preds = %26
  %45 = load ptr, ptr @stderr, align 8, !tbaa !5
  %46 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %45, ptr noundef @.str.2) #6
  call void @exit(i32 noundef 1) #7
  unreachable

47:                                               ; preds = %26
  %48 = load ptr, ptr %4, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.ddump_data, ptr %48, i32 0, i32 2
  %50 = load ptr, ptr %49, align 8, !tbaa !18
  %51 = load ptr, ptr %4, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.ddump_data, ptr %51, i32 0, i32 4
  store ptr %50, ptr %52, align 8, !tbaa !19
  %53 = load ptr, ptr %4, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.ddump_data, ptr %53, i32 0, i32 4
  %55 = load ptr, ptr %54, align 8, !tbaa !19
  %56 = getelementptr inbounds %struct.dex_header, ptr %55, i32 0, i32 0
  %57 = getelementptr inbounds [8 x i8], ptr %56, i64 0, i64 0
  %58 = load ptr, ptr @_ZL21dex_v35_header_string, align 8, !tbaa !5
  %59 = call i32 @memcmp(ptr noundef %57, ptr noundef %58, i64 noundef 8) #8
  %60 = icmp ne i32 %59, 0
  br i1 %60, label %61, label %91

61:                                               ; preds = %47
  %62 = load ptr, ptr %4, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.ddump_data, ptr %62, i32 0, i32 4
  %64 = load ptr, ptr %63, align 8, !tbaa !19
  %65 = getelementptr inbounds %struct.dex_header, ptr %64, i32 0, i32 0
  %66 = getelementptr inbounds [8 x i8], ptr %65, i64 0, i64 0
  %67 = load ptr, ptr @_ZL21dex_v37_header_string, align 8, !tbaa !5
  %68 = call i32 @memcmp(ptr noundef %66, ptr noundef %67, i64 noundef 8) #8
  %69 = icmp ne i32 %68, 0
  br i1 %69, label %70, label %91

70:                                               ; preds = %61
  %71 = load ptr, ptr %4, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.ddump_data, ptr %71, i32 0, i32 4
  %73 = load ptr, ptr %72, align 8, !tbaa !19
  %74 = getelementptr inbounds %struct.dex_header, ptr %73, i32 0, i32 0
  %75 = getelementptr inbounds [8 x i8], ptr %74, i64 0, i64 0
  %76 = load ptr, ptr @_ZL21dex_v38_header_string, align 8, !tbaa !5
  %77 = call i32 @memcmp(ptr noundef %75, ptr noundef %76, i64 noundef 8) #8
  %78 = icmp ne i32 %77, 0
  br i1 %78, label %79, label %91

79:                                               ; preds = %70
  %80 = load ptr, ptr %4, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.ddump_data, ptr %80, i32 0, i32 4
  %82 = load ptr, ptr %81, align 8, !tbaa !19
  %83 = getelementptr inbounds %struct.dex_header, ptr %82, i32 0, i32 0
  %84 = getelementptr inbounds [8 x i8], ptr %83, i64 0, i64 0
  %85 = load ptr, ptr @_ZL21dex_v39_header_string, align 8, !tbaa !5
  %86 = call i32 @memcmp(ptr noundef %84, ptr noundef %85, i64 noundef 8) #8
  %87 = icmp ne i32 %86, 0
  br i1 %87, label %88, label %91

88:                                               ; preds = %79
  %89 = load ptr, ptr @stderr, align 8, !tbaa !5
  %90 = call i32 (ptr, ptr, ...) @fprintf(ptr noundef %89, ptr noundef @.str.3) #6
  call void @exit(i32 noundef 1) #7
  unreachable

91:                                               ; preds = %79, %70, %61, %47
  %92 = load ptr, ptr %4, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.ddump_data, ptr %92, i32 0, i32 2
  %94 = load ptr, ptr %93, align 8, !tbaa !18
  %95 = load ptr, ptr %4, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.ddump_data, ptr %95, i32 0, i32 4
  %97 = load ptr, ptr %96, align 8, !tbaa !19
  %98 = getelementptr inbounds %struct.dex_header, ptr %97, i32 0, i32 10
  %99 = load i32, ptr %98, align 1, !tbaa !20
  %100 = zext i32 %99 to i64
  %101 = getelementptr inbounds i8, ptr %94, i64 %100
  %102 = load ptr, ptr %4, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.ddump_data, ptr %102, i32 0, i32 7
  store ptr %101, ptr %103, align 8, !tbaa !22
  %104 = load ptr, ptr %4, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.ddump_data, ptr %104, i32 0, i32 2
  %106 = load ptr, ptr %105, align 8, !tbaa !18
  %107 = load ptr, ptr %4, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.ddump_data, ptr %107, i32 0, i32 4
  %109 = load ptr, ptr %108, align 8, !tbaa !19
  %110 = getelementptr inbounds %struct.dex_header, ptr %109, i32 0, i32 20
  %111 = load i32, ptr %110, align 1, !tbaa !23
  %112 = zext i32 %111 to i64
  %113 = getelementptr inbounds i8, ptr %106, i64 %112
  %114 = load ptr, ptr %4, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.ddump_data, ptr %114, i32 0, i32 8
  store ptr %113, ptr %115, align 8, !tbaa !24
  %116 = load ptr, ptr %4, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.ddump_data, ptr %116, i32 0, i32 2
  %118 = load ptr, ptr %117, align 8, !tbaa !18
  %119 = load ptr, ptr %4, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.ddump_data, ptr %119, i32 0, i32 4
  %121 = load ptr, ptr %120, align 8, !tbaa !19
  %122 = getelementptr inbounds %struct.dex_header, ptr %121, i32 0, i32 16
  %123 = load i32, ptr %122, align 1, !tbaa !25
  %124 = zext i32 %123 to i64
  %125 = getelementptr inbounds i8, ptr %118, i64 %124
  %126 = load ptr, ptr %4, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.ddump_data, ptr %126, i32 0, i32 9
  store ptr %125, ptr %127, align 8, !tbaa !26
  %128 = load ptr, ptr %4, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.ddump_data, ptr %128, i32 0, i32 2
  %130 = load ptr, ptr %129, align 8, !tbaa !18
  %131 = load ptr, ptr %4, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.ddump_data, ptr %131, i32 0, i32 4
  %133 = load ptr, ptr %132, align 8, !tbaa !19
  %134 = getelementptr inbounds %struct.dex_header, ptr %133, i32 0, i32 18
  %135 = load i32, ptr %134, align 1, !tbaa !27
  %136 = zext i32 %135 to i64
  %137 = getelementptr inbounds i8, ptr %130, i64 %136
  %138 = load ptr, ptr %4, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.ddump_data, ptr %138, i32 0, i32 10
  store ptr %137, ptr %139, align 8, !tbaa !28
  %140 = load ptr, ptr %4, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.ddump_data, ptr %140, i32 0, i32 2
  %142 = load ptr, ptr %141, align 8, !tbaa !18
  %143 = load ptr, ptr %4, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.ddump_data, ptr %143, i32 0, i32 4
  %145 = load ptr, ptr %144, align 8, !tbaa !19
  %146 = getelementptr inbounds %struct.dex_header, ptr %145, i32 0, i32 14
  %147 = load i32, ptr %146, align 1, !tbaa !29
  %148 = zext i32 %147 to i64
  %149 = getelementptr inbounds i8, ptr %142, i64 %148
  %150 = load ptr, ptr %4, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.ddump_data, ptr %150, i32 0, i32 11
  store ptr %149, ptr %151, align 8, !tbaa !30
  call void @llvm.lifetime.end.p0(i64 144, ptr %6) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %5) #6
  ret void
}

declare i32 @open(ptr noundef, i32 noundef, ...) #2

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

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) #4

; Function Attrs: nounwind
declare i32 @fstat(i32 noundef, ptr noundef) #3

; Function Attrs: nounwind
declare ptr @mmap(ptr noundef, i64 noundef, i32 noundef, i32 noundef, i32 noundef, i64 noundef) #3

declare i32 @close(i32 noundef) #2

; Function Attrs: nounwind willreturn memory(read)
declare i32 @memcmp(ptr noundef, ptr noundef, i64 noundef) #5

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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind "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 = { noreturn 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 willreturn memory(read) "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 }
attributes #7 = { noreturn nounwind }
attributes #8 = { nounwind willreturn memory(read) }

!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 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 96}
!12 = !{!"_ZTS10ddump_data", !13, i64 0, !13, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96}
!13 = !{!"long", !7, i64 0}
!14 = !{!15, !13, i64 48}
!15 = !{!"_ZTS4stat", !13, i64 0, !13, i64 8, !13, i64 16, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !13, i64 40, !13, i64 48, !13, i64 56, !13, i64 64, !16, i64 72, !16, i64 88, !16, i64 104, !7, i64 120}
!16 = !{!"_ZTS8timespec", !13, i64 0, !13, i64 8}
!17 = !{!12, !13, i64 8}
!18 = !{!12, !6, i64 16}
!19 = !{!12, !6, i64 32}
!20 = !{!21, !10, i64 60}
!21 = !{!"_ZTS10dex_header", !7, i64 0, !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}
!22 = !{!12, !6, i64 56}
!23 = !{!21, !10, i64 100}
!24 = !{!12, !6, i64 64}
!25 = !{!21, !10, i64 84}
!26 = !{!12, !6, i64 72}
!27 = !{!21, !10, i64 92}
!28 = !{!12, !6, i64 80}
!29 = !{!21, !10, i64 76}
!30 = !{!12, !6, i64 88}


; 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.stat = type { i64, i64, i64, i32, i32, i32, i32, i64, i64, i64, i64, %struct.timespec, %struct.timespec, %struct.timespec, [3 x i64] }
%struct.timespec = type { i64, i64 }

@stderr = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [35 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [51 x i8], align 1
@_ZL21dex_v35_header_string = external hidden local_unnamed_addr global ptr, align 8
@_ZL21dex_v37_header_string = external hidden local_unnamed_addr global ptr, align 8
@_ZL21dex_v38_header_string = external hidden local_unnamed_addr global ptr, align 8
@_ZL21dex_v39_header_string = external hidden local_unnamed_addr global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [24 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 nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: mustprogress uwtable
define dso_local void @_Z13open_dex_filePKcP10ddump_data(ptr noundef %0, ptr nocapture noundef %1) local_unnamed_addr #1 {
  %3 = alloca %struct.stat, align 8
  %4 = tail call i32 (ptr, i32, ...) @open(ptr noundef %0, i32 noundef 2)
  call void @llvm.lifetime.start.p0(i64 144, ptr nonnull %3) #8
  %5 = getelementptr inbounds i8, ptr %1, i64 96
  store ptr %0, ptr %5, align 8, !tbaa !5
  %6 = icmp slt i32 %4, 0
  br i1 %6, label %7, label %10

7:                                                ; preds = %2
  %8 = load ptr, ptr @stderr, align 8, !tbaa !11
  %9 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %8, ptr noundef nonnull @.str, ptr noundef %0) #9
  tail call void @exit(i32 noundef 1) #10
  unreachable

10:                                               ; preds = %2
  %11 = call i32 @fstat(i32 noundef %4, ptr noundef nonnull %3) #8
  %.not = icmp eq i32 %11, 0
  br i1 %.not, label %15, label %12

12:                                               ; preds = %10
  %13 = load ptr, ptr @stderr, align 8, !tbaa !11
  %14 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %13, ptr noundef nonnull @.str.1, ptr noundef %0) #9
  tail call void @exit(i32 noundef 1) #10
  unreachable

15:                                               ; preds = %10
  %16 = getelementptr inbounds i8, ptr %3, i64 48
  %17 = load i64, ptr %16, align 8, !tbaa !12
  %18 = getelementptr inbounds i8, ptr %1, i64 8
  store i64 %17, ptr %18, align 8, !tbaa !16
  %19 = tail call ptr @mmap(ptr noundef null, i64 noundef %17, i32 noundef 3, i32 noundef 1, i32 noundef %4, i64 noundef 0) #8
  %20 = getelementptr inbounds i8, ptr %1, i64 16
  store ptr %19, ptr %20, align 8, !tbaa !17
  %21 = tail call i32 @close(i32 noundef %4)
  %22 = load ptr, ptr %20, align 8, !tbaa !17
  %23 = icmp eq ptr %22, null
  br i1 %23, label %24, label %27

24:                                               ; preds = %15
  %25 = load ptr, ptr @stderr, align 8, !tbaa !11
  %26 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %25, ptr noundef nonnull @.str.2) #9
  tail call void @exit(i32 noundef 1) #10
  unreachable

27:                                               ; preds = %15
  %28 = getelementptr inbounds i8, ptr %1, i64 32
  store ptr %22, ptr %28, align 8, !tbaa !18
  %29 = load ptr, ptr @_ZL21dex_v35_header_string, align 8, !tbaa !11
  %bcmp = tail call i32 @bcmp(ptr noundef nonnull dereferenceable(8) %22, ptr noundef nonnull dereferenceable(8) %29, i64 8)
  %.not34 = icmp eq i32 %bcmp, 0
  br i1 %.not34, label %39, label %30

30:                                               ; preds = %27
  %31 = load ptr, ptr @_ZL21dex_v37_header_string, align 8, !tbaa !11
  %bcmp35 = tail call i32 @bcmp(ptr noundef nonnull dereferenceable(8) %22, ptr noundef nonnull dereferenceable(8) %31, i64 8)
  %.not36 = icmp eq i32 %bcmp35, 0
  br i1 %.not36, label %39, label %32

32:                                               ; preds = %30
  %33 = load ptr, ptr @_ZL21dex_v38_header_string, align 8, !tbaa !11
  %bcmp37 = tail call i32 @bcmp(ptr noundef nonnull dereferenceable(8) %22, ptr noundef nonnull dereferenceable(8) %33, i64 8)
  %.not38 = icmp eq i32 %bcmp37, 0
  br i1 %.not38, label %39, label %34

34:                                               ; preds = %32
  %35 = load ptr, ptr @_ZL21dex_v39_header_string, align 8, !tbaa !11
  %bcmp39 = tail call i32 @bcmp(ptr noundef nonnull dereferenceable(8) %22, ptr noundef nonnull dereferenceable(8) %35, i64 8)
  %.not40 = icmp eq i32 %bcmp39, 0
  br i1 %.not40, label %39, label %36

36:                                               ; preds = %34
  %37 = load ptr, ptr @stderr, align 8, !tbaa !11
  %38 = tail call i32 (ptr, ptr, ...) @fprintf(ptr noundef %37, ptr noundef nonnull @.str.3) #9
  tail call void @exit(i32 noundef 1) #10
  unreachable

39:                                               ; preds = %34, %32, %30, %27
  %40 = getelementptr inbounds i8, ptr %22, i64 60
  %41 = load i32, ptr %40, align 1, !tbaa !19
  %42 = zext i32 %41 to i64
  %43 = getelementptr inbounds i8, ptr %22, i64 %42
  %44 = getelementptr inbounds i8, ptr %1, i64 56
  store ptr %43, ptr %44, align 8, !tbaa !21
  %45 = getelementptr inbounds i8, ptr %22, i64 100
  %46 = load i32, ptr %45, align 1, !tbaa !22
  %47 = zext i32 %46 to i64
  %48 = getelementptr inbounds i8, ptr %22, i64 %47
  %49 = getelementptr inbounds i8, ptr %1, i64 64
  store ptr %48, ptr %49, align 8, !tbaa !23
  %50 = getelementptr inbounds i8, ptr %22, i64 84
  %51 = load i32, ptr %50, align 1, !tbaa !24
  %52 = zext i32 %51 to i64
  %53 = getelementptr inbounds i8, ptr %22, i64 %52
  %54 = getelementptr inbounds i8, ptr %1, i64 72
  store ptr %53, ptr %54, align 8, !tbaa !25
  %55 = getelementptr inbounds i8, ptr %22, i64 92
  %56 = load i32, ptr %55, align 1, !tbaa !26
  %57 = zext i32 %56 to i64
  %58 = getelementptr inbounds i8, ptr %22, i64 %57
  %59 = getelementptr inbounds i8, ptr %1, i64 80
  store ptr %58, ptr %59, align 8, !tbaa !27
  %60 = getelementptr inbounds i8, ptr %22, i64 76
  %61 = load i32, ptr %60, align 1, !tbaa !28
  %62 = zext i32 %61 to i64
  %63 = getelementptr inbounds i8, ptr %22, i64 %62
  %64 = getelementptr inbounds i8, ptr %1, i64 88
  store ptr %63, ptr %64, align 8, !tbaa !29
  call void @llvm.lifetime.end.p0(i64 144, ptr nonnull %3) #8
  ret void
}

; Function Attrs: nofree
declare noundef i32 @open(ptr nocapture noundef readonly, i32 noundef, ...) local_unnamed_addr #2

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

; Function Attrs: noreturn nounwind
declare void @exit(i32 noundef) local_unnamed_addr #4

; Function Attrs: nofree nounwind
declare noundef i32 @fstat(i32 noundef, ptr nocapture noundef) local_unnamed_addr #3

; Function Attrs: nounwind
declare ptr @mmap(ptr noundef, i64 noundef, i32 noundef, i32 noundef, i32 noundef, i64 noundef) local_unnamed_addr #5

declare i32 @close(i32 noundef) local_unnamed_addr #6

; Function Attrs: nofree nounwind willreturn memory(argmem: read)
declare i32 @bcmp(ptr nocapture, ptr nocapture, i64) local_unnamed_addr #7

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 = { nofree "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 = { 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 #4 = { noreturn 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 "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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #7 = { nofree nounwind willreturn memory(argmem: read) }
attributes #8 = { nounwind }
attributes #9 = { cold nounwind }
attributes #10 = { noreturn 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, !10, i64 96}
!6 = !{!"_ZTS10ddump_data", !7, i64 0, !7, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !10, i64 96}
!7 = !{!"long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!10, !10, i64 0}
!12 = !{!13, !7, i64 48}
!13 = !{!"_ZTS4stat", !7, i64 0, !7, i64 8, !7, i64 16, !14, i64 24, !14, i64 28, !14, i64 32, !14, i64 36, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !15, i64 72, !15, i64 88, !15, i64 104, !8, i64 120}
!14 = !{!"int", !8, i64 0}
!15 = !{!"_ZTS8timespec", !7, i64 0, !7, i64 8}
!16 = !{!6, !7, i64 8}
!17 = !{!6, !10, i64 16}
!18 = !{!6, !10, i64 32}
!19 = !{!20, !14, i64 60}
!20 = !{!"_ZTS10dex_header", !8, i64 0, !14, i64 8, !8, i64 12, !14, i64 32, !14, i64 36, !14, i64 40, !14, i64 44, !14, i64 48, !14, i64 52, !14, i64 56, !14, i64 60, !14, i64 64, !14, i64 68, !14, i64 72, !14, i64 76, !14, i64 80, !14, i64 84, !14, i64 88, !14, i64 92, !14, i64 96, !14, i64 100, !14, i64 104, !14, i64 108}
!21 = !{!6, !10, i64 56}
!22 = !{!20, !14, i64 100}
!23 = !{!6, !10, i64 64}
!24 = !{!20, !14, i64 84}
!25 = !{!6, !10, i64 72}
!26 = !{!20, !14, i64 92}
!27 = !{!6, !10, i64 80}
!28 = !{!20, !14, i64 76}
!29 = !{!6, !10, i64 88}


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