; LLVM IR from thalium/icebox :: third_party/virtualbox/src/VBox/Devices/EFI/Firmware/IntelFrameworkModulePkg (Undi16SimpleNetworkReceive)

; 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_SIMPLE_NETWORK_DEV = type { i64, ptr, %struct._EFI_SIMPLE_NETWORK_PROTOCOL, %struct.EFI_SIMPLE_NETWORK_MODE, %struct._EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL, ptr, ptr, ptr, i8, ptr, ptr, i16, i16, %struct.EFI_SIMPLE_NETWORK_DEV_FIFO, ptr, ptr, %struct.PXENV_UNDI_GET_INFORMATION_T, %struct.PXENV_UNDI_GET_NIC_TYPE_T, %struct.PXENV_UNDI_GET_NDIS_INFO_T, i8, %struct.PXENV_UNDI_ISR_T, ptr, ptr, ptr, ptr, i8, i64, i64, i64, i64, ptr, ptr, ptr, ptr }
%struct._EFI_SIMPLE_NETWORK_PROTOCOL = type { i64, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%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] }
%struct._EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL = type { i64, i64, i64, i32, [4 x i8], i8, i8, i8, i8, i16 }
%struct.EFI_SIMPLE_NETWORK_DEV_FIFO = type { i32, i32, [64 x ptr] }
%struct.PXENV_UNDI_GET_INFORMATION_T = type { i16, i16, i16, i16, i16, i16, [16 x i8], [16 x i8], i16, i16, i16 }
%struct.PXENV_UNDI_GET_NIC_TYPE_T = type <{ i16, i8, %union.PCI_PNP_INFO_T }>
%union.PCI_PNP_INFO_T = type { %struct.PCI_INFO_T }
%struct.PCI_INFO_T = type { i16, i16, i8, i8, i8, i8, i16, i16, i16 }
%struct.PXENV_UNDI_GET_NDIS_INFO_T = type <{ i16, [16 x i8], i32, i32, [4 x i32] }>
%struct.PXENV_UNDI_ISR_T = type { i16, i16, i16, i16, i16, i16, i16, i8, i8 }

@.str.29 = external hidden unnamed_addr constant [160 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.79 = external hidden unnamed_addr constant [49 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 ptr @CopyMem(ptr noundef, ptr noundef, i64 noundef) #1

declare zeroext i8 @DebugPrintEnabled() #1

declare zeroext i8 @DebugPrintLevelEnabled(i64 noundef) #1

declare void @DebugPrint(i64 noundef, ptr noundef, ...) #1

; Function Attrs: nounwind uwtable
define dso_local i64 @Undi16SimpleNetworkReceive(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6) #2 {
  %8 = alloca i64, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca i64, align 8
  %17 = alloca ptr, align 8
  %18 = alloca i64, align 8
  %19 = alloca i8, align 1
  %20 = alloca i32, align 4
  store ptr %0, ptr %9, align 8, !tbaa !5
  store ptr %1, ptr %10, align 8, !tbaa !5
  store ptr %2, ptr %11, align 8, !tbaa !5
  store ptr %3, ptr %12, align 8, !tbaa !5
  store ptr %4, ptr %13, align 8, !tbaa !5
  store ptr %5, ptr %14, align 8, !tbaa !5
  store ptr %6, ptr %15, align 8, !tbaa !5
  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 1, ptr %19) #3
  %21 = load ptr, ptr %9, align 8, !tbaa !5
  %22 = icmp eq ptr %21, null
  br i1 %22, label %29, label %23

23:                                               ; preds = %7
  %24 = load ptr, ptr %11, align 8, !tbaa !5
  %25 = icmp eq ptr %24, null
  br i1 %25, label %29, label %26

26:                                               ; preds = %23
  %27 = load ptr, ptr %12, align 8, !tbaa !5
  %28 = icmp eq ptr %27, null
  br i1 %28, label %29, label %30

29:                                               ; preds = %26, %23, %7
  store i64 -9223372036854775806, ptr %8, align 8
  store i32 1, ptr %20, align 4
  br label %148

30:                                               ; preds = %26
  store i64 0, ptr %16, align 8, !tbaa !9
  %31 = call zeroext i8 @DebugAssertEnabled()
  %32 = zext i8 %31 to i32
  %33 = icmp ne i32 %32, 0
  br i1 %33, label %34, label %44

34:                                               ; preds = %30
  %35 = load ptr, ptr %9, align 8, !tbaa !5
  %36 = ptrtoint ptr %35 to i64
  %37 = sub i64 %36, ptrtoint (ptr getelementptr inbounds (%struct.EFI_SIMPLE_NETWORK_DEV, ptr null, i32 0, i32 2) to i64)
  %38 = inttoptr i64 %37 to ptr
  %39 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_DEV, ptr %38, i32 0, i32 0
  %40 = load i64, ptr %39, align 8, !tbaa !11
  %41 = icmp ne i64 %40, 909209203
  br i1 %41, label %42, label %44

42:                                               ; preds = %34
  call void @DebugAssert(ptr noundef @.str.29, i64 noundef 3312, ptr noundef @.str.30)
  %43 = load ptr, ptr %9, align 8, !tbaa !5
  br label %49

44:                                               ; preds = %34, %30
  %45 = load ptr, ptr %9, align 8, !tbaa !5
  %46 = ptrtoint ptr %45 to i64
  %47 = sub i64 %46, ptrtoint (ptr getelementptr inbounds (%struct.EFI_SIMPLE_NETWORK_DEV, ptr null, i32 0, i32 2) to i64)
  %48 = inttoptr i64 %47 to ptr
  br label %49

49:                                               ; preds = %44, %42
  %50 = phi ptr [ %43, %42 ], [ %48, %44 ]
  store ptr %50, ptr %17, align 8, !tbaa !5
  %51 = load ptr, ptr %17, align 8, !tbaa !5
  %52 = icmp eq ptr %51, null
  br i1 %52, label %53, label %54

53:                                               ; preds = %49
  store i64 -9223372036854775801, ptr %8, align 8
  store i32 1, ptr %20, align 4
  br label %148

54:                                               ; preds = %49
  %55 = load ptr, ptr %17, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_DEV, ptr %55, i32 0, i32 3
  %57 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %56, i32 0, i32 0
  %58 = load i32, ptr %57, align 8, !tbaa !24
  switch i32 %58, label %61 [
    i32 2, label %62
    i32 0, label %59
    i32 1, label %60
  ]

59:                                               ; preds = %54
  store i64 -9223372036854775789, ptr %8, align 8
  store i32 1, ptr %20, align 4
  br label %148

60:                                               ; preds = %54
  br label %61

61:                                               ; preds = %60, %54
  store i64 -9223372036854775801, ptr %8, align 8
  store i32 1, ptr %20, align 4
  br label %148

62:                                               ; preds = %54
  %63 = load ptr, ptr %9, align 8, !tbaa !5
  %64 = load ptr, ptr %11, align 8, !tbaa !5
  %65 = load ptr, ptr %10, align 8, !tbaa !5
  %66 = load ptr, ptr %12, align 8, !tbaa !5
  %67 = call i64 @Undi16SimpleNetworkIsr(ptr noundef %63, ptr noundef %64, ptr noundef %65, ptr noundef %66, ptr noundef %19, ptr noundef null)
  store i64 %67, ptr %16, align 8, !tbaa !9
  %68 = load i64, ptr %16, align 8, !tbaa !9
  %69 = icmp slt i64 %68, 0
  br i1 %69, label %70, label %72

70:                                               ; preds = %62
  %71 = load i64, ptr %16, align 8, !tbaa !9
  store i64 %71, ptr %8, align 8
  store i32 1, ptr %20, align 4
  br label %148

72:                                               ; preds = %62
  %73 = load ptr, ptr %17, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_DEV, ptr %73, i32 0, i32 25
  %75 = load i8, ptr %74, align 8, !tbaa !25
  %76 = zext i8 %75 to i32
  %77 = and i32 %76, 1
  %78 = icmp eq i32 %77, 0
  br i1 %78, label %79, label %80

79:                                               ; preds = %72
  store i64 -9223372036854775802, ptr %8, align 8
  store i32 1, ptr %20, align 4
  br label %148

80:                                               ; preds = %72
  %81 = load ptr, ptr %17, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_DEV, ptr %81, i32 0, i32 25
  %83 = load i8, ptr %82, align 8, !tbaa !25
  %84 = zext i8 %83 to i32
  %85 = and i32 %84, -2
  %86 = trunc i32 %85 to i8
  store i8 %86, ptr %82, align 8, !tbaa !25
  %87 = load ptr, ptr %9, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct._EFI_SIMPLE_NETWORK_PROTOCOL, ptr %87, i32 0, i32 15
  %89 = load ptr, ptr %88, align 8, !tbaa !26
  %90 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %89, i32 0, i32 1
  %91 = load i32, ptr %90, align 4, !tbaa !27
  %92 = zext i32 %91 to i64
  store i64 %92, ptr %18, align 8, !tbaa !9
  %93 = load ptr, ptr %13, align 8, !tbaa !5
  %94 = icmp ne ptr %93, null
  br i1 %94, label %95, label %102

95:                                               ; preds = %80
  %96 = load ptr, ptr %13, align 8, !tbaa !5
  %97 = load ptr, ptr %12, align 8, !tbaa !5
  %98 = load i64, ptr %18, align 8, !tbaa !9
  %99 = getelementptr inbounds i8, ptr %97, i64 %98
  %100 = load i64, ptr %18, align 8, !tbaa !9
  %101 = call ptr @CopyMem(ptr noundef %96, ptr noundef %99, i64 noundef %100)
  br label %102

102:                                              ; preds = %95, %80
  %103 = load ptr, ptr %14, align 8, !tbaa !5
  %104 = icmp ne ptr %103, null
  br i1 %104, label %105, label %110

105:                                              ; preds = %102
  %106 = load ptr, ptr %14, align 8, !tbaa !5
  %107 = load ptr, ptr %12, align 8, !tbaa !5
  %108 = load i64, ptr %18, align 8, !tbaa !9
  %109 = call ptr @CopyMem(ptr noundef %106, ptr noundef %107, i64 noundef %108)
  br label %110

110:                                              ; preds = %105, %102
  %111 = load ptr, ptr %15, align 8, !tbaa !5
  %112 = icmp ne ptr %111, null
  br i1 %112, label %113, label %128

113:                                              ; preds = %110
  %114 = load ptr, ptr %12, align 8, !tbaa !5
  %115 = load i64, ptr %18, align 8, !tbaa !9
  %116 = mul i64 2, %115
  %117 = getelementptr inbounds i8, ptr %114, i64 %116
  %118 = getelementptr inbounds i8, ptr %117, i64 1
  %119 = load i8, ptr %118, align 1, !tbaa !28
  %120 = load ptr, ptr %15, align 8, !tbaa !5
  store i8 %119, ptr %120, align 1, !tbaa !28
  %121 = load ptr, ptr %12, align 8, !tbaa !5
  %122 = load i64, ptr %18, align 8, !tbaa !9
  %123 = mul i64 2, %122
  %124 = getelementptr inbounds i8, ptr %121, i64 %123
  %125 = load i8, ptr %124, align 1, !tbaa !28
  %126 = load ptr, ptr %15, align 8, !tbaa !5
  %127 = getelementptr inbounds i8, ptr %126, i64 1
  store i8 %125, ptr %127, align 1, !tbaa !28
  br label %128

128:                                              ; preds = %113, %110
  br label %129

129:                                              ; preds = %128
  %130 = call zeroext i8 @DebugPrintEnabled()
  %131 = icmp ne i8 %130, 0
  br i1 %131, label %132, label %144

132:                                              ; preds = %129
  br label %133

133:                                              ; preds = %132
  %134 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 16384)
  %135 = icmp ne i8 %134, 0
  br i1 %135, label %136, label %141

136:                                              ; preds = %133
  %137 = load ptr, ptr %11, align 8, !tbaa !5
  %138 = load i64, ptr %137, align 8, !tbaa !9
  %139 = load ptr, ptr %10, align 8, !tbaa !5
  %140 = load i64, ptr %139, align 8, !tbaa !9
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 16384, ptr noundef @.str.79, i64 noundef %138, i64 noundef %140)
  br label %141

141:                                              ; preds = %136, %133
  br label %142

142:                                              ; preds = %141
  br label %143

143:                                              ; preds = %142
  br label %144

144:                                              ; preds = %143, %129
  br label %145

145:                                              ; preds = %144
  br label %146

146:                                              ; preds = %145
  %147 = load i64, ptr %16, align 8, !tbaa !9
  store i64 %147, ptr %8, align 8
  store i32 1, ptr %20, align 4
  br label %148

148:                                              ; preds = %146, %79, %70, %61, %59, %53, %29
  call void @llvm.lifetime.end.p0(i64 1, 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
  %149 = load i64, ptr %8, align 8
  ret i64 %149
}

declare zeroext i8 @DebugAssertEnabled() #1

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

; Function Attrs: nounwind uwtable
declare dso_local i64 @Undi16SimpleNetworkIsr(ptr noundef, ptr noundef, ptr 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 = !{!10, !10, i64 0}
!10 = !{!"long long", !7, i64 0}
!11 = !{!12, !10, i64 0}
!12 = !{!"", !10, i64 0, !6, i64 8, !13, i64 16, !14, i64 144, !17, i64 800, !6, i64 840, !6, i64 848, !6, i64 856, !7, i64 864, !6, i64 872, !6, i64 880, !18, i64 888, !18, i64 890, !19, i64 896, !6, i64 1416, !6, i64 1424, !20, i64 1432, !21, i64 1482, !22, i64 1499, !7, i64 1541, !23, i64 1542, !6, i64 1560, !6, i64 1568, !6, i64 1576, !6, i64 1584, !7, i64 1592, !10, i64 1600, !10, i64 1608, !10, i64 1616, !10, i64 1624, !6, i64 1632, !6, i64 1640, !6, i64 1648, !6, i64 1656}
!13 = !{!"_EFI_SIMPLE_NETWORK_PROTOCOL", !10, i64 0, !6, i64 8, !6, i64 16, !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}
!14 = !{!"", !15, i64 0, !15, i64 4, !15, i64 8, !15, i64 12, !15, i64 16, !15, i64 20, !15, i64 24, !15, i64 28, !15, i64 32, !15, i64 36, !7, i64 40, !16, i64 552, !16, i64 584, !16, i64 616, !7, i64 648, !7, i64 649, !7, i64 650, !7, i64 651, !7, i64 652}
!15 = !{!"int", !7, i64 0}
!16 = !{!"", !7, i64 0}
!17 = !{!"_EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL", !10, i64 0, !10, i64 8, !10, i64 16, !15, i64 24, !7, i64 28, !7, i64 32, !7, i64 33, !7, i64 34, !7, i64 35, !18, i64 36}
!18 = !{!"short", !7, i64 0}
!19 = !{!"", !15, i64 0, !15, i64 4, !7, i64 8}
!20 = !{!"", !18, i64 0, !18, i64 2, !18, i64 4, !18, i64 6, !18, i64 8, !18, i64 10, !7, i64 12, !7, i64 28, !18, i64 44, !18, i64 46, !18, i64 48}
!21 = !{!"", !18, i64 0, !7, i64 2, !7, i64 3}
!22 = !{!"", !18, i64 0, !7, i64 2, !15, i64 18, !15, i64 22, !7, i64 26}
!23 = !{!"", !18, i64 0, !18, i64 2, !18, i64 4, !18, i64 6, !18, i64 8, !18, i64 10, !18, i64 12, !7, i64 14, !7, i64 15}
!24 = !{!12, !15, i64 144}
!25 = !{!12, !7, i64 1592}
!26 = !{!13, !6, i64 120}
!27 = !{!14, !15, i64 4}
!28 = !{!7, !7, 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"

@.str.29 = external hidden unnamed_addr constant [160 x i8], align 1
@.str.30 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.79 = external hidden unnamed_addr constant [49 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

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

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

declare zeroext i8 @DebugPrintEnabled() local_unnamed_addr #1

declare zeroext i8 @DebugPrintLevelEnabled(i64 noundef) local_unnamed_addr #1

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

; Function Attrs: nounwind uwtable
define dso_local i64 @Undi16SimpleNetworkReceive(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef writeonly %6) local_unnamed_addr #2 {
  %8 = alloca i8, align 1
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %8) #3
  %9 = icmp eq ptr %0, null
  %10 = icmp eq ptr %2, null
  %or.cond = or i1 %9, %10
  %11 = icmp eq ptr %3, null
  %or.cond3 = or i1 %or.cond, %11
  br i1 %or.cond3, label %58, label %12

12:                                               ; preds = %7
  %13 = tail call zeroext i8 @DebugAssertEnabled() #3
  %.not = icmp eq i8 %13, 0
  %.pre = ptrtoint ptr %0 to i64
  %.pre53 = add i64 %.pre, -16
  %.pre55 = inttoptr i64 %.pre53 to ptr
  br i1 %.not, label %._crit_edge, label %14

14:                                               ; preds = %12
  %15 = load i64, ptr %.pre55, align 8, !tbaa !5
  %.not47 = icmp eq i64 %15, 909209203
  br i1 %.not47, label %._crit_edge, label %.thread

.thread:                                          ; preds = %14
  tail call void @DebugAssert(ptr noundef nonnull @.str.29, i64 noundef 3312, ptr noundef nonnull @.str.30) #3
  br label %17

._crit_edge:                                      ; preds = %12, %14
  %16 = icmp eq i64 %.pre53, 0
  br i1 %16, label %58, label %17

17:                                               ; preds = %.thread, %._crit_edge
  %18 = phi ptr [ %0, %.thread ], [ %.pre55, %._crit_edge ]
  %19 = getelementptr inbounds i8, ptr %18, i64 144
  %20 = load i32, ptr %19, align 8, !tbaa !22
  switch i32 %20, label %21 [
    i32 2, label %22
    i32 0, label %58
  ]

21:                                               ; preds = %17
  br label %58

22:                                               ; preds = %17
  %23 = call i64 @Undi16SimpleNetworkIsr(ptr noundef nonnull %0, ptr noundef nonnull %2, ptr noundef %1, ptr noundef nonnull %3, ptr noundef nonnull %8, ptr noundef null)
  %24 = icmp slt i64 %23, 0
  br i1 %24, label %58, label %25

25:                                               ; preds = %22
  %26 = getelementptr inbounds i8, ptr %18, i64 1592
  %27 = load i8, ptr %26, align 8, !tbaa !23
  %28 = and i8 %27, 1
  %29 = icmp eq i8 %28, 0
  br i1 %29, label %58, label %30

30:                                               ; preds = %25
  %31 = and i8 %27, -2
  store i8 %31, ptr %26, align 8, !tbaa !23
  %32 = getelementptr inbounds i8, ptr %0, i64 120
  %33 = load ptr, ptr %32, align 8, !tbaa !24
  %34 = getelementptr inbounds i8, ptr %33, i64 4
  %35 = load i32, ptr %34, align 4, !tbaa !25
  %36 = zext i32 %35 to i64
  %.not48 = icmp eq ptr %4, null
  br i1 %.not48, label %40, label %37

37:                                               ; preds = %30
  %38 = getelementptr inbounds i8, ptr %3, i64 %36
  %39 = call ptr @CopyMem(ptr noundef nonnull %4, ptr noundef %38, i64 noundef %36) #3
  br label %40

40:                                               ; preds = %37, %30
  %.not49 = icmp eq ptr %5, null
  br i1 %.not49, label %43, label %41

41:                                               ; preds = %40
  %42 = call ptr @CopyMem(ptr noundef nonnull %5, ptr noundef nonnull %3, i64 noundef %36) #3
  br label %43

43:                                               ; preds = %41, %40
  %.not50 = icmp eq ptr %6, null
  br i1 %.not50, label %51, label %44

44:                                               ; preds = %43
  %45 = shl nuw nsw i64 %36, 1
  %46 = getelementptr inbounds i8, ptr %3, i64 %45
  %47 = getelementptr inbounds i8, ptr %46, i64 1
  %48 = load i8, ptr %47, align 1, !tbaa !26
  store i8 %48, ptr %6, align 1, !tbaa !26
  %49 = load i8, ptr %46, align 1, !tbaa !26
  %50 = getelementptr inbounds i8, ptr %6, i64 1
  store i8 %49, ptr %50, align 1, !tbaa !26
  br label %51

51:                                               ; preds = %43, %44
  %52 = call zeroext i8 @DebugPrintEnabled() #3
  %.not51 = icmp eq i8 %52, 0
  br i1 %.not51, label %58, label %53

53:                                               ; preds = %51
  %54 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 16384) #3
  %.not52 = icmp eq i8 %54, 0
  br i1 %.not52, label %58, label %55

55:                                               ; preds = %53
  %56 = load i64, ptr %2, align 8, !tbaa !27
  %57 = load i64, ptr %1, align 8, !tbaa !27
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 16384, ptr noundef nonnull @.str.79, i64 noundef %56, i64 noundef %57) #3
  br label %58

58:                                               ; preds = %51, %55, %53, %25, %22, %17, %._crit_edge, %7, %21
  %.0 = phi i64 [ -9223372036854775801, %21 ], [ -9223372036854775806, %7 ], [ -9223372036854775801, %._crit_edge ], [ -9223372036854775789, %17 ], [ %23, %22 ], [ -9223372036854775802, %25 ], [ %23, %53 ], [ %23, %55 ], [ %23, %51 ]
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %8) #3
  ret i64 %.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 @Undi16SimpleNetworkIsr(ptr noundef, ptr noundef, ptr 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, !7, i64 0}
!6 = !{!"", !7, i64 0, !10, i64 8, !11, i64 16, !12, i64 144, !15, i64 800, !10, i64 840, !10, i64 848, !10, i64 856, !8, i64 864, !10, i64 872, !10, i64 880, !16, i64 888, !16, i64 890, !17, i64 896, !10, i64 1416, !10, i64 1424, !18, i64 1432, !19, i64 1482, !20, i64 1499, !8, i64 1541, !21, i64 1542, !10, i64 1560, !10, i64 1568, !10, i64 1576, !10, i64 1584, !8, i64 1592, !7, i64 1600, !7, i64 1608, !7, i64 1616, !7, i64 1624, !10, i64 1632, !10, i64 1640, !10, i64 1648, !10, i64 1656}
!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_SIMPLE_NETWORK_PROTOCOL", !7, i64 0, !10, i64 8, !10, i64 16, !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}
!12 = !{!"", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !13, i64 16, !13, i64 20, !13, i64 24, !13, i64 28, !13, i64 32, !13, i64 36, !8, i64 40, !14, i64 552, !14, i64 584, !14, i64 616, !8, i64 648, !8, i64 649, !8, i64 650, !8, i64 651, !8, i64 652}
!13 = !{!"int", !8, i64 0}
!14 = !{!"", !8, i64 0}
!15 = !{!"_EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL", !7, i64 0, !7, i64 8, !7, i64 16, !13, i64 24, !8, i64 28, !8, i64 32, !8, i64 33, !8, i64 34, !8, i64 35, !16, i64 36}
!16 = !{!"short", !8, i64 0}
!17 = !{!"", !13, i64 0, !13, i64 4, !8, i64 8}
!18 = !{!"", !16, i64 0, !16, i64 2, !16, i64 4, !16, i64 6, !16, i64 8, !16, i64 10, !8, i64 12, !8, i64 28, !16, i64 44, !16, i64 46, !16, i64 48}
!19 = !{!"", !16, i64 0, !8, i64 2, !8, i64 3}
!20 = !{!"", !16, i64 0, !8, i64 2, !13, i64 18, !13, i64 22, !8, i64 26}
!21 = !{!"", !16, i64 0, !16, i64 2, !16, i64 4, !16, i64 6, !16, i64 8, !16, i64 10, !16, i64 12, !8, i64 14, !8, i64 15}
!22 = !{!6, !13, i64 144}
!23 = !{!6, !8, i64 1592}
!24 = !{!11, !10, i64 120}
!25 = !{!12, !13, i64 4}
!26 = !{!8, !8, i64 0}
!27 = !{!7, !7, i64 0}


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