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

; 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_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._LIST_ENTRY = type { ptr, ptr }
%struct.NET_BUF_QUEUE = type { i32, i64, %struct._LIST_ENTRY, %struct._LIST_ENTRY, i32, i32 }
%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.MNP_INSTANCE_DATA = type { i32, ptr, ptr, %struct._LIST_ENTRY, %struct._EFI_MANAGED_NETWORK_PROTOCOL, i8, i8, %struct._LIST_ENTRY, %struct.NET_MAP, %struct._LIST_ENTRY, %struct._LIST_ENTRY, i64, %struct.EFI_MANAGED_NETWORK_CONFIG_DATA, i8 }
%struct._EFI_MANAGED_NETWORK_PROTOCOL = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.NET_MAP = type { %struct._LIST_ENTRY, %struct._LIST_ENTRY, i64 }
%struct.EFI_MANAGED_NETWORK_CONFIG_DATA = type { i32, i32, i16, i8, i8, i8, i8, i8, i8, 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.MNP_RXDATA_WRAP = type { %struct._LIST_ENTRY, ptr, %struct.EFI_MANAGED_NETWORK_RECEIVE_DATA, ptr, i64 }
%struct.EFI_MANAGED_NETWORK_RECEIVE_DATA = type { %struct.EFI_TIME, ptr, i32, i32, i32, i32, i8, i8, i8, i16, ptr, ptr, ptr, ptr }
%struct.EFI_TIME = type { i16, i8, i8, i8, i8, i8, i8, i32, i16, i8, i8 }

@.str = external hidden unnamed_addr constant [147 x i8], align 1
@gBS = external global ptr, align 8
@.str.8 = external hidden unnamed_addr constant [125 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [115 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [49 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

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
declare dso_local void @MnpRecycleRxData(ptr noundef, ptr noundef) #2

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

15:                                               ; preds = %2
  %16 = call zeroext i8 @DebugAssertEnabled()
  %17 = icmp ne i8 %16, 0
  br i1 %17, label %18, label %28

18:                                               ; preds = %15
  %19 = load ptr, ptr %5, align 8, !tbaa !5
  %20 = icmp ne ptr %19, null
  br i1 %20, label %21, label %26

21:                                               ; preds = %18
  %22 = load ptr, ptr %5, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %22, i32 0, i32 0
  %24 = load i32, ptr %23, align 8, !tbaa !9
  %25 = icmp eq i32 %24, 1148218957
  br i1 %25, label %27, label %26

26:                                               ; preds = %21, %18
  call void @DebugAssert(ptr noundef @.str, i64 noundef 1053, ptr noundef @.str.8)
  br label %27

27:                                               ; preds = %26, %21
  br label %28

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

29:                                               ; preds = %28
  br label %30

30:                                               ; preds = %29
  %31 = load ptr, ptr %5, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %31, i32 0, i32 7
  %33 = getelementptr inbounds %struct._LIST_ENTRY, ptr %32, i32 0, i32 0
  %34 = load ptr, ptr %33, align 8, !tbaa !16
  store ptr %34, ptr %8, align 8, !tbaa !5
  br label %35

35:                                               ; preds = %169, %30
  %36 = load ptr, ptr %8, align 8, !tbaa !5
  %37 = load ptr, ptr %5, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %37, i32 0, i32 7
  %39 = icmp ne ptr %36, %38
  br i1 %39, label %40, label %173

40:                                               ; preds = %35
  %41 = call zeroext i8 @DebugAssertEnabled()
  %42 = zext i8 %41 to i32
  %43 = icmp ne i32 %42, 0
  br i1 %43, label %44, label %54

44:                                               ; preds = %40
  %45 = load ptr, ptr %8, align 8, !tbaa !5
  %46 = ptrtoint ptr %45 to i64
  %47 = sub i64 %46, ptrtoint (ptr getelementptr inbounds (%struct.MNP_SERVICE_DATA, ptr null, i32 0, i32 1) to i64)
  %48 = inttoptr i64 %47 to ptr
  %49 = getelementptr inbounds %struct.MNP_SERVICE_DATA, ptr %48, i32 0, i32 0
  %50 = load i32, ptr %49, align 8, !tbaa !17
  %51 = icmp ne i32 %50, 1399877197
  br i1 %51, label %52, label %54

52:                                               ; preds = %44
  call void @DebugAssert(ptr noundef @.str, i64 noundef 1056, ptr noundef @.str.25)
  %53 = load ptr, ptr %8, align 8, !tbaa !5
  br label %59

54:                                               ; preds = %44, %40
  %55 = load ptr, ptr %8, align 8, !tbaa !5
  %56 = ptrtoint ptr %55 to i64
  %57 = sub i64 %56, ptrtoint (ptr getelementptr inbounds (%struct.MNP_SERVICE_DATA, ptr null, i32 0, i32 1) to i64)
  %58 = inttoptr i64 %57 to ptr
  br label %59

59:                                               ; preds = %54, %52
  %60 = phi ptr [ %53, %52 ], [ %58, %54 ]
  store ptr %60, ptr %6, align 8, !tbaa !5
  %61 = load ptr, ptr %6, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.MNP_SERVICE_DATA, ptr %61, i32 0, i32 6
  %63 = getelementptr inbounds %struct._LIST_ENTRY, ptr %62, i32 0, i32 0
  %64 = load ptr, ptr %63, align 8, !tbaa !21
  store ptr %64, ptr %7, align 8, !tbaa !5
  br label %65

65:                                               ; preds = %164, %59
  %66 = load ptr, ptr %7, align 8, !tbaa !5
  %67 = load ptr, ptr %6, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.MNP_SERVICE_DATA, ptr %67, i32 0, i32 6
  %69 = icmp ne ptr %66, %68
  br i1 %69, label %70, label %168

70:                                               ; preds = %65
  %71 = load ptr, ptr %7, align 8, !tbaa !5
  %72 = ptrtoint ptr %71 to i64
  %73 = sub i64 %72, ptrtoint (ptr getelementptr inbounds (%struct.MNP_INSTANCE_DATA, ptr null, i32 0, i32 3) to i64)
  %74 = inttoptr i64 %73 to ptr
  store ptr %74, ptr %11, align 8, !tbaa !5
  br label %75

75:                                               ; preds = %70
  %76 = call zeroext i8 @DebugAssertEnabled()
  %77 = icmp ne i8 %76, 0
  br i1 %77, label %78, label %88

78:                                               ; preds = %75
  %79 = load ptr, ptr %11, align 8, !tbaa !5
  %80 = icmp ne ptr %79, null
  br i1 %80, label %81, label %86

81:                                               ; preds = %78
  %82 = load ptr, ptr %11, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.MNP_INSTANCE_DATA, ptr %82, i32 0, i32 0
  %84 = load i32, ptr %83, align 8, !tbaa !22
  %85 = icmp eq i32 %84, 1232105037
  br i1 %85, label %87, label %86

86:                                               ; preds = %81, %78
  call void @DebugAssert(ptr noundef @.str, i64 noundef 1061, ptr noundef @.str.11)
  br label %87

87:                                               ; preds = %86, %81
  br label %88

88:                                               ; preds = %87, %75
  br label %89

89:                                               ; preds = %88
  br label %90

90:                                               ; preds = %89
  %91 = load ptr, ptr %11, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct.MNP_INSTANCE_DATA, ptr %91, i32 0, i32 5
  %93 = load i8, ptr %92, align 8, !tbaa !27
  %94 = icmp ne i8 %93, 0
  br i1 %94, label %95, label %101

95:                                               ; preds = %90
  %96 = load ptr, ptr %11, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.MNP_INSTANCE_DATA, ptr %96, i32 0, i32 12
  %98 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_CONFIG_DATA, ptr %97, i32 0, i32 0
  %99 = load i32, ptr %98, align 8, !tbaa !28
  %100 = icmp eq i32 %99, 0
  br i1 %100, label %101, label %102

101:                                              ; preds = %95, %90
  br label %164

102:                                              ; preds = %95
  %103 = load ptr, ptr @gBS, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %103, i32 0, i32 1
  %105 = load ptr, ptr %104, align 8, !tbaa !29
  %106 = call i64 %105(i64 noundef 16)
  store i64 %106, ptr %13, align 8, !tbaa !32
  %107 = load ptr, ptr %11, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.MNP_INSTANCE_DATA, ptr %107, i32 0, i32 10
  %109 = getelementptr inbounds %struct._LIST_ENTRY, ptr %108, i32 0, i32 0
  %110 = load ptr, ptr %109, align 8, !tbaa !33
  store ptr %110, ptr %9, align 8, !tbaa !5
  %111 = load ptr, ptr %9, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct._LIST_ENTRY, ptr %111, i32 0, i32 0
  %113 = load ptr, ptr %112, align 8, !tbaa !34
  store ptr %113, ptr %10, align 8, !tbaa !5
  br label %114

114:                                              ; preds = %154, %102
  %115 = load ptr, ptr %9, align 8, !tbaa !5
  %116 = load ptr, ptr %11, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.MNP_INSTANCE_DATA, ptr %116, i32 0, i32 10
  %118 = icmp ne ptr %115, %117
  br i1 %118, label %119, label %159

119:                                              ; preds = %114
  %120 = load ptr, ptr %9, align 8, !tbaa !5
  %121 = ptrtoint ptr %120 to i64
  %122 = sub i64 %121, 0
  %123 = inttoptr i64 %122 to ptr
  store ptr %123, ptr %12, align 8, !tbaa !5
  %124 = load ptr, ptr %12, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.MNP_RXDATA_WRAP, ptr %124, i32 0, i32 4
  %126 = load i64, ptr %125, align 8, !tbaa !35
  %127 = icmp uge i64 %126, 50000
  br i1 %127, label %128, label %133

128:                                              ; preds = %119
  %129 = load ptr, ptr %12, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.MNP_RXDATA_WRAP, ptr %129, i32 0, i32 4
  %131 = load i64, ptr %130, align 8, !tbaa !35
  %132 = sub i64 %131, 50000
  store i64 %132, ptr %130, align 8, !tbaa !35
  br label %153

133:                                              ; preds = %119
  br label %134

134:                                              ; preds = %133
  %135 = call zeroext i8 @DebugPrintEnabled()
  %136 = icmp ne i8 %135, 0
  br i1 %136, label %137, label %145

137:                                              ; preds = %134
  br label %138

138:                                              ; preds = %137
  %139 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2)
  %140 = icmp ne i8 %139, 0
  br i1 %140, label %141, label %142

141:                                              ; preds = %138
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2, ptr noundef @.str.26)
  br label %142

142:                                              ; preds = %141, %138
  br label %143

143:                                              ; preds = %142
  br label %144

144:                                              ; preds = %143
  br label %145

145:                                              ; preds = %144, %134
  br label %146

146:                                              ; preds = %145
  br label %147

147:                                              ; preds = %146
  %148 = load ptr, ptr %12, align 8, !tbaa !5
  call void @MnpRecycleRxData(ptr noundef null, ptr noundef %148)
  %149 = load ptr, ptr %11, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.MNP_INSTANCE_DATA, ptr %149, i32 0, i32 11
  %151 = load i64, ptr %150, align 8, !tbaa !39
  %152 = add i64 %151, -1
  store i64 %152, ptr %150, align 8, !tbaa !39
  br label %153

153:                                              ; preds = %147, %128
  br label %154

154:                                              ; preds = %153
  %155 = load ptr, ptr %10, align 8, !tbaa !5
  store ptr %155, ptr %9, align 8, !tbaa !5
  %156 = load ptr, ptr %9, align 8, !tbaa !5
  %157 = getelementptr inbounds %struct._LIST_ENTRY, ptr %156, i32 0, i32 0
  %158 = load ptr, ptr %157, align 8, !tbaa !34
  store ptr %158, ptr %10, align 8, !tbaa !5
  br label %114, !llvm.loop !40

159:                                              ; preds = %114
  %160 = load ptr, ptr @gBS, align 8, !tbaa !5
  %161 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %160, i32 0, i32 2
  %162 = load ptr, ptr %161, align 8, !tbaa !42
  %163 = load i64, ptr %13, align 8, !tbaa !32
  call void %162(i64 noundef %163)
  br label %164

164:                                              ; preds = %159, %101
  %165 = load ptr, ptr %7, align 8, !tbaa !5
  %166 = getelementptr inbounds %struct._LIST_ENTRY, ptr %165, i32 0, i32 0
  %167 = load ptr, ptr %166, align 8, !tbaa !34
  store ptr %167, ptr %7, align 8, !tbaa !5
  br label %65, !llvm.loop !43

168:                                              ; preds = %65
  br label %169

169:                                              ; preds = %168
  %170 = load ptr, ptr %8, align 8, !tbaa !5
  %171 = getelementptr inbounds %struct._LIST_ENTRY, ptr %170, i32 0, i32 0
  %172 = load ptr, ptr %171, align 8, !tbaa !34
  store ptr %172, ptr %8, align 8, !tbaa !5
  br label %35, !llvm.loop !44

173:                                              ; preds = %35
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #3
  ret void
}

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, !11, i64 0}
!10 = !{!"", !11, i64 0, !6, i64 8, !6, i64 16, !12, i64 24, !13, i64 48, !6, i64 56, !6, i64 64, !14, i64 72, !13, i64 88, !14, i64 96, !11, i64 112, !6, i64 120, !15, i64 128, !13, i64 184, !6, i64 192, !7, i64 200, !6, i64 208, !6, i64 216, !11, i64 224, !11, i64 228, !11, i64 232, !11, i64 236, !11, i64 240, !11, i64 244, !6, i64 248, !6, i64 256}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_EFI_VLAN_CONFIG_PROTOCOL", !6, i64 0, !6, i64 8, !6, i64 16}
!13 = !{!"long long", !7, i64 0}
!14 = !{!"_LIST_ENTRY", !6, i64 0, !6, i64 8}
!15 = !{!"", !11, i64 0, !13, i64 8, !14, i64 16, !14, i64 32, !11, i64 48, !11, i64 52}
!16 = !{!10, !6, i64 72}
!17 = !{!18, !11, i64 0}
!18 = !{!"", !11, i64 0, !14, i64 8, !6, i64 24, !6, i64 32, !19, i64 40, !6, i64 56, !14, i64 64, !13, i64 80, !11, i64 88, !20, i64 92, !7, i64 94}
!19 = !{!"_EFI_SERVICE_BINDING_PROTOCOL", !6, i64 0, !6, i64 8}
!20 = !{!"short", !7, i64 0}
!21 = !{!18, !6, i64 64}
!22 = !{!23, !11, i64 0}
!23 = !{!"", !11, i64 0, !6, i64 8, !6, i64 16, !14, i64 24, !24, i64 40, !7, i64 104, !7, i64 105, !14, i64 112, !25, i64 128, !14, i64 168, !14, i64 184, !13, i64 200, !26, i64 208, !7, i64 228}
!24 = !{!"_EFI_MANAGED_NETWORK_PROTOCOL", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56}
!25 = !{!"", !14, i64 0, !14, i64 16, !13, i64 32}
!26 = !{!"", !11, i64 0, !11, i64 4, !20, i64 8, !7, i64 10, !7, i64 11, !7, i64 12, !7, i64 13, !7, i64 14, !7, i64 15, !7, i64 16}
!27 = !{!23, !7, i64 104}
!28 = !{!23, !11, i64 208}
!29 = !{!30, !6, i64 24}
!30 = !{!"", !31, 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}
!31 = !{!"", !13, i64 0, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20}
!32 = !{!13, !13, i64 0}
!33 = !{!23, !6, i64 184}
!34 = !{!14, !6, i64 0}
!35 = !{!36, !13, i64 112}
!36 = !{!"", !14, i64 0, !6, i64 16, !37, i64 24, !6, i64 104, !13, i64 112}
!37 = !{!"", !38, i64 0, !6, i64 16, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !7, i64 40, !7, i64 41, !7, i64 42, !20, i64 44, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72}
!38 = !{!"", !20, i64 0, !7, i64 2, !7, i64 3, !7, i64 4, !7, i64 5, !7, i64 6, !7, i64 7, !11, i64 8, !20, i64 12, !7, i64 14, !7, i64 15}
!39 = !{!23, !13, i64 200}
!40 = distinct !{!40, !41}
!41 = !{!"llvm.loop.mustprogress"}
!42 = !{!30, !6, i64 32}
!43 = distinct !{!43, !41}
!44 = distinct !{!44, !41}


; 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 [147 x i8], align 1
@gBS = external local_unnamed_addr global ptr, align 8
@.str.8 = external hidden unnamed_addr constant [125 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [115 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [21 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [49 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

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

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

4:                                                ; preds = %2
  %.not36 = icmp eq ptr %1, null
  br i1 %.not36, label %8, label %5

5:                                                ; preds = %4
  %6 = load i32, ptr %1, align 8, !tbaa !5
  %7 = icmp eq i32 %6, 1148218957
  br i1 %7, label %9, label %8

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

9:                                                ; preds = %5, %8, %2
  %10 = getelementptr inbounds i8, ptr %1, i64 72
  %.03056 = load ptr, ptr %10, align 8, !tbaa !15
  %.not3757 = icmp eq ptr %.03056, %10
  br i1 %.not3757, label %._crit_edge61, label %.lr.ph60

.loopexit:                                        ; preds = %59, %.lr.ph60._crit_edge
  %.030 = load ptr, ptr %.03058, align 8, !tbaa !15
  %.not37 = icmp eq ptr %.030, %10
  br i1 %.not37, label %._crit_edge61, label %.lr.ph60, !llvm.loop !16

.lr.ph60:                                         ; preds = %9, %.loopexit
  %.03058 = phi ptr [ %.030, %.loopexit ], [ %.03056, %9 ]
  %11 = tail call zeroext i8 @DebugAssertEnabled() #2
  %.not38 = icmp eq i8 %11, 0
  %.pre = ptrtoint ptr %.03058 to i64
  %.pre62 = add i64 %.pre, -8
  %.pre64 = inttoptr i64 %.pre62 to ptr
  br i1 %.not38, label %.lr.ph60._crit_edge, label %12

12:                                               ; preds = %.lr.ph60
  %13 = load i32, ptr %.pre64, align 8, !tbaa !18
  %.not39 = icmp eq i32 %13, 1399877197
  br i1 %.not39, label %.lr.ph60._crit_edge, label %14

14:                                               ; preds = %12
  tail call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 1056, ptr noundef nonnull @.str.25) #2
  br label %.lr.ph60._crit_edge

.lr.ph60._crit_edge:                              ; preds = %.lr.ph60, %12, %14
  %15 = phi ptr [ %.03058, %14 ], [ %.pre64, %12 ], [ %.pre64, %.lr.ph60 ]
  %16 = getelementptr inbounds i8, ptr %15, i64 64
  %.051 = load ptr, ptr %16, align 8, !tbaa !15
  %.not4052 = icmp eq ptr %.051, %16
  br i1 %.not4052, label %.loopexit, label %.lr.ph55

.lr.ph55:                                         ; preds = %.lr.ph60._crit_edge, %59
  %.053 = phi ptr [ %.0, %59 ], [ %.051, %.lr.ph60._crit_edge ]
  %17 = ptrtoint ptr %.053 to i64
  %18 = add i64 %17, -24
  %19 = inttoptr i64 %18 to ptr
  %20 = tail call zeroext i8 @DebugAssertEnabled() #2
  %.not41 = icmp eq i8 %20, 0
  br i1 %.not41, label %26, label %21

21:                                               ; preds = %.lr.ph55
  %.not42 = icmp eq i64 %18, 0
  br i1 %.not42, label %25, label %22

22:                                               ; preds = %21
  %23 = load i32, ptr %19, align 8, !tbaa !22
  %24 = icmp eq i32 %23, 1232105037
  br i1 %24, label %26, label %25

25:                                               ; preds = %22, %21
  tail call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 1061, ptr noundef nonnull @.str.11) #2
  br label %26

26:                                               ; preds = %22, %25, %.lr.ph55
  %27 = getelementptr inbounds i8, ptr %19, i64 104
  %28 = load i8, ptr %27, align 8, !tbaa !27
  %.not43 = icmp eq i8 %28, 0
  br i1 %.not43, label %59, label %29

29:                                               ; preds = %26
  %30 = getelementptr inbounds i8, ptr %19, i64 208
  %31 = load i32, ptr %30, align 8, !tbaa !28
  %32 = icmp eq i32 %31, 0
  br i1 %32, label %59, label %33

33:                                               ; preds = %29
  %34 = load ptr, ptr @gBS, align 8, !tbaa !29
  %35 = getelementptr inbounds i8, ptr %34, i64 24
  %36 = load ptr, ptr %35, align 8, !tbaa !30
  %37 = tail call i64 %36(i64 noundef 16) #2
  %38 = getelementptr inbounds i8, ptr %19, i64 184
  %39 = load ptr, ptr %38, align 8, !tbaa !33
  %.not4448 = icmp eq ptr %39, %38
  br i1 %.not4448, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %33
  %40 = getelementptr inbounds i8, ptr %19, i64 200
  br label %41

41:                                               ; preds = %.lr.ph, %55
  %.03149 = phi ptr [ %39, %.lr.ph ], [ %.03250, %55 ]
  %.03250 = load ptr, ptr %.03149, align 8, !tbaa !15
  %42 = getelementptr inbounds i8, ptr %.03149, i64 112
  %43 = load i64, ptr %42, align 8, !tbaa !34
  %44 = icmp ugt i64 %43, 49999
  br i1 %44, label %45, label %47

45:                                               ; preds = %41
  %46 = add i64 %43, -50000
  store i64 %46, ptr %42, align 8, !tbaa !34
  br label %55

47:                                               ; preds = %41
  %48 = tail call zeroext i8 @DebugPrintEnabled() #2
  %.not45 = icmp eq i8 %48, 0
  br i1 %.not45, label %52, label %49

49:                                               ; preds = %47
  %50 = tail call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2) #2
  %.not46 = icmp eq i8 %50, 0
  br i1 %.not46, label %52, label %51

51:                                               ; preds = %49
  tail call void (i64, ptr, ...) @DebugPrint(i64 noundef 2, ptr noundef nonnull @.str.26) #2
  br label %52

52:                                               ; preds = %49, %51, %47
  tail call void @MnpRecycleRxData(ptr noundef null, ptr noundef nonnull %.03149)
  %53 = load i64, ptr %40, align 8, !tbaa !38
  %54 = add i64 %53, -1
  store i64 %54, ptr %40, align 8, !tbaa !38
  br label %55

55:                                               ; preds = %45, %52
  %.not44 = icmp eq ptr %.03250, %38
  br i1 %.not44, label %._crit_edge, label %41, !llvm.loop !39

._crit_edge:                                      ; preds = %55, %33
  %56 = load ptr, ptr @gBS, align 8, !tbaa !29
  %57 = getelementptr inbounds i8, ptr %56, i64 32
  %58 = load ptr, ptr %57, align 8, !tbaa !40
  tail call void %58(i64 noundef %37) #2
  br label %59

59:                                               ; preds = %26, %29, %._crit_edge
  %.0 = load ptr, ptr %.053, align 8, !tbaa !15
  %.not40 = icmp eq ptr %.0, %16
  br i1 %.not40, label %.loopexit, label %.lr.ph55, !llvm.loop !41

._crit_edge61:                                    ; preds = %.loopexit, %9
  ret void
}

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 = { nounwind }

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

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


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