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

; 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.SCSI_DISK_DEV = type { i32, ptr, %struct._EFI_BLOCK_IO_PROTOCOL, %struct.EFI_BLOCK_IO_MEDIA, ptr, i8, i8, i16, ptr, i64, %struct.EFI_SCSI_INQUIRY_DATA, ptr, %struct._EFI_DISK_INFO_PROTOCOL, i32, i32, %struct.ATAPI_IDENTIFY_DATA, i8 }
%struct._EFI_BLOCK_IO_PROTOCOL = type { i64, 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_SCSI_INQUIRY_DATA = type { i16, i8, i8, i8, [91 x i8] }
%struct._EFI_DISK_INFO_PROTOCOL = type { %struct.GUID, ptr, ptr, ptr, ptr }
%struct.GUID = type { i32, i16, i16, [8 x i8] }
%struct.ATAPI_IDENTIFY_DATA = type { i16, i16, i16, [7 x i16], [20 x i8], [3 x i16], [8 x i8], [40 x i8], [2 x i16], i16, i16, i16, i16, i16, [8 x i16], i16, i16, i16, i16, i16, i16, i16, [2 x i16], [2 x i16], [2 x i16], i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, [13 x i16], [4 x i16], [4 x i16], [3 x i16], i16, i16, [4 x i16], i16, [2 x i16], i16, [31 x i16], [16 x i16], [46 x i16], i16, i16, [31 x i16], i16 }
%struct.EFI_SCSI_DISK_CAPACITY_DATA = type { i8, i8, i8, i8, i8, i8, i8, i8 }
%struct.EFI_SCSI_DISK_CAPACITY_DATA16 = type { i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, [16 x i8] }

; 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: nounwind uwtable
define dso_local void @GetMediaInfo(ptr noundef %0, ptr noundef %1, ptr noundef %2) #1 {
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  store ptr %2, ptr %6, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #2
  %8 = load ptr, ptr %4, align 8, !tbaa !5
  %9 = getelementptr inbounds %struct.SCSI_DISK_DEV, ptr %8, i32 0, i32 16
  %10 = load i8, ptr %9, align 8, !tbaa !9
  %11 = icmp ne i8 %10, 0
  br i1 %11, label %78, label %12

12:                                               ; preds = %3
  %13 = load ptr, ptr %5, align 8, !tbaa !5
  %14 = getelementptr inbounds %struct.EFI_SCSI_DISK_CAPACITY_DATA, ptr %13, i32 0, i32 0
  %15 = load i8, ptr %14, align 1, !tbaa !20
  %16 = zext i8 %15 to i32
  %17 = shl i32 %16, 24
  %18 = load ptr, ptr %5, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.EFI_SCSI_DISK_CAPACITY_DATA, ptr %18, i32 0, i32 1
  %20 = load i8, ptr %19, align 1, !tbaa !22
  %21 = zext i8 %20 to i32
  %22 = shl i32 %21, 16
  %23 = or i32 %17, %22
  %24 = load ptr, ptr %5, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.EFI_SCSI_DISK_CAPACITY_DATA, ptr %24, i32 0, i32 2
  %26 = load i8, ptr %25, align 1, !tbaa !23
  %27 = zext i8 %26 to i32
  %28 = shl i32 %27, 8
  %29 = or i32 %23, %28
  %30 = load ptr, ptr %5, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.EFI_SCSI_DISK_CAPACITY_DATA, ptr %30, i32 0, i32 3
  %32 = load i8, ptr %31, align 1, !tbaa !24
  %33 = zext i8 %32 to i32
  %34 = or i32 %29, %33
  %35 = sext i32 %34 to i64
  %36 = load ptr, ptr %4, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.SCSI_DISK_DEV, ptr %36, i32 0, i32 2
  %38 = getelementptr inbounds %struct._EFI_BLOCK_IO_PROTOCOL, ptr %37, i32 0, i32 1
  %39 = load ptr, ptr %38, align 8, !tbaa !25
  %40 = getelementptr inbounds %struct.EFI_BLOCK_IO_MEDIA, ptr %39, i32 0, i32 8
  store i64 %35, ptr %40, align 8, !tbaa !26
  %41 = load ptr, ptr %5, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.EFI_SCSI_DISK_CAPACITY_DATA, ptr %41, i32 0, i32 4
  %43 = load i8, ptr %42, align 1, !tbaa !27
  %44 = zext i8 %43 to i32
  %45 = shl i32 %44, 24
  %46 = load ptr, ptr %5, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.EFI_SCSI_DISK_CAPACITY_DATA, ptr %46, i32 0, i32 5
  %48 = load i8, ptr %47, align 1, !tbaa !28
  %49 = zext i8 %48 to i32
  %50 = shl i32 %49, 16
  %51 = or i32 %45, %50
  %52 = load ptr, ptr %5, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.EFI_SCSI_DISK_CAPACITY_DATA, ptr %52, i32 0, i32 6
  %54 = load i8, ptr %53, align 1, !tbaa !29
  %55 = zext i8 %54 to i32
  %56 = shl i32 %55, 8
  %57 = or i32 %51, %56
  %58 = load ptr, ptr %5, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.EFI_SCSI_DISK_CAPACITY_DATA, ptr %58, i32 0, i32 7
  %60 = load i8, ptr %59, align 1, !tbaa !30
  %61 = zext i8 %60 to i32
  %62 = or i32 %57, %61
  %63 = load ptr, ptr %4, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.SCSI_DISK_DEV, ptr %63, i32 0, i32 2
  %65 = getelementptr inbounds %struct._EFI_BLOCK_IO_PROTOCOL, ptr %64, i32 0, i32 1
  %66 = load ptr, ptr %65, align 8, !tbaa !25
  %67 = getelementptr inbounds %struct.EFI_BLOCK_IO_MEDIA, ptr %66, i32 0, i32 6
  store i32 %62, ptr %67, align 4, !tbaa !31
  %68 = load ptr, ptr %4, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.SCSI_DISK_DEV, ptr %68, i32 0, i32 2
  %70 = getelementptr inbounds %struct._EFI_BLOCK_IO_PROTOCOL, ptr %69, i32 0, i32 1
  %71 = load ptr, ptr %70, align 8, !tbaa !25
  %72 = getelementptr inbounds %struct.EFI_BLOCK_IO_MEDIA, ptr %71, i32 0, i32 9
  store i64 0, ptr %72, align 8, !tbaa !32
  %73 = load ptr, ptr %4, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.SCSI_DISK_DEV, ptr %73, i32 0, i32 2
  %75 = getelementptr inbounds %struct._EFI_BLOCK_IO_PROTOCOL, ptr %74, i32 0, i32 1
  %76 = load ptr, ptr %75, align 8, !tbaa !25
  %77 = getelementptr inbounds %struct.EFI_BLOCK_IO_MEDIA, ptr %76, i32 0, i32 10
  store i32 0, ptr %77, align 8, !tbaa !33
  br label %176

78:                                               ; preds = %3
  %79 = load ptr, ptr %4, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.SCSI_DISK_DEV, ptr %79, i32 0, i32 2
  %81 = getelementptr inbounds %struct._EFI_BLOCK_IO_PROTOCOL, ptr %80, i32 0, i32 1
  %82 = load ptr, ptr %81, align 8, !tbaa !25
  %83 = getelementptr inbounds %struct.EFI_BLOCK_IO_MEDIA, ptr %82, i32 0, i32 8
  store ptr %83, ptr %7, align 8, !tbaa !5
  %84 = load ptr, ptr %6, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.EFI_SCSI_DISK_CAPACITY_DATA16, ptr %84, i32 0, i32 7
  %86 = load i8, ptr %85, align 1, !tbaa !34
  %87 = load ptr, ptr %7, align 8, !tbaa !5
  %88 = getelementptr inbounds i8, ptr %87, i32 1
  store ptr %88, ptr %7, align 8, !tbaa !5
  store i8 %86, ptr %87, align 1, !tbaa !36
  %89 = load ptr, ptr %6, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.EFI_SCSI_DISK_CAPACITY_DATA16, ptr %89, i32 0, i32 6
  %91 = load i8, ptr %90, align 1, !tbaa !37
  %92 = load ptr, ptr %7, align 8, !tbaa !5
  %93 = getelementptr inbounds i8, ptr %92, i32 1
  store ptr %93, ptr %7, align 8, !tbaa !5
  store i8 %91, ptr %92, align 1, !tbaa !36
  %94 = load ptr, ptr %6, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.EFI_SCSI_DISK_CAPACITY_DATA16, ptr %94, i32 0, i32 5
  %96 = load i8, ptr %95, align 1, !tbaa !38
  %97 = load ptr, ptr %7, align 8, !tbaa !5
  %98 = getelementptr inbounds i8, ptr %97, i32 1
  store ptr %98, ptr %7, align 8, !tbaa !5
  store i8 %96, ptr %97, align 1, !tbaa !36
  %99 = load ptr, ptr %6, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.EFI_SCSI_DISK_CAPACITY_DATA16, ptr %99, i32 0, i32 4
  %101 = load i8, ptr %100, align 1, !tbaa !39
  %102 = load ptr, ptr %7, align 8, !tbaa !5
  %103 = getelementptr inbounds i8, ptr %102, i32 1
  store ptr %103, ptr %7, align 8, !tbaa !5
  store i8 %101, ptr %102, align 1, !tbaa !36
  %104 = load ptr, ptr %6, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.EFI_SCSI_DISK_CAPACITY_DATA16, ptr %104, i32 0, i32 3
  %106 = load i8, ptr %105, align 1, !tbaa !40
  %107 = load ptr, ptr %7, align 8, !tbaa !5
  %108 = getelementptr inbounds i8, ptr %107, i32 1
  store ptr %108, ptr %7, align 8, !tbaa !5
  store i8 %106, ptr %107, align 1, !tbaa !36
  %109 = load ptr, ptr %6, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.EFI_SCSI_DISK_CAPACITY_DATA16, ptr %109, i32 0, i32 2
  %111 = load i8, ptr %110, align 1, !tbaa !41
  %112 = load ptr, ptr %7, align 8, !tbaa !5
  %113 = getelementptr inbounds i8, ptr %112, i32 1
  store ptr %113, ptr %7, align 8, !tbaa !5
  store i8 %111, ptr %112, align 1, !tbaa !36
  %114 = load ptr, ptr %6, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.EFI_SCSI_DISK_CAPACITY_DATA16, ptr %114, i32 0, i32 1
  %116 = load i8, ptr %115, align 1, !tbaa !42
  %117 = load ptr, ptr %7, align 8, !tbaa !5
  %118 = getelementptr inbounds i8, ptr %117, i32 1
  store ptr %118, ptr %7, align 8, !tbaa !5
  store i8 %116, ptr %117, align 1, !tbaa !36
  %119 = load ptr, ptr %6, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.EFI_SCSI_DISK_CAPACITY_DATA16, ptr %119, i32 0, i32 0
  %121 = load i8, ptr %120, align 1, !tbaa !43
  %122 = load ptr, ptr %7, align 8, !tbaa !5
  store i8 %121, ptr %122, align 1, !tbaa !36
  %123 = load ptr, ptr %6, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.EFI_SCSI_DISK_CAPACITY_DATA16, ptr %123, i32 0, i32 8
  %125 = load i8, ptr %124, align 1, !tbaa !44
  %126 = zext i8 %125 to i32
  %127 = shl i32 %126, 24
  %128 = load ptr, ptr %6, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.EFI_SCSI_DISK_CAPACITY_DATA16, ptr %128, i32 0, i32 9
  %130 = load i8, ptr %129, align 1, !tbaa !45
  %131 = zext i8 %130 to i32
  %132 = shl i32 %131, 16
  %133 = or i32 %127, %132
  %134 = load ptr, ptr %6, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.EFI_SCSI_DISK_CAPACITY_DATA16, ptr %134, i32 0, i32 10
  %136 = load i8, ptr %135, align 1, !tbaa !46
  %137 = zext i8 %136 to i32
  %138 = shl i32 %137, 8
  %139 = or i32 %133, %138
  %140 = load ptr, ptr %6, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.EFI_SCSI_DISK_CAPACITY_DATA16, ptr %140, i32 0, i32 11
  %142 = load i8, ptr %141, align 1, !tbaa !47
  %143 = zext i8 %142 to i32
  %144 = or i32 %139, %143
  %145 = load ptr, ptr %4, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct.SCSI_DISK_DEV, ptr %145, i32 0, i32 2
  %147 = getelementptr inbounds %struct._EFI_BLOCK_IO_PROTOCOL, ptr %146, i32 0, i32 1
  %148 = load ptr, ptr %147, align 8, !tbaa !25
  %149 = getelementptr inbounds %struct.EFI_BLOCK_IO_MEDIA, ptr %148, i32 0, i32 6
  store i32 %144, ptr %149, align 4, !tbaa !31
  %150 = load ptr, ptr %6, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.EFI_SCSI_DISK_CAPACITY_DATA16, ptr %150, i32 0, i32 14
  %152 = load i8, ptr %151, align 1, !tbaa !48
  %153 = zext i8 %152 to i32
  %154 = shl i32 %153, 8
  %155 = load ptr, ptr %6, align 8, !tbaa !5
  %156 = getelementptr inbounds %struct.EFI_SCSI_DISK_CAPACITY_DATA16, ptr %155, i32 0, i32 15
  %157 = load i8, ptr %156, align 1, !tbaa !49
  %158 = zext i8 %157 to i32
  %159 = or i32 %154, %158
  %160 = sext i32 %159 to i64
  %161 = load ptr, ptr %4, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.SCSI_DISK_DEV, ptr %161, i32 0, i32 2
  %163 = getelementptr inbounds %struct._EFI_BLOCK_IO_PROTOCOL, ptr %162, i32 0, i32 1
  %164 = load ptr, ptr %163, align 8, !tbaa !25
  %165 = getelementptr inbounds %struct.EFI_BLOCK_IO_MEDIA, ptr %164, i32 0, i32 9
  store i64 %160, ptr %165, align 8, !tbaa !32
  %166 = load ptr, ptr %6, align 8, !tbaa !5
  %167 = getelementptr inbounds %struct.EFI_SCSI_DISK_CAPACITY_DATA16, ptr %166, i32 0, i32 13
  %168 = load i8, ptr %167, align 1, !tbaa !50
  %169 = zext i8 %168 to i32
  %170 = shl i32 1, %169
  %171 = load ptr, ptr %4, align 8, !tbaa !5
  %172 = getelementptr inbounds %struct.SCSI_DISK_DEV, ptr %171, i32 0, i32 2
  %173 = getelementptr inbounds %struct._EFI_BLOCK_IO_PROTOCOL, ptr %172, i32 0, i32 1
  %174 = load ptr, ptr %173, align 8, !tbaa !25
  %175 = getelementptr inbounds %struct.EFI_BLOCK_IO_MEDIA, ptr %174, i32 0, i32 10
  store i32 %170, ptr %175, align 8, !tbaa !33
  br label %176

176:                                              ; preds = %78, %12
  %177 = load ptr, ptr %4, align 8, !tbaa !5
  %178 = getelementptr inbounds %struct.SCSI_DISK_DEV, ptr %177, i32 0, i32 2
  %179 = getelementptr inbounds %struct._EFI_BLOCK_IO_PROTOCOL, ptr %178, i32 0, i32 1
  %180 = load ptr, ptr %179, align 8, !tbaa !25
  %181 = getelementptr inbounds %struct.EFI_BLOCK_IO_MEDIA, ptr %180, i32 0, i32 2
  store i8 1, ptr %181, align 1, !tbaa !51
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #2
  ret void
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !7, i64 816}
!10 = !{!"", !11, i64 0, !6, i64 8, !12, i64 16, !14, i64 64, !6, i64 112, !7, i64 120, !7, i64 121, !15, i64 122, !6, i64 128, !13, i64 136, !16, i64 144, !6, i64 240, !17, i64 248, !11, i64 296, !11, i64 300, !19, i64 304, !7, i64 816}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_EFI_BLOCK_IO_PROTOCOL", !13, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40}
!13 = !{!"long long", !7, i64 0}
!14 = !{!"", !11, i64 0, !7, i64 4, !7, i64 5, !7, i64 6, !7, i64 7, !7, i64 8, !11, i64 12, !11, i64 16, !13, i64 24, !13, i64 32, !11, i64 40, !11, i64 44}
!15 = !{!"short", !7, i64 0}
!16 = !{!"", !7, i64 0, !7, i64 0, !7, i64 1, !7, i64 1, !7, i64 2, !7, i64 3, !7, i64 4, !7, i64 5}
!17 = !{!"_EFI_DISK_INFO_PROTOCOL", !18, i64 0, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40}
!18 = !{!"", !11, i64 0, !15, i64 4, !15, i64 6, !7, i64 8}
!19 = !{!"", !15, i64 0, !15, i64 2, !15, i64 4, !7, i64 6, !7, i64 20, !7, i64 40, !7, i64 46, !7, i64 54, !7, i64 94, !15, i64 98, !15, i64 100, !15, i64 102, !15, i64 104, !15, i64 106, !7, i64 108, !15, i64 124, !15, i64 126, !15, i64 128, !15, i64 130, !15, i64 132, !15, i64 134, !15, i64 136, !7, i64 138, !7, i64 142, !7, i64 146, !15, i64 150, !15, i64 152, !15, i64 154, !15, i64 156, !15, i64 158, !15, i64 160, !15, i64 162, !15, i64 164, !15, i64 166, !15, i64 168, !15, i64 170, !15, i64 172, !15, i64 174, !15, i64 176, !15, i64 178, !15, i64 180, !15, i64 182, !15, i64 184, !15, i64 186, !15, i64 188, !7, i64 190, !7, i64 216, !7, i64 224, !7, i64 232, !15, i64 238, !15, i64 240, !7, i64 242, !15, i64 250, !7, i64 252, !15, i64 256, !7, i64 258, !7, i64 320, !7, i64 352, !15, i64 444, !15, i64 446, !7, i64 448, !15, i64 510}
!20 = !{!21, !7, i64 0}
!21 = !{!"", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !7, i64 4, !7, i64 5, !7, i64 6, !7, i64 7}
!22 = !{!21, !7, i64 1}
!23 = !{!21, !7, i64 2}
!24 = !{!21, !7, i64 3}
!25 = !{!10, !6, i64 24}
!26 = !{!14, !13, i64 24}
!27 = !{!21, !7, i64 4}
!28 = !{!21, !7, i64 5}
!29 = !{!21, !7, i64 6}
!30 = !{!21, !7, i64 7}
!31 = !{!14, !11, i64 12}
!32 = !{!14, !13, i64 32}
!33 = !{!14, !11, i64 40}
!34 = !{!35, !7, i64 7}
!35 = !{!"", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !7, i64 4, !7, i64 5, !7, i64 6, !7, i64 7, !7, i64 8, !7, i64 9, !7, i64 10, !7, i64 11, !7, i64 12, !7, i64 13, !7, i64 14, !7, i64 15, !7, i64 16}
!36 = !{!7, !7, i64 0}
!37 = !{!35, !7, i64 6}
!38 = !{!35, !7, i64 5}
!39 = !{!35, !7, i64 4}
!40 = !{!35, !7, i64 3}
!41 = !{!35, !7, i64 2}
!42 = !{!35, !7, i64 1}
!43 = !{!35, !7, i64 0}
!44 = !{!35, !7, i64 8}
!45 = !{!35, !7, i64 9}
!46 = !{!35, !7, i64 10}
!47 = !{!35, !7, i64 11}
!48 = !{!35, !7, i64 14}
!49 = !{!35, !7, i64 15}
!50 = !{!35, !7, i64 13}
!51 = !{!14, !7, i64 5}


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

; Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(write, argmem: readwrite, inaccessiblemem: none) uwtable
define dso_local void @GetMediaInfo(ptr nocapture noundef readonly %0, ptr nocapture noundef readonly %1, ptr nocapture noundef readonly %2) local_unnamed_addr #0 {
  %4 = getelementptr inbounds i8, ptr %0, i64 816
  %5 = load i8, ptr %4, align 8, !tbaa !5
  %.not = icmp eq i8 %5, 0
  br i1 %.not, label %6, label %48

6:                                                ; preds = %3
  %7 = load i8, ptr %1, align 1, !tbaa !19
  %8 = zext i8 %7 to i32
  %9 = shl nuw i32 %8, 24
  %10 = getelementptr inbounds i8, ptr %1, i64 1
  %11 = load i8, ptr %10, align 1, !tbaa !21
  %12 = zext i8 %11 to i32
  %13 = shl nuw nsw i32 %12, 16
  %14 = or disjoint i32 %13, %9
  %15 = getelementptr inbounds i8, ptr %1, i64 2
  %16 = load i8, ptr %15, align 1, !tbaa !22
  %17 = zext i8 %16 to i32
  %18 = shl nuw nsw i32 %17, 8
  %19 = or disjoint i32 %14, %18
  %20 = getelementptr inbounds i8, ptr %1, i64 3
  %21 = load i8, ptr %20, align 1, !tbaa !23
  %22 = zext i8 %21 to i32
  %23 = or disjoint i32 %19, %22
  %24 = sext i32 %23 to i64
  %25 = getelementptr inbounds i8, ptr %0, i64 24
  %26 = load ptr, ptr %25, align 8, !tbaa !24
  %27 = getelementptr inbounds i8, ptr %26, i64 24
  store i64 %24, ptr %27, align 8, !tbaa !25
  %28 = getelementptr inbounds i8, ptr %1, i64 4
  %29 = load i8, ptr %28, align 1, !tbaa !26
  %30 = zext i8 %29 to i32
  %31 = shl nuw i32 %30, 24
  %32 = getelementptr inbounds i8, ptr %1, i64 5
  %33 = load i8, ptr %32, align 1, !tbaa !27
  %34 = zext i8 %33 to i32
  %35 = shl nuw nsw i32 %34, 16
  %36 = or disjoint i32 %35, %31
  %37 = getelementptr inbounds i8, ptr %1, i64 6
  %38 = load i8, ptr %37, align 1, !tbaa !28
  %39 = zext i8 %38 to i32
  %40 = shl nuw nsw i32 %39, 8
  %41 = or disjoint i32 %36, %40
  %42 = getelementptr inbounds i8, ptr %1, i64 7
  %43 = load i8, ptr %42, align 1, !tbaa !29
  %44 = zext i8 %43 to i32
  %45 = or disjoint i32 %41, %44
  %46 = getelementptr inbounds i8, ptr %26, i64 12
  store i32 %45, ptr %46, align 4, !tbaa !30
  %47 = getelementptr inbounds i8, ptr %26, i64 32
  store i64 0, ptr %47, align 8, !tbaa !31
  br label %107

