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

; 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.MNP_SERVICE_DATA = type { i32, %struct._LIST_ENTRY, ptr, ptr, %struct._EFI_SERVICE_BINDING_PROTOCOL, ptr, %struct._LIST_ENTRY, i64, i32, i16, i8 }
%struct._EFI_SERVICE_BINDING_PROTOCOL = type { ptr, ptr }
%struct._LIST_ENTRY = type { ptr, ptr }
%struct.MNP_DEVICE_DATA = type { i32, ptr, ptr, %struct._EFI_VLAN_CONFIG_PROTOCOL, i64, ptr, ptr, %struct._LIST_ENTRY, i64, %struct._LIST_ENTRY, i32, ptr, %struct.NET_BUF_QUEUE, i64, ptr, i8, ptr, ptr, i32, i32, i32, i32, i32, i32, ptr, ptr }
%struct._EFI_VLAN_CONFIG_PROTOCOL = type { ptr, ptr, ptr }
%struct.NET_BUF_QUEUE = type { i32, i64, %struct._LIST_ENTRY, %struct._LIST_ENTRY, i32, i32 }
%struct.EFI_MANAGED_NETWORK_COMPLETION_TOKEN = type { ptr, i64, %union.anon }
%union.anon = type { 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_MANAGED_NETWORK_TRANSMIT_DATA = type { ptr, ptr, i16, i32, i16, i16, [1 x %struct.EFI_MANAGED_NETWORK_FRAGMENT_DATA] }
%struct.EFI_MANAGED_NETWORK_FRAGMENT_DATA = type { i32, ptr }
%struct.EFI_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 }

@.str.7 = external hidden unnamed_addr constant [47 x i8], align 1
@gBS = external global ptr, align 8

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.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

; 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
define dso_local i64 @MnpSyncSendPacket(ptr noundef %0, ptr noundef %1, i32 noundef %2, ptr noundef %3) #2 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca i64, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i32, align 4
  %13 = alloca ptr, align 8
  %14 = alloca ptr, align 8
  %15 = alloca i16, align 2
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store i32 %2, ptr %7, align 4, !tbaa !9
  store ptr %3, ptr %8, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.start.p0(i64 2, ptr %15) #3
  %16 = load ptr, ptr %5, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct.MNP_SERVICE_DATA, ptr %16, i32 0, i32 2
  %18 = load ptr, ptr %17, align 8, !tbaa !11
  store ptr %18, ptr %14, align 8, !tbaa !5
  %19 = load ptr, ptr %14, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %19, i32 0, i32 6
  %21 = load ptr, ptr %20, align 8, !tbaa !17
  store ptr %21, ptr %10, align 8, !tbaa !5
  %22 = load ptr, ptr %8, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_COMPLETION_TOKEN, ptr %22, i32 0, i32 2
  %24 = load ptr, ptr %23, align 8, !tbaa !21
  store ptr %24, ptr %11, align 8, !tbaa !5
  %25 = load ptr, ptr %10, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct._EFI_SIMPLE_NETWORK_PROTOCOL, ptr %25, i32 0, i32 15
  %27 = load ptr, ptr %26, align 8, !tbaa !22
  %28 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %27, i32 0, i32 2
  %29 = load i32, ptr %28, align 4, !tbaa !24
  %30 = load ptr, ptr %11, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_TRANSMIT_DATA, ptr %30, i32 0, i32 4
  %32 = load i16, ptr %31, align 8, !tbaa !27
  %33 = zext i16 %32 to i32
  %34 = sub i32 %29, %33
  store i32 %34, ptr %12, align 4, !tbaa !9
  %35 = load ptr, ptr %10, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct._EFI_SIMPLE_NETWORK_PROTOCOL, ptr %35, i32 0, i32 15
  %37 = load ptr, ptr %36, align 8, !tbaa !22
  %38 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %37, i32 0, i32 17
  %39 = load i8, ptr %38, align 1, !tbaa !29
  %40 = zext i8 %39 to i32
  %41 = icmp ne i32 %40, 0
  br i1 %41, label %42, label %64

42:                                               ; preds = %4
  %43 = load ptr, ptr %10, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct._EFI_SIMPLE_NETWORK_PROTOCOL, ptr %43, i32 0, i32 15
  %45 = load ptr, ptr %44, align 8, !tbaa !22
  %46 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %45, i32 0, i32 18
  %47 = load i8, ptr %46, align 4, !tbaa !30
  %48 = icmp ne i8 %47, 0
  br i1 %48, label %64, label %49

49:                                               ; preds = %42
  br label %50

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

53:                                               ; preds = %50
  br label %54

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

57:                                               ; preds = %54
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2, ptr noundef @.str.7)
  br label %58

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

59:                                               ; preds = %58
  br label %60

60:                                               ; preds = %59
  br label %61

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

62:                                               ; preds = %61
  br label %63

63:                                               ; preds = %62
  store i64 -9223372036854775796, ptr %9, align 8, !tbaa !31
  br label %156

64:                                               ; preds = %42, %4
  %65 = load ptr, ptr @gBS, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %65, i32 0, i32 9
  %67 = load ptr, ptr %66, align 8, !tbaa !32
  %68 = load ptr, ptr %14, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %68, i32 0, i32 11
  %70 = load ptr, ptr %69, align 8, !tbaa !35
  %71 = call i64 %67(ptr noundef %70, i32 noundef 2, i64 noundef 5000000)
  store i64 %71, ptr %9, align 8, !tbaa !31
  %72 = load i64, ptr %9, align 8, !tbaa !31
  %73 = icmp slt i64 %72, 0
  br i1 %73, label %74, label %75

74:                                               ; preds = %64
  br label %156

75:                                               ; preds = %64
  %76 = load ptr, ptr %5, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.MNP_SERVICE_DATA, ptr %76, i32 0, i32 9
  %78 = load i16, ptr %77, align 4, !tbaa !36
  %79 = zext i16 %78 to i32
  %80 = icmp ne i32 %79, 0
  br i1 %80, label %81, label %84

81:                                               ; preds = %75
  %82 = load ptr, ptr %5, align 8, !tbaa !5
  %83 = load ptr, ptr %11, align 8, !tbaa !5
  call void @MnpInsertVlanTag(ptr noundef %82, ptr noundef %83, ptr noundef %15, ptr noundef %6, ptr noundef %7)
  br label %88

84:                                               ; preds = %75
  %85 = load ptr, ptr %11, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_TRANSMIT_DATA, ptr %85, i32 0, i32 2
  %87 = load i16, ptr %86, align 8, !tbaa !37
  store i16 %87, ptr %15, align 2, !tbaa !38
  br label %88

88:                                               ; preds = %84, %81
  br label %89

89:                                               ; preds = %147, %88
  %90 = load ptr, ptr %10, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct._EFI_SIMPLE_NETWORK_PROTOCOL, ptr %90, i32 0, i32 12
  %92 = load ptr, ptr %91, align 8, !tbaa !39
  %93 = load ptr, ptr %10, align 8, !tbaa !5
  %94 = load i32, ptr %12, align 4, !tbaa !9
  %95 = zext i32 %94 to i64
  %96 = load i32, ptr %7, align 4, !tbaa !9
  %97 = zext i32 %96 to i64
  %98 = load ptr, ptr %6, align 8, !tbaa !5
  %99 = load ptr, ptr %11, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_TRANSMIT_DATA, ptr %99, i32 0, i32 1
  %101 = load ptr, ptr %100, align 8, !tbaa !40
  %102 = load ptr, ptr %11, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_TRANSMIT_DATA, ptr %102, i32 0, i32 0
  %104 = load ptr, ptr %103, align 8, !tbaa !41
  %105 = call i64 %92(ptr noundef %93, i64 noundef %95, i64 noundef %97, ptr noundef %98, ptr noundef %101, ptr noundef %104, ptr noundef %15)
  store i64 %105, ptr %9, align 8, !tbaa !31
  %106 = load i64, ptr %9, align 8, !tbaa !31
  %107 = icmp ne i64 %106, 0
  br i1 %107, label %108, label %112

108:                                              ; preds = %89
  %109 = load i64, ptr %9, align 8, !tbaa !31
  %110 = icmp ne i64 %109, -9223372036854775802
  br i1 %110, label %111, label %112

111:                                              ; preds = %108
  store i64 -9223372036854775801, ptr %9, align 8, !tbaa !31
  br label %148

112:                                              ; preds = %108, %89
  store ptr null, ptr %13, align 8, !tbaa !5
  br label %113

113:                                              ; preds = %129, %112
  %114 = load ptr, ptr %10, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct._EFI_SIMPLE_NETWORK_PROTOCOL, ptr %114, i32 0, i32 11
  %116 = load ptr, ptr %115, align 8, !tbaa !42
  %117 = load ptr, ptr %10, align 8, !tbaa !5
  %118 = call i64 %116(ptr noundef %117, ptr noundef null, ptr noundef %13)
  %119 = load ptr, ptr @gBS, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %119, i32 0, i32 13
  %121 = load ptr, ptr %120, align 8, !tbaa !43
  %122 = load ptr, ptr %14, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %122, i32 0, i32 11
  %124 = load ptr, ptr %123, align 8, !tbaa !35
  %125 = call i64 %121(ptr noundef %124)
  %126 = icmp slt i64 %125, 0
  br i1 %126, label %128, label %127

127:                                              ; preds = %113
  store i64 -9223372036854775790, ptr %9, align 8, !tbaa !31
  br label %132

128:                                              ; preds = %113
  br label %129

129:                                              ; preds = %128
  %130 = load ptr, ptr %13, align 8, !tbaa !5
  %131 = icmp eq ptr %130, null
  br i1 %131, label %113, label %132, !llvm.loop !44

132:                                              ; preds = %129, %127
  %133 = load i64, ptr %9, align 8, !tbaa !31
  %134 = icmp eq i64 %133, 0
  br i1 %134, label %138, label %135

135:                                              ; preds = %132
  %136 = load i64, ptr %9, align 8, !tbaa !31
  %137 = icmp eq i64 %136, -9223372036854775790
  br i1 %137, label %138, label %139

138:                                              ; preds = %135, %132
  br label %148

139:                                              ; preds = %135
  %140 = load ptr, ptr @gBS, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %140, i32 0, i32 9
  %142 = load ptr, ptr %141, align 8, !tbaa !32
  %143 = load ptr, ptr %14, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %143, i32 0, i32 11
  %145 = load ptr, ptr %144, align 8, !tbaa !35
  %146 = call i64 %142(ptr noundef %145, i32 noundef 2, i64 noundef 5000000)
  br label %147

147:                                              ; preds = %139
  br label %89

148:                                              ; preds = %138, %111
  %149 = load ptr, ptr @gBS, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %149, i32 0, i32 9
  %151 = load ptr, ptr %150, align 8, !tbaa !32
  %152 = load ptr, ptr %14, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %152, i32 0, i32 11
  %154 = load ptr, ptr %153, align 8, !tbaa !35
  %155 = call i64 %151(ptr noundef %154, i32 noundef 0, i64 noundef 0)
  br label %156

156:                                              ; preds = %148, %74, %63
  %157 = load i64, ptr %9, align 8, !tbaa !31
  %158 = load ptr, ptr %8, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_COMPLETION_TOKEN, ptr %158, i32 0, i32 1
  store i64 %157, ptr %159, align 8, !tbaa !46
  %160 = load ptr, ptr @gBS, align 8, !tbaa !5
  %161 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %160, i32 0, i32 11
  %162 = load ptr, ptr %161, align 8, !tbaa !48
  %163 = load ptr, ptr %8, align 8, !tbaa !5
  %164 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_COMPLETION_TOKEN, ptr %163, i32 0, i32 0
  %165 = load ptr, ptr %164, align 8, !tbaa !49
  %166 = call i64 %162(ptr noundef %165)
  %167 = call i64 @DispatchDpc()
  call void @llvm.lifetime.end.p0(i64 2, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  ret i64 0
}

declare void @MnpInsertVlanTag(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #1

declare i64 @DispatchDpc() #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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 24}
!12 = !{!"", !10, i64 0, !13, i64 8, !6, i64 24, !6, i64 32, !14, i64 40, !6, i64 56, !13, i64 64, !15, i64 80, !10, i64 88, !16, i64 92, !7, i64 94}
!13 = !{!"_LIST_ENTRY", !6, i64 0, !6, i64 8}
!14 = !{!"_EFI_SERVICE_BINDING_PROTOCOL", !6, i64 0, !6, i64 8}
!15 = !{!"long long", !7, i64 0}
!16 = !{!"short", !7, i64 0}
!17 = !{!18, !6, i64 64}
!18 = !{!"", !10, i64 0, !6, i64 8, !6, i64 16, !19, i64 24, !15, i64 48, !6, i64 56, !6, i64 64, !13, i64 72, !15, i64 88, !13, i64 96, !10, i64 112, !6, i64 120, !20, i64 128, !15, i64 184, !6, i64 192, !7, i64 200, !6, i64 208, !6, i64 216, !10, i64 224, !10, i64 228, !10, i64 232, !10, i64 236, !10, i64 240, !10, i64 244, !6, i64 248, !6, i64 256}
!19 = !{!"_EFI_VLAN_CONFIG_PROTOCOL", !6, i64 0, !6, i64 8, !6, i64 16}
!20 = !{!"", !10, i64 0, !15, i64 8, !13, i64 16, !13, i64 32, !10, i64 48, !10, i64 52}
!21 = !{!7, !7, i64 0}
!22 = !{!23, !6, i64 120}
!23 = !{!"_EFI_SIMPLE_NETWORK_PROTOCOL", !15, 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}
!24 = !{!25, !10, i64 8}
!25 = !{!"", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !7, i64 40, !26, i64 552, !26, i64 584, !26, i64 616, !7, i64 648, !7, i64 649, !7, i64 650, !7, i64 651, !7, i64 652}
!26 = !{!"", !7, i64 0}
!27 = !{!28, !16, i64 24}
!28 = !{!"", !6, i64 0, !6, i64 8, !16, i64 16, !10, i64 20, !16, i64 24, !16, i64 26, !7, i64 32}
!29 = !{!25, !7, i64 651}
!30 = !{!25, !7, i64 652}
!31 = !{!15, !15, i64 0}
!32 = !{!33, !6, i64 88}
!33 = !{!"", !34, 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}
!34 = !{!"", !15, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20}
!35 = !{!18, !6, i64 120}
!36 = !{!12, !16, i64 92}
!37 = !{!28, !16, i64 16}
!38 = !{!16, !16, i64 0}
!39 = !{!23, !6, i64 96}
!40 = !{!28, !6, i64 8}
!41 = !{!28, !6, i64 0}
!42 = !{!23, !6, i64 88}
!43 = !{!33, !6, i64 120}
!44 = distinct !{!44, !45}
!45 = !{!"llvm.loop.mustprogress"}
!46 = !{!47, !15, i64 8}
!47 = !{!"", !6, i64 0, !15, i64 8, !7, i64 16}
!48 = !{!33, !6, i64 104}
!49 = !{!47, !6, 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.7 = external hidden unnamed_addr constant [47 x i8], align 1
@gBS = external local_unnamed_addr global ptr, align 8

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #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: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #0

; Function Attrs: nounwind uwtable
define dso_local noundef i64 @MnpSyncSendPacket(ptr noundef %0, ptr noundef %1, i32 noundef %2, ptr nocapture noundef %3) local_unnamed_addr #2 {
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca ptr, align 8
  %8 = alloca i16, align 2
  store ptr %1, ptr %5, align 8, !tbaa !5
  store i32 %2, ptr %6, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #3
  call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %8) #3
  %9 = getelementptr inbounds i8, ptr %0, i64 24
  %10 = load ptr, ptr %9, align 8, !tbaa !11
  %11 = getelementptr inbounds i8, ptr %10, i64 64
  %12 = load ptr, ptr %11, align 8, !tbaa !17
  %13 = getelementptr inbounds i8, ptr %3, i64 16
  %14 = load ptr, ptr %13, align 8, !tbaa !21
  %15 = getelementptr inbounds i8, ptr %12, i64 120
  %16 = load ptr, ptr %15, align 8, !tbaa !22
  %17 = getelementptr inbounds i8, ptr %16, i64 8
  %18 = load i32, ptr %17, align 4, !tbaa !24
  %19 = getelementptr inbounds i8, ptr %14, i64 24
  %20 = load i16, ptr %19, align 8, !tbaa !27
  %21 = zext i16 %20 to i32
  %22 = sub i32 %18, %21
  %23 = getelementptr inbounds i8, ptr %16, i64 651
  %24 = load i8, ptr %23, align 1, !tbaa !29
  %.not = icmp eq i8 %24, 0
  br i1 %.not, label %33, label %25

25:                                               ; preds = %4
  %26 = getelementptr inbounds i8, ptr %16, i64 652
  %27 = load i8, ptr %26, align 4, !tbaa !30
  %.not33 = icmp eq i8 %27, 0
  br i1 %.not33, label %28, label %33

28:                                               ; preds = %25
  %29 = tail call zeroext i8 @DebugPrintEnabled() #3
  %.not34 = icmp eq i8 %29, 0
  br i1 %.not34, label %86, label %30

30:                                               ; preds = %28
  %31 = tail call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2) #3
  %.not35 = icmp eq i8 %31, 0
  br i1 %.not35, label %86, label %32

32:                                               ; preds = %30
  tail call void (i64, ptr, ...) @DebugPrint(i64 noundef 2, ptr noundef nonnull @.str.7) #3
  br label %86

33:                                               ; preds = %25, %4
  %34 = load ptr, ptr @gBS, align 8, !tbaa !5
  %35 = getelementptr inbounds i8, ptr %34, i64 88
  %36 = load ptr, ptr %35, align 8, !tbaa !31
  %37 = getelementptr inbounds i8, ptr %10, i64 120
  %38 = load ptr, ptr %37, align 8, !tbaa !34
  %39 = tail call i64 %36(ptr noundef %38, i32 noundef 2, i64 noundef 5000000) #3
  %40 = icmp slt i64 %39, 0
  br i1 %40, label %86, label %41

41:                                               ; preds = %33
  %42 = getelementptr inbounds i8, ptr %0, i64 92
  %43 = load i16, ptr %42, align 4, !tbaa !35
  %.not36 = icmp eq i16 %43, 0
  br i1 %.not36, label %45, label %44

44:                                               ; preds = %41
  call void @MnpInsertVlanTag(ptr noundef nonnull %0, ptr noundef nonnull %14, ptr noundef nonnull %8, ptr noundef nonnull %5, ptr noundef nonnull %6) #3
  br label %48

45:                                               ; preds = %41
  %46 = getelementptr inbounds i8, ptr %14, i64 16
  %47 = load i16, ptr %46, align 8, !tbaa !36
  store i16 %47, ptr %8, align 2, !tbaa !37
  br label %48

48:                                               ; preds = %45, %44
  %49 = getelementptr inbounds i8, ptr %12, i64 96
  %50 = zext i32 %22 to i64
  %51 = getelementptr inbounds i8, ptr %14, i64 8
  %52 = getelementptr inbounds i8, ptr %12, i64 88
  br label %53

53:                                               ; preds = %75, %48
  %54 = load ptr, ptr %49, align 8, !tbaa !38
  %55 = load i32, ptr %6, align 4, !tbaa !9
  %56 = zext i32 %55 to i64
  %57 = load ptr, ptr %5, align 8, !tbaa !5
  %58 = load ptr, ptr %51, align 8, !tbaa !39
  %59 = load ptr, ptr %14, align 8, !tbaa !40
  %60 = call i64 %54(ptr noundef nonnull %12, i64 noundef %50, i64 noundef %56, ptr noundef %57, ptr noundef %58, ptr noundef %59, ptr noundef nonnull %8) #3
  switch i64 %60, label %.thread [
    i64 -9223372036854775802, label %61
    i64 0, label %61
  ]

61:                                               ; preds = %53, %53
  store ptr null, ptr %7, align 8, !tbaa !5
  br label %62

62:                                               ; preds = %71, %61
  %63 = load ptr, ptr %52, align 8, !tbaa !41
  %64 = call i64 %63(ptr noundef nonnull %12, ptr noundef null, ptr noundef nonnull %7) #3
  %65 = load ptr, ptr @gBS, align 8, !tbaa !5
  %66 = getelementptr inbounds i8, ptr %65, i64 120
  %67 = load ptr, ptr %66, align 8, !tbaa !42
  %68 = load ptr, ptr %37, align 8, !tbaa !34
  %69 = call i64 %67(ptr noundef %68) #3
  %70 = icmp slt i64 %69, 0
  br i1 %70, label %71, label %.thread

71:                                               ; preds = %62
  %72 = load ptr, ptr %7, align 8, !tbaa !5
  %73 = icmp eq ptr %72, null
  br i1 %73, label %62, label %74, !llvm.loop !43

74:                                               ; preds = %71
  switch i64 %60, label %75 [
    i64 -9223372036854775790, label %.thread
    i64 0, label %.thread
  ]

75:                                               ; preds = %74
  %76 = load ptr, ptr @gBS, align 8, !tbaa !5
  %77 = getelementptr inbounds i8, ptr %76, i64 88
  %78 = load ptr, ptr %77, align 8, !tbaa !31
  %79 = load ptr, ptr %37, align 8, !tbaa !34
  %80 = call i64 %78(ptr noundef %79, i32 noundef 2, i64 noundef 5000000) #3
  br label %53

.thread:                                          ; preds = %74, %74, %53, %62
  %.1 = phi i64 [ -9223372036854775790, %62 ], [ %60, %74 ], [ -9223372036854775801, %53 ], [ %60, %74 ]
  %81 = load ptr, ptr @gBS, align 8, !tbaa !5
  %82 = getelementptr inbounds i8, ptr %81, i64 88
  %83 = load ptr, ptr %82, align 8, !tbaa !31
  %84 = load ptr, ptr %37, align 8, !tbaa !34
  %85 = call i64 %83(ptr noundef %84, i32 noundef 0, i64 noundef 0) #3
  br label %86

86:                                               ; preds = %28, %32, %30, %33, %.thread
  %.2 = phi i64 [ %39, %33 ], [ %.1, %.thread ], [ -9223372036854775796, %30 ], [ -9223372036854775796, %32 ], [ -9223372036854775796, %28 ]
  %87 = getelementptr inbounds i8, ptr %3, i64 8
  store i64 %.2, ptr %87, align 8, !tbaa !45
  %88 = load ptr, ptr @gBS, align 8, !tbaa !5
  %89 = getelementptr inbounds i8, ptr %88, i64 104
  %90 = load ptr, ptr %89, align 8, !tbaa !47
  %91 = load ptr, ptr %3, align 8, !tbaa !48
  %92 = call i64 %90(ptr noundef %91) #3
  %93 = call i64 @DispatchDpc() #3
  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #3
  ret i64 0
}

declare void @MnpInsertVlanTag(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare i64 @DispatchDpc() local_unnamed_addr #1

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !6, i64 24}
!12 = !{!"", !10, i64 0, !13, i64 8, !6, i64 24, !6, i64 32, !14, i64 40, !6, i64 56, !13, i64 64, !15, i64 80, !10, i64 88, !16, i64 92, !7, i64 94}
!13 = !{!"_LIST_ENTRY", !6, i64 0, !6, i64 8}
!14 = !{!"_EFI_SERVICE_BINDING_PROTOCOL", !6, i64 0, !6, i64 8}
!15 = !{!"long long", !7, i64 0}
!16 = !{!"short", !7, i64 0}
!17 = !{!18, !6, i64 64}
!18 = !{!"", !10, i64 0, !6, i64 8, !6, i64 16, !19, i64 24, !15, i64 48, !6, i64 56, !6, i64 64, !13, i64 72, !15, i64 88, !13, i64 96, !10, i64 112, !6, i64 120, !20, i64 128, !15, i64 184, !6, i64 192, !7, i64 200, !6, i64 208, !6, i64 216, !10, i64 224, !10, i64 228, !10, i64 232, !10, i64 236, !10, i64 240, !10, i64 244, !6, i64 248, !6, i64 256}
!19 = !{!"_EFI_VLAN_CONFIG_PROTOCOL", !6, i64 0, !6, i64 8, !6, i64 16}
!20 = !{!"", !10, i64 0, !15, i64 8, !13, i64 16, !13, i64 32, !10, i64 48, !10, i64 52}
!21 = !{!7, !7, i64 0}
!22 = !{!23, !6, i64 120}
!23 = !{!"_EFI_SIMPLE_NETWORK_PROTOCOL", !15, 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}
!24 = !{!25, !10, i64 8}
!25 = !{!"", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20, !10, i64 24, !10, i64 28, !10, i64 32, !10, i64 36, !7, i64 40, !26, i64 552, !26, i64 584, !26, i64 616, !7, i64 648, !7, i64 649, !7, i64 650, !7, i64 651, !7, i64 652}
!26 = !{!"", !7, i64 0}
!27 = !{!28, !16, i64 24}
!28 = !{!"", !6, i64 0, !6, i64 8, !16, i64 16, !10, i64 20, !16, i64 24, !16, i64 26, !7, i64 32}
!29 = !{!25, !7, i64 651}
!30 = !{!25, !7, i64 652}
!31 = !{!32, !6, i64 88}
!32 = !{!"", !33, 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}
!33 = !{!"", !15, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20}
!34 = !{!18, !6, i64 120}
!35 = !{!12, !16, i64 92}
!36 = !{!28, !16, i64 16}
!37 = !{!16, !16, i64 0}
!38 = !{!23, !6, i64 96}
!39 = !{!28, !6, i64 8}
!40 = !{!28, !6, i64 0}
!41 = !{!23, !6, i64 88}
!42 = !{!32, !6, i64 120}
!43 = distinct !{!43, !44}
!44 = !{!"llvm.loop.mustprogress"}
!45 = !{!46, !15, i64 8}
!46 = !{!"", !6, i64 0, !15, i64 8, !7, i64 16}
!47 = !{!32, !6, i64 104}
!48 = !{!46, !6, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass