; LLVM IR from thalium/icebox :: third_party/virtualbox/src/VBox/Devices/EFI/Firmware/OptionRomPkg/Bus/Usb (Setup)

; 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.NIC_DEVICE = type { i64, ptr, ptr, %struct._EFI_SIMPLE_NETWORK_PROTOCOL, %struct._EFI_SIMPLE_NETWORK_PROTOCOL, %struct.EFI_SIMPLE_NETWORK_MODE, i8, ptr, i16, i8, i8, i8, i8, i64, i64, i16, ptr, ptr, [8 x i8], %struct.EFI_MAC_ADDRESS, i8, ptr, ptr, ptr, ptr, ptr, i64, 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_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._RX_PKT = type <{ ptr, i8, i16, [2048 x i8] }>

@gBS = external global ptr, align 8
@.str.13 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [58 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [58 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

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

declare zeroext i8 @DebugPrintEnabled() #2

declare zeroext i8 @DebugPrintLevelEnabled(i64 noundef) #2

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

; Function Attrs: nounwind uwtable
declare dso_local i64 @SN_Reset(ptr noundef, i8 noundef zeroext) #1

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

; Function Attrs: nounwind uwtable
declare dso_local i64 @SN_MCastIPtoMAC(ptr noundef, i8 noundef zeroext, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local i64 @SN_NvData(ptr noundef, i8 noundef zeroext, i64 noundef, i64 noundef, ptr noundef) #1

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

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

declare ptr @SetMem(ptr noundef, i64 noundef, i8 noundef zeroext) #2

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

; Function Attrs: nounwind uwtable
define dso_local i64 @SN_Setup(ptr noundef %0) #1 {
  %2 = alloca i64, align 8
  %3 = alloca ptr, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i32, align 4
  %10 = 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 8, ptr %6) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  store ptr null, ptr %7, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  store ptr null, ptr %8, align 8, !tbaa !5
  %11 = load ptr, ptr %3, align 8, !tbaa !5
  %12 = getelementptr inbounds %struct.NIC_DEVICE, ptr %11, i32 0, i32 3
  store ptr %12, ptr %5, align 8, !tbaa !5
  %13 = load ptr, ptr %5, align 8, !tbaa !5
  %14 = getelementptr inbounds %struct._EFI_SIMPLE_NETWORK_PROTOCOL, ptr %13, i32 0, i32 0
  store i64 65536, ptr %14, align 8, !tbaa !9
  %15 = load ptr, ptr %5, align 8, !tbaa !5
  %16 = getelementptr inbounds %struct._EFI_SIMPLE_NETWORK_PROTOCOL, ptr %15, i32 0, i32 1
  store ptr @SN_Start, ptr %16, align 8, !tbaa !12
  %17 = load ptr, ptr %5, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct._EFI_SIMPLE_NETWORK_PROTOCOL, ptr %17, i32 0, i32 2
  store ptr @SN_Stop, ptr %18, align 8, !tbaa !13
  %19 = load ptr, ptr %5, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct._EFI_SIMPLE_NETWORK_PROTOCOL, ptr %19, i32 0, i32 3
  store ptr @SN_Initialize, ptr %20, align 8, !tbaa !14
  %21 = load ptr, ptr %5, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct._EFI_SIMPLE_NETWORK_PROTOCOL, ptr %21, i32 0, i32 4
  store ptr @SN_Reset, ptr %22, align 8, !tbaa !15
  %23 = load ptr, ptr %5, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct._EFI_SIMPLE_NETWORK_PROTOCOL, ptr %23, i32 0, i32 5
  store ptr @SN_Shutdown, ptr %24, align 8, !tbaa !16
  %25 = load ptr, ptr %5, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct._EFI_SIMPLE_NETWORK_PROTOCOL, ptr %25, i32 0, i32 6
  store ptr @SN_ReceiveFilters, ptr %26, align 8, !tbaa !17
  %27 = load ptr, ptr %5, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct._EFI_SIMPLE_NETWORK_PROTOCOL, ptr %27, i32 0, i32 7
  store ptr @SN_StationAddress, ptr %28, align 8, !tbaa !18
  %29 = load ptr, ptr %5, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct._EFI_SIMPLE_NETWORK_PROTOCOL, ptr %29, i32 0, i32 8
  store ptr @SN_Statistics, ptr %30, align 8, !tbaa !19
  %31 = load ptr, ptr %5, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct._EFI_SIMPLE_NETWORK_PROTOCOL, ptr %31, i32 0, i32 9
  store ptr @SN_MCastIPtoMAC, ptr %32, align 8, !tbaa !20
  %33 = load ptr, ptr %5, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct._EFI_SIMPLE_NETWORK_PROTOCOL, ptr %33, i32 0, i32 10
  store ptr @SN_NvData, ptr %34, align 8, !tbaa !21
  %35 = load ptr, ptr %5, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct._EFI_SIMPLE_NETWORK_PROTOCOL, ptr %35, i32 0, i32 11
  store ptr @SN_GetStatus, ptr %36, align 8, !tbaa !22
  %37 = load ptr, ptr %5, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct._EFI_SIMPLE_NETWORK_PROTOCOL, ptr %37, i32 0, i32 12
  store ptr @SN_Transmit, ptr %38, align 8, !tbaa !23
  %39 = load ptr, ptr %5, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct._EFI_SIMPLE_NETWORK_PROTOCOL, ptr %39, i32 0, i32 13
  store ptr @SN_Receive, ptr %40, align 8, !tbaa !24
  %41 = load ptr, ptr %5, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct._EFI_SIMPLE_NETWORK_PROTOCOL, ptr %41, i32 0, i32 14
  store ptr null, ptr %42, align 8, !tbaa !25
  %43 = load ptr, ptr %3, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.NIC_DEVICE, ptr %43, i32 0, i32 5
  store ptr %44, ptr %4, align 8, !tbaa !5
  %45 = load ptr, ptr %4, align 8, !tbaa !5
  %46 = load ptr, ptr %5, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct._EFI_SIMPLE_NETWORK_PROTOCOL, ptr %46, i32 0, i32 15
  store ptr %45, ptr %47, align 8, !tbaa !26
  %48 = load ptr, ptr %4, align 8, !tbaa !5
  %49 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %48, i32 0, i32 0
  store i32 0, ptr %49, align 4, !tbaa !27
  %50 = load ptr, ptr %4, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %50, i32 0, i32 1
  store i32 6, ptr %51, align 4, !tbaa !31
  %52 = load ptr, ptr %4, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %52, i32 0, i32 2
  store i32 14, ptr %53, align 4, !tbaa !32
  %54 = load ptr, ptr %4, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %54, i32 0, i32 3
  store i32 1500, ptr %55, align 4, !tbaa !33
  %56 = load ptr, ptr %4, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %56, i32 0, i32 4
  store i32 0, ptr %57, align 4, !tbaa !34
  %58 = load ptr, ptr %4, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %58, i32 0, i32 5
  store i32 0, ptr %59, align 4, !tbaa !35
  %60 = load ptr, ptr %4, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %60, i32 0, i32 6
  store i32 31, ptr %61, align 4, !tbaa !36
  %62 = load ptr, ptr %4, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %62, i32 0, i32 7
  store i32 5, ptr %63, align 4, !tbaa !37
  %64 = load ptr, ptr %4, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %64, i32 0, i32 8
  store i32 16, ptr %65, align 4, !tbaa !38
  %66 = load ptr, ptr %4, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %66, i32 0, i32 9
  store i32 0, ptr %67, align 4, !tbaa !39
  %68 = load ptr, ptr %4, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %68, i32 0, i32 12
  %70 = call ptr @SetMem(ptr noundef %69, i64 noundef 6, i8 noundef zeroext -1)
  %71 = load ptr, ptr %4, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %71, i32 0, i32 14
  store i8 1, ptr %72, align 4, !tbaa !40
  %73 = load ptr, ptr %4, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %73, i32 0, i32 15
  store i8 1, ptr %74, align 1, !tbaa !41
  %75 = load ptr, ptr %4, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %75, i32 0, i32 16
  store i8 0, ptr %76, align 2, !tbaa !42
  %77 = load ptr, ptr %4, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %77, i32 0, i32 17
  store i8 1, ptr %78, align 1, !tbaa !43
  %79 = load ptr, ptr %4, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %79, i32 0, i32 18
  store i8 0, ptr %80, align 4, !tbaa !44
  %81 = load ptr, ptr %3, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.NIC_DEVICE, ptr %81, i32 0, i32 13
  store i64 0, ptr %82, align 8, !tbaa !45
  %83 = load ptr, ptr %3, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.NIC_DEVICE, ptr %83, i32 0, i32 8
  store i16 16, ptr %84, align 8, !tbaa !48
  %85 = load ptr, ptr %3, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.NIC_DEVICE, ptr %85, i32 0, i32 9
  store i8 1, ptr %86, align 2, !tbaa !49
  %87 = load ptr, ptr %3, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.NIC_DEVICE, ptr %87, i32 0, i32 11
  store i8 1, ptr %88, align 4, !tbaa !50
  %89 = load ptr, ptr %3, align 8, !tbaa !5
  %90 = load ptr, ptr %4, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %90, i32 0, i32 13
  %92 = getelementptr inbounds %struct.EFI_MAC_ADDRESS, ptr %91, i32 0, i32 0
  %93 = getelementptr inbounds [32 x i8], ptr %92, i64 0, i64 0
  %94 = call i64 @Ax88772MacAddressGet(ptr noundef %89, ptr noundef %93)
  store i64 %94, ptr %6, align 8, !tbaa !51
  %95 = load i64, ptr %6, align 8, !tbaa !51
  %96 = icmp slt i64 %95, 0
  br i1 %96, label %203, label %97

97:                                               ; preds = %1
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  %98 = load ptr, ptr %4, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %98, i32 0, i32 11
  %100 = load ptr, ptr %4, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %100, i32 0, i32 13
  %102 = call ptr @CopyMem(ptr noundef %99, ptr noundef %101, i64 noundef 6)
  %103 = load ptr, ptr %3, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.NIC_DEVICE, ptr %103, i32 0, i32 19
  %105 = load ptr, ptr %4, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %105, i32 0, i32 13
  %107 = call ptr @CopyMem(ptr noundef %104, ptr noundef %106, i64 noundef 6)
  %108 = load ptr, ptr %3, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.NIC_DEVICE, ptr %108, i32 0, i32 26
  store i64 0, ptr %109, align 8, !tbaa !52
  store i32 0, ptr %9, align 4, !tbaa !53
  br label %110

110:                                              ; preds = %160, %97
  %111 = load i32, ptr %9, align 4, !tbaa !53
  %112 = icmp slt i32 %111, 50
  br i1 %112, label %113, label %163

113:                                              ; preds = %110
  %114 = load ptr, ptr @gBS, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %114, i32 0, i32 6
  %116 = load ptr, ptr %115, align 8, !tbaa !54
  %117 = call i64 %116(i32 noundef 6, i64 noundef 2059, ptr noundef %7)
  store i64 %117, ptr %6, align 8, !tbaa !51
  %118 = load i64, ptr %6, align 8, !tbaa !51
  %119 = icmp slt i64 %118, 0
  br i1 %119, label %120, label %136

120:                                              ; preds = %113
  br label %121

121:                                              ; preds = %120
  %122 = call zeroext i8 @DebugPrintEnabled()
  %123 = icmp ne i8 %122, 0
  br i1 %123, label %124, label %132

124:                                              ; preds = %121
  br label %125

125:                                              ; preds = %124
  %126 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648)
  %127 = icmp ne i8 %126, 0
  br i1 %127, label %128, label %129

128:                                              ; preds = %125
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef @.str.13)
  br label %129

129:                                              ; preds = %128, %125
  br label %130

130:                                              ; preds = %129
  br label %131

131:                                              ; preds = %130
  br label %132

132:                                              ; preds = %131, %121
  br label %133

133:                                              ; preds = %132
  br label %134

134:                                              ; preds = %133
  %135 = load i64, ptr %6, align 8, !tbaa !51
  store i64 %135, ptr %2, align 8
  store i32 1, ptr %10, align 4
  br label %200

136:                                              ; preds = %113
  %137 = load ptr, ptr %7, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct._RX_PKT, ptr %137, i32 0, i32 1
  store i8 0, ptr %138, align 1, !tbaa !57
  %139 = load i32, ptr %9, align 4, !tbaa !53
  %140 = icmp ne i32 %139, 0
  br i1 %140, label %141, label %145

141:                                              ; preds = %136
  %142 = load ptr, ptr %7, align 8, !tbaa !5
  %143 = load ptr, ptr %8, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct._RX_PKT, ptr %143, i32 0, i32 0
  store ptr %142, ptr %144, align 1, !tbaa !59
  br label %149

145:                                              ; preds = %136
  %146 = load ptr, ptr %7, align 8, !tbaa !5
  %147 = load ptr, ptr %3, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct.NIC_DEVICE, ptr %147, i32 0, i32 23
  store ptr %146, ptr %148, align 8, !tbaa !60
  br label %149

149:                                              ; preds = %145, %141
  %150 = load i32, ptr %9, align 4, !tbaa !53
  %151 = icmp eq i32 49, %150
  br i1 %151, label %152, label %158

152:                                              ; preds = %149
  %153 = load ptr, ptr %3, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.NIC_DEVICE, ptr %153, i32 0, i32 23
  %155 = load ptr, ptr %154, align 8, !tbaa !60
  %156 = load ptr, ptr %7, align 8, !tbaa !5
  %157 = getelementptr inbounds %struct._RX_PKT, ptr %156, i32 0, i32 0
  store ptr %155, ptr %157, align 1, !tbaa !59
  br label %158

158:                                              ; preds = %152, %149
  %159 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %159, ptr %8, align 8, !tbaa !5
  br label %160

160:                                              ; preds = %158
  %161 = load i32, ptr %9, align 4, !tbaa !53
  %162 = add nsw i32 %161, 1
  store i32 %162, ptr %9, align 4, !tbaa !53
  br label %110, !llvm.loop !61

163:                                              ; preds = %110
  %164 = load ptr, ptr %3, align 8, !tbaa !5
  %165 = getelementptr inbounds %struct.NIC_DEVICE, ptr %164, i32 0, i32 23
  %166 = load ptr, ptr %165, align 8, !tbaa !60
  %167 = load ptr, ptr %3, align 8, !tbaa !5
  %168 = getelementptr inbounds %struct.NIC_DEVICE, ptr %167, i32 0, i32 24
  store ptr %166, ptr %168, align 8, !tbaa !63
  %169 = load ptr, ptr %3, align 8, !tbaa !5
  %170 = getelementptr inbounds %struct.NIC_DEVICE, ptr %169, i32 0, i32 23
  %171 = load ptr, ptr %170, align 8, !tbaa !60
  %172 = load ptr, ptr %3, align 8, !tbaa !5
  %173 = getelementptr inbounds %struct.NIC_DEVICE, ptr %172, i32 0, i32 25
  store ptr %171, ptr %173, align 8, !tbaa !64
  %174 = load ptr, ptr @gBS, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %174, i32 0, i32 6
  %176 = load ptr, ptr %175, align 8, !tbaa !54
  %177 = load ptr, ptr %3, align 8, !tbaa !5
  %178 = getelementptr inbounds %struct.NIC_DEVICE, ptr %177, i32 0, i32 27
  %179 = call i64 %176(i32 noundef 6, i64 noundef 16384, ptr noundef %178)
  store i64 %179, ptr %6, align 8, !tbaa !51
  %180 = load i64, ptr %6, align 8, !tbaa !51
  %181 = icmp slt i64 %180, 0
  br i1 %181, label %182, label %199

182:                                              ; preds = %163
  br label %183

183:                                              ; preds = %182
  %184 = call zeroext i8 @DebugPrintEnabled()
  %185 = icmp ne i8 %184, 0
  br i1 %185, label %186, label %195

186:                                              ; preds = %183
  br label %187

187:                                              ; preds = %186
  %188 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648)
  %189 = icmp ne i8 %188, 0
  br i1 %189, label %190, label %192

190:                                              ; preds = %187
  %191 = load i64, ptr %6, align 8, !tbaa !51
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef @.str.14, i64 noundef %191)
  br label %192

192:                                              ; preds = %190, %187
  br label %193

193:                                              ; preds = %192
  br label %194

194:                                              ; preds = %193
  br label %195

195:                                              ; preds = %194, %183
  br label %196

196:                                              ; preds = %195
  br label %197

197:                                              ; preds = %196
  %198 = load i64, ptr %6, align 8, !tbaa !51
  store i64 %198, ptr %2, align 8
  store i32 1, ptr %10, align 4
  br label %200

199:                                              ; preds = %163
  store i32 0, ptr %10, align 4
  br label %200

200:                                              ; preds = %199, %197, %134
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #3
  %201 = load i32, ptr %10, align 4
  switch i32 %201, label %280 [
    i32 0, label %202
  ]

202:                                              ; preds = %200
  br label %220

203:                                              ; preds = %1
  br label %204

204:                                              ; preds = %203
  %205 = call zeroext i8 @DebugPrintEnabled()
  %206 = icmp ne i8 %205, 0
  br i1 %206, label %207, label %216

207:                                              ; preds = %204
  br label %208

208:                                              ; preds = %207
  %209 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648)
  %210 = icmp ne i8 %209, 0
  br i1 %210, label %211, label %213

211:                                              ; preds = %208
  %212 = load i64, ptr %6, align 8, !tbaa !51
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef @.str.15, i64 noundef %212)
  br label %213

213:                                              ; preds = %211, %208
  br label %214

214:                                              ; preds = %213
  br label %215

215:                                              ; preds = %214
  br label %216

216:                                              ; preds = %215, %204
  br label %217

217:                                              ; preds = %216
  br label %218

218:                                              ; preds = %217
  %219 = load i64, ptr %6, align 8, !tbaa !51
  store i64 %219, ptr %2, align 8
  store i32 1, ptr %10, align 4
  br label %280

220:                                              ; preds = %202
  %221 = load ptr, ptr @gBS, align 8, !tbaa !5
  %222 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %221, i32 0, i32 6
  %223 = load ptr, ptr %222, align 8, !tbaa !54
  %224 = load ptr, ptr %3, align 8, !tbaa !5
  %225 = getelementptr inbounds %struct.NIC_DEVICE, ptr %224, i32 0, i32 16
  %226 = call i64 %223(i32 noundef 6, i64 noundef 2060, ptr noundef %225)
  store i64 %226, ptr %6, align 8, !tbaa !51
  %227 = load i64, ptr %6, align 8, !tbaa !51
  %228 = icmp slt i64 %227, 0
  br i1 %228, label %229, label %246

229:                                              ; preds = %220
  br label %230

230:                                              ; preds = %229
  %231 = call zeroext i8 @DebugPrintEnabled()
  %232 = icmp ne i8 %231, 0
  br i1 %232, label %233, label %242

233:                                              ; preds = %230
  br label %234

234:                                              ; preds = %233
  %235 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648)
  %236 = icmp ne i8 %235, 0
  br i1 %236, label %237, label %239

237:                                              ; preds = %234
  %238 = load i64, ptr %6, align 8, !tbaa !51
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef @.str.16, i64 noundef %238)
  br label %239

239:                                              ; preds = %237, %234
  br label %240

240:                                              ; preds = %239
  br label %241

241:                                              ; preds = %240
  br label %242

242:                                              ; preds = %241, %230
  br label %243

243:                                              ; preds = %242
  br label %244

244:                                              ; preds = %243
  %245 = load i64, ptr %6, align 8, !tbaa !51
  store i64 %245, ptr %2, align 8
  store i32 1, ptr %10, align 4
  br label %280

246:                                              ; preds = %220
  %247 = load ptr, ptr @gBS, align 8, !tbaa !5
  %248 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %247, i32 0, i32 6
  %249 = load ptr, ptr %248, align 8, !tbaa !54
  %250 = load ptr, ptr %3, align 8, !tbaa !5
  %251 = getelementptr inbounds %struct.NIC_DEVICE, ptr %250, i32 0, i32 17
  %252 = call i64 %249(i32 noundef 6, i64 noundef 2060, ptr noundef %251)
  store i64 %252, ptr %6, align 8, !tbaa !51
  %253 = load i64, ptr %6, align 8, !tbaa !51
  %254 = icmp slt i64 %253, 0
  br i1 %254, label %255, label %278

255:                                              ; preds = %246
  br label %256

256:                                              ; preds = %255
  %257 = call zeroext i8 @DebugPrintEnabled()
  %258 = icmp ne i8 %257, 0
  br i1 %258, label %259, label %268

259:                                              ; preds = %256
  br label %260

260:                                              ; preds = %259
  %261 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648)
  %262 = icmp ne i8 %261, 0
  br i1 %262, label %263, label %265

263:                                              ; preds = %260
  %264 = load i64, ptr %6, align 8, !tbaa !51
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef @.str.17, i64 noundef %264)
  br label %265

265:                                              ; preds = %263, %260
  br label %266

266:                                              ; preds = %265
  br label %267

267:                                              ; preds = %266
  br label %268

268:                                              ; preds = %267, %256
  br label %269

269:                                              ; preds = %268
  br label %270

270:                                              ; preds = %269
  %271 = load ptr, ptr @gBS, align 8, !tbaa !5
  %272 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %271, i32 0, i32 7
  %273 = load ptr, ptr %272, align 8, !tbaa !65
  %274 = load ptr, ptr %3, align 8, !tbaa !5
  %275 = getelementptr inbounds %struct.NIC_DEVICE, ptr %274, i32 0, i32 16
  %276 = load ptr, ptr %275, align 8, !tbaa !66
  %277 = call i64 %273(ptr noundef %276)
  br label %278

278:                                              ; preds = %270, %246
  %279 = load i64, ptr %6, align 8, !tbaa !51
  store i64 %279, ptr %2, align 8
  store i32 1, ptr %10, align 4
  br label %280

280:                                              ; preds = %278, %244, %218, %200
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 8, 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
  %281 = load i64, ptr %2, align 8
  ret i64 %281
}

; Function Attrs: nounwind uwtable
declare dso_local i64 @SN_Start(ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local i64 @SN_Stop(ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local i64 @SN_Shutdown(ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local i64 @SN_StationAddress(ptr noundef, i8 noundef zeroext, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local i64 @SN_Statistics(ptr noundef, i8 noundef zeroext, ptr noundef, ptr noundef) #1

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

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "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 = !{!"_EFI_SIMPLE_NETWORK_PROTOCOL", !11, 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}
!11 = !{!"long long", !7, i64 0}
!12 = !{!10, !6, i64 8}
!13 = !{!10, !6, i64 16}
!14 = !{!10, !6, i64 24}
!15 = !{!10, !6, i64 32}
!16 = !{!10, !6, i64 40}
!17 = !{!10, !6, i64 48}
!18 = !{!10, !6, i64 56}
!19 = !{!10, !6, i64 64}
!20 = !{!10, !6, i64 72}
!21 = !{!10, !6, i64 80}
!22 = !{!10, !6, i64 88}
!23 = !{!10, !6, i64 96}
!24 = !{!10, !6, i64 104}
!25 = !{!10, !6, i64 112}
!26 = !{!10, !6, i64 120}
!27 = !{!28, !29, i64 0}
!28 = !{!"", !29, i64 0, !29, i64 4, !29, i64 8, !29, i64 12, !29, i64 16, !29, i64 20, !29, i64 24, !29, i64 28, !29, i64 32, !29, i64 36, !7, i64 40, !30, i64 552, !30, i64 584, !30, i64 616, !7, i64 648, !7, i64 649, !7, i64 650, !7, i64 651, !7, i64 652}
!29 = !{!"int", !7, i64 0}
!30 = !{!"", !7, i64 0}
!31 = !{!28, !29, i64 4}
!32 = !{!28, !29, i64 8}
!33 = !{!28, !29, i64 12}
!34 = !{!28, !29, i64 16}
!35 = !{!28, !29, i64 20}
!36 = !{!28, !29, i64 24}
!37 = !{!28, !29, i64 28}
!38 = !{!28, !29, i64 32}
!39 = !{!28, !29, i64 36}
!40 = !{!28, !7, i64 648}
!41 = !{!28, !7, i64 649}
!42 = !{!28, !7, i64 650}
!43 = !{!28, !7, i64 651}
!44 = !{!28, !7, i64 652}
!45 = !{!46, !11, i64 960}
!46 = !{!"", !11, i64 0, !6, i64 8, !6, i64 16, !10, i64 24, !10, i64 152, !28, i64 280, !7, i64 936, !6, i64 944, !47, i64 952, !7, i64 954, !7, i64 955, !7, i64 956, !7, i64 957, !11, i64 960, !11, i64 968, !47, i64 976, !6, i64 984, !6, i64 992, !7, i64 1000, !30, i64 1008, !7, i64 1040, !6, i64 1048, !6, i64 1056, !6, i64 1064, !6, i64 1072, !6, i64 1080, !11, i64 1088, !6, i64 1096}
!47 = !{!"short", !7, i64 0}
!48 = !{!46, !47, i64 952}
!49 = !{!46, !7, i64 954}
!50 = !{!46, !7, i64 956}
!51 = !{!11, !11, i64 0}
!52 = !{!46, !11, i64 1088}
!53 = !{!29, !29, i64 0}
!54 = !{!55, !6, i64 64}
!55 = !{!"", !56, 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}
!56 = !{!"", !11, i64 0, !29, i64 8, !29, i64 12, !29, i64 16, !29, i64 20}
!57 = !{!58, !7, i64 8}
!58 = !{!"_RX_PKT", !6, i64 0, !7, i64 8, !47, i64 9, !7, i64 11}
!59 = !{!58, !6, i64 0}
!60 = !{!46, !6, i64 1064}
!61 = distinct !{!61, !62}
!62 = !{!"llvm.loop.mustprogress"}
!63 = !{!46, !6, i64 1072}
!64 = !{!46, !6, i64 1080}
!65 = !{!55, !6, i64 72}
!66 = !{!46, !6, i64 984}


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

@gBS = external local_unnamed_addr global ptr, align 8
@.str.13 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [54 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [41 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [58 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [58 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

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

declare zeroext i8 @DebugPrintEnabled() local_unnamed_addr #2

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

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

; Function Attrs: nounwind uwtable
declare dso_local i64 @SN_Reset(ptr noundef, i8 noundef zeroext) #1

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

; Function Attrs: nounwind uwtable
declare dso_local i64 @SN_MCastIPtoMAC(ptr noundef, i8 noundef zeroext, ptr noundef, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local i64 @SN_NvData(ptr noundef, i8 noundef zeroext, i64 noundef, i64 noundef, ptr noundef) #1

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

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

declare ptr @SetMem(ptr noundef, i64 noundef, i8 noundef zeroext) local_unnamed_addr #2

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

; Function Attrs: nounwind uwtable
define dso_local i64 @SN_Setup(ptr noundef %0) local_unnamed_addr #1 {
  %2 = alloca ptr, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %2) #3
  store ptr null, ptr %2, align 8, !tbaa !5
  %3 = getelementptr inbounds i8, ptr %0, i64 24
  store i64 65536, ptr %3, align 8, !tbaa !9
  %4 = getelementptr inbounds i8, ptr %0, i64 32
  store ptr @SN_Start, ptr %4, align 8, !tbaa !12
  %5 = getelementptr inbounds i8, ptr %0, i64 40
  store ptr @SN_Stop, ptr %5, align 8, !tbaa !13
  %6 = getelementptr inbounds i8, ptr %0, i64 48
  store ptr @SN_Initialize, ptr %6, align 8, !tbaa !14
  %7 = getelementptr inbounds i8, ptr %0, i64 56
  store ptr @SN_Reset, ptr %7, align 8, !tbaa !15
  %8 = getelementptr inbounds i8, ptr %0, i64 64
  store ptr @SN_Shutdown, ptr %8, align 8, !tbaa !16
  %9 = getelementptr inbounds i8, ptr %0, i64 72
  store ptr @SN_ReceiveFilters, ptr %9, align 8, !tbaa !17
  %10 = getelementptr inbounds i8, ptr %0, i64 80
  store ptr @SN_StationAddress, ptr %10, align 8, !tbaa !18
  %11 = getelementptr inbounds i8, ptr %0, i64 88
  store ptr @SN_Statistics, ptr %11, align 8, !tbaa !19
  %12 = getelementptr inbounds i8, ptr %0, i64 96
  store ptr @SN_MCastIPtoMAC, ptr %12, align 8, !tbaa !20
  %13 = getelementptr inbounds i8, ptr %0, i64 104
  store ptr @SN_NvData, ptr %13, align 8, !tbaa !21
  %14 = getelementptr inbounds i8, ptr %0, i64 112
  store ptr @SN_GetStatus, ptr %14, align 8, !tbaa !22
  %15 = getelementptr inbounds i8, ptr %0, i64 120
  store ptr @SN_Transmit, ptr %15, align 8, !tbaa !23
  %16 = getelementptr inbounds i8, ptr %0, i64 128
  store ptr @SN_Receive, ptr %16, align 8, !tbaa !24
  %17 = getelementptr inbounds i8, ptr %0, i64 136
  store ptr null, ptr %17, align 8, !tbaa !25
  %18 = getelementptr inbounds i8, ptr %0, i64 280
  %19 = getelementptr inbounds i8, ptr %0, i64 144
  store ptr %18, ptr %19, align 8, !tbaa !26
  store <4 x i32> <i32 0, i32 6, i32 14, i32 1500>, ptr %18, align 4, !tbaa !27
  %20 = getelementptr inbounds i8, ptr %0, i64 296
  store <4 x i32> <i32 0, i32 0, i32 31, i32 5>, ptr %20, align 4, !tbaa !27
  %21 = getelementptr inbounds i8, ptr %0, i64 312
  store i32 16, ptr %21, align 4, !tbaa !29
  %22 = getelementptr inbounds i8, ptr %0, i64 316
  store i32 0, ptr %22, align 4, !tbaa !32
  %23 = getelementptr inbounds i8, ptr %0, i64 864
  %24 = tail call ptr @SetMem(ptr noundef nonnull %23, i64 noundef 6, i8 noundef zeroext -1) #3
  %25 = getelementptr inbounds i8, ptr %0, i64 928
  store <4 x i8> <i8 1, i8 1, i8 0, i8 1>, ptr %25, align 4, !tbaa !33
  %26 = getelementptr inbounds i8, ptr %0, i64 932
  store i8 0, ptr %26, align 4, !tbaa !34
  %27 = getelementptr inbounds i8, ptr %0, i64 960
  store i64 0, ptr %27, align 8, !tbaa !35
  %28 = getelementptr inbounds i8, ptr %0, i64 952
  store i16 16, ptr %28, align 8, !tbaa !38
  %29 = getelementptr inbounds i8, ptr %0, i64 954
  store i8 1, ptr %29, align 2, !tbaa !39
  %30 = getelementptr inbounds i8, ptr %0, i64 956
  store i8 1, ptr %30, align 4, !tbaa !40
  %31 = getelementptr inbounds i8, ptr %0, i64 896
  %32 = tail call i64 @Ax88772MacAddressGet(ptr noundef %0, ptr noundef nonnull %31) #3
  %33 = icmp slt i64 %32, 0
  br i1 %33, label %81, label %.peel.begin

.peel.begin:                                      ; preds = %1
  %34 = getelementptr inbounds i8, ptr %0, i64 832
  %35 = tail call ptr @CopyMem(ptr noundef nonnull %34, ptr noundef nonnull %31, i64 noundef 6) #3
  %36 = getelementptr inbounds i8, ptr %0, i64 1008
  %37 = tail call ptr @CopyMem(ptr noundef nonnull %36, ptr noundef nonnull %31, i64 noundef 6) #3
  %38 = getelementptr inbounds i8, ptr %0, i64 1088
  store i64 0, ptr %38, align 8, !tbaa !41
  %39 = getelementptr inbounds i8, ptr %0, i64 1064
  %40 = load ptr, ptr @gBS, align 8, !tbaa !5
  %41 = getelementptr inbounds i8, ptr %40, i64 64
  %42 = load ptr, ptr %41, align 8, !tbaa !42
  %43 = call i64 %42(i32 noundef 6, i64 noundef 2059, ptr noundef nonnull %2) #3
  %44 = icmp slt i64 %43, 0
  br i1 %44, label %.loopexit, label %.peel.next

.peel.next:                                       ; preds = %.peel.begin
  %45 = load ptr, ptr %2, align 8, !tbaa !5
  %46 = getelementptr inbounds i8, ptr %45, i64 8
  store i8 0, ptr %46, align 1, !tbaa !45
  store ptr %45, ptr %39, align 8, !tbaa !47
  %47 = load ptr, ptr @gBS, align 8, !tbaa !5
  %48 = getelementptr inbounds i8, ptr %47, i64 64
  %49 = load ptr, ptr %48, align 8, !tbaa !42
  %50 = call i64 %49(i32 noundef 6, i64 noundef 2059, ptr noundef nonnull %2) #3
  %51 = icmp slt i64 %50, 0
  br i1 %51, label %.loopexit, label %.lr.ph

52:                                               ; preds = %.lr.ph
  %53 = add nuw nsw i32 %.07698109, 1
  %54 = load ptr, ptr @gBS, align 8, !tbaa !5
  %55 = getelementptr inbounds i8, ptr %54, i64 64
  %56 = load ptr, ptr %55, align 8, !tbaa !42
  %57 = call i64 %56(i32 noundef 6, i64 noundef 2059, ptr noundef nonnull %2) #3
  %58 = icmp slt i64 %57, 0
  br i1 %58, label %.loopexit, label %.lr.ph

.loopexit:                                        ; preds = %52, %.peel.next, %.peel.begin
  %.lcssa = phi i64 [ %43, %.peel.begin ], [ %50, %.peel.next ], [ %57, %52 ]
  %59 = call zeroext i8 @DebugPrintEnabled() #3
  %.not86 = icmp eq i8 %59, 0
  br i1 %.not86, label %.thread94, label %60

60:                                               ; preds = %.loopexit
  %61 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648) #3
  %.not87 = icmp eq i8 %61, 0
  br i1 %.not87, label %.thread94, label %62

62:                                               ; preds = %60
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef nonnull @.str.13) #3
  br label %.thread94

.lr.ph:                                           ; preds = %.peel.next, %52
  %.07797110 = phi ptr [ %.pre103, %52 ], [ %45, %.peel.next ]
  %.07698109 = phi i32 [ %53, %52 ], [ 1, %.peel.next ]
  %63 = load ptr, ptr %2, align 8, !tbaa !5
  %64 = getelementptr inbounds i8, ptr %63, i64 8
  store i8 0, ptr %64, align 1, !tbaa !45
  store ptr %63, ptr %.07797110, align 1, !tbaa !48
  %65 = icmp eq i32 %.07698109, 49
  %.pre103 = load ptr, ptr %2, align 8, !tbaa !5
  br i1 %65, label %66, label %52

66:                                               ; preds = %.lr.ph
  %67 = load ptr, ptr %39, align 8, !tbaa !47
  store ptr %67, ptr %.pre103, align 1, !tbaa !48
  %68 = getelementptr inbounds i8, ptr %0, i64 1072
  store ptr %67, ptr %68, align 8, !tbaa !49
  %69 = getelementptr inbounds i8, ptr %0, i64 1080
  store ptr %67, ptr %69, align 8, !tbaa !50
  %70 = load ptr, ptr @gBS, align 8, !tbaa !5
  %71 = getelementptr inbounds i8, ptr %70, i64 64
  %72 = load ptr, ptr %71, align 8, !tbaa !42
  %73 = getelementptr inbounds i8, ptr %0, i64 1096
  %74 = call i64 %72(i32 noundef 6, i64 noundef 16384, ptr noundef nonnull %73) #3
  %75 = icmp slt i64 %74, 0
  br i1 %75, label %76, label %86

76:                                               ; preds = %66
  %77 = call zeroext i8 @DebugPrintEnabled() #3
  %.not = icmp eq i8 %77, 0
  br i1 %.not, label %.thread94, label %78

78:                                               ; preds = %76
  %79 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648) #3
  %.not84 = icmp eq i8 %79, 0
  br i1 %.not84, label %.thread94, label %80

80:                                               ; preds = %78
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef nonnull @.str.14, i64 noundef %74) #3
  br label %.thread94

81:                                               ; preds = %1
  %82 = tail call zeroext i8 @DebugPrintEnabled() #3
  %.not92 = icmp eq i8 %82, 0
  br i1 %.not92, label %.thread94, label %83

83:                                               ; preds = %81
  %84 = tail call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648) #3
  %.not93 = icmp eq i8 %84, 0
  br i1 %.not93, label %.thread94, label %85

85:                                               ; preds = %83
  tail call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef nonnull @.str.15, i64 noundef %32) #3
  br label %.thread94

86:                                               ; preds = %66
  %87 = load ptr, ptr @gBS, align 8, !tbaa !5
  %88 = getelementptr inbounds i8, ptr %87, i64 64
  %89 = load ptr, ptr %88, align 8, !tbaa !42
  %90 = getelementptr inbounds i8, ptr %0, i64 984
  %91 = call i64 %89(i32 noundef 6, i64 noundef 2060, ptr noundef nonnull %90) #3
  %92 = icmp slt i64 %91, 0
  br i1 %92, label %93, label %98

93:                                               ; preds = %86
  %94 = call zeroext i8 @DebugPrintEnabled() #3
  %.not90 = icmp eq i8 %94, 0
  br i1 %.not90, label %.thread94, label %95

95:                                               ; preds = %93
  %96 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648) #3
  %.not91 = icmp eq i8 %96, 0
  br i1 %.not91, label %.thread94, label %97

97:                                               ; preds = %95
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef nonnull @.str.16, i64 noundef %91) #3
  br label %.thread94

98:                                               ; preds = %86
  %99 = load ptr, ptr @gBS, align 8, !tbaa !5
  %100 = getelementptr inbounds i8, ptr %99, i64 64
  %101 = load ptr, ptr %100, align 8, !tbaa !42
  %102 = getelementptr inbounds i8, ptr %0, i64 992
  %103 = call i64 %101(i32 noundef 6, i64 noundef 2060, ptr noundef nonnull %102) #3
  %104 = icmp slt i64 %103, 0
  br i1 %104, label %105, label %.thread94

105:                                              ; preds = %98
  %106 = call zeroext i8 @DebugPrintEnabled() #3
  %.not88 = icmp eq i8 %106, 0
  br i1 %.not88, label %110, label %107

107:                                              ; preds = %105
  %108 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648) #3
  %.not89 = icmp eq i8 %108, 0
  br i1 %.not89, label %110, label %109

109:                                              ; preds = %107
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef nonnull @.str.17, i64 noundef %103) #3
  br label %110

110:                                              ; preds = %107, %109, %105
  %111 = load ptr, ptr @gBS, align 8, !tbaa !5
  %112 = getelementptr inbounds i8, ptr %111, i64 72
  %113 = load ptr, ptr %112, align 8, !tbaa !51
  %114 = load ptr, ptr %90, align 8, !tbaa !52
  %115 = call i64 %113(ptr noundef %114) #3
  br label %.thread94

.thread94:                                        ; preds = %76, %80, %78, %.loopexit, %62, %60, %98, %110, %93, %97, %95, %81, %85, %83
  %.1 = phi i64 [ %32, %83 ], [ %32, %85 ], [ %32, %81 ], [ %91, %95 ], [ %91, %97 ], [ %91, %93 ], [ %103, %110 ], [ %103, %98 ], [ %74, %76 ], [ %74, %80 ], [ %74, %78 ], [ %.lcssa, %.loopexit ], [ %.lcssa, %62 ], [ %.lcssa, %60 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %2) #3
  ret i64 %.1
}

; Function Attrs: nounwind uwtable
declare dso_local i64 @SN_Start(ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local i64 @SN_Stop(ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local i64 @SN_Shutdown(ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local i64 @SN_StationAddress(ptr noundef, i8 noundef zeroext, ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local i64 @SN_Statistics(ptr noundef, i8 noundef zeroext, ptr noundef, ptr noundef) #1

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

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

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { "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 = !{!"_EFI_SIMPLE_NETWORK_PROTOCOL", !11, 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}
!11 = !{!"long long", !7, i64 0}
!12 = !{!10, !6, i64 8}
!13 = !{!10, !6, i64 16}
!14 = !{!10, !6, i64 24}
!15 = !{!10, !6, i64 32}
!16 = !{!10, !6, i64 40}
!17 = !{!10, !6, i64 48}
!18 = !{!10, !6, i64 56}
!19 = !{!10, !6, i64 64}
!20 = !{!10, !6, i64 72}
!21 = !{!10, !6, i64 80}
!22 = !{!10, !6, i64 88}
!23 = !{!10, !6, i64 96}
!24 = !{!10, !6, i64 104}
!25 = !{!10, !6, i64 112}
!26 = !{!10, !6, i64 120}
!27 = !{!28, !28, i64 0}
!28 = !{!"int", !7, i64 0}
!29 = !{!30, !28, i64 32}
!30 = !{!"", !28, i64 0, !28, i64 4, !28, i64 8, !28, i64 12, !28, i64 16, !28, i64 20, !28, i64 24, !28, i64 28, !28, i64 32, !28, i64 36, !7, i64 40, !31, i64 552, !31, i64 584, !31, i64 616, !7, i64 648, !7, i64 649, !7, i64 650, !7, i64 651, !7, i64 652}
!31 = !{!"", !7, i64 0}
!32 = !{!30, !28, i64 36}
!33 = !{!7, !7, i64 0}
!34 = !{!30, !7, i64 652}
!35 = !{!36, !11, i64 960}
!36 = !{!"", !11, i64 0, !6, i64 8, !6, i64 16, !10, i64 24, !10, i64 152, !30, i64 280, !7, i64 936, !6, i64 944, !37, i64 952, !7, i64 954, !7, i64 955, !7, i64 956, !7, i64 957, !11, i64 960, !11, i64 968, !37, i64 976, !6, i64 984, !6, i64 992, !7, i64 1000, !31, i64 1008, !7, i64 1040, !6, i64 1048, !6, i64 1056, !6, i64 1064, !6, i64 1072, !6, i64 1080, !11, i64 1088, !6, i64 1096}
!37 = !{!"short", !7, i64 0}
!38 = !{!36, !37, i64 952}
!39 = !{!36, !7, i64 954}
!40 = !{!36, !7, i64 956}
!41 = !{!36, !11, i64 1088}
!42 = !{!43, !6, i64 64}
!43 = !{!"", !44, 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}
!44 = !{!"", !11, i64 0, !28, i64 8, !28, i64 12, !28, i64 16, !28, i64 20}
!45 = !{!46, !7, i64 8}
!46 = !{!"_RX_PKT", !6, i64 0, !7, i64 8, !37, i64 9, !7, i64 11}
!47 = !{!36, !6, i64 1064}
!48 = !{!46, !6, i64 0}
!49 = !{!36, !6, i64 1072}
!50 = !{!36, !6, i64 1080}
!51 = !{!43, !6, i64 72}
!52 = !{!36, !6, i64 984}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopFullUnrollPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SCCPPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass