; 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_MODE, i8, ptr, i16, i8, i8, i8, i8, i8, ptr, i64, ptr, ptr, ptr, [2 x i32], 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 }

@gBS = external global ptr, align 8
@.str.4 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [36 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_Initialize(ptr noundef, i64 noundef, i64 noundef) #1

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

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

92:                                               ; preds = %1
  br label %93

93:                                               ; preds = %92
  %94 = call zeroext i8 @DebugPrintEnabled()
  %95 = icmp ne i8 %94, 0
  br i1 %95, label %96, label %104

96:                                               ; preds = %93
  br label %97

97:                                               ; preds = %96
  %98 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648)
  %99 = icmp ne i8 %98, 0
  br i1 %99, label %100, label %101

100:                                              ; preds = %97
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef @.str.4)
  br label %101

101:                                              ; preds = %100, %97
  br label %102

102:                                              ; preds = %101
  br label %103

103:                                              ; preds = %102
  br label %104

104:                                              ; preds = %103, %93
  br label %105

105:                                              ; preds = %104
  br label %106

106:                                              ; preds = %105
  %107 = load i64, ptr %6, align 8, !tbaa !53
  store i64 %107, ptr %2, align 8
  store i32 1, ptr %7, align 4
  br label %175

108:                                              ; preds = %1
  %109 = load ptr, ptr %3, align 8, !tbaa !5
  %110 = load ptr, ptr %4, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %110, i32 0, i32 13
  %112 = getelementptr inbounds %struct.EFI_MAC_ADDRESS, ptr %111, i32 0, i32 0
  %113 = getelementptr inbounds [32 x i8], ptr %112, i64 0, i64 0
  %114 = call i64 @Ax88772MacAddressGet(ptr noundef %109, ptr noundef %113)
  store i64 %114, ptr %6, align 8, !tbaa !53
  %115 = load i64, ptr %6, align 8, !tbaa !53
  %116 = icmp slt i64 %115, 0
  br i1 %116, label %173, label %117

117:                                              ; preds = %108
  br label %118

118:                                              ; preds = %117
  %119 = call zeroext i8 @DebugPrintEnabled()
  %120 = icmp ne i8 %119, 0
  br i1 %120, label %121, label %165

121:                                              ; preds = %118
  br label %122

122:                                              ; preds = %121
  %123 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 134217792)
  %124 = icmp ne i8 %123, 0
  br i1 %124, label %125, label %162

125:                                              ; preds = %122
  %126 = load ptr, ptr %4, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %126, i32 0, i32 13
  %128 = getelementptr inbounds %struct.EFI_MAC_ADDRESS, ptr %127, i32 0, i32 0
  %129 = getelementptr inbounds [32 x i8], ptr %128, i64 0, i64 0
  %130 = load i8, ptr %129, align 4, !tbaa !54
  %131 = zext i8 %130 to i32
  %132 = load ptr, ptr %4, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %132, i32 0, i32 13
  %134 = getelementptr inbounds %struct.EFI_MAC_ADDRESS, ptr %133, i32 0, i32 0
  %135 = getelementptr inbounds [32 x i8], ptr %134, i64 0, i64 1
  %136 = load i8, ptr %135, align 1, !tbaa !54
  %137 = zext i8 %136 to i32
  %138 = load ptr, ptr %4, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %138, i32 0, i32 13
  %140 = getelementptr inbounds %struct.EFI_MAC_ADDRESS, ptr %139, i32 0, i32 0
  %141 = getelementptr inbounds [32 x i8], ptr %140, i64 0, i64 2
  %142 = load i8, ptr %141, align 2, !tbaa !54
  %143 = zext i8 %142 to i32
  %144 = load ptr, ptr %4, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %144, i32 0, i32 13
  %146 = getelementptr inbounds %struct.EFI_MAC_ADDRESS, ptr %145, i32 0, i32 0
  %147 = getelementptr inbounds [32 x i8], ptr %146, i64 0, i64 3
  %148 = load i8, ptr %147, align 1, !tbaa !54
  %149 = zext i8 %148 to i32
  %150 = load ptr, ptr %4, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %150, i32 0, i32 13
  %152 = getelementptr inbounds %struct.EFI_MAC_ADDRESS, ptr %151, i32 0, i32 0
  %153 = getelementptr inbounds [32 x i8], ptr %152, i64 0, i64 4
  %154 = load i8, ptr %153, align 4, !tbaa !54
  %155 = zext i8 %154 to i32
  %156 = load ptr, ptr %4, align 8, !tbaa !5
  %157 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %156, i32 0, i32 13
  %158 = getelementptr inbounds %struct.EFI_MAC_ADDRESS, ptr %157, i32 0, i32 0
  %159 = getelementptr inbounds [32 x i8], ptr %158, i64 0, i64 5
  %160 = load i8, ptr %159, align 1, !tbaa !54
  %161 = zext i8 %160 to i32
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 134217792, ptr noundef @.str.5, i32 noundef %131, i32 noundef %137, i32 noundef %143, i32 noundef %149, i32 noundef %155, i32 noundef %161)
  br label %162

162:                                              ; preds = %125, %122
  br label %163

163:                                              ; preds = %162
  br label %164

164:                                              ; preds = %163
  br label %165

165:                                              ; preds = %164, %118
  br label %166

166:                                              ; preds = %165
  br label %167

167:                                              ; preds = %166
  %168 = load ptr, ptr %4, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %168, i32 0, i32 11
  %170 = load ptr, ptr %4, align 8, !tbaa !5
  %171 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %170, i32 0, i32 13
  %172 = call ptr @CopyMem(ptr noundef %169, ptr noundef %171, i64 noundef 6)
  br label %173

173:                                              ; preds = %167, %108
  %174 = load i64, ptr %6, align 8, !tbaa !53
  store i64 %174, ptr %2, align 8
  store i32 1, ptr %7, align 4
  br label %175

175:                                              ; preds = %173, %106
  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
  %176 = load i64, ptr %2, align 8
  ret i64 %176
}

; 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 ptr @SetMem(ptr noundef, i64 noundef, i8 noundef zeroext) #2

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, !47, i64 824}
!46 = !{!"", !11, i64 0, !6, i64 8, !6, i64 16, !10, i64 24, !28, i64 152, !7, i64 808, !6, i64 816, !47, i64 824, !7, i64 826, !7, i64 827, !7, i64 828, !7, i64 829, !7, i64 830, !6, i64 832, !11, i64 840, !6, i64 848, !6, i64 856, !6, i64 864, !7, i64 872, !6, i64 880}
!47 = !{!"short", !7, i64 0}
!48 = !{!46, !7, i64 826}
!49 = !{!46, !7, i64 828}
!50 = !{!51, !6, i64 64}
!51 = !{!"", !52, 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}
!52 = !{!"", !11, i64 0, !29, i64 8, !29, i64 12, !29, i64 16, !29, i64 20}
!53 = !{!11, !11, i64 0}
!54 = !{!7, !7, i64 0}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@gBS = external local_unnamed_addr global ptr, align 8
@.str.4 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [36 x i8], align 1

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

declare zeroext i8 @DebugPrintEnabled() local_unnamed_addr #1

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

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

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

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

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

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

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

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

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

; Function Attrs: nounwind uwtable
define dso_local i64 @SN_Setup(ptr noundef %0) local_unnamed_addr #0 {
  %2 = getelementptr inbounds i8, ptr %0, i64 24
  store i64 65536, ptr %2, align 8, !tbaa !5
  %3 = getelementptr inbounds i8, ptr %0, i64 32
  store ptr @SN_Start, ptr %3, align 8, !tbaa !11
  %4 = getelementptr inbounds i8, ptr %0, i64 40
  store ptr @SN_Stop, ptr %4, align 8, !tbaa !12
  %5 = getelementptr inbounds i8, ptr %0, i64 48
  store ptr @SN_Initialize, ptr %5, align 8, !tbaa !13
  %6 = getelementptr inbounds i8, ptr %0, i64 56
  store ptr @SN_Reset, ptr %6, align 8, !tbaa !14
  %7 = getelementptr inbounds i8, ptr %0, i64 64
  store ptr @SN_Shutdown, ptr %7, align 8, !tbaa !15
  %8 = getelementptr inbounds i8, ptr %0, i64 72
  store ptr @SN_ReceiveFilters, ptr %8, align 8, !tbaa !16
  %9 = getelementptr inbounds i8, ptr %0, i64 80
  store ptr @SN_StationAddress, ptr %9, align 8, !tbaa !17
  %10 = getelementptr inbounds i8, ptr %0, i64 88
  store ptr @SN_Statistics, ptr %10, align 8, !tbaa !18
  %11 = getelementptr inbounds i8, ptr %0, i64 96
  store ptr @SN_MCastIPtoMAC, ptr %11, align 8, !tbaa !19
  %12 = getelementptr inbounds i8, ptr %0, i64 104
  store ptr @SN_NvData, ptr %12, align 8, !tbaa !20
  %13 = getelementptr inbounds i8, ptr %0, i64 112
  store ptr @SN_GetStatus, ptr %13, align 8, !tbaa !21
  %14 = getelementptr inbounds i8, ptr %0, i64 120
  store ptr @SN_Transmit, ptr %14, align 8, !tbaa !22
  %15 = getelementptr inbounds i8, ptr %0, i64 128
  store ptr @SN_Receive, ptr %15, align 8, !tbaa !23
  %16 = getelementptr inbounds i8, ptr %0, i64 136
  store ptr null, ptr %16, align 8, !tbaa !24
  %17 = getelementptr inbounds i8, ptr %0, i64 152
  %18 = getelementptr inbounds i8, ptr %0, i64 144
  store ptr %17, ptr %18, align 8, !tbaa !25
  store <4 x i32> <i32 0, i32 6, i32 14, i32 1500>, ptr %17, align 4, !tbaa !26
  %19 = getelementptr inbounds i8, ptr %0, i64 168
  store <4 x i32> <i32 0, i32 0, i32 31, i32 5>, ptr %19, align 4, !tbaa !26
  %20 = getelementptr inbounds i8, ptr %0, i64 184
  store i32 16, ptr %20, align 4, !tbaa !28
  %21 = getelementptr inbounds i8, ptr %0, i64 188
  store i32 0, ptr %21, align 4, !tbaa !31
  %22 = getelementptr inbounds i8, ptr %0, i64 736
  %23 = tail call ptr @SetMem(ptr noundef nonnull %22, i64 noundef 6, i8 noundef zeroext -1) #2
  %24 = getelementptr inbounds i8, ptr %0, i64 800
  %25 = getelementptr inbounds i8, ptr %0, i64 804
  store i32 16843009, ptr %24, align 4
  store i8 0, ptr %25, align 4, !tbaa !32
  %26 = getelementptr inbounds i8, ptr %0, i64 824
  store i16 16, ptr %26, align 8, !tbaa !33
  %27 = getelementptr inbounds i8, ptr %0, i64 826
  store i8 1, ptr %27, align 2, !tbaa !36
  %28 = getelementptr inbounds i8, ptr %0, i64 828
  store i8 1, ptr %28, align 4, !tbaa !37
  %29 = load ptr, ptr @gBS, align 8, !tbaa !38
  %30 = getelementptr inbounds i8, ptr %29, i64 64
  %31 = load ptr, ptr %30, align 8, !tbaa !39
  %32 = getelementptr inbounds i8, ptr %0, i64 880
  %33 = tail call i64 %31(i32 noundef 6, i64 noundef 2048, ptr noundef nonnull %32) #2
  %34 = icmp slt i64 %33, 0
  br i1 %34, label %35, label %40

35:                                               ; preds = %1
  %36 = tail call zeroext i8 @DebugPrintEnabled() #2
  %.not55 = icmp eq i8 %36, 0
  br i1 %.not55, label %69, label %37

37:                                               ; preds = %35
  %38 = tail call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648) #2
  %.not56 = icmp eq i8 %38, 0
  br i1 %.not56, label %69, label %39

39:                                               ; preds = %37
  tail call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef nonnull @.str.4) #2
  br label %69

40:                                               ; preds = %1
  %41 = getelementptr inbounds i8, ptr %0, i64 768
  %42 = tail call i64 @Ax88772MacAddressGet(ptr noundef nonnull %0, ptr noundef nonnull %41) #2
  %43 = icmp slt i64 %42, 0
  br i1 %43, label %69, label %44

44:                                               ; preds = %40
  %45 = tail call zeroext i8 @DebugPrintEnabled() #2
  %.not = icmp eq i8 %45, 0
  br i1 %.not, label %66, label %46

46:                                               ; preds = %44
  %47 = tail call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 134217792) #2
  %.not54 = icmp eq i8 %47, 0
  br i1 %.not54, label %66, label %48

48:                                               ; preds = %46
  %49 = load i8, ptr %41, align 4, !tbaa !42
  %50 = zext i8 %49 to i32
  %51 = getelementptr inbounds i8, ptr %0, i64 769
  %52 = load i8, ptr %51, align 1, !tbaa !42
  %53 = zext i8 %52 to i32
  %54 = getelementptr inbounds i8, ptr %0, i64 770
  %55 = load i8, ptr %54, align 2, !tbaa !42
  %56 = zext i8 %55 to i32
  %57 = getelementptr inbounds i8, ptr %0, i64 771
  %58 = load i8, ptr %57, align 1, !tbaa !42
  %59 = zext i8 %58 to i32
  %60 = getelementptr inbounds i8, ptr %0, i64 772
  %61 = load i8, ptr %60, align 4, !tbaa !42
  %62 = zext i8 %61 to i32
  %63 = getelementptr inbounds i8, ptr %0, i64 773
  %64 = load i8, ptr %63, align 1, !tbaa !42
  %65 = zext i8 %64 to i32
  tail call void (i64, ptr, ...) @DebugPrint(i64 noundef 134217792, ptr noundef nonnull @.str.5, i32 noundef %50, i32 noundef %53, i32 noundef %56, i32 noundef %59, i32 noundef %62, i32 noundef %65) #2
  br label %66

66:                                               ; preds = %46, %48, %44
  %67 = getelementptr inbounds i8, ptr %0, i64 704
  %68 = tail call ptr @CopyMem(ptr noundef nonnull %67, ptr noundef nonnull %41, i64 noundef 6) #2
  br label %69

69:                                               ; preds = %40, %66, %35, %39, %37
  %.0 = phi i64 [ %33, %37 ], [ %33, %39 ], [ %33, %35 ], [ %42, %66 ], [ %42, %40 ]
  ret i64 %.0
}

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

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

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

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

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

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

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

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !7, i64 0}
!6 = !{!"_EFI_SIMPLE_NETWORK_PROTOCOL", !7, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !10, i64 96, !10, i64 104, !10, i64 112, !10, i64 120}
!7 = !{!"long long", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!6, !10, i64 8}
!12 = !{!6, !10, i64 16}
!13 = !{!6, !10, i64 24}
!14 = !{!6, !10, i64 32}
!15 = !{!6, !10, i64 40}
!16 = !{!6, !10, i64 48}
!17 = !{!6, !10, i64 56}
!18 = !{!6, !10, i64 64}
!19 = !{!6, !10, i64 72}
!20 = !{!6, !10, i64 80}
!21 = !{!6, !10, i64 88}
!22 = !{!6, !10, i64 96}
!23 = !{!6, !10, i64 104}
!24 = !{!6, !10, i64 112}
!25 = !{!6, !10, i64 120}
!26 = !{!27, !27, i64 0}
!27 = !{!"int", !8, i64 0}
!28 = !{!29, !27, i64 32}
!29 = !{!"", !27, i64 0, !27, i64 4, !27, i64 8, !27, i64 12, !27, i64 16, !27, i64 20, !27, i64 24, !27, i64 28, !27, i64 32, !27, i64 36, !8, i64 40, !30, i64 552, !30, i64 584, !30, i64 616, !8, i64 648, !8, i64 649, !8, i64 650, !8, i64 651, !8, i64 652}
!30 = !{!"", !8, i64 0}
!31 = !{!29, !27, i64 36}
!32 = !{!29, !8, i64 652}
!33 = !{!34, !35, i64 824}
!34 = !{!"", !7, i64 0, !10, i64 8, !10, i64 16, !6, i64 24, !29, i64 152, !8, i64 808, !10, i64 816, !35, i64 824, !8, i64 826, !8, i64 827, !8, i64 828, !8, i64 829, !8, i64 830, !10, i64 832, !7, i64 840, !10, i64 848, !10, i64 856, !10, i64 864, !8, i64 872, !10, i64 880}
!35 = !{!"short", !8, i64 0}
!36 = !{!34, !8, i64 826}
!37 = !{!34, !8, i64 828}
!38 = !{!10, !10, i64 0}
!39 = !{!40, !10, i64 64}
!40 = !{!"", !41, i64 0, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !10, i64 96, !10, i64 104, !10, i64 112, !10, i64 120, !10, i64 128, !10, i64 136, !10, i64 144, !10, i64 152, !10, i64 160, !10, i64 168, !10, i64 176, !10, i64 184, !10, i64 192, !10, i64 200, !10, i64 208, !10, i64 216, !10, i64 224, !10, i64 232, !10, i64 240, !10, i64 248, !10, i64 256, !10, i64 264, !10, i64 272, !10, i64 280, !10, i64 288, !10, i64 296, !10, i64 304, !10, i64 312, !10, i64 320, !10, i64 328, !10, i64 336, !10, i64 344, !10, i64 352, !10, i64 360, !10, i64 368}
!41 = !{!"", !7, i64 0, !27, i64 8, !27, i64 12, !27, i64 16, !27, i64 20}
!42 = !{!8, !8, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,MemCpyOptPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass