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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct._EFI_SIMPLE_NETWORK_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.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._RX_TX_PACKET = type { ptr, i16, i16, [2044 x i8] }
%struct.ETHERNET_HEADER = type { [6 x i8], [6 x i8], i16 }

@.str = external hidden unnamed_addr constant [160 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [21 x i8], align 1
@gBS = external global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [17 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

declare zeroext i8 @DebugAssertEnabled() #1

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

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

declare zeroext i8 @DebugPrintEnabled() #1

declare zeroext i8 @DebugPrintLevelEnabled(i64 noundef) #1

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

declare void @Ax88772Rx(ptr noundef, i8 noundef zeroext) #1

; Function Attrs: nounwind uwtable
define dso_local i64 @SN_Receive(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6) #2 {
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca i64, align 8
  %20 = alloca i64, align 8
  %21 = alloca i16, align 2
  %22 = alloca i64, align 8
  store ptr %0, ptr %8, align 8, !tbaa !5
  store ptr %1, ptr %9, align 8, !tbaa !5
  store ptr %2, ptr %10, align 8, !tbaa !5
  store ptr %3, ptr %11, align 8, !tbaa !5
  store ptr %4, ptr %12, align 8, !tbaa !5
  store ptr %5, ptr %13, align 8, !tbaa !5
  store ptr %6, ptr %14, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #3
  call void @llvm.lifetime.start.p0(i64 2, ptr %21) #3
  %23 = load ptr, ptr %8, align 8, !tbaa !5
  %24 = icmp ne ptr null, %23
  br i1 %24, label %25, label %196

25:                                               ; preds = %7
  %26 = load ptr, ptr %8, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct._EFI_SIMPLE_NETWORK_PROTOCOL, ptr %26, i32 0, i32 15
  %28 = load ptr, ptr %27, align 8, !tbaa !9
  %29 = icmp ne ptr null, %28
  br i1 %29, label %30, label %196

30:                                               ; preds = %25
  %31 = load ptr, ptr %8, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct._EFI_SIMPLE_NETWORK_PROTOCOL, ptr %31, i32 0, i32 15
  %33 = load ptr, ptr %32, align 8, !tbaa !9
  store ptr %33, ptr %16, align 8, !tbaa !5
  %34 = load ptr, ptr %16, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %34, i32 0, i32 0
  %36 = load i32, ptr %35, align 4, !tbaa !12
  %37 = icmp eq i32 2, %36
  br i1 %37, label %38, label %194

38:                                               ; preds = %30
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #3
  %39 = load ptr, ptr @gBS, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %39, i32 0, i32 1
  %41 = load ptr, ptr %40, align 8, !tbaa !16
  %42 = call i64 %41(i64 noundef 31)
  store i64 %42, ptr %22, align 8, !tbaa !19
  %43 = load ptr, ptr @gBS, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %43, i32 0, i32 2
  %45 = load ptr, ptr %44, align 8, !tbaa !20
  %46 = load i64, ptr %22, align 8, !tbaa !19
  call void %45(i64 noundef %46)
  %47 = load i64, ptr %22, align 8, !tbaa !19
  %48 = icmp ugt i64 %47, 8
  br i1 %48, label %49, label %76

49:                                               ; preds = %38
  br label %50

50:                                               ; preds = %49
  %51 = call zeroext i8 @DebugPrintEnabled()
  %52 = icmp ne i8 %51, 0
  br i1 %52, label %53, label %62

53:                                               ; preds = %50
  br label %54

54:                                               ; preds = %53
  %55 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648)
  %56 = icmp ne i8 %55, 0
  br i1 %56, label %57, label %59

57:                                               ; preds = %54
  %58 = load i64, ptr %22, align 8, !tbaa !19
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef @.str.2, i64 noundef %58, i32 noundef 8)
  br label %59

59:                                               ; preds = %57, %54
  br label %60

60:                                               ; preds = %59
  br label %61

61:                                               ; preds = %60
  br label %62

62:                                               ; preds = %61, %50
  br label %63

63:                                               ; preds = %62
  br label %64

64:                                               ; preds = %63
  br label %65

65:                                               ; preds = %64
  %66 = call zeroext i8 @DebugAssertEnabled()
  %67 = icmp ne i8 %66, 0
  br i1 %67, label %68, label %73

68:                                               ; preds = %65
  %69 = load i64, ptr %22, align 8, !tbaa !19
  %70 = icmp ule i64 %69, 8
  br i1 %70, label %72, label %71

71:                                               ; preds = %68
  call void @DebugAssert(ptr noundef @.str, i64 noundef 455, ptr noundef @.str.3)
  br label %72

72:                                               ; preds = %71, %68
  br label %73

73:                                               ; preds = %72, %65
  br label %74

74:                                               ; preds = %73
  br label %75

75:                                               ; preds = %74
  br label %76

76:                                               ; preds = %75, %38
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #3
  %77 = load ptr, ptr @gBS, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %77, i32 0, i32 1
  %79 = load ptr, ptr %78, align 8, !tbaa !16
  %80 = call i64 %79(i64 noundef 8)
  store i64 %80, ptr %20, align 8, !tbaa !19
  %81 = call zeroext i8 @DebugAssertEnabled()
  %82 = zext i8 %81 to i32
  %83 = icmp ne i32 %82, 0
  br i1 %83, label %84, label %94

84:                                               ; preds = %76
  %85 = load ptr, ptr %8, align 8, !tbaa !5
  %86 = ptrtoint ptr %85 to i64
  %87 = sub i64 %86, ptrtoint (ptr getelementptr inbounds (%struct.NIC_DEVICE, ptr null, i32 0, i32 3) to i64)
  %88 = inttoptr i64 %87 to ptr
  %89 = getelementptr inbounds %struct.NIC_DEVICE, ptr %88, i32 0, i32 0
  %90 = load i64, ptr %89, align 8, !tbaa !21
  %91 = icmp ne i64 %90, 943216705
  br i1 %91, label %92, label %94

92:                                               ; preds = %84
  call void @DebugAssert(ptr noundef @.str, i64 noundef 461, ptr noundef @.str.1)
  %93 = load ptr, ptr %8, align 8, !tbaa !5
  br label %99

94:                                               ; preds = %84, %76
  %95 = load ptr, ptr %8, align 8, !tbaa !5
  %96 = ptrtoint ptr %95 to i64
  %97 = sub i64 %96, ptrtoint (ptr getelementptr inbounds (%struct.NIC_DEVICE, ptr null, i32 0, i32 3) to i64)
  %98 = inttoptr i64 %97 to ptr
  br label %99

99:                                               ; preds = %94, %92
  %100 = phi ptr [ %93, %92 ], [ %98, %94 ]
  store ptr %100, ptr %17, align 8, !tbaa !5
  %101 = load ptr, ptr %17, align 8, !tbaa !5
  call void @Ax88772Rx(ptr noundef %101, i8 noundef zeroext 0)
  %102 = load ptr, ptr %17, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.NIC_DEVICE, ptr %102, i32 0, i32 11
  %104 = load i8, ptr %103, align 1, !tbaa !24
  %105 = load ptr, ptr %16, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %105, i32 0, i32 18
  store i8 %104, ptr %106, align 4, !tbaa !25
  %107 = load ptr, ptr %16, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %107, i32 0, i32 18
  %109 = load i8, ptr %108, align 4, !tbaa !25
  %110 = icmp ne i8 %109, 0
  br i1 %110, label %111, label %188

111:                                              ; preds = %99
  %112 = load ptr, ptr %17, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.NIC_DEVICE, ptr %112, i32 0, i32 15
  %114 = load ptr, ptr %113, align 8, !tbaa !26
  store ptr %114, ptr %18, align 8, !tbaa !5
  %115 = load ptr, ptr %18, align 8, !tbaa !5
  %116 = icmp ne ptr null, %115
  br i1 %116, label %117, label %186

117:                                              ; preds = %111
  %118 = load ptr, ptr %18, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct._RX_TX_PACKET, ptr %118, i32 0, i32 0
  %120 = load ptr, ptr %119, align 1, !tbaa !27
  %121 = load ptr, ptr %17, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.NIC_DEVICE, ptr %121, i32 0, i32 15
  store ptr %120, ptr %122, align 8, !tbaa !26
  %123 = load ptr, ptr %17, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.NIC_DEVICE, ptr %123, i32 0, i32 15
  %125 = load ptr, ptr %124, align 8, !tbaa !26
  %126 = icmp eq ptr null, %125
  br i1 %126, label %127, label %130

127:                                              ; preds = %117
  %128 = load ptr, ptr %17, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.NIC_DEVICE, ptr %128, i32 0, i32 16
  store ptr null, ptr %129, align 8, !tbaa !29
  br label %130

130:                                              ; preds = %127, %117
  %131 = load ptr, ptr %18, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct._RX_TX_PACKET, ptr %131, i32 0, i32 1
  %133 = load i16, ptr %132, align 1, !tbaa !30
  %134 = zext i16 %133 to i64
  %135 = load ptr, ptr %10, align 8, !tbaa !5
  store i64 %134, ptr %135, align 8, !tbaa !19
  %136 = load ptr, ptr %11, align 8, !tbaa !5
  %137 = load ptr, ptr %18, align 8, !tbaa !5
  %138 = getelementptr inbounds %struct._RX_TX_PACKET, ptr %137, i32 0, i32 3
  %139 = getelementptr inbounds [2044 x i8], ptr %138, i64 0, i64 0
  %140 = load ptr, ptr %18, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct._RX_TX_PACKET, ptr %140, i32 0, i32 1
  %142 = load i16, ptr %141, align 1, !tbaa !30
  %143 = zext i16 %142 to i64
  %144 = call ptr @CopyMem(ptr noundef %136, ptr noundef %139, i64 noundef %143)
  %145 = load ptr, ptr %18, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct._RX_TX_PACKET, ptr %145, i32 0, i32 3
  %147 = getelementptr inbounds [2044 x i8], ptr %146, i64 0, i64 0
  store ptr %147, ptr %15, align 8, !tbaa !5
  %148 = load ptr, ptr %9, align 8, !tbaa !5
  %149 = icmp ne ptr null, %148
  br i1 %149, label %150, label %152

150:                                              ; preds = %130
  %151 = load ptr, ptr %9, align 8, !tbaa !5
  store i64 14, ptr %151, align 8, !tbaa !19
  br label %152

152:                                              ; preds = %150, %130
  %153 = load ptr, ptr %13, align 8, !tbaa !5
  %154 = icmp ne ptr null, %153
  br i1 %154, label %155, label %160

155:                                              ; preds = %152
  %156 = load ptr, ptr %13, align 8, !tbaa !5
  %157 = load ptr, ptr %15, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct.ETHERNET_HEADER, ptr %157, i32 0, i32 0
  %159 = call ptr @CopyMem(ptr noundef %156, ptr noundef %158, i64 noundef 6)
  br label %160

160:                                              ; preds = %155, %152
  %161 = load ptr, ptr %12, align 8, !tbaa !5
  %162 = icmp ne ptr null, %161
  br i1 %162, label %163, label %168

163:                                              ; preds = %160
  %164 = load ptr, ptr %12, align 8, !tbaa !5
  %165 = load ptr, ptr %15, align 8, !tbaa !5
  %166 = getelementptr inbounds %struct.ETHERNET_HEADER, ptr %165, i32 0, i32 1
  %167 = call ptr @CopyMem(ptr noundef %164, ptr noundef %166, i64 noundef 6)
  br label %168

168:                                              ; preds = %163, %160
  %169 = load ptr, ptr %14, align 8, !tbaa !5
  %170 = icmp ne ptr null, %169
  br i1 %170, label %171, label %185

171:                                              ; preds = %168
  %172 = load ptr, ptr %15, align 8, !tbaa !5
  %173 = getelementptr inbounds %struct.ETHERNET_HEADER, ptr %172, i32 0, i32 2
  %174 = load i16, ptr %173, align 1, !tbaa !31
  store i16 %174, ptr %21, align 2, !tbaa !33
  %175 = load i16, ptr %21, align 2, !tbaa !33
  %176 = zext i16 %175 to i32
  %177 = ashr i32 %176, 8
  %178 = load i16, ptr %21, align 2, !tbaa !33
  %179 = zext i16 %178 to i32
  %180 = shl i32 %179, 8
  %181 = or i32 %177, %180
  %182 = trunc i32 %181 to i16
  store i16 %182, ptr %21, align 2, !tbaa !33
  %183 = load i16, ptr %21, align 2, !tbaa !33
  %184 = load ptr, ptr %14, align 8, !tbaa !5
  store i16 %183, ptr %184, align 2, !tbaa !33
  br label %185

185:                                              ; preds = %171, %168
  store i64 0, ptr %19, align 8, !tbaa !19
  br label %187

186:                                              ; preds = %111
  store i64 -9223372036854775802, ptr %19, align 8, !tbaa !19
  br label %187

187:                                              ; preds = %186, %185
  br label %189

188:                                              ; preds = %99
  store i64 -9223372036854775802, ptr %19, align 8, !tbaa !19
  br label %189

189:                                              ; preds = %188, %187
  %190 = load ptr, ptr @gBS, align 8, !tbaa !5
  %191 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %190, i32 0, i32 2
  %192 = load ptr, ptr %191, align 8, !tbaa !20
  %193 = load i64, ptr %20, align 8, !tbaa !19
  call void %192(i64 noundef %193)
  br label %195

194:                                              ; preds = %30
  store i64 -9223372036854775789, ptr %19, align 8, !tbaa !19
  br label %195

195:                                              ; preds = %194, %189
  br label %197

196:                                              ; preds = %25, %7
  store i64 -9223372036854775806, ptr %19, align 8, !tbaa !19
  br label %197

197:                                              ; preds = %196, %195
  %198 = load i64, ptr %19, align 8, !tbaa !19
  call void @llvm.lifetime.end.p0(i64 2, ptr %21) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  ret i64 %198
}

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 120}
!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 = !{!13, !14, i64 0}
!13 = !{!"", !14, i64 0, !14, i64 4, !14, i64 8, !14, i64 12, !14, i64 16, !14, i64 20, !14, i64 24, !14, i64 28, !14, i64 32, !14, i64 36, !7, i64 40, !15, i64 552, !15, i64 584, !15, i64 616, !7, i64 648, !7, i64 649, !7, i64 650, !7, i64 651, !7, i64 652}
!14 = !{!"int", !7, i64 0}
!15 = !{!"", !7, i64 0}
!16 = !{!17, !6, i64 24}
!17 = !{!"", !18, 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}
!18 = !{!"", !11, i64 0, !14, i64 8, !14, i64 12, !14, i64 16, !14, i64 20}
!19 = !{!11, !11, i64 0}
!20 = !{!17, !6, i64 32}
!21 = !{!22, !11, i64 0}
!22 = !{!"", !11, i64 0, !6, i64 8, !6, i64 16, !10, i64 24, !13, i64 152, !7, i64 808, !6, i64 816, !23, 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}
!23 = !{!"short", !7, i64 0}
!24 = !{!22, !7, i64 829}
!25 = !{!13, !7, i64 652}
!26 = !{!22, !6, i64 848}
!27 = !{!28, !6, i64 0}
!28 = !{!"_RX_TX_PACKET", !6, i64 0, !23, i64 8, !23, i64 10, !7, i64 12}
!29 = !{!22, !6, i64 856}
!30 = !{!28, !23, i64 8}
!31 = !{!32, !23, i64 12}
!32 = !{!"", !7, i64 0, !7, i64 6, !23, i64 12}
!33 = !{!23, !23, i64 0}


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

@.str = external hidden unnamed_addr constant [160 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [21 x i8], align 1
@gBS = external local_unnamed_addr global ptr, align 8
@.str.2 = external hidden unnamed_addr constant [31 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [17 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 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 @Ax88772Rx(ptr noundef, i8 noundef zeroext) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local range(i64 -9223372036854775806, 1) i64 @SN_Receive(ptr noundef %0, ptr noundef writeonly %1, ptr nocapture noundef writeonly %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef writeonly %6) local_unnamed_addr #1 {
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %76, label %8

8:                                                ; preds = %7
  %9 = getelementptr inbounds i8, ptr %0, i64 120
  %10 = load ptr, ptr %9, align 8, !tbaa !5
  %.not51 = icmp eq ptr %10, null
  br i1 %.not51, label %76, label %11

11:                                               ; preds = %8
  %12 = load i32, ptr %10, align 4, !tbaa !11
  %13 = icmp eq i32 %12, 2
  br i1 %13, label %14, label %76

14:                                               ; preds = %11
  %15 = load ptr, ptr @gBS, align 8, !tbaa !15
  %16 = getelementptr inbounds i8, ptr %15, i64 24
  %17 = load ptr, ptr %16, align 8, !tbaa !16
  %18 = tail call i64 %17(i64 noundef 31) #3
  %19 = load ptr, ptr @gBS, align 8, !tbaa !15
  %20 = getelementptr inbounds i8, ptr %19, i64 32
  %21 = load ptr, ptr %20, align 8, !tbaa !19
  tail call void %21(i64 noundef %18) #3
  %22 = icmp ugt i64 %18, 8
  br i1 %22, label %23, label %32

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

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

27:                                               ; preds = %25
  tail call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef nonnull @.str.2, i64 noundef %18, i32 noundef 8) #3
  br label %28

28:                                               ; preds = %23, %27, %25
  %29 = tail call zeroext i8 @DebugAssertEnabled() #3
  %30 = icmp eq i8 %29, 0
  br i1 %30, label %32, label %31

31:                                               ; preds = %28
  tail call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 455, ptr noundef nonnull @.str.3) #3
  br label %32

32:                                               ; preds = %28, %31, %14
  %33 = load ptr, ptr @gBS, align 8, !tbaa !15
  %34 = getelementptr inbounds i8, ptr %33, i64 24
  %35 = load ptr, ptr %34, align 8, !tbaa !16
  %36 = tail call i64 %35(i64 noundef 8) #3
  %37 = tail call zeroext i8 @DebugAssertEnabled() #3
  %.not54 = icmp eq i8 %37, 0
  %.pre = ptrtoint ptr %0 to i64
  %.pre62 = add i64 %.pre, -24
  %.pre64 = inttoptr i64 %.pre62 to ptr
  br i1 %.not54, label %._crit_edge, label %38

38:                                               ; preds = %32
  %39 = load i64, ptr %.pre64, align 8, !tbaa !20
  %.not55 = icmp eq i64 %39, 943216705
  br i1 %.not55, label %._crit_edge, label %40

40:                                               ; preds = %38
  tail call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 461, ptr noundef nonnull @.str.1) #3
  br label %._crit_edge

._crit_edge:                                      ; preds = %32, %38, %40
  %41 = phi ptr [ %0, %40 ], [ %.pre64, %38 ], [ %.pre64, %32 ]
  tail call void @Ax88772Rx(ptr noundef %41, i8 noundef zeroext 0) #3
  %42 = getelementptr inbounds i8, ptr %41, i64 829
  %43 = load i8, ptr %42, align 1, !tbaa !23
  %44 = getelementptr inbounds i8, ptr %10, i64 652
  store i8 %43, ptr %44, align 4, !tbaa !24
  %.not56 = icmp eq i8 %43, 0
  br i1 %.not56, label %72, label %45

45:                                               ; preds = %._crit_edge
  %46 = getelementptr inbounds i8, ptr %41, i64 848
  %47 = load ptr, ptr %46, align 8, !tbaa !25
  %.not57 = icmp eq ptr %47, null
  br i1 %.not57, label %72, label %48

48:                                               ; preds = %45
  %49 = load ptr, ptr %47, align 1, !tbaa !26
  store ptr %49, ptr %46, align 8, !tbaa !25
  %50 = icmp eq ptr %49, null
  br i1 %50, label %51, label %53

51:                                               ; preds = %48
  %52 = getelementptr inbounds i8, ptr %41, i64 856
  store ptr null, ptr %52, align 8, !tbaa !28
  br label %53

53:                                               ; preds = %51, %48
  %54 = getelementptr inbounds i8, ptr %47, i64 8
  %55 = load i16, ptr %54, align 1, !tbaa !29
  %56 = zext i16 %55 to i64
  store i64 %56, ptr %2, align 8, !tbaa !30
  %57 = getelementptr inbounds i8, ptr %47, i64 12
  %58 = tail call ptr @CopyMem(ptr noundef %3, ptr noundef nonnull %57, i64 noundef %56) #3
  %.not58 = icmp eq ptr %1, null
  br i1 %.not58, label %60, label %59

59:                                               ; preds = %53
  store i64 14, ptr %1, align 8, !tbaa !30
  br label %60

60:                                               ; preds = %59, %53
  %.not59 = icmp eq ptr %5, null
  br i1 %.not59, label %63, label %61

61:                                               ; preds = %60
  %62 = tail call ptr @CopyMem(ptr noundef nonnull %5, ptr noundef nonnull %57, i64 noundef 6) #3
  br label %63

63:                                               ; preds = %61, %60
  %.not60 = icmp eq ptr %4, null
  br i1 %.not60, label %67, label %64

64:                                               ; preds = %63
  %65 = getelementptr inbounds i8, ptr %47, i64 18
  %66 = tail call ptr @CopyMem(ptr noundef nonnull %4, ptr noundef nonnull %65, i64 noundef 6) #3
  br label %67

67:                                               ; preds = %64, %63
  %.not61 = icmp eq ptr %6, null
  br i1 %.not61, label %72, label %68

68:                                               ; preds = %67
  %69 = getelementptr inbounds i8, ptr %47, i64 24
  %70 = load i16, ptr %69, align 1, !tbaa !31
  %71 = tail call i16 @llvm.bswap.i16(i16 %70)
  store i16 %71, ptr %6, align 2, !tbaa !33
  br label %72

72:                                               ; preds = %._crit_edge, %45, %67, %68
  %.0 = phi i64 [ 0, %68 ], [ 0, %67 ], [ -9223372036854775802, %45 ], [ -9223372036854775802, %._crit_edge ]
  %73 = load ptr, ptr @gBS, align 8, !tbaa !15
  %74 = getelementptr inbounds i8, ptr %73, i64 32
  %75 = load ptr, ptr %74, align 8, !tbaa !19
  tail call void %75(i64 noundef %36) #3
  br label %76

76:                                               ; preds = %7, %8, %11, %72
  %.1 = phi i64 [ %.0, %72 ], [ -9223372036854775789, %11 ], [ -9223372036854775806, %8 ], [ -9223372036854775806, %7 ]
  ret i64 %.1
}

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i16 @llvm.bswap.i16(i16) #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 nosync nounwind speculatable willreturn memory(none) }
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, !10, i64 120}
!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 = !{!12, !13, i64 0}
!12 = !{!"", !13, i64 0, !13, i64 4, !13, i64 8, !13, i64 12, !13, i64 16, !13, i64 20, !13, i64 24, !13, i64 28, !13, i64 32, !13, i64 36, !8, i64 40, !14, i64 552, !14, i64 584, !14, i64 616, !8, i64 648, !8, i64 649, !8, i64 650, !8, i64 651, !8, i64 652}
!13 = !{!"int", !8, i64 0}
!14 = !{!"", !8, i64 0}
!15 = !{!10, !10, i64 0}
!16 = !{!17, !10, i64 24}
!17 = !{!"", !18, 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}
!18 = !{!"", !7, i64 0, !13, i64 8, !13, i64 12, !13, i64 16, !13, i64 20}
!19 = !{!17, !10, i64 32}
!20 = !{!21, !7, i64 0}
!21 = !{!"", !7, i64 0, !10, i64 8, !10, i64 16, !6, i64 24, !12, i64 152, !8, i64 808, !10, i64 816, !22, 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}
!22 = !{!"short", !8, i64 0}
!23 = !{!21, !8, i64 829}
!24 = !{!12, !8, i64 652}
!25 = !{!21, !10, i64 848}
!26 = !{!27, !10, i64 0}
!27 = !{!"_RX_TX_PACKET", !10, i64 0, !22, i64 8, !22, i64 10, !8, i64 12}
!28 = !{!21, !10, i64 856}
!29 = !{!27, !22, i64 8}
!30 = !{!7, !7, i64 0}
!31 = !{!32, !22, i64 12}
!32 = !{!"", !8, i64 0, !8, i64 6, !22, i64 12}
!33 = !{!22, !22, i64 0}


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