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

; 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.EFI_EXT_SCSI_PASS_THRU_SCSI_REQUEST_PACKET = type { i64, ptr, ptr, ptr, ptr, i32, i32, i8, i8, i8, i8, i8 }
%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 }

@.str.10 = external hidden unnamed_addr constant [154 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [79 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

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

; 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

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

declare i64 @RShiftU64(i64 noundef, i64 noundef) #1

; Function Attrs: nounwind uwtable
define dso_local i64 @UfsCreateScsiCommandDesc(ptr noundef %0, i8 noundef zeroext %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5) #2 {
  %7 = alloca i64, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i8, align 1
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i64, align 8
  %15 = alloca i64, align 8
  %16 = alloca ptr, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca i32, align 4
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  store ptr %0, ptr %8, align 8, !tbaa !5
  store i8 %1, ptr %9, align 1, !tbaa !9
  store ptr %2, ptr %10, align 8, !tbaa !5
  store ptr %3, ptr %11, align 8, !tbaa !5
  store ptr %4, ptr %12, align 8, !tbaa !5
  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
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %20) #3
  br label %22

22:                                               ; preds = %6
  %23 = call zeroext i8 @DebugAssertEnabled()
  %24 = icmp ne i8 %23, 0
  br i1 %24, label %25, label %36

25:                                               ; preds = %22
  %26 = load ptr, ptr %8, align 8, !tbaa !5
  %27 = icmp ne ptr %26, null
  br i1 %27, label %28, label %34

28:                                               ; preds = %25
  %29 = load ptr, ptr %10, align 8, !tbaa !5
  %30 = icmp ne ptr %29, null
  br i1 %30, label %31, label %34

31:                                               ; preds = %28
  %32 = load ptr, ptr %11, align 8, !tbaa !5
  %33 = icmp ne ptr %32, null
  br i1 %33, label %35, label %34

34:                                               ; preds = %31, %28, %25
  call void @DebugAssert(ptr noundef @.str.10, i64 noundef 445, ptr noundef @.str.28)
  br label %35

35:                                               ; preds = %34, %31
  br label %36

36:                                               ; preds = %35, %22
  br label %37

37:                                               ; preds = %36
  br label %38

38:                                               ; preds = %37
  %39 = load ptr, ptr %10, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.EFI_EXT_SCSI_PASS_THRU_SCSI_REQUEST_PACKET, ptr %39, i32 0, i32 8
  %41 = load i8, ptr %40, align 1, !tbaa !10
  %42 = zext i8 %41 to i32
  %43 = icmp eq i32 %42, 0
  br i1 %43, label %44, label %48

44:                                               ; preds = %38
  %45 = load ptr, ptr %10, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct.EFI_EXT_SCSI_PASS_THRU_SCSI_REQUEST_PACKET, ptr %45, i32 0, i32 5
  %47 = load i32, ptr %46, align 8, !tbaa !14
  store i32 %47, ptr %19, align 4, !tbaa !15
  store i32 2, ptr %20, align 4, !tbaa !15
  br label %52

48:                                               ; preds = %38
  %49 = load ptr, ptr %10, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.EFI_EXT_SCSI_PASS_THRU_SCSI_REQUEST_PACKET, ptr %49, i32 0, i32 6
  %51 = load i32, ptr %50, align 4, !tbaa !16
  store i32 %51, ptr %19, align 4, !tbaa !15
  store i32 1, ptr %20, align 4, !tbaa !15
  br label %52

52:                                               ; preds = %48, %44
  %53 = load i32, ptr %19, align 4, !tbaa !15
  %54 = icmp eq i32 %53, 0
  br i1 %54, label %55, label %56

55:                                               ; preds = %52
  store i32 0, ptr %20, align 4, !tbaa !15
  br label %56

56:                                               ; preds = %55, %52
  %57 = load i32, ptr %19, align 4, !tbaa !15
  %58 = zext i32 %57 to i64
  %59 = add i64 %58, 262144
  %60 = sub i64 %59, 1
  %61 = call i64 @DivU64x32(i64 noundef %60, i32 noundef 262144)
  store i64 %61, ptr %15, align 8, !tbaa !17
  %62 = load i64, ptr %15, align 8, !tbaa !17
  %63 = mul i64 %62, 16
  %64 = add i64 88, %63
  store i64 %64, ptr %14, align 8, !tbaa !17
  %65 = load ptr, ptr %8, align 8, !tbaa !5
  %66 = load i64, ptr %14, align 8, !tbaa !17
  %67 = load ptr, ptr %12, align 8, !tbaa !5
  %68 = load ptr, ptr %13, align 8, !tbaa !5
  %69 = call i64 @UfsAllocateAlignCommonBuffer(ptr noundef %65, i64 noundef %66, ptr noundef %67, ptr noundef %17, ptr noundef %68)
  store i64 %69, ptr %18, align 8, !tbaa !17
  %70 = load i64, ptr %18, align 8, !tbaa !17
  %71 = icmp slt i64 %70, 0
  br i1 %71, label %72, label %74

72:                                               ; preds = %56
  %73 = load i64, ptr %18, align 8, !tbaa !17
  store i64 %73, ptr %7, align 8
  store i32 1, ptr %21, align 4
  br label %138

74:                                               ; preds = %56
  %75 = load ptr, ptr %12, align 8, !tbaa !5
  %76 = load ptr, ptr %75, align 8, !tbaa !5
  store ptr %76, ptr %16, align 8, !tbaa !5
  %77 = load ptr, ptr %16, align 8, !tbaa !5
  %78 = load i8, ptr %9, align 1, !tbaa !9
  %79 = load ptr, ptr %8, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct._UFS_PASS_THRU_PRIVATE_DATA, ptr %79, i32 0, i32 7
  %81 = load i8, ptr %80, align 4, !tbaa !18
  %82 = add i8 %81, 1
  store i8 %82, ptr %80, align 4, !tbaa !18
  %83 = load ptr, ptr %10, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.EFI_EXT_SCSI_PASS_THRU_SCSI_REQUEST_PACKET, ptr %83, i32 0, i32 4
  %85 = load ptr, ptr %84, align 8, !tbaa !24
  %86 = load ptr, ptr %10, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.EFI_EXT_SCSI_PASS_THRU_SCSI_REQUEST_PACKET, ptr %86, i32 0, i32 7
  %88 = load i8, ptr %87, align 8, !tbaa !25
  %89 = load i32, ptr %20, align 4, !tbaa !15
  %90 = load i32, ptr %19, align 4, !tbaa !15
  %91 = call i64 @UfsInitCommandUpiu(ptr noundef %77, i8 noundef zeroext %78, i8 noundef zeroext %81, ptr noundef %85, i8 noundef zeroext %88, i32 noundef %89, i32 noundef %90)
  %92 = load ptr, ptr %11, align 8, !tbaa !5
  %93 = load i32, ptr %92, align 1
  %94 = and i32 %93, -16777217
  %95 = or i32 %94, 16777216
  store i32 %95, ptr %92, align 1
  %96 = load i32, ptr %20, align 4, !tbaa !15
  %97 = load ptr, ptr %11, align 8, !tbaa !5
  %98 = load i32, ptr %97, align 1
  %99 = and i32 %96, 3
  %100 = shl i32 %99, 25
  %101 = and i32 %98, -100663297
  %102 = or i32 %101, %100
  store i32 %102, ptr %97, align 1
  %103 = load ptr, ptr %11, align 8, !tbaa !5
  %104 = load i32, ptr %103, align 1
  %105 = and i32 %104, 268435455
  %106 = or i32 %105, 268435456
  store i32 %106, ptr %103, align 1
  %107 = load i64, ptr %17, align 8, !tbaa !17
  %108 = call i64 @RShiftU64(i64 noundef %107, i64 noundef 7)
  %109 = trunc i64 %108 to i32
  %110 = load ptr, ptr %11, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.UTP_TRD, ptr %110, i32 0, i32 4
  %112 = load i32, ptr %111, align 1
  %113 = and i32 %109, 33554431
  %114 = shl i32 %113, 7
  %115 = and i32 %112, 127
  %116 = or i32 %115, %114
  store i32 %116, ptr %111, align 1
  %117 = load i64, ptr %17, align 8, !tbaa !17
  %118 = call i64 @RShiftU64(i64 noundef %117, i64 noundef 32)
  %119 = trunc i64 %118 to i32
  %120 = load ptr, ptr %11, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.UTP_TRD, ptr %120, i32 0, i32 5
  store i32 %119, ptr %121, align 1, !tbaa !26
  %122 = call i64 @DivU64x32(i64 noundef 56, i32 noundef 4)
  %123 = trunc i64 %122 to i16
  %124 = load ptr, ptr %11, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.UTP_TRD, ptr %124, i32 0, i32 6
  store i16 %123, ptr %125, align 1, !tbaa !28
  %126 = call i64 @DivU64x32(i64 noundef 32, i32 noundef 4)
  %127 = trunc i64 %126 to i16
  %128 = load ptr, ptr %11, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.UTP_TRD, ptr %128, i32 0, i32 7
  store i16 %127, ptr %129, align 1, !tbaa !29
  %130 = load i64, ptr %15, align 8, !tbaa !17
  %131 = trunc i64 %130 to i16
  %132 = load ptr, ptr %11, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.UTP_TRD, ptr %132, i32 0, i32 8
  store i16 %131, ptr %133, align 1, !tbaa !30
  %134 = call i64 @DivU64x32(i64 noundef 88, i32 noundef 4)
  %135 = trunc i64 %134 to i16
  %136 = load ptr, ptr %11, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.UTP_TRD, ptr %136, i32 0, i32 9
  store i16 %135, ptr %137, align 1, !tbaa !31
  store i64 0, ptr %7, align 8
  store i32 1, ptr %21, align 4
  br label %138

138:                                              ; preds = %74, %72
  call void @llvm.lifetime.end.p0(i64 4, ptr %20) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #3
  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
  %139 = load i64, ptr %7, align 8
  ret i64 %139
}

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

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 = !{!7, !7, i64 0}
!10 = !{!11, !7, i64 49}
!11 = !{!"", !12, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !13, i64 40, !13, i64 44, !7, i64 48, !7, i64 49, !7, i64 50, !7, i64 51, !7, i64 52}
!12 = !{!"long long", !7, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = !{!11, !13, i64 40}
!15 = !{!13, !13, i64 0}
!16 = !{!11, !13, i64 44}
!17 = !{!12, !12, i64 0}
!18 = !{!19, !7, i64 116}
!19 = !{!"_UFS_PASS_THRU_PRIVATE_DATA", !13, i64 0, !6, i64 8, !20, i64 16, !21, i64 32, !6, i64 96, !12, 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, !22, i64 168}
!20 = !{!"", !13, i64 0, !13, i64 4, !13, i64 8}
!21 = !{!"_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}
!22 = !{!"", !7, i64 0, !23, i64 12, !23, i64 13}
!23 = !{!"short", !7, i64 0}
!24 = !{!11, !6, i64 32}
!25 = !{!11, !7, i64 48}
!26 = !{!27, !13, i64 20}
!27 = !{!"", !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, !23, i64 24, !23, i64 26, !23, i64 28, !23, i64 30}
!28 = !{!27, !23, i64 24}
!29 = !{!27, !23, i64 26}
!30 = !{!27, !23, i64 28}
!31 = !{!27, !23, i64 30}


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

@.str.10 = external hidden unnamed_addr constant [154 x i8], align 1
@.str.28 = external hidden unnamed_addr constant [79 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

declare i64 @DivU64x32(i64 noundef, i32 noundef) local_unnamed_addr #1

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

declare zeroext i8 @DebugAssertEnabled() local_unnamed_addr #1

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

; Function Attrs: nounwind uwtable
declare dso_local i64 @UfsInitCommandUpiu(ptr noundef, i8 noundef zeroext, i8 noundef zeroext, ptr noundef, i8 noundef zeroext, i32 noundef, i32 noundef) local_unnamed_addr #2

declare i64 @RShiftU64(i64 noundef, i64 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local range(i64 -9223372036854775808, 1) i64 @UfsCreateScsiCommandDesc(ptr noundef %0, i8 noundef zeroext %1, ptr noundef readonly %2, ptr noundef %3, ptr noundef %4, ptr noundef %5) local_unnamed_addr #2 {
  %7 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #3
  %8 = tail call zeroext i8 @DebugAssertEnabled() #3
  %.not = icmp eq i8 %8, 0
  br i1 %.not, label %14, label %9

9:                                                ; preds = %6
  %10 = icmp ne ptr %0, null
  %11 = icmp ne ptr %2, null
  %or.cond = and i1 %10, %11
  %12 = icmp ne ptr %3, null
  %or.cond3 = and i1 %or.cond, %12
  br i1 %or.cond3, label %14, label %13

13:                                               ; preds = %9
  tail call void @DebugAssert(ptr noundef nonnull @.str.10, i64 noundef 445, ptr noundef nonnull @.str.28) #3
  br label %14

14:                                               ; preds = %13, %9, %6
  %15 = getelementptr inbounds i8, ptr %2, i64 49
  %16 = load i8, ptr %15, align 1, !tbaa !5
  %17 = icmp eq i8 %16, 0
  %.037.in.v = select i1 %17, i64 40, i64 44
  %.037.in = getelementptr inbounds i8, ptr %2, i64 %.037.in.v
  %.037 = load i32, ptr %.037.in, align 4, !tbaa !12
  %18 = zext i32 %.037 to i64
  %19 = add nuw nsw i64 %18, 262143
  %20 = tail call i64 @DivU64x32(i64 noundef %19, i32 noundef 262144) #3
  %21 = shl i64 %20, 4
  %22 = add i64 %21, 88
  %23 = call i64 @UfsAllocateAlignCommonBuffer(ptr noundef %0, i64 noundef %22, ptr noundef %4, ptr noundef nonnull %7, ptr noundef %5)
  %24 = icmp slt i64 %23, 0
  br i1 %24, label %64, label %25

25:                                               ; preds = %14
  %26 = icmp eq i32 %.037, 0
  %.0 = select i1 %17, i32 2, i32 1
  %.1 = select i1 %26, i32 0, i32 %.0
  %27 = load ptr, ptr %4, align 8, !tbaa !13
  %28 = getelementptr inbounds i8, ptr %0, i64 116
  %29 = load i8, ptr %28, align 4, !tbaa !14
  %30 = add i8 %29, 1
  store i8 %30, ptr %28, align 4, !tbaa !14
  %31 = getelementptr inbounds i8, ptr %2, i64 32
  %32 = load ptr, ptr %31, align 8, !tbaa !20
  %33 = getelementptr inbounds i8, ptr %2, i64 48
  %34 = load i8, ptr %33, align 8, !tbaa !21
  %35 = call i64 @UfsInitCommandUpiu(ptr noundef %27, i8 noundef zeroext %1, i8 noundef zeroext %29, ptr noundef %32, i8 noundef zeroext %34, i32 noundef %.1, i32 noundef %.037)
  %36 = load i32, ptr %3, align 1
  %37 = shl nuw nsw i32 %.1, 25
  %38 = and i32 %36, 150994943
  %39 = or disjoint i32 %38, %37
  %40 = or disjoint i32 %39, 285212672
  store i32 %40, ptr %3, align 1
  %41 = load i64, ptr %7, align 8, !tbaa !22
  %42 = call i64 @RShiftU64(i64 noundef %41, i64 noundef 7) #3
  %43 = trunc i64 %42 to i32
  %44 = getelementptr inbounds i8, ptr %3, i64 16
  %45 = load i32, ptr %44, align 1
  %46 = shl i32 %43, 7
  %47 = and i32 %45, 127
  %48 = or disjoint i32 %47, %46
  store i32 %48, ptr %44, align 1
  %49 = load i64, ptr %7, align 8, !tbaa !22
  %50 = call i64 @RShiftU64(i64 noundef %49, i64 noundef 32) #3
  %51 = trunc i64 %50 to i32
  %52 = getelementptr inbounds i8, ptr %3, i64 20
  store i32 %51, ptr %52, align 1, !tbaa !23
  %53 = call i64 @DivU64x32(i64 noundef 56, i32 noundef 4) #3
  %54 = trunc i64 %53 to i16
  %55 = getelementptr inbounds i8, ptr %3, i64 24
  store i16 %54, ptr %55, align 1, !tbaa !25
  %56 = call i64 @DivU64x32(i64 noundef 32, i32 noundef 4) #3
  %57 = trunc i64 %56 to i16
  %58 = getelementptr inbounds i8, ptr %3, i64 26
  store i16 %57, ptr %58, align 1, !tbaa !26
  %59 = trunc i64 %20 to i16
  %60 = getelementptr inbounds i8, ptr %3, i64 28
  store i16 %59, ptr %60, align 1, !tbaa !27
  %61 = call i64 @DivU64x32(i64 noundef 88, i32 noundef 4) #3
  %62 = trunc i64 %61 to i16
  %63 = getelementptr inbounds i8, ptr %3, i64 30
  store i16 %62, ptr %63, align 1, !tbaa !28
  br label %64

64:                                               ; preds = %14, %25
  %.038 = phi i64 [ 0, %25 ], [ %23, %14 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #3
  ret i64 %.038
}

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

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


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