; LLVM IR from thalium/icebox :: third_party/virtualbox/src/VBox/Devices/EFI/Firmware/NetworkPkg/Dhcp6Dxe (Dhcp6GenerateClientId)

; 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.GUID = type { i32, i16, i16, [8 x i8] }
%struct.EFI_TIME = type { i16, i8, i8, i8, i8, i8, i8, i32, i16, i8, i8 }
%struct.EFI_DHCP6_DUID = type { i16, [1 x i8] }
%struct.EFI_RUNTIME_SERVICES = type { %struct.EFI_TABLE_HEADER, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.EFI_TABLE_HEADER = type { i64, i32, i32, i32, i32 }
%struct.EFI_SIMPLE_NETWORK_MODE = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [16 x %struct.EFI_MAC_ADDRESS], %struct.EFI_MAC_ADDRESS, %struct.EFI_MAC_ADDRESS, %struct.EFI_MAC_ADDRESS, i8, i8, i8, i8, i8 }
%struct.EFI_MAC_ADDRESS = type { [32 x i8] }

@.str = external hidden unnamed_addr constant [9 x i32], align 4
@gEfiDhcp6ServiceBindingProtocolGuid = external global %struct.GUID, align 4
@gRT = external global ptr, align 8

; Function Attrs: nounwind uwtable
define dso_local ptr @Dhcp6GenerateClientId(ptr noundef %0) #0 {
  %2 = alloca ptr, align 8
  %3 = alloca ptr, align 8
  %4 = alloca i64, align 8
  %5 = alloca ptr, align 8
  %6 = alloca %struct.EFI_TIME, align 4
  %7 = alloca i32, align 4
  %8 = alloca %struct.GUID, align 4
  %9 = 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 8, ptr %5) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr %6) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %7) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr %8) #3
  %10 = call i64 @GetVariable2(ptr noundef @.str, ptr noundef @gEfiDhcp6ServiceBindingProtocolGuid, ptr noundef %5, ptr noundef null)
  %11 = load ptr, ptr %5, align 8, !tbaa !5
  %12 = icmp ne ptr %11, null
  br i1 %12, label %13, label %15

13:                                               ; preds = %1
  %14 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %14, ptr %2, align 8
  store i32 1, ptr %9, align 4
  br label %133

15:                                               ; preds = %1
  %16 = call i64 @NetLibGetSystemGuid(ptr noundef %8)
  %17 = icmp slt i64 %16, 0
  br i1 %17, label %36, label %18

18:                                               ; preds = %15
  %19 = call ptr @AllocateZeroPool(i64 noundef 20)
  store ptr %19, ptr %5, align 8, !tbaa !5
  %20 = load ptr, ptr %5, align 8, !tbaa !5
  %21 = icmp eq ptr %20, null
  br i1 %21, label %22, label %23

22:                                               ; preds = %18
  store ptr null, ptr %2, align 8
  store i32 1, ptr %9, align 4
  br label %133

23:                                               ; preds = %18
  %24 = load ptr, ptr %5, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct.EFI_DHCP6_DUID, ptr %24, i32 0, i32 0
  store i16 18, ptr %25, align 2, !tbaa !9
  %26 = load ptr, ptr %5, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.EFI_DHCP6_DUID, ptr %26, i32 0, i32 1
  %28 = getelementptr inbounds [1 x i8], ptr %27, i64 0, i64 0
  %29 = call zeroext i16 @SwapBytes16(i16 noundef zeroext 4)
  %30 = call zeroext i16 @WriteUnaligned16(ptr noundef %28, i16 noundef zeroext %29)
  %31 = load ptr, ptr %5, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.EFI_DHCP6_DUID, ptr %31, i32 0, i32 1
  %33 = getelementptr inbounds [1 x i8], ptr %32, i64 0, i64 0
  %34 = getelementptr inbounds i8, ptr %33, i64 2
  %35 = call ptr @CopyMem(ptr noundef %34, ptr noundef %8, i64 noundef 16)
  br label %115

36:                                               ; preds = %15
  %37 = load ptr, ptr @gRT, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.EFI_RUNTIME_SERVICES, ptr %37, i32 0, i32 1
  %39 = load ptr, ptr %38, align 8, !tbaa !12
  %40 = call i64 %39(ptr noundef %6, ptr noundef null)
  %41 = getelementptr inbounds %struct.EFI_TIME, ptr %6, i32 0, i32 0
  %42 = load i16, ptr %41, align 4, !tbaa !17
  %43 = zext i16 %42 to i32
  %44 = sub nsw i32 %43, 2000
  %45 = mul nsw i32 %44, 360
  %46 = getelementptr inbounds %struct.EFI_TIME, ptr %6, i32 0, i32 1
  %47 = load i8, ptr %46, align 2, !tbaa !19
  %48 = zext i8 %47 to i32
  %49 = sub nsw i32 %48, 1
  %50 = add nsw i32 %45, %49
  %51 = mul nsw i32 %50, 30
  %52 = getelementptr inbounds %struct.EFI_TIME, ptr %6, i32 0, i32 2
  %53 = load i8, ptr %52, align 1, !tbaa !20
  %54 = zext i8 %53 to i32
  %55 = sub nsw i32 %54, 1
  %56 = add nsw i32 %51, %55
  %57 = mul nsw i32 %56, 24
  %58 = getelementptr inbounds %struct.EFI_TIME, ptr %6, i32 0, i32 3
  %59 = load i8, ptr %58, align 4, !tbaa !21
  %60 = zext i8 %59 to i32
  %61 = add nsw i32 %57, %60
  %62 = mul nsw i32 %61, 60
  %63 = getelementptr inbounds %struct.EFI_TIME, ptr %6, i32 0, i32 4
  %64 = load i8, ptr %63, align 1, !tbaa !22
  %65 = zext i8 %64 to i32
  %66 = add nsw i32 %62, %65
  %67 = mul nsw i32 %66, 60
  %68 = getelementptr inbounds %struct.EFI_TIME, ptr %6, i32 0, i32 5
  %69 = load i8, ptr %68, align 2, !tbaa !23
  %70 = zext i8 %69 to i32
  %71 = add nsw i32 %67, %70
  store i32 %71, ptr %7, align 4, !tbaa !24
  %72 = load ptr, ptr %3, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %72, i32 0, i32 1
  %74 = load i32, ptr %73, align 4, !tbaa !25
  %75 = add i32 10, %74
  %76 = zext i32 %75 to i64
  %77 = call ptr @AllocateZeroPool(i64 noundef %76)
  store ptr %77, ptr %5, align 8, !tbaa !5
  %78 = load ptr, ptr %5, align 8, !tbaa !5
  %79 = icmp eq ptr %78, null
  br i1 %79, label %80, label %81

80:                                               ; preds = %36
  store ptr null, ptr %2, align 8
  store i32 1, ptr %9, align 4
  br label %133

81:                                               ; preds = %36
  %82 = load ptr, ptr %3, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %82, i32 0, i32 1
  %84 = load i32, ptr %83, align 4, !tbaa !25
  %85 = add i32 %84, 8
  %86 = trunc i32 %85 to i16
  %87 = load ptr, ptr %5, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.EFI_DHCP6_DUID, ptr %87, i32 0, i32 0
  store i16 %86, ptr %88, align 2, !tbaa !9
  %89 = load ptr, ptr %5, align 8, !tbaa !5
  %90 = getelementptr inbounds i8, ptr %89, i64 2
  %91 = call zeroext i16 @SwapBytes16(i16 noundef zeroext 1)
  %92 = call zeroext i16 @WriteUnaligned16(ptr noundef %90, i16 noundef zeroext %91)
  %93 = load ptr, ptr %5, align 8, !tbaa !5
  %94 = getelementptr inbounds i8, ptr %93, i64 2
  %95 = getelementptr inbounds i8, ptr %94, i64 2
  %96 = call zeroext i16 @SwapBytes16(i16 noundef zeroext 1)
  %97 = call zeroext i16 @WriteUnaligned16(ptr noundef %95, i16 noundef zeroext %96)
  %98 = load ptr, ptr %5, align 8, !tbaa !5
  %99 = getelementptr inbounds i8, ptr %98, i64 2
  %100 = getelementptr inbounds i8, ptr %99, i64 4
  %101 = load i32, ptr %7, align 4, !tbaa !24
  %102 = call i32 @SwapBytes32(i32 noundef %101)
  %103 = call i32 @WriteUnaligned32(ptr noundef %100, i32 noundef %102)
  %104 = load ptr, ptr %5, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.EFI_DHCP6_DUID, ptr %104, i32 0, i32 1
  %106 = getelementptr inbounds [1 x i8], ptr %105, i64 0, i64 0
  %107 = getelementptr inbounds i8, ptr %106, i64 8
  %108 = load ptr, ptr %3, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %108, i32 0, i32 11
  %110 = load ptr, ptr %3, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %110, i32 0, i32 1
  %112 = load i32, ptr %111, align 4, !tbaa !25
  %113 = zext i32 %112 to i64
  %114 = call ptr @CopyMem(ptr noundef %107, ptr noundef %109, i64 noundef %113)
  br label %115

115:                                              ; preds = %81, %23
  %116 = load ptr, ptr @gRT, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.EFI_RUNTIME_SERVICES, ptr %116, i32 0, i32 9
  %118 = load ptr, ptr %117, align 8, !tbaa !28
  %119 = load ptr, ptr %5, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.EFI_DHCP6_DUID, ptr %119, i32 0, i32 0
  %121 = load i16, ptr %120, align 2, !tbaa !9
  %122 = zext i16 %121 to i32
  %123 = add nsw i32 %122, 2
  %124 = sext i32 %123 to i64
  %125 = load ptr, ptr %5, align 8, !tbaa !5
  %126 = call i64 %118(ptr noundef @.str, ptr noundef @gEfiDhcp6ServiceBindingProtocolGuid, i32 noundef 3, i64 noundef %124, ptr noundef %125)
  store i64 %126, ptr %4, align 8, !tbaa !29
  %127 = load i64, ptr %4, align 8, !tbaa !29
  %128 = icmp slt i64 %127, 0
  br i1 %128, label %129, label %131

129:                                              ; preds = %115
  %130 = load ptr, ptr %5, align 8, !tbaa !5
  call void @FreePool(ptr noundef %130)
  store ptr null, ptr %2, align 8
  store i32 1, ptr %9, align 4
  br label %133

131:                                              ; preds = %115
  %132 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %132, ptr %2, align 8
  store i32 1, ptr %9, align 4
  br label %133

133:                                              ; preds = %131, %129, %80, %22, %13
  call void @llvm.lifetime.end.p0(i64 16, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #3
  %134 = load ptr, ptr %2, align 8
  ret ptr %134
}

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

declare i64 @GetVariable2(ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

declare i64 @NetLibGetSystemGuid(ptr noundef) #2

declare ptr @AllocateZeroPool(i64 noundef) #2

declare zeroext i16 @WriteUnaligned16(ptr noundef, i16 noundef zeroext) #2

declare zeroext i16 @SwapBytes16(i16 noundef zeroext) #2

declare ptr @CopyMem(ptr noundef, ptr noundef, i64 noundef) #2

declare i32 @WriteUnaligned32(ptr noundef, i32 noundef) #2

declare i32 @SwapBytes32(i32 noundef) #2

declare void @FreePool(ptr noundef) #2

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

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, !11, i64 0}
!10 = !{!"", !11, i64 0, !7, i64 2}
!11 = !{!"short", !7, i64 0}
!12 = !{!13, !6, i64 24}
!13 = !{!"", !14, 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}
!14 = !{!"", !15, i64 0, !16, i64 8, !16, i64 12, !16, i64 16, !16, i64 20}
!15 = !{!"long long", !7, i64 0}
!16 = !{!"int", !7, i64 0}
!17 = !{!18, !11, i64 0}
!18 = !{!"", !11, i64 0, !7, i64 2, !7, i64 3, !7, i64 4, !7, i64 5, !7, i64 6, !7, i64 7, !16, i64 8, !11, i64 12, !7, i64 14, !7, i64 15}
!19 = !{!18, !7, i64 2}
!20 = !{!18, !7, i64 3}
!21 = !{!18, !7, i64 4}
!22 = !{!18, !7, i64 5}
!23 = !{!18, !7, i64 6}
!24 = !{!16, !16, i64 0}
!25 = !{!26, !16, i64 4}
!26 = !{!"", !16, i64 0, !16, i64 4, !16, i64 8, !16, i64 12, !16, i64 16, !16, i64 20, !16, i64 24, !16, i64 28, !16, i64 32, !16, i64 36, !7, i64 40, !27, i64 552, !27, i64 584, !27, i64 616, !7, i64 648, !7, i64 649, !7, i64 650, !7, i64 651, !7, i64 652}
!27 = !{!"", !7, i64 0}
!28 = !{!13, !6, i64 88}
!29 = !{!15, !15, i64 0}


; 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.GUID = type { i32, i16, i16, [8 x i8] }
%struct.EFI_TIME = type { i16, i8, i8, i8, i8, i8, i8, i32, i16, i8, i8 }

@.str = external hidden unnamed_addr constant [9 x i32], align 4
@gEfiDhcp6ServiceBindingProtocolGuid = external global %struct.GUID, align 4
@gRT = external local_unnamed_addr global ptr, align 8

; Function Attrs: nounwind uwtable
define dso_local ptr @Dhcp6GenerateClientId(ptr noundef %0) local_unnamed_addr #0 {
  %2 = alloca ptr, align 8
  %3 = alloca %struct.EFI_TIME, align 4
  %4 = alloca %struct.GUID, align 4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %3) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %4) #3
  %5 = call i64 @GetVariable2(ptr noundef nonnull @.str, ptr noundef nonnull @gEfiDhcp6ServiceBindingProtocolGuid, ptr noundef nonnull %2, ptr noundef null) #3
  %6 = load ptr, ptr %2, align 8, !tbaa !5
  %.not = icmp eq ptr %6, null
  br i1 %.not, label %7, label %92

7:                                                ; preds = %1
  %8 = call i64 @NetLibGetSystemGuid(ptr noundef nonnull %4) #3
  %9 = icmp slt i64 %8, 0
  br i1 %9, label %20, label %10

10:                                               ; preds = %7
  %11 = call ptr @AllocateZeroPool(i64 noundef 20) #3
  store ptr %11, ptr %2, align 8, !tbaa !5
  %12 = icmp eq ptr %11, null
  br i1 %12, label %92, label %13

13:                                               ; preds = %10
  store i16 18, ptr %11, align 2, !tbaa !9
  %14 = getelementptr inbounds i8, ptr %11, i64 2
  %15 = call zeroext i16 @SwapBytes16(i16 noundef zeroext 4) #3
  %16 = call zeroext i16 @WriteUnaligned16(ptr noundef nonnull %14, i16 noundef zeroext %15) #3
  %17 = load ptr, ptr %2, align 8, !tbaa !5
  %18 = getelementptr inbounds i8, ptr %17, i64 4
  %19 = call ptr @CopyMem(ptr noundef nonnull %18, ptr noundef nonnull %4, i64 noundef 16) #3
  br label %80

20:                                               ; preds = %7
  %21 = load ptr, ptr @gRT, align 8, !tbaa !5
  %22 = getelementptr inbounds i8, ptr %21, i64 24
  %23 = load ptr, ptr %22, align 8, !tbaa !12
  %24 = call i64 %23(ptr noundef nonnull %3, ptr noundef null) #3
  %25 = load i16, ptr %3, align 4, !tbaa !17
  %26 = getelementptr inbounds i8, ptr %3, i64 2
  %27 = load i8, ptr %26, align 2, !tbaa !19
  %28 = getelementptr inbounds i8, ptr %3, i64 3
  %29 = load i8, ptr %28, align 1, !tbaa !20
  %30 = getelementptr inbounds i8, ptr %3, i64 4
  %31 = load i8, ptr %30, align 4, !tbaa !21
  %32 = getelementptr inbounds i8, ptr %3, i64 5
  %33 = load i8, ptr %32, align 1, !tbaa !22
  %34 = getelementptr inbounds i8, ptr %3, i64 6
  %35 = load i8, ptr %34, align 2, !tbaa !23
  %36 = getelementptr inbounds i8, ptr %0, i64 4
  %37 = load i32, ptr %36, align 4, !tbaa !24
  %38 = add i32 %37, 10
  %39 = zext i32 %38 to i64
  %40 = call ptr @AllocateZeroPool(i64 noundef %39) #3
  store ptr %40, ptr %2, align 8, !tbaa !5
  %41 = icmp eq ptr %40, null
  br i1 %41, label %92, label %42

42:                                               ; preds = %20
  %43 = zext i16 %25 to i32
  %44 = mul nuw nsw i32 %43, 360
  %45 = zext i8 %27 to i32
  %46 = add nuw nsw i32 %44, %45
  %47 = mul nuw nsw i32 %46, 30
  %48 = zext i8 %29 to i32
  %49 = add nuw nsw i32 %47, %48
  %50 = mul i32 %49, 24
  %51 = zext i8 %31 to i32
  %52 = add nuw nsw i32 %51, -518400744
  %53 = add i32 %52, %50
  %54 = mul nsw i32 %53, 60
  %55 = zext i8 %33 to i32
  %56 = add nsw i32 %54, %55
  %57 = mul nsw i32 %56, 60
  %58 = zext i8 %35 to i32
  %59 = add nsw i32 %57, %58
  %60 = load i32, ptr %36, align 4, !tbaa !24
  %61 = trunc i32 %60 to i16
  %62 = add i16 %61, 8
  store i16 %62, ptr %40, align 2, !tbaa !9
  %63 = getelementptr inbounds i8, ptr %40, i64 2
  %64 = call zeroext i16 @SwapBytes16(i16 noundef zeroext 1) #3
  %65 = call zeroext i16 @WriteUnaligned16(ptr noundef nonnull %63, i16 noundef zeroext %64) #3
  %66 = load ptr, ptr %2, align 8, !tbaa !5
  %67 = getelementptr inbounds i8, ptr %66, i64 4
  %68 = call zeroext i16 @SwapBytes16(i16 noundef zeroext 1) #3
  %69 = call zeroext i16 @WriteUnaligned16(ptr noundef nonnull %67, i16 noundef zeroext %68) #3
  %70 = load ptr, ptr %2, align 8, !tbaa !5
  %71 = getelementptr inbounds i8, ptr %70, i64 6
  %72 = call i32 @SwapBytes32(i32 noundef %59) #3
  %73 = call i32 @WriteUnaligned32(ptr noundef nonnull %71, i32 noundef %72) #3
  %74 = load ptr, ptr %2, align 8, !tbaa !5
  %75 = getelementptr inbounds i8, ptr %74, i64 10
  %76 = getelementptr inbounds i8, ptr %0, i64 552
  %77 = load i32, ptr %36, align 4, !tbaa !24
  %78 = zext i32 %77 to i64
  %79 = call ptr @CopyMem(ptr noundef nonnull %75, ptr noundef nonnull %76, i64 noundef %78) #3
  br label %80

80:                                               ; preds = %42, %13
  %81 = load ptr, ptr @gRT, align 8, !tbaa !5
  %82 = getelementptr inbounds i8, ptr %81, i64 88
  %83 = load ptr, ptr %82, align 8, !tbaa !27
  %84 = load ptr, ptr %2, align 8, !tbaa !5
  %85 = load i16, ptr %84, align 2, !tbaa !9
  %86 = zext i16 %85 to i64
  %87 = add nuw nsw i64 %86, 2
  %88 = call i64 %83(ptr noundef nonnull @.str, ptr noundef nonnull @gEfiDhcp6ServiceBindingProtocolGuid, i32 noundef 3, i64 noundef %87, ptr noundef nonnull %84) #3
  %89 = icmp slt i64 %88, 0
  %90 = load ptr, ptr %2, align 8, !tbaa !5
  br i1 %89, label %91, label %92

91:                                               ; preds = %80
  call void @FreePool(ptr noundef %90) #3
  br label %92

92:                                               ; preds = %80, %20, %10, %1, %91
  %.0 = phi ptr [ null, %91 ], [ %6, %1 ], [ null, %10 ], [ null, %20 ], [ %90, %80 ]
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %4) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %3) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #3
  ret ptr %.0
}

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

declare i64 @GetVariable2(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare i64 @NetLibGetSystemGuid(ptr noundef) local_unnamed_addr #2

declare ptr @AllocateZeroPool(i64 noundef) local_unnamed_addr #2

declare zeroext i16 @WriteUnaligned16(ptr noundef, i16 noundef zeroext) local_unnamed_addr #2

declare zeroext i16 @SwapBytes16(i16 noundef zeroext) local_unnamed_addr #2

declare ptr @CopyMem(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #2

declare i32 @WriteUnaligned32(ptr noundef, i32 noundef) local_unnamed_addr #2

declare i32 @SwapBytes32(i32 noundef) local_unnamed_addr #2

declare void @FreePool(ptr noundef) local_unnamed_addr #2

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

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, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !11, i64 0}
!10 = !{!"", !11, i64 0, !7, i64 2}
!11 = !{!"short", !7, i64 0}
!12 = !{!13, !6, i64 24}
!13 = !{!"", !14, 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}
!14 = !{!"", !15, i64 0, !16, i64 8, !16, i64 12, !16, i64 16, !16, i64 20}
!15 = !{!"long long", !7, i64 0}
!16 = !{!"int", !7, i64 0}
!17 = !{!18, !11, i64 0}
!18 = !{!"", !11, i64 0, !7, i64 2, !7, i64 3, !7, i64 4, !7, i64 5, !7, i64 6, !7, i64 7, !16, i64 8, !11, i64 12, !7, i64 14, !7, i64 15}
!19 = !{!18, !7, i64 2}
!20 = !{!18, !7, i64 3}
!21 = !{!18, !7, i64 4}
!22 = !{!18, !7, i64 5}
!23 = !{!18, !7, i64 6}
!24 = !{!25, !16, i64 4}
!25 = !{!"", !16, i64 0, !16, i64 4, !16, i64 8, !16, i64 12, !16, i64 16, !16, i64 20, !16, i64 24, !16, i64 28, !16, i64 32, !16, i64 36, !7, i64 40, !26, i64 552, !26, i64 584, !26, i64 616, !7, i64 648, !7, i64 649, !7, i64 650, !7, i64 651, !7, i64 652}
!26 = !{!"", !7, i64 0}
!27 = !{!13, !6, i64 88}


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