; LLVM IR from thalium/icebox :: third_party/virtualbox/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal (ArpSendFrame)

; 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_MANAGED_NETWORK_COMPLETION_TOKEN = type { ptr, i64, %union.anon }
%union.anon = type { ptr }
%struct.EFI_BOOT_SERVICES = type { %struct.EFI_TABLE_HEADER, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, 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.ARP_INSTANCE_DATA = type { i32, ptr, ptr, %struct._EFI_ARP_PROTOCOL, %struct._LIST_ENTRY, %struct.EFI_ARP_CONFIG_DATA, i8, i8 }
%struct._EFI_ARP_PROTOCOL = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct._LIST_ENTRY = type { ptr, ptr }
%struct.EFI_ARP_CONFIG_DATA = type { i16, i8, ptr, i32, i32, i32 }
%struct._ARP_SERVICE_DATA = type { i32, %struct._EFI_SERVICE_BINDING_PROTOCOL, ptr, ptr, ptr, ptr, %struct.EFI_MANAGED_NETWORK_CONFIG_DATA, %struct.EFI_MANAGED_NETWORK_COMPLETION_TOKEN, %struct.EFI_SIMPLE_NETWORK_MODE, i64, %struct._LIST_ENTRY, %struct._LIST_ENTRY, %struct._LIST_ENTRY, %struct._LIST_ENTRY, ptr }
%struct._EFI_SERVICE_BINDING_PROTOCOL = type { ptr, ptr }
%struct.EFI_MANAGED_NETWORK_CONFIG_DATA = type { i32, i32, i16, i8, i8, i8, i8, i8, i8, i8 }
%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.ARP_CACHE_ENTRY = type { %struct._LIST_ENTRY, i32, i32, i32, i32, [2 x %struct.NET_ARP_ADDRESS], %struct._LIST_ENTRY }
%struct.NET_ARP_ADDRESS = type { i16, i8, ptr, %union.NET_ARP_ADDRESS_UNION }
%union.NET_ARP_ADDRESS_UNION = type { [32 x i8] }
%struct.ARP_HEAD = type { i16, i16, i8, i8, i16 }
%struct.EFI_MANAGED_NETWORK_TRANSMIT_DATA = type { ptr, ptr, i16, i32, i16, i16, [1 x %struct.EFI_MANAGED_NETWORK_FRAGMENT_DATA] }
%struct.EFI_MANAGED_NETWORK_FRAGMENT_DATA = type { i32, ptr }
%struct._EFI_MANAGED_NETWORK_PROTOCOL = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }

@.str = external hidden unnamed_addr constant [149 x i8], align 1
@gBS = external global ptr, align 8
@.str.11 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [27 x i8], align 1

declare zeroext i8 @DebugAssertEnabled() #0

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

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

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

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

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

18:                                               ; preds = %3
  %19 = call zeroext i8 @DebugAssertEnabled()
  %20 = icmp ne i8 %19, 0
  br i1 %20, label %21, label %29

21:                                               ; preds = %18
  %22 = load ptr, ptr %4, align 8, !tbaa !5
  %23 = icmp ne ptr %22, null
  br i1 %23, label %24, label %27

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

27:                                               ; preds = %24, %21
  call void @DebugAssert(ptr noundef @.str, i64 noundef 1033, ptr noundef @.str.11)
  br label %28

28:                                               ; preds = %27, %24
  br label %29

29:                                               ; preds = %28, %18
  br label %30

30:                                               ; preds = %29
  br label %31

31:                                               ; preds = %30
  %32 = call ptr @AllocatePool(i64 noundef 24)
  store ptr %32, ptr %8, align 8, !tbaa !5
  %33 = load ptr, ptr %8, align 8, !tbaa !5
  %34 = icmp eq ptr %33, null
  br i1 %34, label %35, label %50

35:                                               ; preds = %31
  br label %36

36:                                               ; preds = %35
  %37 = call zeroext i8 @DebugPrintEnabled()
  %38 = icmp ne i8 %37, 0
  br i1 %38, label %39, label %47

39:                                               ; preds = %36
  br label %40

40:                                               ; preds = %39
  %41 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648)
  %42 = icmp ne i8 %41, 0
  br i1 %42, label %43, label %44

43:                                               ; preds = %40
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef @.str.12)
  br label %44

44:                                               ; preds = %43, %40
  br label %45

45:                                               ; preds = %44
  br label %46

46:                                               ; preds = %45
  br label %47

47:                                               ; preds = %46, %36
  br label %48

48:                                               ; preds = %47
  br label %49

49:                                               ; preds = %48
  store i32 1, ptr %17, align 4
  br label %382

50:                                               ; preds = %31
  %51 = load ptr, ptr %8, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_COMPLETION_TOKEN, ptr %51, i32 0, i32 0
  store ptr null, ptr %52, align 8, !tbaa !11
  store ptr null, ptr %9, align 8, !tbaa !5
  store ptr null, ptr %11, align 8, !tbaa !5
  %53 = load ptr, ptr @gBS, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %53, i32 0, i32 8
  %55 = load ptr, ptr %54, align 8, !tbaa !14
  %56 = load ptr, ptr %8, align 8, !tbaa !5
  %57 = load ptr, ptr %8, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_COMPLETION_TOKEN, ptr %57, i32 0, i32 0
  %59 = call i64 %55(i32 noundef 512, i64 noundef 16, ptr noundef @ArpOnFrameSent, ptr noundef %56, ptr noundef %58)
  store i64 %59, ptr %7, align 8, !tbaa !18
  %60 = load i64, ptr %7, align 8, !tbaa !18
  %61 = icmp slt i64 %60, 0
  br i1 %61, label %62, label %77

62:                                               ; preds = %50
  br label %63

63:                                               ; preds = %62
  %64 = call zeroext i8 @DebugPrintEnabled()
  %65 = icmp ne i8 %64, 0
  br i1 %65, label %66, label %74

66:                                               ; preds = %63
  br label %67

67:                                               ; preds = %66
  %68 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648)
  %69 = icmp ne i8 %68, 0
  br i1 %69, label %70, label %71

70:                                               ; preds = %67
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef @.str.13)
  br label %71

71:                                               ; preds = %70, %67
  br label %72

72:                                               ; preds = %71
  br label %73

73:                                               ; preds = %72
  br label %74

74:                                               ; preds = %73, %63
  br label %75

75:                                               ; preds = %74
  br label %76

76:                                               ; preds = %75
  br label %357

77:                                               ; preds = %50
  %78 = call ptr @AllocatePool(i64 noundef 48)
  store ptr %78, ptr %9, align 8, !tbaa !5
  %79 = load ptr, ptr %9, align 8, !tbaa !5
  %80 = icmp eq ptr %79, null
  br i1 %80, label %81, label %96

81:                                               ; preds = %77
  br label %82

82:                                               ; preds = %81
  %83 = call zeroext i8 @DebugPrintEnabled()
  %84 = icmp ne i8 %83, 0
  br i1 %84, label %85, label %93

85:                                               ; preds = %82
  br label %86

86:                                               ; preds = %85
  %87 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648)
  %88 = icmp ne i8 %87, 0
  br i1 %88, label %89, label %90

89:                                               ; preds = %86
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef @.str.14)
  br label %90

90:                                               ; preds = %89, %86
  br label %91

91:                                               ; preds = %90
  br label %92

92:                                               ; preds = %91
  br label %93

93:                                               ; preds = %92, %82
  br label %94

94:                                               ; preds = %93
  br label %95

95:                                               ; preds = %94
  br label %357

96:                                               ; preds = %77
  %97 = load ptr, ptr %4, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.ARP_INSTANCE_DATA, ptr %97, i32 0, i32 1
  %99 = load ptr, ptr %98, align 8, !tbaa !19
  store ptr %99, ptr %12, align 8, !tbaa !5
  %100 = load ptr, ptr %12, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct._ARP_SERVICE_DATA, ptr %100, i32 0, i32 8
  store ptr %101, ptr %13, align 8, !tbaa !5
  %102 = load ptr, ptr %4, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.ARP_INSTANCE_DATA, ptr %102, i32 0, i32 5
  store ptr %103, ptr %14, align 8, !tbaa !5
  %104 = load ptr, ptr %13, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %104, i32 0, i32 2
  %106 = load i32, ptr %105, align 4, !tbaa !24
  %107 = zext i32 %106 to i64
  %108 = add i64 %107, 8
  %109 = load ptr, ptr %14, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.EFI_ARP_CONFIG_DATA, ptr %109, i32 0, i32 1
  %111 = load i8, ptr %110, align 2, !tbaa !27
  %112 = zext i8 %111 to i32
  %113 = load ptr, ptr %13, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %113, i32 0, i32 1
  %115 = load i32, ptr %114, align 4, !tbaa !28
  %116 = add i32 %112, %115
  %117 = mul i32 2, %116
  %118 = zext i32 %117 to i64
  %119 = add i64 %108, %118
  %120 = trunc i64 %119 to i32
  store i32 %120, ptr %10, align 4, !tbaa !29
  %121 = load i32, ptr %10, align 4, !tbaa !29
  %122 = zext i32 %121 to i64
  %123 = call ptr @AllocatePool(i64 noundef %122)
  store ptr %123, ptr %11, align 8, !tbaa !5
  %124 = load ptr, ptr %11, align 8, !tbaa !5
  %125 = icmp eq ptr %124, null
  br i1 %125, label %126, label %152

126:                                              ; preds = %96
  br label %127

127:                                              ; preds = %126
  %128 = call zeroext i8 @DebugPrintEnabled()
  %129 = icmp ne i8 %128, 0
  br i1 %129, label %130, label %138

130:                                              ; preds = %127
  br label %131

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

134:                                              ; preds = %131
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef @.str.15)
  br label %135

135:                                              ; preds = %134, %131
  br label %136

136:                                              ; preds = %135
  br label %137

137:                                              ; preds = %136
  br label %138

138:                                              ; preds = %137, %127
  br label %139

139:                                              ; preds = %138
  br label %140

140:                                              ; preds = %139
  br label %141

141:                                              ; preds = %140
  %142 = call zeroext i8 @DebugAssertEnabled()
  %143 = icmp ne i8 %142, 0
  br i1 %143, label %144, label %149

144:                                              ; preds = %141
  %145 = load ptr, ptr %11, align 8, !tbaa !5
  %146 = icmp ne ptr %145, null
  br i1 %146, label %148, label %147

147:                                              ; preds = %144
  call void @DebugAssert(ptr noundef @.str, i64 noundef 1088, ptr noundef @.str.16)
  br label %148

148:                                              ; preds = %147, %144
  br label %149

149:                                              ; preds = %148, %141
  br label %150

150:                                              ; preds = %149
  br label %151

151:                                              ; preds = %150
  br label %152

152:                                              ; preds = %151, %96
  %153 = load ptr, ptr %11, align 8, !tbaa !5
  store ptr %153, ptr %15, align 8, !tbaa !5
  %154 = load i16, ptr %6, align 2, !tbaa !9
  %155 = zext i16 %154 to i32
  %156 = icmp eq i32 %155, 1
  br i1 %156, label %157, label %166

157:                                              ; preds = %152
  %158 = load ptr, ptr %15, align 8, !tbaa !5
  %159 = load ptr, ptr %13, align 8, !tbaa !5
  %160 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %159, i32 0, i32 12
  %161 = load ptr, ptr %13, align 8, !tbaa !5
  %162 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %161, i32 0, i32 1
  %163 = load i32, ptr %162, align 4, !tbaa !28
  %164 = zext i32 %163 to i64
  %165 = call ptr @CopyMem(ptr noundef %158, ptr noundef %160, i64 noundef %164)
  br label %178

166:                                              ; preds = %152
  %167 = load ptr, ptr %15, align 8, !tbaa !5
  %168 = load ptr, ptr %5, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct.ARP_CACHE_ENTRY, ptr %168, i32 0, i32 5
  %170 = getelementptr inbounds [2 x %struct.NET_ARP_ADDRESS], ptr %169, i64 0, i64 0
  %171 = getelementptr inbounds %struct.NET_ARP_ADDRESS, ptr %170, i32 0, i32 2
  %172 = load ptr, ptr %171, align 8, !tbaa !30
  %173 = load ptr, ptr %13, align 8, !tbaa !5
  %174 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %173, i32 0, i32 1
  %175 = load i32, ptr %174, align 4, !tbaa !28
  %176 = zext i32 %175 to i64
  %177 = call ptr @CopyMem(ptr noundef %167, ptr noundef %172, i64 noundef %176)
  br label %178

178:                                              ; preds = %166, %157
  %179 = load ptr, ptr %13, align 8, !tbaa !5
  %180 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %179, i32 0, i32 1
  %181 = load i32, ptr %180, align 4, !tbaa !28
  %182 = load ptr, ptr %15, align 8, !tbaa !5
  %183 = zext i32 %181 to i64
  %184 = getelementptr inbounds i8, ptr %182, i64 %183
  store ptr %184, ptr %15, align 8, !tbaa !5
  %185 = load ptr, ptr %15, align 8, !tbaa !5
  %186 = load ptr, ptr %13, align 8, !tbaa !5
  %187 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %186, i32 0, i32 11
  %188 = load ptr, ptr %13, align 8, !tbaa !5
  %189 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %188, i32 0, i32 1
  %190 = load i32, ptr %189, align 4, !tbaa !28
  %191 = zext i32 %190 to i64
  %192 = call ptr @CopyMem(ptr noundef %185, ptr noundef %187, i64 noundef %191)
  %193 = load ptr, ptr %13, align 8, !tbaa !5
  %194 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %193, i32 0, i32 1
  %195 = load i32, ptr %194, align 4, !tbaa !28
  %196 = load ptr, ptr %15, align 8, !tbaa !5
  %197 = zext i32 %195 to i64
  %198 = getelementptr inbounds i8, ptr %196, i64 %197
  store ptr %198, ptr %15, align 8, !tbaa !5
  %199 = call zeroext i16 @SwapBytes16(i16 noundef zeroext 2054)
  %200 = load ptr, ptr %15, align 8, !tbaa !5
  store i16 %199, ptr %200, align 2, !tbaa !9
  %201 = load ptr, ptr %15, align 8, !tbaa !5
  %202 = getelementptr inbounds i8, ptr %201, i64 2
  store ptr %202, ptr %15, align 8, !tbaa !5
  %203 = load ptr, ptr %15, align 8, !tbaa !5
  store ptr %203, ptr %16, align 8, !tbaa !5
  %204 = load ptr, ptr %13, align 8, !tbaa !5
  %205 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %204, i32 0, i32 14
  %206 = load i8, ptr %205, align 4, !tbaa !32
  %207 = zext i8 %206 to i16
  %208 = call zeroext i16 @SwapBytes16(i16 noundef zeroext %207)
  %209 = load ptr, ptr %16, align 8, !tbaa !5
  %210 = getelementptr inbounds %struct.ARP_HEAD, ptr %209, i32 0, i32 0
  store i16 %208, ptr %210, align 1, !tbaa !33
  %211 = load ptr, ptr %14, align 8, !tbaa !5
  %212 = getelementptr inbounds %struct.EFI_ARP_CONFIG_DATA, ptr %211, i32 0, i32 0
  %213 = load i16, ptr %212, align 8, !tbaa !35
  %214 = call zeroext i16 @SwapBytes16(i16 noundef zeroext %213)
  %215 = load ptr, ptr %16, align 8, !tbaa !5
  %216 = getelementptr inbounds %struct.ARP_HEAD, ptr %215, i32 0, i32 1
  store i16 %214, ptr %216, align 1, !tbaa !36
  %217 = load ptr, ptr %13, align 8, !tbaa !5
  %218 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %217, i32 0, i32 1
  %219 = load i32, ptr %218, align 4, !tbaa !28
  %220 = trunc i32 %219 to i8
  %221 = load ptr, ptr %16, align 8, !tbaa !5
  %222 = getelementptr inbounds %struct.ARP_HEAD, ptr %221, i32 0, i32 2
  store i8 %220, ptr %222, align 1, !tbaa !37
  %223 = load ptr, ptr %14, align 8, !tbaa !5
  %224 = getelementptr inbounds %struct.EFI_ARP_CONFIG_DATA, ptr %223, i32 0, i32 1
  %225 = load i8, ptr %224, align 2, !tbaa !27
  %226 = load ptr, ptr %16, align 8, !tbaa !5
  %227 = getelementptr inbounds %struct.ARP_HEAD, ptr %226, i32 0, i32 3
  store i8 %225, ptr %227, align 1, !tbaa !38
  %228 = load i16, ptr %6, align 2, !tbaa !9
  %229 = call zeroext i16 @SwapBytes16(i16 noundef zeroext %228)
  %230 = load ptr, ptr %16, align 8, !tbaa !5
  %231 = getelementptr inbounds %struct.ARP_HEAD, ptr %230, i32 0, i32 4
  store i16 %229, ptr %231, align 1, !tbaa !39
  %232 = load ptr, ptr %15, align 8, !tbaa !5
  %233 = getelementptr inbounds i8, ptr %232, i64 8
  store ptr %233, ptr %15, align 8, !tbaa !5
  %234 = load ptr, ptr %15, align 8, !tbaa !5
  %235 = load ptr, ptr %13, align 8, !tbaa !5
  %236 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %235, i32 0, i32 11
  %237 = load ptr, ptr %13, align 8, !tbaa !5
  %238 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %237, i32 0, i32 1
  %239 = load i32, ptr %238, align 4, !tbaa !28
  %240 = zext i32 %239 to i64
  %241 = call ptr @CopyMem(ptr noundef %234, ptr noundef %236, i64 noundef %240)
  %242 = load ptr, ptr %13, align 8, !tbaa !5
  %243 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %242, i32 0, i32 1
  %244 = load i32, ptr %243, align 4, !tbaa !28
  %245 = load ptr, ptr %15, align 8, !tbaa !5
  %246 = zext i32 %244 to i64
  %247 = getelementptr inbounds i8, ptr %245, i64 %246
  store ptr %247, ptr %15, align 8, !tbaa !5
  %248 = load ptr, ptr %15, align 8, !tbaa !5
  %249 = load ptr, ptr %14, align 8, !tbaa !5
  %250 = getelementptr inbounds %struct.EFI_ARP_CONFIG_DATA, ptr %249, i32 0, i32 2
  %251 = load ptr, ptr %250, align 8, !tbaa !40
  %252 = load ptr, ptr %14, align 8, !tbaa !5
  %253 = getelementptr inbounds %struct.EFI_ARP_CONFIG_DATA, ptr %252, i32 0, i32 1
  %254 = load i8, ptr %253, align 2, !tbaa !27
  %255 = zext i8 %254 to i64
  %256 = call ptr @CopyMem(ptr noundef %248, ptr noundef %251, i64 noundef %255)
  %257 = load ptr, ptr %14, align 8, !tbaa !5
  %258 = getelementptr inbounds %struct.EFI_ARP_CONFIG_DATA, ptr %257, i32 0, i32 1
  %259 = load i8, ptr %258, align 2, !tbaa !27
  %260 = zext i8 %259 to i32
  %261 = load ptr, ptr %15, align 8, !tbaa !5
  %262 = sext i32 %260 to i64
  %263 = getelementptr inbounds i8, ptr %261, i64 %262
  store ptr %263, ptr %15, align 8, !tbaa !5
  %264 = load ptr, ptr %15, align 8, !tbaa !5
  %265 = load ptr, ptr %5, align 8, !tbaa !5
  %266 = getelementptr inbounds %struct.ARP_CACHE_ENTRY, ptr %265, i32 0, i32 5
  %267 = getelementptr inbounds [2 x %struct.NET_ARP_ADDRESS], ptr %266, i64 0, i64 0
  %268 = getelementptr inbounds %struct.NET_ARP_ADDRESS, ptr %267, i32 0, i32 2
  %269 = load ptr, ptr %268, align 8, !tbaa !30
  %270 = load ptr, ptr %13, align 8, !tbaa !5
  %271 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %270, i32 0, i32 1
  %272 = load i32, ptr %271, align 4, !tbaa !28
  %273 = zext i32 %272 to i64
  %274 = call ptr @CopyMem(ptr noundef %264, ptr noundef %269, i64 noundef %273)
  %275 = load ptr, ptr %13, align 8, !tbaa !5
  %276 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %275, i32 0, i32 1
  %277 = load i32, ptr %276, align 4, !tbaa !28
  %278 = load ptr, ptr %15, align 8, !tbaa !5
  %279 = zext i32 %277 to i64
  %280 = getelementptr inbounds i8, ptr %278, i64 %279
  store ptr %280, ptr %15, align 8, !tbaa !5
  %281 = load ptr, ptr %15, align 8, !tbaa !5
  %282 = load ptr, ptr %5, align 8, !tbaa !5
  %283 = getelementptr inbounds %struct.ARP_CACHE_ENTRY, ptr %282, i32 0, i32 5
  %284 = getelementptr inbounds [2 x %struct.NET_ARP_ADDRESS], ptr %283, i64 0, i64 1
  %285 = getelementptr inbounds %struct.NET_ARP_ADDRESS, ptr %284, i32 0, i32 2
  %286 = load ptr, ptr %285, align 8, !tbaa !30
  %287 = load ptr, ptr %14, align 8, !tbaa !5
  %288 = getelementptr inbounds %struct.EFI_ARP_CONFIG_DATA, ptr %287, i32 0, i32 1
  %289 = load i8, ptr %288, align 2, !tbaa !27
  %290 = zext i8 %289 to i64
  %291 = call ptr @CopyMem(ptr noundef %281, ptr noundef %286, i64 noundef %290)
  %292 = load ptr, ptr %9, align 8, !tbaa !5
  %293 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_TRANSMIT_DATA, ptr %292, i32 0, i32 0
  store ptr null, ptr %293, align 8, !tbaa !41
  %294 = load ptr, ptr %9, align 8, !tbaa !5
  %295 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_TRANSMIT_DATA, ptr %294, i32 0, i32 1
  store ptr null, ptr %295, align 8, !tbaa !43
  %296 = load ptr, ptr %9, align 8, !tbaa !5
  %297 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_TRANSMIT_DATA, ptr %296, i32 0, i32 2
  store i16 0, ptr %297, align 8, !tbaa !44
  %298 = load i32, ptr %10, align 4, !tbaa !29
  %299 = load ptr, ptr %13, align 8, !tbaa !5
  %300 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %299, i32 0, i32 2
  %301 = load i32, ptr %300, align 4, !tbaa !24
  %302 = sub i32 %298, %301
  %303 = load ptr, ptr %9, align 8, !tbaa !5
  %304 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_TRANSMIT_DATA, ptr %303, i32 0, i32 3
  store i32 %302, ptr %304, align 4, !tbaa !45
  %305 = load ptr, ptr %13, align 8, !tbaa !5
  %306 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %305, i32 0, i32 2
  %307 = load i32, ptr %306, align 4, !tbaa !24
  %308 = trunc i32 %307 to i16
  %309 = load ptr, ptr %9, align 8, !tbaa !5
  %310 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_TRANSMIT_DATA, ptr %309, i32 0, i32 4
  store i16 %308, ptr %310, align 8, !tbaa !46
  %311 = load ptr, ptr %9, align 8, !tbaa !5
  %312 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_TRANSMIT_DATA, ptr %311, i32 0, i32 5
  store i16 1, ptr %312, align 2, !tbaa !47
  %313 = load ptr, ptr %11, align 8, !tbaa !5
  %314 = load ptr, ptr %9, align 8, !tbaa !5
  %315 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_TRANSMIT_DATA, ptr %314, i32 0, i32 6
  %316 = getelementptr inbounds [1 x %struct.EFI_MANAGED_NETWORK_FRAGMENT_DATA], ptr %315, i64 0, i64 0
  %317 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_FRAGMENT_DATA, ptr %316, i32 0, i32 1
  store ptr %313, ptr %317, align 8, !tbaa !48
  %318 = load i32, ptr %10, align 4, !tbaa !29
  %319 = load ptr, ptr %9, align 8, !tbaa !5
  %320 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_TRANSMIT_DATA, ptr %319, i32 0, i32 6
  %321 = getelementptr inbounds [1 x %struct.EFI_MANAGED_NETWORK_FRAGMENT_DATA], ptr %320, i64 0, i64 0
  %322 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_FRAGMENT_DATA, ptr %321, i32 0, i32 0
  store i32 %318, ptr %322, align 8, !tbaa !50
  %323 = load ptr, ptr %9, align 8, !tbaa !5
  %324 = load ptr, ptr %8, align 8, !tbaa !5
  %325 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_COMPLETION_TOKEN, ptr %324, i32 0, i32 2
  store ptr %323, ptr %325, align 8, !tbaa !51
  %326 = load ptr, ptr %8, align 8, !tbaa !5
  %327 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_COMPLETION_TOKEN, ptr %326, i32 0, i32 1
  store i64 -9223372036854775802, ptr %327, align 8, !tbaa !52
  %328 = load ptr, ptr %12, align 8, !tbaa !5
  %329 = getelementptr inbounds %struct._ARP_SERVICE_DATA, ptr %328, i32 0, i32 5
  %330 = load ptr, ptr %329, align 8, !tbaa !53
  %331 = getelementptr inbounds %struct._EFI_MANAGED_NETWORK_PROTOCOL, ptr %330, i32 0, i32 4
  %332 = load ptr, ptr %331, align 8, !tbaa !57
  %333 = load ptr, ptr %12, align 8, !tbaa !5
  %334 = getelementptr inbounds %struct._ARP_SERVICE_DATA, ptr %333, i32 0, i32 5
  %335 = load ptr, ptr %334, align 8, !tbaa !53
  %336 = load ptr, ptr %8, align 8, !tbaa !5
  %337 = call i64 %332(ptr noundef %335, ptr noundef %336)
  store i64 %337, ptr %7, align 8, !tbaa !18
  %338 = load i64, ptr %7, align 8, !tbaa !18
  %339 = icmp slt i64 %338, 0
  br i1 %339, label %340, label %356

340:                                              ; preds = %178
  br label %341

341:                                              ; preds = %340
  %342 = call zeroext i8 @DebugPrintEnabled()
  %343 = icmp ne i8 %342, 0
  br i1 %343, label %344, label %353

344:                                              ; preds = %341
  br label %345

345:                                              ; preds = %344
  %346 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648)
  %347 = icmp ne i8 %346, 0
  br i1 %347, label %348, label %350

348:                                              ; preds = %345
  %349 = load i64, ptr %7, align 8, !tbaa !18
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef @.str.17, i64 noundef %349)
  br label %350

350:                                              ; preds = %348, %345
  br label %351

351:                                              ; preds = %350
  br label %352

352:                                              ; preds = %351
  br label %353

353:                                              ; preds = %352, %341
  br label %354

354:                                              ; preds = %353
  br label %355

355:                                              ; preds = %354
  br label %357

356:                                              ; preds = %178
  store i32 1, ptr %17, align 4
  br label %382

357:                                              ; preds = %355, %95, %76
  %358 = load ptr, ptr %11, align 8, !tbaa !5
  %359 = icmp ne ptr %358, null
  br i1 %359, label %360, label %362

360:                                              ; preds = %357
  %361 = load ptr, ptr %11, align 8, !tbaa !5
  call void @FreePool(ptr noundef %361)
  br label %362

362:                                              ; preds = %360, %357
  %363 = load ptr, ptr %9, align 8, !tbaa !5
  %364 = icmp ne ptr %363, null
  br i1 %364, label %365, label %367

365:                                              ; preds = %362
  %366 = load ptr, ptr %9, align 8, !tbaa !5
  call void @FreePool(ptr noundef %366)
  br label %367

367:                                              ; preds = %365, %362
  %368 = load ptr, ptr %8, align 8, !tbaa !5
  %369 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_COMPLETION_TOKEN, ptr %368, i32 0, i32 0
  %370 = load ptr, ptr %369, align 8, !tbaa !11
  %371 = icmp ne ptr %370, null
  br i1 %371, label %372, label %380

372:                                              ; preds = %367
  %373 = load ptr, ptr @gBS, align 8, !tbaa !5
  %374 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %373, i32 0, i32 12
  %375 = load ptr, ptr %374, align 8, !tbaa !59
  %376 = load ptr, ptr %8, align 8, !tbaa !5
  %377 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_COMPLETION_TOKEN, ptr %376, i32 0, i32 0
  %378 = load ptr, ptr %377, align 8, !tbaa !11
  %379 = call i64 %375(ptr noundef %378)
  br label %380

380:                                              ; preds = %372, %367
  %381 = load ptr, ptr %8, align 8, !tbaa !5
  call void @FreePool(ptr noundef %381)
  store i32 0, ptr %17, align 4
  br label %382

382:                                              ; preds = %380, %356, %49
  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
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  %383 = load i32, ptr %17, align 4
  switch i32 %383, label %385 [
    i32 0, label %384
    i32 1, label %384
  ]

384:                                              ; preds = %382, %382
  ret void

385:                                              ; preds = %382
  unreachable
}

declare zeroext i8 @DebugPrintEnabled() #0

declare zeroext i8 @DebugPrintLevelEnabled(i64 noundef) #0

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

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

declare void @FreePool(ptr noundef) #0

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

declare ptr @AllocatePool(i64 noundef) #0

attributes #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 = { 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 = !{!"short", !7, i64 0}
!11 = !{!12, !6, i64 0}
!12 = !{!"", !6, i64 0, !13, i64 8, !7, i64 16}
!13 = !{!"long long", !7, i64 0}
!14 = !{!15, !6, i64 80}
!15 = !{!"", !16, 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, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184, !6, i64 192, !6, i64 200, !6, i64 208, !6, i64 216, !6, i64 224, !6, i64 232, !6, i64 240, !6, i64 248, !6, i64 256, !6, i64 264, !6, i64 272, !6, i64 280, !6, i64 288, !6, i64 296, !6, i64 304, !6, i64 312, !6, i64 320, !6, i64 328, !6, i64 336, !6, i64 344, !6, i64 352, !6, i64 360, !6, i64 368}
!16 = !{!"", !13, i64 0, !17, i64 8, !17, i64 12, !17, i64 16, !17, i64 20}
!17 = !{!"int", !7, i64 0}
!18 = !{!13, !13, i64 0}
!19 = !{!20, !6, i64 8}
!20 = !{!"", !17, i64 0, !6, i64 8, !6, i64 16, !21, i64 24, !22, i64 80, !23, i64 96, !7, i64 128, !7, i64 129}
!21 = !{!"_EFI_ARP_PROTOCOL", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48}
!22 = !{!"_LIST_ENTRY", !6, i64 0, !6, i64 8}
!23 = !{!"", !10, i64 0, !7, i64 2, !6, i64 8, !17, i64 16, !17, i64 20, !17, i64 24}
!24 = !{!25, !17, i64 8}
!25 = !{!"", !17, i64 0, !17, i64 4, !17, i64 8, !17, i64 12, !17, i64 16, !17, i64 20, !17, i64 24, !17, i64 28, !17, i64 32, !17, 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 = !{!23, !7, i64 2}
!28 = !{!25, !17, i64 4}
!29 = !{!17, !17, i64 0}
!30 = !{!31, !6, i64 8}
!31 = !{!"", !10, i64 0, !7, i64 2, !6, i64 8, !7, i64 16}
!32 = !{!25, !7, i64 648}
!33 = !{!34, !10, i64 0}
!34 = !{!"", !10, i64 0, !10, i64 2, !7, i64 4, !7, i64 5, !10, i64 6}
!35 = !{!23, !10, i64 0}
!36 = !{!34, !10, i64 2}
!37 = !{!34, !7, i64 4}
!38 = !{!34, !7, i64 5}
!39 = !{!34, !10, i64 6}
!40 = !{!23, !6, i64 8}
!41 = !{!42, !6, i64 0}
!42 = !{!"", !6, i64 0, !6, i64 8, !10, i64 16, !17, i64 20, !10, i64 24, !10, i64 26, !7, i64 32}
!43 = !{!42, !6, i64 8}
!44 = !{!42, !10, i64 16}
!45 = !{!42, !17, i64 20}
!46 = !{!42, !10, i64 24}
!47 = !{!42, !10, i64 26}
!48 = !{!49, !6, i64 8}
!49 = !{!"", !17, i64 0, !6, i64 8}
!50 = !{!49, !17, i64 0}
!51 = !{!7, !7, i64 0}
!52 = !{!12, !13, i64 8}
!53 = !{!54, !6, i64 48}
!54 = !{!"_ARP_SERVICE_DATA", !17, i64 0, !55, i64 8, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !56, i64 56, !12, i64 80, !25, i64 104, !13, i64 760, !22, i64 768, !22, i64 784, !22, i64 800, !22, i64 816, !6, i64 832}
!55 = !{!"_EFI_SERVICE_BINDING_PROTOCOL", !6, i64 0, !6, i64 8}
!56 = !{!"", !17, i64 0, !17, i64 4, !10, i64 8, !7, i64 10, !7, i64 11, !7, i64 12, !7, i64 13, !7, i64 14, !7, i64 15, !7, i64 16}
!57 = !{!58, !6, i64 32}
!58 = !{!"_EFI_MANAGED_NETWORK_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}
!59 = !{!15, !6, i64 112}


; 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 = external hidden unnamed_addr constant [149 x i8], align 1
@gBS = external local_unnamed_addr global ptr, align 8
@.str.11 = external hidden unnamed_addr constant [59 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [27 x i8], align 1

declare zeroext i8 @DebugAssertEnabled() local_unnamed_addr #0

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

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

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

; Function Attrs: nounwind uwtable
define dso_local void @ArpSendFrame(ptr noundef readonly %0, ptr noundef readonly %1, i16 noundef zeroext %2) local_unnamed_addr #1 {
  %4 = tail call zeroext i8 @DebugAssertEnabled() #3
  %.not = icmp eq i8 %4, 0
  br i1 %.not, label %9, label %5

5:                                                ; preds = %3
  %6 = icmp ne ptr %0, null
  %7 = icmp ne ptr %1, null
  %or.cond = and i1 %6, %7
  br i1 %or.cond, label %9, label %8

8:                                                ; preds = %5
  tail call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 1033, ptr noundef nonnull @.str.11) #3
  br label %9

9:                                                ; preds = %8, %5, %3
  %10 = tail call ptr @AllocatePool(i64 noundef 24) #3
  %11 = icmp eq ptr %10, null
  br i1 %11, label %12, label %17

12:                                               ; preds = %9
  %13 = tail call zeroext i8 @DebugPrintEnabled() #3
  %.not111 = icmp eq i8 %13, 0
  br i1 %.not111, label %158, label %14

14:                                               ; preds = %12
  %15 = tail call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648) #3
  %.not112 = icmp eq i8 %15, 0
  br i1 %.not112, label %158, label %16

16:                                               ; preds = %14
  tail call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef nonnull @.str.12) #3
  br label %158

17:                                               ; preds = %9
  store ptr null, ptr %10, align 8, !tbaa !5
  %18 = load ptr, ptr @gBS, align 8, !tbaa !11
  %19 = getelementptr inbounds i8, ptr %18, i64 80
  %20 = load ptr, ptr %19, align 8, !tbaa !12
  %21 = tail call i64 %20(i32 noundef 512, i64 noundef 16, ptr noundef nonnull @ArpOnFrameSent, ptr noundef nonnull %10, ptr noundef nonnull %10) #3
  %22 = icmp slt i64 %21, 0
  br i1 %22, label %23, label %28

23:                                               ; preds = %17
  %24 = tail call zeroext i8 @DebugPrintEnabled() #3
  %.not106 = icmp eq i8 %24, 0
  br i1 %.not106, label %.thread117, label %25

25:                                               ; preds = %23
  %26 = tail call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648) #3
  %.not107 = icmp eq i8 %26, 0
  br i1 %.not107, label %.thread117, label %27

27:                                               ; preds = %25
  tail call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef nonnull @.str.13) #3
  br label %.thread117

28:                                               ; preds = %17
  %29 = tail call ptr @AllocatePool(i64 noundef 48) #3
  %30 = icmp eq ptr %29, null
  br i1 %30, label %31, label %36

31:                                               ; preds = %28
  %32 = tail call zeroext i8 @DebugPrintEnabled() #3
  %.not104 = icmp eq i8 %32, 0
  br i1 %.not104, label %.thread117, label %33

33:                                               ; preds = %31
  %34 = tail call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648) #3
  %.not105 = icmp eq i8 %34, 0
  br i1 %.not105, label %.thread117, label %35

35:                                               ; preds = %33
  tail call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef nonnull @.str.14) #3
  br label %.thread117

36:                                               ; preds = %28
  %37 = getelementptr inbounds i8, ptr %0, i64 8
  %38 = load ptr, ptr %37, align 8, !tbaa !16
  %39 = getelementptr inbounds i8, ptr %0, i64 96
  %40 = getelementptr inbounds i8, ptr %38, i64 112
  %41 = load i32, ptr %40, align 4, !tbaa !22
  %42 = add i32 %41, 8
  %43 = getelementptr inbounds i8, ptr %0, i64 98
  %44 = load i8, ptr %43, align 2, !tbaa !25
  %45 = zext i8 %44 to i32
  %46 = getelementptr inbounds i8, ptr %38, i64 108
  %47 = load i32, ptr %46, align 4, !tbaa !26
  %48 = add i32 %47, %45
  %49 = shl i32 %48, 1
  %50 = add i32 %42, %49
  %51 = zext i32 %50 to i64
  %52 = tail call ptr @AllocatePool(i64 noundef %51) #3
  %53 = icmp eq ptr %52, null
  br i1 %53, label %54, label %63

54:                                               ; preds = %36
  %55 = tail call zeroext i8 @DebugPrintEnabled() #3
  %.not100 = icmp eq i8 %55, 0
  br i1 %.not100, label %59, label %56

56:                                               ; preds = %54
  %57 = tail call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648) #3
  %.not101 = icmp eq i8 %57, 0
  br i1 %.not101, label %59, label %58

58:                                               ; preds = %56
  tail call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef nonnull @.str.15) #3
  br label %59

59:                                               ; preds = %54, %58, %56
  %60 = tail call zeroext i8 @DebugAssertEnabled() #3
  %61 = icmp eq i8 %60, 0
  br i1 %61, label %63, label %62

62:                                               ; preds = %59
  tail call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 1088, ptr noundef nonnull @.str.16) #3
  br label %63

63:                                               ; preds = %59, %62, %36
  %64 = icmp eq i16 %2, 1
  br i1 %64, label %65, label %70

65:                                               ; preds = %63
  %66 = getelementptr inbounds i8, ptr %38, i64 688
  %67 = load i32, ptr %46, align 4, !tbaa !26
  %68 = zext i32 %67 to i64
  %69 = tail call ptr @CopyMem(ptr noundef %52, ptr noundef nonnull %66, i64 noundef %68) #3
  br label %76

70:                                               ; preds = %63
  %71 = getelementptr inbounds i8, ptr %1, i64 40
  %72 = load ptr, ptr %71, align 8, !tbaa !27
  %73 = load i32, ptr %46, align 4, !tbaa !26
  %74 = zext i32 %73 to i64
  %75 = tail call ptr @CopyMem(ptr noundef %52, ptr noundef %72, i64 noundef %74) #3
  br label %76

76:                                               ; preds = %70, %65
  %77 = load i32, ptr %46, align 4, !tbaa !26
  %78 = zext i32 %77 to i64
  %79 = getelementptr inbounds i8, ptr %52, i64 %78
  %80 = getelementptr inbounds i8, ptr %38, i64 656
  %81 = tail call ptr @CopyMem(ptr noundef %79, ptr noundef nonnull %80, i64 noundef %78) #3
  %82 = load i32, ptr %46, align 4, !tbaa !26
  %83 = zext i32 %82 to i64
  %84 = getelementptr inbounds i8, ptr %79, i64 %83
  %85 = tail call zeroext i16 @SwapBytes16(i16 noundef zeroext 2054) #3
  store i16 %85, ptr %84, align 2, !tbaa !29
  %86 = getelementptr inbounds i8, ptr %84, i64 2
  %87 = getelementptr inbounds i8, ptr %38, i64 752
  %88 = load i8, ptr %87, align 4, !tbaa !30
  %89 = zext i8 %88 to i16
  %90 = tail call zeroext i16 @SwapBytes16(i16 noundef zeroext %89) #3
  store i16 %90, ptr %86, align 1, !tbaa !31
  %91 = load i16, ptr %39, align 8, !tbaa !33
  %92 = tail call zeroext i16 @SwapBytes16(i16 noundef zeroext %91) #3
  %93 = getelementptr inbounds i8, ptr %84, i64 4
  store i16 %92, ptr %93, align 1, !tbaa !34
  %94 = load i32, ptr %46, align 4, !tbaa !26
  %95 = trunc i32 %94 to i8
  %96 = getelementptr inbounds i8, ptr %84, i64 6
  store i8 %95, ptr %96, align 1, !tbaa !35
  %97 = load i8, ptr %43, align 2, !tbaa !25
  %98 = getelementptr inbounds i8, ptr %84, i64 7
  store i8 %97, ptr %98, align 1, !tbaa !36
  %99 = tail call zeroext i16 @SwapBytes16(i16 noundef zeroext %2) #3
  %100 = getelementptr inbounds i8, ptr %84, i64 8
  store i16 %99, ptr %100, align 1, !tbaa !37
  %101 = getelementptr inbounds i8, ptr %84, i64 10
  %102 = load i32, ptr %46, align 4, !tbaa !26
  %103 = zext i32 %102 to i64
  %104 = tail call ptr @CopyMem(ptr noundef nonnull %101, ptr noundef nonnull %80, i64 noundef %103) #3
  %105 = load i32, ptr %46, align 4, !tbaa !26
  %106 = zext i32 %105 to i64
  %107 = getelementptr inbounds i8, ptr %101, i64 %106
  %108 = getelementptr inbounds i8, ptr %0, i64 104
  %109 = load ptr, ptr %108, align 8, !tbaa !38
  %110 = load i8, ptr %43, align 2, !tbaa !25
  %111 = zext i8 %110 to i64
  %112 = tail call ptr @CopyMem(ptr noundef nonnull %107, ptr noundef %109, i64 noundef %111) #3
  %113 = load i8, ptr %43, align 2, !tbaa !25
  %114 = zext i8 %113 to i64
  %115 = getelementptr inbounds i8, ptr %107, i64 %114
  %116 = getelementptr inbounds i8, ptr %1, i64 40
  %117 = load ptr, ptr %116, align 8, !tbaa !27
  %118 = load i32, ptr %46, align 4, !tbaa !26
  %119 = zext i32 %118 to i64
  %120 = tail call ptr @CopyMem(ptr noundef nonnull %115, ptr noundef %117, i64 noundef %119) #3
  %121 = load i32, ptr %46, align 4, !tbaa !26
  %122 = zext i32 %121 to i64
  %123 = getelementptr inbounds i8, ptr %115, i64 %122
  %124 = getelementptr inbounds i8, ptr %1, i64 88
  %125 = load ptr, ptr %124, align 8, !tbaa !27
  %126 = load i8, ptr %43, align 2, !tbaa !25
  %127 = zext i8 %126 to i64
  %128 = tail call ptr @CopyMem(ptr noundef nonnull %123, ptr noundef %125, i64 noundef %127) #3
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(18) %29, i8 0, i64 18, i1 false)
  %129 = load i32, ptr %40, align 4, !tbaa !22
  %130 = sub i32 %50, %129
  %131 = getelementptr inbounds i8, ptr %29, i64 20
  store i32 %130, ptr %131, align 4, !tbaa !39
  %132 = trunc i32 %129 to i16
  %133 = getelementptr inbounds i8, ptr %29, i64 24
  store i16 %132, ptr %133, align 8, !tbaa !41
  %134 = getelementptr inbounds i8, ptr %29, i64 26
  store i16 1, ptr %134, align 2, !tbaa !42
  %135 = getelementptr inbounds i8, ptr %29, i64 32
  %136 = getelementptr inbounds i8, ptr %29, i64 40
  store ptr %52, ptr %136, align 8, !tbaa !43
  store i32 %50, ptr %135, align 8, !tbaa !45
  %137 = getelementptr inbounds i8, ptr %10, i64 16
  store ptr %29, ptr %137, align 8, !tbaa !46
  %138 = getelementptr inbounds i8, ptr %10, i64 8
  store i64 -9223372036854775802, ptr %138, align 8, !tbaa !47
  %139 = getelementptr inbounds i8, ptr %38, i64 48
  %140 = load ptr, ptr %139, align 8, !tbaa !48
  %141 = getelementptr inbounds i8, ptr %140, i64 32
  %142 = load ptr, ptr %141, align 8, !tbaa !52
  %143 = tail call i64 %142(ptr noundef %140, ptr noundef nonnull %10) #3
  %144 = icmp slt i64 %143, 0
  br i1 %144, label %145, label %158

145:                                              ; preds = %76
  %146 = tail call zeroext i8 @DebugPrintEnabled() #3
  %.not102 = icmp eq i8 %146, 0
  br i1 %.not102, label %150, label %147

147:                                              ; preds = %145
  %148 = tail call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648) #3
  %.not103 = icmp eq i8 %148, 0
  br i1 %.not103, label %150, label %149

149:                                              ; preds = %147
  tail call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef nonnull @.str.17, i64 noundef %143) #3
  br label %150

150:                                              ; preds = %147, %149, %145
  tail call void @FreePool(ptr noundef nonnull %52) #3
  tail call void @FreePool(ptr noundef nonnull %29) #3
  br label %.thread117

.thread117:                                       ; preds = %27, %25, %23, %35, %33, %31, %150
  %151 = load ptr, ptr %10, align 8, !tbaa !5
  %.not110 = icmp eq ptr %151, null
  br i1 %.not110, label %157, label %152

152:                                              ; preds = %.thread117
  %153 = load ptr, ptr @gBS, align 8, !tbaa !11
  %154 = getelementptr inbounds i8, ptr %153, i64 112
  %155 = load ptr, ptr %154, align 8, !tbaa !54
  %156 = tail call i64 %155(ptr noundef nonnull %151) #3
  br label %157

157:                                              ; preds = %152, %.thread117
  tail call void @FreePool(ptr noundef nonnull %10) #3
  br label %158

158:                                              ; preds = %76, %12, %16, %14, %157
  ret void
}

declare zeroext i8 @DebugPrintEnabled() local_unnamed_addr #0

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

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

declare void @FreePool(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local void @ArpOnFrameSent(ptr noundef, ptr noundef) #1

declare ptr @AllocatePool(i64 noundef) local_unnamed_addr #0

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

attributes #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 = { 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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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, !8, i64 16}
!7 = !{!"any pointer", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"long long", !8, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !7, i64 80}
!13 = !{!"", !14, i64 0, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56, !7, i64 64, !7, i64 72, !7, i64 80, !7, i64 88, !7, i64 96, !7, i64 104, !7, i64 112, !7, i64 120, !7, i64 128, !7, i64 136, !7, i64 144, !7, i64 152, !7, i64 160, !7, i64 168, !7, i64 176, !7, i64 184, !7, i64 192, !7, i64 200, !7, i64 208, !7, i64 216, !7, i64 224, !7, i64 232, !7, i64 240, !7, i64 248, !7, i64 256, !7, i64 264, !7, i64 272, !7, i64 280, !7, i64 288, !7, i64 296, !7, i64 304, !7, i64 312, !7, i64 320, !7, i64 328, !7, i64 336, !7, i64 344, !7, i64 352, !7, i64 360, !7, i64 368}
!14 = !{!"", !10, i64 0, !15, i64 8, !15, i64 12, !15, i64 16, !15, i64 20}
!15 = !{!"int", !8, i64 0}
!16 = !{!17, !7, i64 8}
!17 = !{!"", !15, i64 0, !7, i64 8, !7, i64 16, !18, i64 24, !19, i64 80, !20, i64 96, !8, i64 128, !8, i64 129}
!18 = !{!"_EFI_ARP_PROTOCOL", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48}
!19 = !{!"_LIST_ENTRY", !7, i64 0, !7, i64 8}
!20 = !{!"", !21, i64 0, !8, i64 2, !7, i64 8, !15, i64 16, !15, i64 20, !15, i64 24}
!21 = !{!"short", !8, i64 0}
!22 = !{!23, !15, i64 8}
!23 = !{!"", !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, !8, i64 40, !24, i64 552, !24, i64 584, !24, i64 616, !8, i64 648, !8, i64 649, !8, i64 650, !8, i64 651, !8, i64 652}
!24 = !{!"", !8, i64 0}
!25 = !{!20, !8, i64 2}
!26 = !{!23, !15, i64 4}
!27 = !{!28, !7, i64 8}
!28 = !{!"", !21, i64 0, !8, i64 2, !7, i64 8, !8, i64 16}
!29 = !{!21, !21, i64 0}
!30 = !{!23, !8, i64 648}
!31 = !{!32, !21, i64 0}
!32 = !{!"", !21, i64 0, !21, i64 2, !8, i64 4, !8, i64 5, !21, i64 6}
!33 = !{!20, !21, i64 0}
!34 = !{!32, !21, i64 2}
!35 = !{!32, !8, i64 4}
!36 = !{!32, !8, i64 5}
!37 = !{!32, !21, i64 6}
!38 = !{!20, !7, i64 8}
!39 = !{!40, !15, i64 20}
!40 = !{!"", !7, i64 0, !7, i64 8, !21, i64 16, !15, i64 20, !21, i64 24, !21, i64 26, !8, i64 32}
!41 = !{!40, !21, i64 24}
!42 = !{!40, !21, i64 26}
!43 = !{!44, !7, i64 8}
!44 = !{!"", !15, i64 0, !7, i64 8}
!45 = !{!44, !15, i64 0}
!46 = !{!8, !8, i64 0}
!47 = !{!6, !10, i64 8}
!48 = !{!49, !7, i64 48}
!49 = !{!"_ARP_SERVICE_DATA", !15, i64 0, !50, i64 8, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !51, i64 56, !6, i64 80, !23, i64 104, !10, i64 760, !19, i64 768, !19, i64 784, !19, i64 800, !19, i64 816, !7, i64 832}
!50 = !{!"_EFI_SERVICE_BINDING_PROTOCOL", !7, i64 0, !7, i64 8}
!51 = !{!"", !15, i64 0, !15, i64 4, !21, i64 8, !8, i64 10, !8, i64 11, !8, i64 12, !8, i64 13, !8, i64 14, !8, i64 15, !8, i64 16}
!52 = !{!53, !7, i64 32}
!53 = !{!"_EFI_MANAGED_NETWORK_PROTOCOL", !7, i64 0, !7, i64 8, !7, i64 16, !7, i64 24, !7, i64 32, !7, i64 40, !7, i64 48, !7, i64 56}
!54 = !{!13, !7, i64 112}


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