; LLVM IR from thalium/icebox :: third_party/virtualbox/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Bus/Ufs (UfsExecNopCmds)

; 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._UFS_PASS_THRU_PRIVATE_DATA = type { i32, ptr, %struct.EFI_EXT_SCSI_PASS_THRU_MODE, %struct._EFI_EXT_SCSI_PASS_THRU_PROTOCOL, ptr, i64, i32, i8, ptr, i8, ptr, ptr, i8, ptr, %struct.UFS_EXPOSED_LUNS }
%struct.EFI_EXT_SCSI_PASS_THRU_MODE = type { i32, i32, i32 }
%struct._EFI_EXT_SCSI_PASS_THRU_PROTOCOL = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.UFS_EXPOSED_LUNS = type { [12 x i8], i16 }
%struct.UTP_TRD = type { i32, i32, i32, i32, i32, i32, i16, i16, i16, i16 }
%struct.UTP_NOP_IN_UPIU = type { i8, i8, i8, i8, [2 x i8], i8, i8, i8, i8, i16, [20 x i8] }
%struct._EDKII_UFS_HOST_CONTROLLER_PROTOCOL = type { ptr, ptr, ptr, ptr, ptr, ptr }

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

; Function Attrs: nounwind uwtable
declare dso_local i64 @UfsWaitMemSet(i64 noundef, i32 noundef, i32 noundef, i64 noundef) #0

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

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

declare zeroext i8 @DebugAssertEnabled() #2

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

; Function Attrs: nounwind uwtable
declare dso_local i64 @UfsCreateNopCommandDesc(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local i64 @UfsFindAvailableSlotInTrl(ptr noundef, ptr noundef) #0

; Function Attrs: nounwind uwtable
declare dso_local void @UfsStartExecCmd(ptr noundef, i8 noundef zeroext) #0

; Function Attrs: nounwind uwtable
declare dso_local void @UfsStopExecCmd(ptr noundef, i8 noundef zeroext) #0

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

; Function Attrs: nounwind uwtable
define dso_local i64 @UfsExecNopCmds(ptr noundef %0) #0 {
  %2 = alloca i64, align 8
  %3 = alloca ptr, align 8
  %4 = alloca i64, align 8
  %5 = alloca i8, align 1
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i64, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #3
  call void @llvm.lifetime.start.p0(i64 1, ptr %5) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  %14 = load ptr, ptr %3, align 8, !tbaa !5
  %15 = call i64 @UfsFindAvailableSlotInTrl(ptr noundef %14, ptr noundef %5)
  store i64 %15, ptr %4, align 8, !tbaa !9
  %16 = load i64, ptr %4, align 8, !tbaa !9
  %17 = icmp slt i64 %16, 0
  br i1 %17, label %18, label %20

18:                                               ; preds = %1
  %19 = load i64, ptr %4, align 8, !tbaa !9
  store i64 %19, ptr %2, align 8
  store i32 1, ptr %13, align 4
  br label %128

20:                                               ; preds = %1
  %21 = load ptr, ptr %3, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct._UFS_PASS_THRU_PRIVATE_DATA, ptr %21, i32 0, i32 8
  %23 = load ptr, ptr %22, align 8, !tbaa !11
  %24 = load i8, ptr %5, align 1, !tbaa !18
  %25 = zext i8 %24 to i32
  %26 = sext i32 %25 to i64
  %27 = getelementptr inbounds %struct.UTP_TRD, ptr %23, i64 %26
  store ptr %27, ptr %6, align 8, !tbaa !5
  %28 = load ptr, ptr %3, align 8, !tbaa !5
  %29 = load ptr, ptr %6, align 8, !tbaa !5
  %30 = call i64 @UfsCreateNopCommandDesc(ptr noundef %28, ptr noundef %29, ptr noundef %10, ptr noundef %11)
  store i64 %30, ptr %4, align 8, !tbaa !9
  %31 = load i64, ptr %4, align 8, !tbaa !9
  %32 = icmp slt i64 %31, 0
  br i1 %32, label %33, label %35

33:                                               ; preds = %20
  %34 = load i64, ptr %4, align 8, !tbaa !9
  store i64 %34, ptr %2, align 8
  store i32 1, ptr %13, align 4
  br label %128

35:                                               ; preds = %20
  %36 = load ptr, ptr %3, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct._UFS_PASS_THRU_PRIVATE_DATA, ptr %36, i32 0, i32 4
  %38 = load ptr, ptr %37, align 8, !tbaa !19
  store ptr %38, ptr %12, align 8, !tbaa !5
  %39 = load ptr, ptr %10, align 8, !tbaa !5
  %40 = load ptr, ptr %6, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.UTP_TRD, ptr %40, i32 0, i32 7
  %42 = load i16, ptr %41, align 1, !tbaa !20
  %43 = zext i16 %42 to i64
  %44 = mul i64 %43, 4
  %45 = getelementptr inbounds i8, ptr %39, i64 %44
  store ptr %45, ptr %7, align 8, !tbaa !5
  br label %46

46:                                               ; preds = %35
  %47 = call zeroext i8 @DebugAssertEnabled()
  %48 = icmp ne i8 %47, 0
  br i1 %48, label %49, label %54

49:                                               ; preds = %46
  %50 = load ptr, ptr %7, align 8, !tbaa !5
  %51 = icmp ne ptr %50, null
  br i1 %51, label %53, label %52

52:                                               ; preds = %49
  call void @DebugAssert(ptr noundef @.str.10, i64 noundef 1264, ptr noundef @.str.35)
  br label %53

53:                                               ; preds = %52, %49
  br label %54

54:                                               ; preds = %53, %46
  br label %55

55:                                               ; preds = %54
  br label %56

56:                                               ; preds = %55
  %57 = load ptr, ptr %6, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.UTP_TRD, ptr %57, i32 0, i32 7
  %59 = load i16, ptr %58, align 1, !tbaa !20
  %60 = zext i16 %59 to i64
  %61 = mul i64 %60, 4
  %62 = load ptr, ptr %6, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.UTP_TRD, ptr %62, i32 0, i32 6
  %64 = load i16, ptr %63, align 1, !tbaa !22
  %65 = zext i16 %64 to i64
  %66 = mul i64 %65, 4
  %67 = add i64 %61, %66
  %68 = trunc i64 %67 to i32
  store i32 %68, ptr %8, align 4, !tbaa !23
  %69 = load ptr, ptr %3, align 8, !tbaa !5
  %70 = load i8, ptr %5, align 1, !tbaa !18
  call void @UfsStartExecCmd(ptr noundef %69, i8 noundef zeroext %70)
  %71 = load ptr, ptr %3, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct._UFS_PASS_THRU_PRIVATE_DATA, ptr %71, i32 0, i32 5
  %73 = load i64, ptr %72, align 8, !tbaa !24
  %74 = add i64 %73, 88
  store i64 %74, ptr %9, align 8, !tbaa !9
  %75 = load i64, ptr %9, align 8, !tbaa !9
  %76 = call i64 @MultU64x32(i64 noundef 3, i32 noundef 10000000)
  %77 = call i64 @UfsWaitMemSet(i64 noundef %75, i32 noundef 1, i32 noundef 0, i64 noundef %76)
  store i64 %77, ptr %4, align 8, !tbaa !9
  %78 = load i64, ptr %4, align 8, !tbaa !9
  %79 = icmp slt i64 %78, 0
  br i1 %79, label %80, label %81

80:                                               ; preds = %56
  br label %90

81:                                               ; preds = %56
  %82 = load ptr, ptr %7, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.UTP_NOP_IN_UPIU, ptr %82, i32 0, i32 5
  %84 = load i8, ptr %83, align 1, !tbaa !25
  %85 = zext i8 %84 to i32
  %86 = icmp ne i32 %85, 0
  br i1 %86, label %87, label %88

87:                                               ; preds = %81
  store i64 -9223372036854775801, ptr %4, align 8, !tbaa !9
  br label %89

88:                                               ; preds = %81
  store i64 0, ptr %4, align 8, !tbaa !9
  br label %89

89:                                               ; preds = %88, %87
  br label %90

90:                                               ; preds = %89, %80
  %91 = load ptr, ptr %12, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct._EDKII_UFS_HOST_CONTROLLER_PROTOCOL, ptr %91, i32 0, i32 5
  %93 = load ptr, ptr %92, align 8, !tbaa !27
  %94 = load ptr, ptr %12, align 8, !tbaa !5
  %95 = call i64 %93(ptr noundef %94)
  %96 = load ptr, ptr %3, align 8, !tbaa !5
  %97 = load i8, ptr %5, align 1, !tbaa !18
  call void @UfsStopExecCmd(ptr noundef %96, i8 noundef zeroext %97)
  %98 = load ptr, ptr %11, align 8, !tbaa !5
  %99 = icmp ne ptr %98, null
  br i1 %99, label %100, label %107

100:                                              ; preds = %90
  %101 = load ptr, ptr %12, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct._EDKII_UFS_HOST_CONTROLLER_PROTOCOL, ptr %101, i32 0, i32 4
  %103 = load ptr, ptr %102, align 8, !tbaa !29
  %104 = load ptr, ptr %12, align 8, !tbaa !5
  %105 = load ptr, ptr %11, align 8, !tbaa !5
  %106 = call i64 %103(ptr noundef %104, ptr noundef %105)
  br label %107

107:                                              ; preds = %100, %90
  %108 = load ptr, ptr %10, align 8, !tbaa !5
  %109 = icmp ne ptr %108, null
  br i1 %109, label %110, label %126

110:                                              ; preds = %107
  %111 = load ptr, ptr %12, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct._EDKII_UFS_HOST_CONTROLLER_PROTOCOL, ptr %111, i32 0, i32 2
  %113 = load ptr, ptr %112, align 8, !tbaa !30
  %114 = load ptr, ptr %12, align 8, !tbaa !5
  %115 = load i32, ptr %8, align 4, !tbaa !23
  %116 = lshr i32 %115, 12
  %117 = load i32, ptr %8, align 4, !tbaa !23
  %118 = and i32 %117, 4095
  %119 = icmp ne i32 %118, 0
  %120 = zext i1 %119 to i64
  %121 = select i1 %119, i32 1, i32 0
  %122 = add i32 %116, %121
  %123 = zext i32 %122 to i64
  %124 = load ptr, ptr %10, align 8, !tbaa !5
  %125 = call i64 %113(ptr noundef %114, i64 noundef %123, ptr noundef %124)
  br label %126

126:                                              ; preds = %110, %107
  %127 = load i64, ptr %4, align 8, !tbaa !9
  store i64 %127, ptr %2, align 8
  store i32 1, ptr %13, align 4
  br label %128

128:                                              ; preds = %126, %33, %18
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #3
  %129 = load i64, ptr %2, align 8
  ret i64 %129
}

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 }

!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 = !{!"long long", !7, i64 0}
!11 = !{!12, !6, i64 120}
!12 = !{!"_UFS_PASS_THRU_PRIVATE_DATA", !13, i64 0, !6, i64 8, !14, i64 16, !15, i64 32, !6, i64 96, !10, i64 104, !13, i64 112, !7, i64 116, !6, i64 120, !7, i64 128, !6, i64 136, !6, i64 144, !7, i64 152, !6, i64 160, !16, i64 168}
!13 = !{!"int", !7, i64 0}
!14 = !{!"", !13, i64 0, !13, i64 4, !13, i64 8}
!15 = !{!"_EFI_EXT_SCSI_PASS_THRU_PROTOCOL", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56}
!16 = !{!"", !7, i64 0, !17, i64 12, !17, i64 13}
!17 = !{!"short", !7, i64 0}
!18 = !{!7, !7, i64 0}
!19 = !{!12, !6, i64 96}
!20 = !{!21, !17, i64 26}
!21 = !{!"", !13, i64 0, !13, i64 3, !13, i64 3, !13, i64 3, !13, i64 3, !13, i64 4, !13, i64 8, !13, i64 9, !13, i64 12, !13, i64 16, !13, i64 16, !13, i64 20, !17, i64 24, !17, i64 26, !17, i64 28, !17, i64 30}
!22 = !{!21, !17, i64 24}
!23 = !{!13, !13, i64 0}
!24 = !{!12, !10, i64 104}
!25 = !{!26, !7, i64 6}
!26 = !{!"", !7, i64 0, !7, i64 0, !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !7, i64 4, !7, i64 6, !7, i64 7, !7, i64 8, !7, i64 9, !17, i64 10, !7, i64 12}
!27 = !{!28, !6, i64 40}
!28 = !{!"_EDKII_UFS_HOST_CONTROLLER_PROTOCOL", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40}
!29 = !{!28, !6, i64 32}
!30 = !{!28, !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"

%struct.UTP_TRD = type { i32, i32, i32, i32, i32, i32, i16, i16, i16, i16 }

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

; Function Attrs: nounwind uwtable
declare dso_local i64 @UfsWaitMemSet(i64 noundef, i32 noundef, i32 noundef, i64 noundef) local_unnamed_addr #0

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

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

declare zeroext i8 @DebugAssertEnabled() local_unnamed_addr #2

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

; Function Attrs: nounwind uwtable
declare dso_local i64 @UfsCreateNopCommandDesc(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local i64 @UfsFindAvailableSlotInTrl(ptr noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local void @UfsStartExecCmd(ptr noundef, i8 noundef zeroext) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local void @UfsStopExecCmd(ptr noundef, i8 noundef zeroext) local_unnamed_addr #0

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

; Function Attrs: nounwind uwtable
define dso_local range(i64 -9223372036854775808, 1) i64 @UfsExecNopCmds(ptr noundef %0) local_unnamed_addr #0 {
  %2 = alloca i8, align 1
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %2) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #3
  %5 = call i64 @UfsFindAvailableSlotInTrl(ptr noundef %0, ptr noundef nonnull %2)
  %6 = icmp slt i64 %5, 0
  br i1 %6, label %66, label %7

7:                                                ; preds = %1
  %8 = getelementptr inbounds i8, ptr %0, i64 120
  %9 = load ptr, ptr %8, align 8, !tbaa !5
  %10 = load i8, ptr %2, align 1, !tbaa !16
  %11 = zext i8 %10 to i64
  %12 = getelementptr inbounds %struct.UTP_TRD, ptr %9, i64 %11
  %13 = call i64 @UfsCreateNopCommandDesc(ptr noundef %0, ptr noundef %12, ptr noundef nonnull %3, ptr noundef nonnull %4)
  %14 = icmp slt i64 %13, 0
  br i1 %14, label %66, label %15

15:                                               ; preds = %7
  %16 = getelementptr inbounds i8, ptr %0, i64 96
  %17 = load ptr, ptr %16, align 8, !tbaa !17
  %18 = load ptr, ptr %3, align 8, !tbaa !18
  %19 = getelementptr inbounds i8, ptr %12, i64 26
  %20 = load i16, ptr %19, align 1, !tbaa !19
  %21 = zext i16 %20 to i64
  %22 = shl nuw nsw i64 %21, 2
  %23 = getelementptr inbounds i8, ptr %18, i64 %22
  %24 = call zeroext i8 @DebugAssertEnabled() #3
  %25 = icmp eq i8 %24, 0
  %26 = icmp ne ptr %18, null
  %or.cond = select i1 %25, i1 true, i1 %26
  br i1 %or.cond, label %28, label %27

27:                                               ; preds = %15
  call void @DebugAssert(ptr noundef nonnull @.str.10, i64 noundef 1264, ptr noundef nonnull @.str.35) #3
  br label %28

28:                                               ; preds = %27, %15
  %29 = load i16, ptr %19, align 1, !tbaa !19
  %30 = zext i16 %29 to i32
  %31 = getelementptr inbounds i8, ptr %12, i64 24
  %32 = load i16, ptr %31, align 1, !tbaa !21
  %33 = zext i16 %32 to i32
  %34 = add nuw nsw i32 %33, %30
  %35 = load i8, ptr %2, align 1, !tbaa !16
  call void @UfsStartExecCmd(ptr noundef nonnull %0, i8 noundef zeroext %35)
  %36 = getelementptr inbounds i8, ptr %0, i64 104
  %37 = load i64, ptr %36, align 8, !tbaa !22
  %38 = add i64 %37, 88
  %39 = call i64 @MultU64x32(i64 noundef 3, i32 noundef 10000000) #3
  %40 = call i64 @UfsWaitMemSet(i64 noundef %38, i32 noundef 1, i32 noundef 0, i64 noundef %39)
  %41 = icmp slt i64 %40, 0
  br i1 %41, label %45, label %42

42:                                               ; preds = %28
  %43 = getelementptr inbounds i8, ptr %23, i64 6
  %44 = load i8, ptr %43, align 1, !tbaa !23
  %.not = icmp eq i8 %44, 0
  %. = select i1 %.not, i64 0, i64 -9223372036854775801
  br label %45

45:                                               ; preds = %42, %28
  %.029 = phi i64 [ %40, %28 ], [ %., %42 ]
  %46 = getelementptr inbounds i8, ptr %17, i64 40
  %47 = load ptr, ptr %46, align 8, !tbaa !25
  %48 = call i64 %47(ptr noundef %17) #3
  %49 = load i8, ptr %2, align 1, !tbaa !16
  call void @UfsStopExecCmd(ptr noundef nonnull %0, i8 noundef zeroext %49)
  %50 = load ptr, ptr %4, align 8, !tbaa !18
  %.not35 = icmp eq ptr %50, null
  br i1 %.not35, label %55, label %51

51:                                               ; preds = %45
  %52 = getelementptr inbounds i8, ptr %17, i64 32
  %53 = load ptr, ptr %52, align 8, !tbaa !27
  %54 = call i64 %53(ptr noundef nonnull %17, ptr noundef nonnull %50) #3
  br label %55

55:                                               ; preds = %51, %45
  %56 = load ptr, ptr %3, align 8, !tbaa !18
  %.not36 = icmp eq ptr %56, null
  br i1 %.not36, label %66, label %57

57:                                               ; preds = %55
  %58 = getelementptr inbounds i8, ptr %17, i64 16
  %59 = load ptr, ptr %58, align 8, !tbaa !28
  %60 = lshr i32 %34, 10
  %61 = and i32 %34, 1023
  %.not37 = icmp ne i32 %61, 0
  %62 = zext i1 %.not37 to i32
  %63 = add nuw nsw i32 %60, %62
  %64 = zext nneg i32 %63 to i64
  %65 = call i64 %59(ptr noundef nonnull %17, i64 noundef %64, ptr noundef nonnull %56) #3
  br label %66

66:                                               ; preds = %55, %57, %7, %1
  %.0 = phi i64 [ %5, %1 ], [ %13, %7 ], [ %.029, %57 ], [ %.029, %55 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %2) #3
  ret i64 %.0
}

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 }

!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 120}
!6 = !{!"_UFS_PASS_THRU_PRIVATE_DATA", !7, i64 0, !10, i64 8, !11, i64 16, !12, i64 32, !10, i64 96, !13, i64 104, !7, i64 112, !8, i64 116, !10, i64 120, !8, i64 128, !10, i64 136, !10, i64 144, !8, i64 152, !10, i64 160, !14, i64 168}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"", !7, i64 0, !7, i64 4, !7, i64 8}
!12 = !{!"_EFI_EXT_SCSI_PASS_THRU_PROTOCOL", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56}
!13 = !{!"long long", !8, i64 0}
!14 = !{!"", !8, i64 0, !15, i64 12, !15, i64 13}
!15 = !{!"short", !8, i64 0}
!16 = !{!8, !8, i64 0}
!17 = !{!6, !10, i64 96}
!18 = !{!10, !10, i64 0}
!19 = !{!20, !15, i64 26}
!20 = !{!"", !7, i64 0, !7, i64 3, !7, i64 3, !7, i64 3, !7, i64 3, !7, i64 4, !7, i64 8, !7, i64 9, !7, i64 12, !7, i64 16, !7, i64 16, !7, i64 20, !15, i64 24, !15, i64 26, !15, i64 28, !15, i64 30}
!21 = !{!20, !15, i64 24}
!22 = !{!6, !13, i64 104}
!23 = !{!24, !8, i64 6}
!24 = !{!"", !8, i64 0, !8, i64 0, !8, i64 0, !8, i64 1, !8, i64 2, !8, i64 3, !8, i64 4, !8, i64 6, !8, i64 7, !8, i64 8, !8, i64 9, !15, i64 10, !8, i64 12}
!25 = !{!26, !10, i64 40}
!26 = !{!"_EDKII_UFS_HOST_CONTROLLER_PROTOCOL", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40}
!27 = !{!26, !10, i64 32}
!28 = !{!26, !10, i64 16}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,ReassociatePass,SROAPass,SimplifyCFGPass