48:                                               ; preds = %3
  %49 = getelementptr inbounds i8, ptr %0, i64 24
  %50 = load ptr, ptr %49, align 8, !tbaa !24
  %51 = getelementptr inbounds i8, ptr %50, i64 24
  %52 = getelementptr inbounds i8, ptr %2, i64 7
  %53 = load i8, ptr %52, align 1, !tbaa !32
  %54 = getelementptr inbounds i8, ptr %50, i64 25
  store i8 %53, ptr %51, align 1, !tbaa !34
  %55 = getelementptr inbounds i8, ptr %2, i64 6
  %56 = load i8, ptr %55, align 1, !tbaa !35
  %57 = getelementptr inbounds i8, ptr %50, i64 26
  store i8 %56, ptr %54, align 1, !tbaa !34
  %58 = getelementptr inbounds i8, ptr %2, i64 5
  %59 = load i8, ptr %58, align 1, !tbaa !36
  %60 = getelementptr inbounds i8, ptr %50, i64 27
  store i8 %59, ptr %57, align 1, !tbaa !34
  %61 = getelementptr inbounds i8, ptr %2, i64 4
  %62 = load i8, ptr %61, align 1, !tbaa !37
  %63 = getelementptr inbounds i8, ptr %50, i64 28
  store i8 %62, ptr %60, align 1, !tbaa !34
  %64 = getelementptr inbounds i8, ptr %2, i64 3
  %65 = load i8, ptr %64, align 1, !tbaa !38
  %66 = getelementptr inbounds i8, ptr %50, i64 29
  store i8 %65, ptr %63, align 1, !tbaa !34
  %67 = getelementptr inbounds i8, ptr %2, i64 2
  %68 = load i8, ptr %67, align 1, !tbaa !39
  %69 = getelementptr inbounds i8, ptr %50, i64 30
  store i8 %68, ptr %66, align 1, !tbaa !34
  %70 = getelementptr inbounds i8, ptr %2, i64 1
  %71 = load i8, ptr %70, align 1, !tbaa !40
  %72 = getelementptr inbounds i8, ptr %50, i64 31
  store i8 %71, ptr %69, align 1, !tbaa !34
  %73 = load i8, ptr %2, align 1, !tbaa !41
  store i8 %73, ptr %72, align 1, !tbaa !34
  %74 = getelementptr inbounds i8, ptr %2, i64 8
  %75 = load i8, ptr %74, align 1, !tbaa !42
  %76 = zext i8 %75 to i32
  %77 = shl nuw i32 %76, 24
  %78 = getelementptr inbounds i8, ptr %2, i64 9
  %79 = load i8, ptr %78, align 1, !tbaa !43
  %80 = zext i8 %79 to i32
  %81 = shl nuw nsw i32 %80, 16
  %82 = or disjoint i32 %81, %77
  %83 = getelementptr inbounds i8, ptr %2, i64 10
  %84 = load i8, ptr %83, align 1, !tbaa !44
  %85 = zext i8 %84 to i32
  %86 = shl nuw nsw i32 %85, 8
  %87 = or disjoint i32 %82, %86
  %88 = getelementptr inbounds i8, ptr %2, i64 11
  %89 = load i8, ptr %88, align 1, !tbaa !45
  %90 = zext i8 %89 to i32
  %91 = or disjoint i32 %87, %90
  %92 = load ptr, ptr %49, align 8, !tbaa !24
  %93 = getelementptr inbounds i8, ptr %92, i64 12
  store i32 %91, ptr %93, align 4, !tbaa !30
  %94 = getelementptr inbounds i8, ptr %2, i64 14
  %95 = load i8, ptr %94, align 1, !tbaa !46
  %96 = zext i8 %95 to i64
  %97 = shl nuw nsw i64 %96, 8
  %98 = getelementptr inbounds i8, ptr %2, i64 15
  %99 = load i8, ptr %98, align 1, !tbaa !47
  %100 = zext i8 %99 to i64
  %101 = or disjoint i64 %97, %100
  %102 = getelementptr inbounds i8, ptr %92, i64 32
  store i64 %101, ptr %102, align 8, !tbaa !31
  %103 = getelementptr inbounds i8, ptr %2, i64 13
  %104 = load i8, ptr %103, align 1, !tbaa !48
  %105 = zext nneg i8 %104 to i32
  %106 = shl nuw i32 1, %105
  br label %107

107:                                              ; preds = %48, %6
  %.sink42 = phi ptr [ %92, %48 ], [ %26, %6 ]
  %.sink = phi i32 [ %106, %48 ], [ 0, %6 ]
  %108 = getelementptr inbounds i8, ptr %.sink42, i64 40
  store i32 %.sink, ptr %108, align 8, !tbaa !49
  %109 = getelementptr inbounds i8, ptr %.sink42, i64 5
  store i8 1, ptr %109, align 1, !tbaa !50
  ret void
}

attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(write, argmem: readwrite, inaccessiblemem: none) 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" }

!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 816}
!6 = !{!"", !7, i64 0, !10, i64 8, !11, i64 16, !13, i64 64, !10, i64 112, !8, i64 120, !8, i64 121, !14, i64 122, !10, i64 128, !12, i64 136, !15, i64 144, !10, i64 240, !16, i64 248, !7, i64 296, !7, i64 300, !18, i64 304, !8, i64 816}
!7 = !{!"int", !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", !12, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40}
!12 = !{!"long long", !8, i64 0}
!13 = !{!"", !7, i64 0, !8, i64 4, !8, i64 5, !8, i64 6, !8, i64 7, !8, i64 8, !7, i64 12, !7, i64 16, !12, i64 24, !12, i64 32, !7, i64 40, !7, i64 44}
!14 = !{!"short", !8, i64 0}
!15 = !{!"", !8, i64 0, !8, i64 0, !8, i64 1, !8, i64 1, !8, i64 2, !8, i64 3, !8, i64 4, !8, i64 5}
!16 = !{!"_EFI_DISK_INFO_PROTOCOL", !17, i64 0, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40}
!17 = !{!"", !7, i64 0, !14, i64 4, !14, i64 6, !8, i64 8}
!18 = !{!"", !14, i64 0, !14, i64 2, !14, i64 4, !8, i64 6, !8, i64 20, !8, i64 40, !8, i64 46, !8, i64 54, !8, i64 94, !14, i64 98, !14, i64 100, !14, i64 102, !14, i64 104, !14, i64 106, !8, i64 108, !14, i64 124, !14, i64 126, !14, i64 128, !14, i64 130, !14, i64 132, !14, i64 134, !14, i64 136, !8, i64 138, !8, i64 142, !8, i64 146, !14, i64 150, !14, i64 152, !14, i64 154, !14, i64 156, !14, i64 158, !14, i64 160, !14, i64 162, !14, i64 164, !14, i64 166, !14, i64 168, !14, i64 170, !14, i64 172, !14, i64 174, !14, i64 176, !14, i64 178, !14, i64 180, !14, i64 182, !14, i64 184, !14, i64 186, !14, i64 188, !8, i64 190, !8, i64 216, !8, i64 224, !8, i64 232, !14, i64 238, !14, i64 240, !8, i64 242, !14, i64 250, !8, i64 252, !14, i64 256, !8, i64 258, !8, i64 320, !8, i64 352, !14, i64 444, !14, i64 446, !8, i64 448, !14, i64 510}
!19 = !{!20, !8, i64 0}
!20 = !{!"", !8, i64 0, !8, i64 1, !8, i64 2, !8, i64 3, !8, i64 4, !8, i64 5, !8, i64 6, !8, i64 7}
!21 = !{!20, !8, i64 1}
!22 = !{!20, !8, i64 2}
!23 = !{!20, !8, i64 3}
!24 = !{!6, !10, i64 24}
!25 = !{!13, !12, i64 24}
!26 = !{!20, !8, i64 4}
!27 = !{!20, !8, i64 5}
!28 = !{!20, !8, i64 6}
!29 = !{!20, !8, i64 7}
!30 = !{!13, !7, i64 12}
!31 = !{!13, !12, i64 32}
!32 = !{!33, !8, i64 7}
!33 = !{!"", !8, i64 0, !8, i64 1, !8, i64 2, !8, i64 3, !8, i64 4, !8, i64 5, !8, i64 6, !8, i64 7, !8, i64 8, !8, i64 9, !8, i64 10, !8, i64 11, !8, i64 12, !8, i64 13, !8, i64 14, !8, i64 15, !8, i64 16}
!34 = !{!8, !8, i64 0}
!35 = !{!33, !8, i64 6}
!36 = !{!33, !8, i64 5}
!37 = !{!33, !8, i64 4}
!38 = !{!33, !8, i64 3}
!39 = !{!33, !8, i64 2}
!40 = !{!33, !8, i64 1}
!41 = !{!33, !8, i64 0}
!42 = !{!33, !8, i64 8}
!43 = !{!33, !8, i64 9}
!44 = !{!33, !8, i64 10}
!45 = !{!33, !8, i64 11}
!46 = !{!33, !8, i64 14}
!47 = !{!33, !8, i64 15}
!48 = !{!33, !8, i64 13}
!49 = !{!13, !7, i64 40}
!50 = !{!13, !8, i64 5}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass