; LLVM IR from thalium/icebox :: third_party/virtualbox/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal (PartitionReadBlocksEx)

; 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.PARTITION_PRIVATE_DATA = type { i64, ptr, ptr, %struct._EFI_BLOCK_IO_PROTOCOL, %struct._EFI_BLOCK_IO2_PROTOCOL, %struct.EFI_BLOCK_IO_MEDIA, %struct.EFI_BLOCK_IO_MEDIA, ptr, ptr, ptr, ptr, i64, i64, i32, ptr }
%struct._EFI_BLOCK_IO_PROTOCOL = type { i64, ptr, ptr, ptr, ptr, ptr }
%struct._EFI_BLOCK_IO2_PROTOCOL = type { ptr, ptr, ptr, ptr, ptr }
%struct.EFI_BLOCK_IO_MEDIA = type { i32, i8, i8, i8, i8, i8, i32, i32, i64, i64, i32, i32 }
%struct.EFI_BLOCK_IO2_TOKEN = type { ptr, i64 }
%struct._EFI_DISK_IO2_PROTOCOL = type { i64, ptr, ptr, ptr, ptr }
%struct.PARTITION_ACCESS_TASK = type { %struct.EFI_DISK_IO2_TOKEN, ptr }
%struct.EFI_DISK_IO2_TOKEN = type { ptr, i64 }
%struct.EFI_BOOT_SERVICES = type { %struct.EFI_TABLE_HEADER, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.EFI_TABLE_HEADER = type { i64, i32, i32, i32, i32 }

@gBS = external global ptr, align 8
@.str = external hidden unnamed_addr constant [154 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [21 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

declare zeroext i8 @DebugAssertEnabled() #1

declare void @DebugAssert(ptr noundef, i64 noundef, ptr noundef) #1

declare void @FreePool(ptr noundef) #1

declare i64 @MultU64x32(i64 noundef, i32 noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local i64 @ProbeMediaStatusEx(ptr noundef, i32 noundef, i64 noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local ptr @PartitionCreateAccessTask(ptr noundef) #2

; Function Attrs: nounwind uwtable
define dso_local i64 @PartitionReadBlocksEx(ptr noundef %0, i32 noundef %1, i64 noundef %2, ptr noundef %3, i64 noundef %4, ptr noundef %5) #2 {
  %7 = alloca i64, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = alloca i64, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i64, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i64, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i64, align 8
  %17 = alloca ptr, align 8
  %18 = alloca i32, align 4
  store ptr %0, ptr %8, align 8, !tbaa !5
  store i32 %1, ptr %9, align 4, !tbaa !9
  store i64 %2, ptr %10, align 8, !tbaa !11
  store ptr %3, ptr %11, align 8, !tbaa !5
  store i64 %4, ptr %12, align 8, !tbaa !11
  store ptr %5, ptr %13, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #3
  %19 = call zeroext i8 @DebugAssertEnabled()
  %20 = zext i8 %19 to i32
  %21 = icmp ne i32 %20, 0
  br i1 %21, label %22, label %32

22:                                               ; preds = %6
  %23 = load ptr, ptr %8, align 8, !tbaa !5
  %24 = ptrtoint ptr %23 to i64
  %25 = sub i64 %24, ptrtoint (ptr getelementptr inbounds (%struct.PARTITION_PRIVATE_DATA, ptr null, i32 0, i32 4) to i64)
  %26 = inttoptr i64 %25 to ptr
  %27 = getelementptr inbounds %struct.PARTITION_PRIVATE_DATA, ptr %26, i32 0, i32 0
  %28 = load i64, ptr %27, align 8, !tbaa !13
  %29 = icmp ne i64 %28, 1953653072
  br i1 %29, label %30, label %32

30:                                               ; preds = %22
  call void @DebugAssert(ptr noundef @.str, i64 noundef 947, ptr noundef @.str.1)
  %31 = load ptr, ptr %8, align 8, !tbaa !5
  br label %37

32:                                               ; preds = %22, %6
  %33 = load ptr, ptr %8, align 8, !tbaa !5
  %34 = ptrtoint ptr %33 to i64
  %35 = sub i64 %34, ptrtoint (ptr getelementptr inbounds (%struct.PARTITION_PRIVATE_DATA, ptr null, i32 0, i32 4) to i64)
  %36 = inttoptr i64 %35 to ptr
  br label %37

37:                                               ; preds = %32, %30
  %38 = phi ptr [ %31, %30 ], [ %36, %32 ]
  store ptr %38, ptr %15, align 8, !tbaa !5
  %39 = load i64, ptr %12, align 8, !tbaa !11
  %40 = load ptr, ptr %15, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.PARTITION_PRIVATE_DATA, ptr %40, i32 0, i32 13
  %42 = load i32, ptr %41, align 8, !tbaa !18
  %43 = zext i32 %42 to i64
  %44 = urem i64 %39, %43
  %45 = icmp ne i64 %44, 0
  br i1 %45, label %46, label %52

46:                                               ; preds = %37
  %47 = load ptr, ptr %15, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.PARTITION_PRIVATE_DATA, ptr %47, i32 0, i32 8
  %49 = load ptr, ptr %48, align 8, !tbaa !19
  %50 = load i32, ptr %9, align 4, !tbaa !9
  %51 = call i64 @ProbeMediaStatusEx(ptr noundef %49, i32 noundef %50, i64 noundef -9223372036854775804)
  store i64 %51, ptr %7, align 8
  store i32 1, ptr %18, align 4
  br label %134

52:                                               ; preds = %37
  %53 = load i64, ptr %10, align 8, !tbaa !11
  %54 = load ptr, ptr %15, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.PARTITION_PRIVATE_DATA, ptr %54, i32 0, i32 13
  %56 = load i32, ptr %55, align 8, !tbaa !18
  %57 = call i64 @MultU64x32(i64 noundef %53, i32 noundef %56)
  %58 = load ptr, ptr %15, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.PARTITION_PRIVATE_DATA, ptr %58, i32 0, i32 11
  %60 = load i64, ptr %59, align 8, !tbaa !20
  %61 = add i64 %57, %60
  store i64 %61, ptr %16, align 8, !tbaa !11
  %62 = load i64, ptr %16, align 8, !tbaa !11
  %63 = load i64, ptr %12, align 8, !tbaa !11
  %64 = add i64 %62, %63
  %65 = load ptr, ptr %15, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.PARTITION_PRIVATE_DATA, ptr %65, i32 0, i32 12
  %67 = load i64, ptr %66, align 8, !tbaa !21
  %68 = icmp ugt i64 %64, %67
  br i1 %68, label %69, label %75

69:                                               ; preds = %52
  %70 = load ptr, ptr %15, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.PARTITION_PRIVATE_DATA, ptr %70, i32 0, i32 8
  %72 = load ptr, ptr %71, align 8, !tbaa !19
  %73 = load i32, ptr %9, align 4, !tbaa !9
  %74 = call i64 @ProbeMediaStatusEx(ptr noundef %72, i32 noundef %73, i64 noundef -9223372036854775806)
  store i64 %74, ptr %7, align 8
  store i32 1, ptr %18, align 4
  br label %134

75:                                               ; preds = %52
  %76 = load ptr, ptr %11, align 8, !tbaa !5
  %77 = icmp ne ptr %76, null
  br i1 %77, label %78, label %118

78:                                               ; preds = %75
  %79 = load ptr, ptr %11, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.EFI_BLOCK_IO2_TOKEN, ptr %79, i32 0, i32 0
  %81 = load ptr, ptr %80, align 8, !tbaa !22
  %82 = icmp ne ptr %81, null
  br i1 %82, label %83, label %118

83:                                               ; preds = %78
  %84 = load ptr, ptr %11, align 8, !tbaa !5
  %85 = call ptr @PartitionCreateAccessTask(ptr noundef %84)
  store ptr %85, ptr %17, align 8, !tbaa !5
  %86 = load ptr, ptr %17, align 8, !tbaa !5
  %87 = icmp eq ptr %86, null
  br i1 %87, label %88, label %89

88:                                               ; preds = %83
  store i64 -9223372036854775799, ptr %7, align 8
  store i32 1, ptr %18, align 4
  br label %134

89:                                               ; preds = %83
  %90 = load ptr, ptr %15, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.PARTITION_PRIVATE_DATA, ptr %90, i32 0, i32 8
  %92 = load ptr, ptr %91, align 8, !tbaa !19
  %93 = getelementptr inbounds %struct._EFI_DISK_IO2_PROTOCOL, ptr %92, i32 0, i32 2
  %94 = load ptr, ptr %93, align 8, !tbaa !24
  %95 = load ptr, ptr %15, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.PARTITION_PRIVATE_DATA, ptr %95, i32 0, i32 8
  %97 = load ptr, ptr %96, align 8, !tbaa !19
  %98 = load i32, ptr %9, align 4, !tbaa !9
  %99 = load i64, ptr %16, align 8, !tbaa !11
  %100 = load ptr, ptr %17, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.PARTITION_ACCESS_TASK, ptr %100, i32 0, i32 0
  %102 = load i64, ptr %12, align 8, !tbaa !11
  %103 = load ptr, ptr %13, align 8, !tbaa !5
  %104 = call i64 %94(ptr noundef %97, i32 noundef %98, i64 noundef %99, ptr noundef %101, i64 noundef %102, ptr noundef %103)
  store i64 %104, ptr %14, align 8, !tbaa !11
  %105 = load i64, ptr %14, align 8, !tbaa !11
  %106 = icmp slt i64 %105, 0
  br i1 %106, label %107, label %117

107:                                              ; preds = %89
  %108 = load ptr, ptr @gBS, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %108, i32 0, i32 12
  %110 = load ptr, ptr %109, align 8, !tbaa !26
  %111 = load ptr, ptr %17, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.PARTITION_ACCESS_TASK, ptr %111, i32 0, i32 0
  %113 = getelementptr inbounds %struct.EFI_DISK_IO2_TOKEN, ptr %112, i32 0, i32 0
  %114 = load ptr, ptr %113, align 8, !tbaa !29
  %115 = call i64 %110(ptr noundef %114)
  %116 = load ptr, ptr %17, align 8, !tbaa !5
  call void @FreePool(ptr noundef %116)
  br label %117

117:                                              ; preds = %107, %89
  br label %132

118:                                              ; preds = %78, %75
  %119 = load ptr, ptr %15, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.PARTITION_PRIVATE_DATA, ptr %119, i32 0, i32 8
  %121 = load ptr, ptr %120, align 8, !tbaa !19
  %122 = getelementptr inbounds %struct._EFI_DISK_IO2_PROTOCOL, ptr %121, i32 0, i32 2
  %123 = load ptr, ptr %122, align 8, !tbaa !24
  %124 = load ptr, ptr %15, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.PARTITION_PRIVATE_DATA, ptr %124, i32 0, i32 8
  %126 = load ptr, ptr %125, align 8, !tbaa !19
  %127 = load i32, ptr %9, align 4, !tbaa !9
  %128 = load i64, ptr %16, align 8, !tbaa !11
  %129 = load i64, ptr %12, align 8, !tbaa !11
  %130 = load ptr, ptr %13, align 8, !tbaa !5
  %131 = call i64 %123(ptr noundef %126, i32 noundef %127, i64 noundef %128, ptr noundef null, i64 noundef %129, ptr noundef %130)
  store i64 %131, ptr %14, align 8, !tbaa !11
  br label %132

132:                                              ; preds = %118, %117
  %133 = load i64, ptr %14, align 8, !tbaa !11
  store i64 %133, ptr %7, align 8
  store i32 1, ptr %18, align 4
  br label %134

134:                                              ; preds = %132, %88, %69, %46
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  %135 = load i64, ptr %7, align 8
  ret i64 %135
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "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 = { 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 = { 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/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long long", !7, i64 0}
!13 = !{!14, !12, i64 0}
!14 = !{!"", !12, i64 0, !6, i64 8, !6, i64 16, !15, i64 24, !16, i64 72, !17, i64 112, !17, i64 160, !6, i64 208, !6, i64 216, !6, i64 224, !6, i64 232, !12, i64 240, !12, i64 248, !10, i64 256, !6, i64 264}
!15 = !{!"_EFI_BLOCK_IO_PROTOCOL", !12, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40}
!16 = !{!"_EFI_BLOCK_IO2_PROTOCOL", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32}
!17 = !{!"", !10, i64 0, !7, i64 4, !7, i64 5, !7, i64 6, !7, i64 7, !7, i64 8, !10, i64 12, !10, i64 16, !12, i64 24, !12, i64 32, !10, i64 40, !10, i64 44}
!18 = !{!14, !10, i64 256}
!19 = !{!14, !6, i64 216}
!20 = !{!14, !12, i64 240}
!21 = !{!14, !12, i64 248}
!22 = !{!23, !6, i64 0}
!23 = !{!"", !6, i64 0, !12, i64 8}
!24 = !{!25, !6, i64 16}
!25 = !{!"_EFI_DISK_IO2_PROTOCOL", !12, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32}
!26 = !{!27, !6, i64 112}
!27 = !{!"", !28, i64 0, !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, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184, !6, i64 192, !6, i64 200, !6, i64 208, !6, i64 216, !6, i64 224, !6, i64 232, !6, i64 240, !6, i64 248, !6, i64 256, !6, i64 264, !6, i64 272, !6, i64 280, !6, i64 288, !6, i64 296, !6, i64 304, !6, i64 312, !6, i64 320, !6, i64 328, !6, i64 336, !6, i64 344, !6, i64 352, !6, i64 360, !6, i64 368}
!28 = !{!"", !12, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20}
!29 = !{!30, !6, i64 0}
!30 = !{!"", !23, i64 0, !6, i64 16}


; 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"

@gBS = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [154 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [21 x i8], align 1

declare zeroext i8 @DebugAssertEnabled() local_unnamed_addr #0

declare void @DebugAssert(ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #0

declare void @FreePool(ptr noundef) local_unnamed_addr #0

declare i64 @MultU64x32(i64 noundef, i32 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local i64 @ProbeMediaStatusEx(ptr noundef, i32 noundef, i64 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local ptr @PartitionCreateAccessTask(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local i64 @PartitionReadBlocksEx(ptr noundef %0, i32 noundef %1, i64 noundef %2, ptr noundef %3, i64 noundef %4, ptr noundef %5) local_unnamed_addr #1 {
  %7 = tail call zeroext i8 @DebugAssertEnabled() #2
  %.not = icmp eq i8 %7, 0
  %.pre = ptrtoint ptr %0 to i64
  %.pre44 = add i64 %.pre, -72
  %.pre46 = inttoptr i64 %.pre44 to ptr
  br i1 %.not, label %._crit_edge, label %8

8:                                                ; preds = %6
  %9 = load i64, ptr %.pre46, align 8, !tbaa !5
  %.not40 = icmp eq i64 %9, 1953653072
  br i1 %.not40, label %._crit_edge, label %10

10:                                               ; preds = %8
  tail call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 947, ptr noundef nonnull @.str.1) #2
  br label %._crit_edge

._crit_edge:                                      ; preds = %6, %8, %10
  %11 = phi ptr [ %0, %10 ], [ %.pre46, %8 ], [ %.pre46, %6 ]
  %12 = getelementptr inbounds i8, ptr %11, i64 256
  %13 = load i32, ptr %12, align 8, !tbaa !15
  %14 = zext i32 %13 to i64
  %15 = urem i64 %4, %14
  %.not41 = icmp eq i64 %15, 0
  br i1 %.not41, label %20, label %16

16:                                               ; preds = %._crit_edge
  %17 = getelementptr inbounds i8, ptr %11, i64 216
  %18 = load ptr, ptr %17, align 8, !tbaa !16
  %19 = tail call i64 @ProbeMediaStatusEx(ptr noundef %18, i32 noundef %1, i64 noundef -9223372036854775804)
  br label %58

20:                                               ; preds = %._crit_edge
  %21 = tail call i64 @MultU64x32(i64 noundef %2, i32 noundef %13) #2
  %22 = getelementptr inbounds i8, ptr %11, i64 240
  %23 = load i64, ptr %22, align 8, !tbaa !17
  %24 = add i64 %23, %21
  %25 = add i64 %24, %4
  %26 = getelementptr inbounds i8, ptr %11, i64 248
  %27 = load i64, ptr %26, align 8, !tbaa !18
  %28 = icmp ugt i64 %25, %27
  br i1 %28, label %29, label %33

29:                                               ; preds = %20
  %30 = getelementptr inbounds i8, ptr %11, i64 216
  %31 = load ptr, ptr %30, align 8, !tbaa !16
  %32 = tail call i64 @ProbeMediaStatusEx(ptr noundef %31, i32 noundef %1, i64 noundef -9223372036854775806)
  br label %58

33:                                               ; preds = %20
  %.not42 = icmp eq ptr %3, null
  br i1 %.not42, label %52, label %34

34:                                               ; preds = %33
  %35 = load ptr, ptr %3, align 8, !tbaa !19
  %.not43 = icmp eq ptr %35, null
  br i1 %.not43, label %52, label %36

36:                                               ; preds = %34
  %37 = tail call ptr @PartitionCreateAccessTask(ptr noundef nonnull %3)
  %38 = icmp eq ptr %37, null
  br i1 %38, label %58, label %39

39:                                               ; preds = %36
  %40 = getelementptr inbounds i8, ptr %11, i64 216
  %41 = load ptr, ptr %40, align 8, !tbaa !16
  %42 = getelementptr inbounds i8, ptr %41, i64 16
  %43 = load ptr, ptr %42, align 8, !tbaa !21
  %44 = tail call i64 %43(ptr noundef %41, i32 noundef %1, i64 noundef %24, ptr noundef nonnull %37, i64 noundef %4, ptr noundef %5) #2
  %45 = icmp slt i64 %44, 0
  br i1 %45, label %46, label %58

46:                                               ; preds = %39
  %47 = load ptr, ptr @gBS, align 8, !tbaa !23
  %48 = getelementptr inbounds i8, ptr %47, i64 112
  %49 = load ptr, ptr %48, align 8, !tbaa !24
  %50 = load ptr, ptr %37, align 8, !tbaa !27
  %51 = tail call i64 %49(ptr noundef %50) #2
  tail call void @FreePool(ptr noundef nonnull %37) #2
  br label %58

52:                                               ; preds = %34, %33
  %53 = getelementptr inbounds i8, ptr %11, i64 216
  %54 = load ptr, ptr %53, align 8, !tbaa !16
  %55 = getelementptr inbounds i8, ptr %54, i64 16
  %56 = load ptr, ptr %55, align 8, !tbaa !21
  %57 = tail call i64 %56(ptr noundef %54, i32 noundef %1, i64 noundef %24, ptr noundef null, i64 noundef %4, ptr noundef %5) #2
  br label %58

58:                                               ; preds = %52, %46, %39, %36, %29, %16
  %.0 = phi i64 [ %19, %16 ], [ %32, %29 ], [ -9223372036854775799, %36 ], [ %44, %46 ], [ %44, %39 ], [ %57, %52 ]
  ret i64 %.0
}

attributes #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 = { 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 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"", !7, i64 0, !10, i64 8, !10, i64 16, !11, i64 24, !12, i64 72, !13, i64 112, !13, i64 160, !10, i64 208, !10, i64 216, !10, i64 224, !10, i64 232, !7, i64 240, !7, i64 248, !14, i64 256, !10, i64 264}
!7 = !{!"long long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"_EFI_BLOCK_IO_PROTOCOL", !7, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40}
!12 = !{!"_EFI_BLOCK_IO2_PROTOCOL", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32}
!13 = !{!"", !14, i64 0, !8, i64 4, !8, i64 5, !8, i64 6, !8, i64 7, !8, i64 8, !14, i64 12, !14, i64 16, !7, i64 24, !7, i64 32, !14, i64 40, !14, i64 44}
!14 = !{!"int", !8, i64 0}
!15 = !{!6, !14, i64 256}
!16 = !{!6, !10, i64 216}
!17 = !{!6, !7, i64 240}
!18 = !{!6, !7, i64 248}
!19 = !{!20, !10, i64 0}
!20 = !{!"", !10, i64 0, !7, i64 8}
!21 = !{!22, !10, i64 16}
!22 = !{!"_EFI_DISK_IO2_PROTOCOL", !7, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32}
!23 = !{!10, !10, i64 0}
!24 = !{!25, !10, i64 112}
!25 = !{!"", !26, i64 0, !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, !10, i64 104, !10, i64 112, !10, i64 120, !10, i64 128, !10, i64 136, !10, i64 144, !10, i64 152, !10, i64 160, !10, i64 168, !10, i64 176, !10, i64 184, !10, i64 192, !10, i64 200, !10, i64 208, !10, i64 216, !10, i64 224, !10, i64 232, !10, i64 240, !10, i64 248, !10, i64 256, !10, i64 264, !10, i64 272, !10, i64 280, !10, i64 288, !10, i64 296, !10, i64 304, !10, i64 312, !10, i64 320, !10, i64 328, !10, i64 336, !10, i64 344, !10, i64 352, !10, i64 360, !10, i64 368}
!26 = !{!"", !7, i64 0, !14, i64 8, !14, i64 12, !14, i64 16, !14, i64 20}
!27 = !{!28, !10, i64 0}
!28 = !{!"", !20, i64 0, !10, i64 16}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass