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

; 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.GUID = type { i32, i16, i16, [8 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._EFI_DRIVER_BINDING_PROTOCOL = type { ptr, ptr, ptr, i32, 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._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 }

@.str = external hidden unnamed_addr constant [151 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [21 x i8], align 1
@gBS = external global ptr, align 8
@gEfiVlanConfigProtocolGuid = external global %struct.GUID, align 4
@gEfiManagedNetworkServiceBindingProtocolGuid = external global %struct.GUID, align 4
@.str.4 = external hidden unnamed_addr constant [55 x i8], align 1
@gMnpControllerNameTable = external global ptr, align 8

; Function Attrs: nounwind uwtable
define dso_local i64 @MnpDriverBindingStop(ptr noundef %0, ptr noundef %1, i64 noundef %2, ptr noundef %3) #0 {
  %5 = alloca i64, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i64, 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 i64, align 8
  %17 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store i64 %2, ptr %8, align 8, !tbaa !9
  store ptr %3, ptr %9, align 8, !tbaa !5
  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
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #3
  %18 = load ptr, ptr @gBS, align 8, !tbaa !5
  %19 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %18, i32 0, i32 33
  %20 = load ptr, ptr %19, align 8, !tbaa !11
  %21 = load ptr, ptr %7, align 8, !tbaa !5
  %22 = load ptr, ptr %6, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct._EFI_DRIVER_BINDING_PROTOCOL, ptr %22, i32 0, i32 5
  %24 = load ptr, ptr %23, align 8, !tbaa !15
  %25 = load ptr, ptr %7, align 8, !tbaa !5
  %26 = call i64 %20(ptr noundef %21, ptr noundef @gEfiManagedNetworkServiceBindingProtocolGuid, ptr noundef %11, ptr noundef %24, ptr noundef %25, i32 noundef 2)
  store i64 %26, ptr %10, align 8, !tbaa !9
  %27 = load i64, ptr %10, align 8, !tbaa !9
  %28 = icmp slt i64 %27, 0
  br i1 %28, label %29, label %77

29:                                               ; preds = %4
  %30 = load ptr, ptr @gBS, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %30, i32 0, i32 33
  %32 = load ptr, ptr %31, align 8, !tbaa !11
  %33 = load ptr, ptr %7, align 8, !tbaa !5
  %34 = load ptr, ptr %6, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct._EFI_DRIVER_BINDING_PROTOCOL, ptr %34, i32 0, i32 5
  %36 = load ptr, ptr %35, align 8, !tbaa !15
  %37 = load ptr, ptr %7, align 8, !tbaa !5
  %38 = call i64 %32(ptr noundef %33, ptr noundef @gEfiVlanConfigProtocolGuid, ptr noundef %12, ptr noundef %36, ptr noundef %37, i32 noundef 2)
  store i64 %38, ptr %10, align 8, !tbaa !9
  %39 = load i64, ptr %10, align 8, !tbaa !9
  %40 = icmp slt i64 %39, 0
  br i1 %40, label %41, label %56

41:                                               ; preds = %29
  br label %42

42:                                               ; preds = %41
  %43 = call zeroext i8 @DebugPrintEnabled()
  %44 = icmp ne i8 %43, 0
  br i1 %44, label %45, label %53

45:                                               ; preds = %42
  br label %46

46:                                               ; preds = %45
  %47 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648)
  %48 = icmp ne i8 %47, 0
  br i1 %48, label %49, label %50

49:                                               ; preds = %46
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef @.str.4)
  br label %50

50:                                               ; preds = %49, %46
  br label %51

51:                                               ; preds = %50
  br label %52

52:                                               ; preds = %51
  br label %53

53:                                               ; preds = %52, %42
  br label %54

54:                                               ; preds = %53
  br label %55

55:                                               ; preds = %54
  store i64 -9223372036854775801, ptr %5, align 8
  store i32 1, ptr %17, align 4
  br label %152

56:                                               ; preds = %29
  %57 = call zeroext i8 @DebugAssertEnabled()
  %58 = zext i8 %57 to i32
  %59 = icmp ne i32 %58, 0
  br i1 %59, label %60, label %70

60:                                               ; preds = %56
  %61 = load ptr, ptr %12, align 8, !tbaa !5
  %62 = ptrtoint ptr %61 to i64
  %63 = sub i64 %62, ptrtoint (ptr getelementptr inbounds (%struct.MNP_DEVICE_DATA, ptr null, i32 0, i32 3) to i64)
  %64 = inttoptr i64 %63 to ptr
  %65 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %64, i32 0, i32 0
  %66 = load i32, ptr %65, align 8, !tbaa !17
  %67 = icmp ne i32 %66, 1148218957
  br i1 %67, label %68, label %70

68:                                               ; preds = %60
  call void @DebugAssert(ptr noundef @.str, i64 noundef 356, ptr noundef @.str.1)
  %69 = load ptr, ptr %12, align 8, !tbaa !5
  br label %75

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

75:                                               ; preds = %70, %68
  %76 = phi ptr [ %69, %68 ], [ %74, %70 ]
  store ptr %76, ptr %13, align 8, !tbaa !5
  br label %101

77:                                               ; preds = %4
  %78 = call zeroext i8 @DebugAssertEnabled()
  %79 = zext i8 %78 to i32
  %80 = icmp ne i32 %79, 0
  br i1 %80, label %81, label %91

81:                                               ; preds = %77
  %82 = load ptr, ptr %11, align 8, !tbaa !5
  %83 = ptrtoint ptr %82 to i64
  %84 = sub i64 %83, ptrtoint (ptr getelementptr inbounds (%struct.MNP_SERVICE_DATA, ptr null, i32 0, i32 4) to i64)
  %85 = inttoptr i64 %84 to ptr
  %86 = getelementptr inbounds %struct.MNP_SERVICE_DATA, ptr %85, i32 0, i32 0
  %87 = load i32, ptr %86, align 8, !tbaa !22
  %88 = icmp ne i32 %87, 1399877197
  br i1 %88, label %89, label %91

89:                                               ; preds = %81
  call void @DebugAssert(ptr noundef @.str, i64 noundef 358, ptr noundef @.str.1)
  %90 = load ptr, ptr %11, align 8, !tbaa !5
  br label %96

91:                                               ; preds = %81, %77
  %92 = load ptr, ptr %11, align 8, !tbaa !5
  %93 = ptrtoint ptr %92 to i64
  %94 = sub i64 %93, ptrtoint (ptr getelementptr inbounds (%struct.MNP_SERVICE_DATA, ptr null, i32 0, i32 4) to i64)
  %95 = inttoptr i64 %94 to ptr
  br label %96

96:                                               ; preds = %91, %89
  %97 = phi ptr [ %90, %89 ], [ %95, %91 ]
  store ptr %97, ptr %14, align 8, !tbaa !5
  %98 = load ptr, ptr %14, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.MNP_SERVICE_DATA, ptr %98, i32 0, i32 2
  %100 = load ptr, ptr %99, align 8, !tbaa !26
  store ptr %100, ptr %13, align 8, !tbaa !5
  br label %101

101:                                              ; preds = %96, %75
  %102 = load i64, ptr %8, align 8, !tbaa !9
  %103 = icmp eq i64 %102, 0
  br i1 %103, label %104, label %143

104:                                              ; preds = %101
  %105 = load ptr, ptr %13, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %105, i32 0, i32 7
  store ptr %106, ptr %15, align 8, !tbaa !5
  %107 = load ptr, ptr %15, align 8, !tbaa !5
  %108 = call i64 @NetDestroyLinkList(ptr noundef %107, ptr noundef @MnpDestroyServiceDataEntry, ptr noundef null, ptr noundef %16)
  store i64 %108, ptr %10, align 8, !tbaa !9
  %109 = load i64, ptr %10, align 8, !tbaa !9
  %110 = icmp slt i64 %109, 0
  br i1 %110, label %114, label %111

111:                                              ; preds = %104
  %112 = load i64, ptr %16, align 8, !tbaa !9
  %113 = icmp ne i64 %112, 0
  br i1 %113, label %114, label %115

114:                                              ; preds = %111, %104
  store i64 -9223372036854775801, ptr %5, align 8
  store i32 1, ptr %17, align 4
  br label %152

115:                                              ; preds = %111
  %116 = load ptr, ptr %13, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %116, i32 0, i32 3
  %118 = getelementptr inbounds %struct._EFI_VLAN_CONFIG_PROTOCOL, ptr %117, i32 0, i32 0
  %119 = load ptr, ptr %118, align 8, !tbaa !27
  %120 = icmp ne ptr %119, null
  br i1 %120, label %121, label %131

121:                                              ; preds = %115
  %122 = load ptr, ptr @gBS, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %122, i32 0, i32 40
  %124 = load ptr, ptr %123, align 8, !tbaa !28
  %125 = load ptr, ptr %13, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %125, i32 0, i32 1
  %127 = load ptr, ptr %126, align 8, !tbaa !29
  %128 = load ptr, ptr %13, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %128, i32 0, i32 3
  %130 = call i64 (ptr, ...) %124(ptr noundef %127, ptr noundef @gEfiVlanConfigProtocolGuid, ptr noundef %129, ptr noundef null)
  br label %131

131:                                              ; preds = %121, %115
  %132 = load ptr, ptr %13, align 8, !tbaa !5
  %133 = load ptr, ptr %6, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct._EFI_DRIVER_BINDING_PROTOCOL, ptr %133, i32 0, i32 5
  %135 = load ptr, ptr %134, align 8, !tbaa !15
  call void @MnpDestroyDeviceData(ptr noundef %132, ptr noundef %135)
  %136 = load ptr, ptr %13, align 8, !tbaa !5
  call void @FreePool(ptr noundef %136)
  %137 = load ptr, ptr @gMnpControllerNameTable, align 8, !tbaa !5
  %138 = icmp ne ptr %137, null
  br i1 %138, label %139, label %142

139:                                              ; preds = %131
  %140 = load ptr, ptr @gMnpControllerNameTable, align 8, !tbaa !5
  %141 = call i64 @FreeUnicodeStringTable(ptr noundef %140)
  store ptr null, ptr @gMnpControllerNameTable, align 8, !tbaa !5
  br label %142

142:                                              ; preds = %139, %131
  store i64 0, ptr %5, align 8
  store i32 1, ptr %17, align 4
  br label %152

143:                                              ; preds = %101
  %144 = load ptr, ptr %13, align 8, !tbaa !5
  %145 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %144, i32 0, i32 7
  store ptr %145, ptr %15, align 8, !tbaa !5
  %146 = load ptr, ptr %15, align 8, !tbaa !5
  %147 = call i64 @NetDestroyLinkList(ptr noundef %146, ptr noundef @MnpDestroyServiceChildEntry, ptr noundef null, ptr noundef %16)
  store i64 %147, ptr %10, align 8, !tbaa !9
  %148 = load i64, ptr %10, align 8, !tbaa !9
  %149 = icmp slt i64 %148, 0
  br i1 %149, label %150, label %151

150:                                              ; preds = %143
  store i64 -9223372036854775801, ptr %5, align 8
  store i32 1, ptr %17, align 4
  br label %152

151:                                              ; preds = %143
  store i64 0, ptr %5, align 8
  store i32 1, ptr %17, align 4
  br label %152

152:                                              ; preds = %151, %150, %142, %114, %55
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 8, 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 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
  %153 = load i64, ptr %5, align 8
  ret i64 %153
}

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

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

declare zeroext i8 @DebugAssertEnabled() #2

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

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

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

declare zeroext i8 @DebugPrintEnabled() #2

declare zeroext i8 @DebugPrintLevelEnabled(i64 noundef) #2

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

declare void @FreePool(ptr noundef) #2

declare void @MnpDestroyDeviceData(ptr noundef, ptr noundef) #2

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

declare i64 @FreeUnicodeStringTable(ptr noundef) #2

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 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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, !10, i64 0}
!10 = !{!"long long", !7, i64 0}
!11 = !{!12, !6, i64 280}
!12 = !{!"", !13, 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}
!13 = !{!"", !10, i64 0, !14, i64 8, !14, i64 12, !14, i64 16, !14, i64 20}
!14 = !{!"int", !7, i64 0}
!15 = !{!16, !6, i64 40}
!16 = !{!"_EFI_DRIVER_BINDING_PROTOCOL", !6, i64 0, !6, i64 8, !6, i64 16, !14, i64 24, !6, i64 32, !6, i64 40}
!17 = !{!18, !14, i64 0}
!18 = !{!"", !14, i64 0, !6, i64 8, !6, i64 16, !19, i64 24, !10, i64 48, !6, i64 56, !6, i64 64, !20, i64 72, !10, i64 88, !20, i64 96, !14, i64 112, !6, i64 120, !21, i64 128, !10, i64 184, !6, i64 192, !7, i64 200, !6, i64 208, !6, i64 216, !14, i64 224, !14, i64 228, !14, i64 232, !14, i64 236, !14, i64 240, !14, i64 244, !6, i64 248, !6, i64 256}
!19 = !{!"_EFI_VLAN_CONFIG_PROTOCOL", !6, i64 0, !6, i64 8, !6, i64 16}
!20 = !{!"_LIST_ENTRY", !6, i64 0, !6, i64 8}
!21 = !{!"", !14, i64 0, !10, i64 8, !20, i64 16, !20, i64 32, !14, i64 48, !14, i64 52}
!22 = !{!23, !14, i64 0}
!23 = !{!"", !14, i64 0, !20, i64 8, !6, i64 24, !6, i64 32, !24, i64 40, !6, i64 56, !20, i64 64, !10, i64 80, !14, i64 88, !25, i64 92, !7, i64 94}
!24 = !{!"_EFI_SERVICE_BINDING_PROTOCOL", !6, i64 0, !6, i64 8}
!25 = !{!"short", !7, i64 0}
!26 = !{!23, !6, i64 24}
!27 = !{!18, !6, i64 24}
!28 = !{!12, !6, i64 336}
!29 = !{!18, !6, i64 8}


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

%struct.GUID = type { i32, i16, i16, [8 x i8] }

@.str = external hidden unnamed_addr constant [151 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
@gEfiVlanConfigProtocolGuid = external global %struct.GUID, align 4
@gEfiManagedNetworkServiceBindingProtocolGuid = external global %struct.GUID, align 4
@.str.4 = external hidden unnamed_addr constant [55 x i8], align 1
@gMnpControllerNameTable = external local_unnamed_addr global ptr, align 8

; Function Attrs: nounwind uwtable
define dso_local range(i64 -9223372036854775801, 1) i64 @MnpDriverBindingStop(ptr nocapture noundef readonly %0, ptr noundef %1, i64 noundef %2, ptr nocapture noundef readnone %3) local_unnamed_addr #0 {
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #3
  %8 = load ptr, ptr @gBS, align 8, !tbaa !5
  %9 = getelementptr inbounds i8, ptr %8, i64 280
  %10 = load ptr, ptr %9, align 8, !tbaa !9
  %11 = getelementptr inbounds i8, ptr %0, i64 40
  %12 = load ptr, ptr %11, align 8, !tbaa !14
  %13 = call i64 %10(ptr noundef %1, ptr noundef nonnull @gEfiManagedNetworkServiceBindingProtocolGuid, ptr noundef nonnull %5, ptr noundef %12, ptr noundef %1, i32 noundef 2) #3
  %14 = icmp slt i64 %13, 0
  br i1 %14, label %15, label %33

15:                                               ; preds = %4
  %16 = load ptr, ptr @gBS, align 8, !tbaa !5
  %17 = getelementptr inbounds i8, ptr %16, i64 280
  %18 = load ptr, ptr %17, align 8, !tbaa !9
  %19 = load ptr, ptr %11, align 8, !tbaa !14
  %20 = call i64 %18(ptr noundef %1, ptr noundef nonnull @gEfiVlanConfigProtocolGuid, ptr noundef nonnull %6, ptr noundef %19, ptr noundef %1, i32 noundef 2) #3
  %21 = icmp slt i64 %20, 0
  br i1 %21, label %22, label %27

22:                                               ; preds = %15
  %23 = call zeroext i8 @DebugPrintEnabled() #3
  %.not30 = icmp eq i8 %23, 0
  br i1 %.not30, label %67, label %24

24:                                               ; preds = %22
  %25 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648) #3
  %.not31 = icmp eq i8 %25, 0
  br i1 %.not31, label %67, label %26

26:                                               ; preds = %24
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef nonnull @.str.4) #3
  br label %67

27:                                               ; preds = %15
  %28 = call zeroext i8 @DebugAssertEnabled() #3
  %.not26 = icmp eq i8 %28, 0
  %.pre32 = load ptr, ptr %6, align 8, !tbaa !5
  %.pre34 = ptrtoint ptr %.pre32 to i64
  %.pre35 = add i64 %.pre34, -24
  %.pre37 = inttoptr i64 %.pre35 to ptr
  br i1 %.not26, label %._crit_edge33, label %29

29:                                               ; preds = %27
  %30 = load i32, ptr %.pre37, align 8, !tbaa !16
  %.not27 = icmp eq i32 %30, 1148218957
  br i1 %.not27, label %._crit_edge33, label %31

31:                                               ; preds = %29
  call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 356, ptr noundef nonnull @.str.1) #3
  %32 = load ptr, ptr %6, align 8, !tbaa !5
  br label %._crit_edge33

33:                                               ; preds = %4
  %34 = call zeroext i8 @DebugAssertEnabled() #3
  %.not = icmp eq i8 %34, 0
  %.pre = load ptr, ptr %5, align 8, !tbaa !5
  %.pre39 = ptrtoint ptr %.pre to i64
  %.pre41 = add i64 %.pre39, -40
  %.pre43 = inttoptr i64 %.pre41 to ptr
  br i1 %.not, label %._crit_edge, label %35

35:                                               ; preds = %33
  %36 = load i32, ptr %.pre43, align 8, !tbaa !21
  %.not25 = icmp eq i32 %36, 1399877197
  br i1 %.not25, label %._crit_edge, label %37

37:                                               ; preds = %35
  call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 358, ptr noundef nonnull @.str.1) #3
  %38 = load ptr, ptr %5, align 8, !tbaa !5
  br label %._crit_edge

._crit_edge:                                      ; preds = %33, %35, %37
  %39 = phi ptr [ %38, %37 ], [ %.pre43, %35 ], [ %.pre43, %33 ]
  %40 = getelementptr inbounds i8, ptr %39, i64 24
  %41 = load ptr, ptr %40, align 8, !tbaa !25
  br label %._crit_edge33

._crit_edge33:                                    ; preds = %27, %29, %31, %._crit_edge
  %.023 = phi ptr [ %41, %._crit_edge ], [ %32, %31 ], [ %.pre37, %29 ], [ %.pre37, %27 ]
  %42 = icmp eq i64 %2, 0
  %43 = getelementptr inbounds i8, ptr %.023, i64 72
  br i1 %42, label %44, label %64

44:                                               ; preds = %._crit_edge33
  %45 = call i64 @NetDestroyLinkList(ptr noundef nonnull %43, ptr noundef nonnull @MnpDestroyServiceDataEntry, ptr noundef null, ptr noundef nonnull %7) #3
  %46 = icmp slt i64 %45, 0
  %47 = load i64, ptr %7, align 8
  %48 = icmp ne i64 %47, 0
  %or.cond = select i1 %46, i1 true, i1 %48
  br i1 %or.cond, label %67, label %49

49:                                               ; preds = %44
  %50 = getelementptr inbounds i8, ptr %.023, i64 24
  %51 = load ptr, ptr %50, align 8, !tbaa !26
  %.not28 = icmp eq ptr %51, null
  br i1 %.not28, label %59, label %52

52:                                               ; preds = %49
  %53 = load ptr, ptr @gBS, align 8, !tbaa !5
  %54 = getelementptr inbounds i8, ptr %53, i64 336
  %55 = load ptr, ptr %54, align 8, !tbaa !27
  %56 = getelementptr inbounds i8, ptr %.023, i64 8
  %57 = load ptr, ptr %56, align 8, !tbaa !28
  %58 = call i64 (ptr, ...) %55(ptr noundef %57, ptr noundef nonnull @gEfiVlanConfigProtocolGuid, ptr noundef nonnull %50, ptr noundef null) #3
  br label %59

59:                                               ; preds = %52, %49
  %60 = load ptr, ptr %11, align 8, !tbaa !14
  call void @MnpDestroyDeviceData(ptr noundef nonnull %.023, ptr noundef %60) #3
  call void @FreePool(ptr noundef nonnull %.023) #3
  %61 = load ptr, ptr @gMnpControllerNameTable, align 8, !tbaa !5
  %.not29 = icmp eq ptr %61, null
  br i1 %.not29, label %67, label %62

62:                                               ; preds = %59
  %63 = call i64 @FreeUnicodeStringTable(ptr noundef nonnull %61) #3
  store ptr null, ptr @gMnpControllerNameTable, align 8, !tbaa !5
  br label %67

64:                                               ; preds = %._crit_edge33
  %65 = call i64 @NetDestroyLinkList(ptr noundef nonnull %43, ptr noundef nonnull @MnpDestroyServiceChildEntry, ptr noundef null, ptr noundef nonnull %7) #3
  %66 = icmp slt i64 %65, 0
  %. = select i1 %66, i64 -9223372036854775801, i64 0
  br label %67

67:                                               ; preds = %64, %59, %62, %44, %22, %26, %24
  %.0 = phi i64 [ -9223372036854775801, %24 ], [ -9223372036854775801, %26 ], [ -9223372036854775801, %22 ], [ -9223372036854775801, %44 ], [ 0, %62 ], [ 0, %59 ], [ %., %64 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #3
  ret i64 %.0
}

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

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

declare zeroext i8 @DebugAssertEnabled() local_unnamed_addr #2

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

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

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

declare zeroext i8 @DebugPrintEnabled() local_unnamed_addr #2

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

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

declare void @FreePool(ptr noundef) local_unnamed_addr #2

declare void @MnpDestroyDeviceData(ptr noundef, ptr noundef) local_unnamed_addr #2

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

declare i64 @FreeUnicodeStringTable(ptr noundef) local_unnamed_addr #2

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 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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, !6, i64 280}
!10 = !{!"", !11, 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}
!11 = !{!"", !12, i64 0, !13, i64 8, !13, i64 12, !13, i64 16, !13, i64 20}
!12 = !{!"long long", !7, i64 0}
!13 = !{!"int", !7, i64 0}
!14 = !{!15, !6, i64 40}
!15 = !{!"_EFI_DRIVER_BINDING_PROTOCOL", !6, i64 0, !6, i64 8, !6, i64 16, !13, i64 24, !6, i64 32, !6, i64 40}
!16 = !{!17, !13, i64 0}
!17 = !{!"", !13, i64 0, !6, i64 8, !6, i64 16, !18, i64 24, !12, i64 48, !6, i64 56, !6, i64 64, !19, i64 72, !12, i64 88, !19, i64 96, !13, i64 112, !6, i64 120, !20, i64 128, !12, i64 184, !6, i64 192, !7, i64 200, !6, i64 208, !6, i64 216, !13, i64 224, !13, i64 228, !13, i64 232, !13, i64 236, !13, i64 240, !13, i64 244, !6, i64 248, !6, i64 256}
!18 = !{!"_EFI_VLAN_CONFIG_PROTOCOL", !6, i64 0, !6, i64 8, !6, i64 16}
!19 = !{!"_LIST_ENTRY", !6, i64 0, !6, i64 8}
!20 = !{!"", !13, i64 0, !12, i64 8, !19, i64 16, !19, i64 32, !13, i64 48, !13, i64 52}
!21 = !{!22, !13, i64 0}
!22 = !{!"", !13, i64 0, !19, i64 8, !6, i64 24, !6, i64 32, !23, i64 40, !6, i64 56, !19, i64 64, !12, i64 80, !13, i64 88, !24, i64 92, !7, i64 94}
!23 = !{!"_EFI_SERVICE_BINDING_PROTOCOL", !6, i64 0, !6, i64 8}
!24 = !{!"short", !7, i64 0}
!25 = !{!22, !6, i64 24}
!26 = !{!17, !6, i64 24}
!27 = !{!10, !6, i64 336}
!28 = !{!17, !6, i64 8}


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