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

; 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_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 = external hidden unnamed_addr constant [151 x i8], align 1
@gBS = external global ptr, align 8
@.str.17 = external hidden unnamed_addr constant [127 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [51 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 i64 @MnpStartSnp(ptr noundef) #2

; Function Attrs: nounwind uwtable
define dso_local i64 @MnpStart(ptr noundef %0, i8 noundef zeroext %1, i8 noundef zeroext %2) #2 {
  %4 = alloca ptr, align 8
  %5 = alloca i8, align 1
  %6 = alloca i8, align 1
  %7 = alloca i64, align 8
  %8 = alloca i32, align 4
  %9 = alloca ptr, align 8
  store ptr %0, ptr %4, align 8, !tbaa !5
  store i8 %1, ptr %5, align 1, !tbaa !9
  store i8 %2, ptr %6, align 1, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %8) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  br label %10

10:                                               ; preds = %3
  %11 = call zeroext i8 @DebugAssertEnabled()
  %12 = icmp ne i8 %11, 0
  br i1 %12, label %13, label %23

13:                                               ; preds = %10
  %14 = load ptr, ptr %4, align 8, !tbaa !5
  %15 = icmp ne ptr %14, null
  br i1 %15, label %16, label %21

16:                                               ; preds = %13
  %17 = load ptr, ptr %4, align 8, !tbaa !5
  %18 = getelementptr inbounds %struct.MNP_SERVICE_DATA, ptr %17, i32 0, i32 0
  %19 = load i32, ptr %18, align 8, !tbaa !10
  %20 = icmp eq i32 %19, 1399877197
  br i1 %20, label %22, label %21

21:                                               ; preds = %16, %13
  call void @DebugAssert(ptr noundef @.str, i64 noundef 1015, ptr noundef @.str.17)
  br label %22

22:                                               ; preds = %21, %16
  br label %23

23:                                               ; preds = %22, %10
  br label %24

24:                                               ; preds = %23
  br label %25

25:                                               ; preds = %24
  store i64 0, ptr %7, align 8, !tbaa !17
  %26 = load ptr, ptr %4, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.MNP_SERVICE_DATA, ptr %26, i32 0, i32 2
  %28 = load ptr, ptr %27, align 8, !tbaa !18
  store ptr %28, ptr %9, align 8, !tbaa !5
  %29 = load i8, ptr %5, align 1, !tbaa !9
  %30 = icmp ne i8 %29, 0
  br i1 %30, label %117, label %31

31:                                               ; preds = %25
  %32 = load ptr, ptr %9, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %32, i32 0, i32 8
  %34 = load i64, ptr %33, align 8, !tbaa !19
  %35 = add i64 %34, 1
  store i64 %35, ptr %33, align 8, !tbaa !19
  %36 = load ptr, ptr %9, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %36, i32 0, i32 8
  %38 = load i64, ptr %37, align 8, !tbaa !19
  %39 = icmp eq i64 %38, 1
  br i1 %39, label %40, label %116

40:                                               ; preds = %31
  %41 = load ptr, ptr %9, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %41, i32 0, i32 6
  %43 = load ptr, ptr %42, align 8, !tbaa !23
  %44 = call i64 @MnpStartSnp(ptr noundef %43)
  store i64 %44, ptr %7, align 8, !tbaa !17
  %45 = load i64, ptr %7, align 8, !tbaa !17
  %46 = icmp slt i64 %45, 0
  br i1 %46, label %47, label %63

47:                                               ; preds = %40
  br label %48

48:                                               ; preds = %47
  %49 = call zeroext i8 @DebugPrintEnabled()
  %50 = icmp ne i8 %49, 0
  br i1 %50, label %51, label %60

51:                                               ; preds = %48
  br label %52

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

55:                                               ; preds = %52
  %56 = load i64, ptr %7, align 8, !tbaa !17
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef @.str.20, i64 noundef %56)
  br label %57

57:                                               ; preds = %55, %52
  br label %58

58:                                               ; preds = %57
  br label %59

59:                                               ; preds = %58
  br label %60

60:                                               ; preds = %59, %48
  br label %61

61:                                               ; preds = %60
  br label %62

62:                                               ; preds = %61
  br label %165

63:                                               ; preds = %40
  %64 = load ptr, ptr @gBS, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %64, i32 0, i32 9
  %66 = load ptr, ptr %65, align 8, !tbaa !24
  %67 = load ptr, ptr %9, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %67, i32 0, i32 16
  %69 = load ptr, ptr %68, align 8, !tbaa !27
  %70 = call i64 %66(ptr noundef %69, i32 noundef 1, i64 noundef 500000)
  store i64 %70, ptr %7, align 8, !tbaa !17
  %71 = load i64, ptr %7, align 8, !tbaa !17
  %72 = icmp slt i64 %71, 0
  br i1 %72, label %73, label %89

73:                                               ; preds = %63
  br label %74

74:                                               ; preds = %73
  %75 = call zeroext i8 @DebugPrintEnabled()
  %76 = icmp ne i8 %75, 0
  br i1 %76, label %77, label %86

77:                                               ; preds = %74
  br label %78

78:                                               ; preds = %77
  %79 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648)
  %80 = icmp ne i8 %79, 0
  br i1 %80, label %81, label %83

81:                                               ; preds = %78
  %82 = load i64, ptr %7, align 8, !tbaa !17
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef @.str.21, i64 noundef %82)
  br label %83

83:                                               ; preds = %81, %78
  br label %84

84:                                               ; preds = %83
  br label %85

85:                                               ; preds = %84
  br label %86

86:                                               ; preds = %85, %74
  br label %87

87:                                               ; preds = %86
  br label %88

88:                                               ; preds = %87
  br label %165

89:                                               ; preds = %63
  %90 = load ptr, ptr @gBS, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %90, i32 0, i32 9
  %92 = load ptr, ptr %91, align 8, !tbaa !24
  %93 = load ptr, ptr %9, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %93, i32 0, i32 17
  %95 = load ptr, ptr %94, align 8, !tbaa !28
  %96 = call i64 %92(ptr noundef %95, i32 noundef 1, i64 noundef 5000000)
  store i64 %96, ptr %7, align 8, !tbaa !17
  %97 = load i64, ptr %7, align 8, !tbaa !17
  %98 = icmp slt i64 %97, 0
  br i1 %98, label %99, label %115

99:                                               ; preds = %89
  br label %100

100:                                              ; preds = %99
  %101 = call zeroext i8 @DebugPrintEnabled()
  %102 = icmp ne i8 %101, 0
  br i1 %102, label %103, label %112

103:                                              ; preds = %100
  br label %104

104:                                              ; preds = %103
  %105 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648)
  %106 = icmp ne i8 %105, 0
  br i1 %106, label %107, label %109

107:                                              ; preds = %104
  %108 = load i64, ptr %7, align 8, !tbaa !17
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef @.str.22, i64 noundef %108)
  br label %109

109:                                              ; preds = %107, %104
  br label %110

110:                                              ; preds = %109
  br label %111

111:                                              ; preds = %110
  br label %112

112:                                              ; preds = %111, %100
  br label %113

113:                                              ; preds = %112
  br label %114

114:                                              ; preds = %113
  br label %165

115:                                              ; preds = %89
  br label %116

116:                                              ; preds = %115, %31
  br label %117

117:                                              ; preds = %116, %25
  %118 = load ptr, ptr %9, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %118, i32 0, i32 15
  %120 = load i8, ptr %119, align 8, !tbaa !29
  %121 = zext i8 %120 to i32
  %122 = load i8, ptr %6, align 1, !tbaa !9
  %123 = zext i8 %122 to i32
  %124 = xor i32 %121, %123
  %125 = icmp ne i32 %124, 0
  br i1 %125, label %126, label %162

126:                                              ; preds = %117
  %127 = load i8, ptr %6, align 1, !tbaa !9
  %128 = zext i8 %127 to i32
  %129 = icmp ne i32 %128, 0
  %130 = zext i1 %129 to i64
  %131 = select i1 %129, i32 1, i32 0
  store i32 %131, ptr %8, align 4, !tbaa !30
  %132 = load ptr, ptr @gBS, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %132, i32 0, i32 9
  %134 = load ptr, ptr %133, align 8, !tbaa !24
  %135 = load ptr, ptr %9, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %135, i32 0, i32 14
  %137 = load ptr, ptr %136, align 8, !tbaa !31
  %138 = load i32, ptr %8, align 4, !tbaa !30
  %139 = call i64 %134(ptr noundef %137, i32 noundef %138, i64 noundef 100000)
  store i64 %139, ptr %7, align 8, !tbaa !17
  %140 = load i64, ptr %7, align 8, !tbaa !17
  %141 = icmp slt i64 %140, 0
  br i1 %141, label %142, label %158

142:                                              ; preds = %126
  br label %143

143:                                              ; preds = %142
  %144 = call zeroext i8 @DebugPrintEnabled()
  %145 = icmp ne i8 %144, 0
  br i1 %145, label %146, label %155

146:                                              ; preds = %143
  br label %147

147:                                              ; preds = %146
  %148 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648)
  %149 = icmp ne i8 %148, 0
  br i1 %149, label %150, label %152

150:                                              ; preds = %147
  %151 = load i64, ptr %7, align 8, !tbaa !17
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef @.str.23, i64 noundef %151)
  br label %152

152:                                              ; preds = %150, %147
  br label %153

153:                                              ; preds = %152
  br label %154

154:                                              ; preds = %153
  br label %155

155:                                              ; preds = %154, %143
  br label %156

156:                                              ; preds = %155
  br label %157

157:                                              ; preds = %156
  br label %165

158:                                              ; preds = %126
  %159 = load i8, ptr %6, align 1, !tbaa !9
  %160 = load ptr, ptr %9, align 8, !tbaa !5
  %161 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %160, i32 0, i32 15
  store i8 %159, ptr %161, align 8, !tbaa !29
  br label %162

162:                                              ; preds = %158, %117
  %163 = load ptr, ptr %9, align 8, !tbaa !5
  %164 = call i64 @MnpConfigReceiveFilters(ptr noundef %163)
  store i64 %164, ptr %7, align 8, !tbaa !17
  br label %165

165:                                              ; preds = %162, %157, %114, %88, %62
  %166 = load i64, ptr %7, align 8, !tbaa !17
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 4, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  ret i64 %166
}

; Function Attrs: nounwind uwtable
declare dso_local i64 @MnpConfigReceiveFilters(ptr noundef) #2

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 = !{!7, !7, i64 0}
!10 = !{!11, !12, i64 0}
!11 = !{!"", !12, i64 0, !13, i64 8, !6, i64 24, !6, i64 32, !14, i64 40, !6, i64 56, !13, i64 64, !15, i64 80, !12, i64 88, !16, i64 92, !7, i64 94}
!12 = !{!"int", !7, i64 0}
!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 = !{!15, !15, i64 0}
!18 = !{!11, !6, i64 24}
!19 = !{!20, !15, i64 88}
!20 = !{!"", !12, i64 0, !6, i64 8, !6, i64 16, !21, i64 24, !15, i64 48, !6, i64 56, !6, i64 64, !13, i64 72, !15, i64 88, !13, i64 96, !12, i64 112, !6, i64 120, !22, i64 128, !15, i64 184, !6, i64 192, !7, i64 200, !6, i64 208, !6, i64 216, !12, i64 224, !12, i64 228, !12, i64 232, !12, i64 236, !12, i64 240, !12, i64 244, !6, i64 248, !6, i64 256}
!21 = !{!"_EFI_VLAN_CONFIG_PROTOCOL", !6, i64 0, !6, i64 8, !6, i64 16}
!22 = !{!"", !12, i64 0, !15, i64 8, !13, i64 16, !13, i64 32, !12, i64 48, !12, i64 52}
!23 = !{!20, !6, i64 64}
!24 = !{!25, !6, i64 88}
!25 = !{!"", !26, 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}
!26 = !{!"", !15, i64 0, !12, i64 8, !12, i64 12, !12, i64 16, !12, i64 20}
!27 = !{!20, !6, i64 208}
!28 = !{!20, !6, i64 216}
!29 = !{!20, !7, i64 200}
!30 = !{!12, !12, i64 0}
!31 = !{!20, !6, i64 192}


; 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 [151 x i8], align 1
@gBS = external local_unnamed_addr global ptr, align 8
@.str.17 = external hidden unnamed_addr constant [127 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [51 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [50 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [51 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 i64 @MnpStartSnp(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local i64 @MnpStart(ptr noundef readonly %0, i8 noundef zeroext %1, i8 noundef zeroext %2) local_unnamed_addr #1 {
  %4 = tail call zeroext i8 @DebugAssertEnabled() #2
  %.not = icmp eq i8 %4, 0
  br i1 %.not, label %10, label %5

5:                                                ; preds = %3
  %.not30 = icmp eq ptr %0, null
  br i1 %.not30, label %9, label %6

6:                                                ; preds = %5
  %7 = load i32, ptr %0, align 8, !tbaa !5
  %8 = icmp eq i32 %7, 1399877197
  br i1 %8, label %10, label %9

9:                                                ; preds = %6, %5
  tail call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 1015, ptr noundef nonnull @.str.17) #2
  br label %10

10:                                               ; preds = %6, %9, %3
  %11 = getelementptr inbounds i8, ptr %0, i64 24
  %12 = load ptr, ptr %11, align 8, !tbaa !15
  %.not31 = icmp eq i8 %1, 0
  br i1 %.not31, label %13, label %54

13:                                               ; preds = %10
  %14 = getelementptr inbounds i8, ptr %12, i64 88
  %15 = load i64, ptr %14, align 8, !tbaa !16
  %16 = add i64 %15, 1
  store i64 %16, ptr %14, align 8, !tbaa !16
  %17 = icmp eq i64 %15, 0
  br i1 %17, label %18, label %54

18:                                               ; preds = %13
  %19 = getelementptr inbounds i8, ptr %12, i64 64
  %20 = load ptr, ptr %19, align 8, !tbaa !20
  %21 = tail call i64 @MnpStartSnp(ptr noundef %20)
  %22 = icmp slt i64 %21, 0
  br i1 %22, label %23, label %28

23:                                               ; preds = %18
  %24 = tail call zeroext i8 @DebugPrintEnabled() #2
  %.not36 = icmp eq i8 %24, 0
  br i1 %.not36, label %74, label %25

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

27:                                               ; preds = %25
  tail call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef nonnull @.str.20, i64 noundef %21) #2
  br label %74

28:                                               ; preds = %18
  %29 = load ptr, ptr @gBS, align 8, !tbaa !21
  %30 = getelementptr inbounds i8, ptr %29, i64 88
  %31 = load ptr, ptr %30, align 8, !tbaa !22
  %32 = getelementptr inbounds i8, ptr %12, i64 208
  %33 = load ptr, ptr %32, align 8, !tbaa !25
  %34 = tail call i64 %31(ptr noundef %33, i32 noundef 1, i64 noundef 500000) #2
  %35 = icmp slt i64 %34, 0
  br i1 %35, label %36, label %41

36:                                               ; preds = %28
  %37 = tail call zeroext i8 @DebugPrintEnabled() #2
  %.not34 = icmp eq i8 %37, 0
  br i1 %.not34, label %74, label %38

38:                                               ; preds = %36
  %39 = tail call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648) #2
  %.not35 = icmp eq i8 %39, 0
  br i1 %.not35, label %74, label %40

40:                                               ; preds = %38
  tail call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef nonnull @.str.21, i64 noundef %34) #2
  br label %74

41:                                               ; preds = %28
  %42 = load ptr, ptr @gBS, align 8, !tbaa !21
  %43 = getelementptr inbounds i8, ptr %42, i64 88
  %44 = load ptr, ptr %43, align 8, !tbaa !22
  %45 = getelementptr inbounds i8, ptr %12, i64 216
  %46 = load ptr, ptr %45, align 8, !tbaa !26
  %47 = tail call i64 %44(ptr noundef %46, i32 noundef 1, i64 noundef 5000000) #2
  %48 = icmp slt i64 %47, 0
  br i1 %48, label %49, label %54

49:                                               ; preds = %41
  %50 = tail call zeroext i8 @DebugPrintEnabled() #2
  %.not32 = icmp eq i8 %50, 0
  br i1 %.not32, label %74, label %51

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

53:                                               ; preds = %51
  tail call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef nonnull @.str.22, i64 noundef %47) #2
  br label %74

54:                                               ; preds = %13, %41, %10
  %55 = getelementptr inbounds i8, ptr %12, i64 200
  %56 = load i8, ptr %55, align 8, !tbaa !27
  %.not38 = icmp eq i8 %56, %2
  br i1 %.not38, label %72, label %57

57:                                               ; preds = %54
  %.not39 = icmp ne i8 %2, 0
  %58 = zext i1 %.not39 to i32
  %59 = load ptr, ptr @gBS, align 8, !tbaa !21
  %60 = getelementptr inbounds i8, ptr %59, i64 88
  %61 = load ptr, ptr %60, align 8, !tbaa !22
  %62 = getelementptr inbounds i8, ptr %12, i64 192
  %63 = load ptr, ptr %62, align 8, !tbaa !28
  %64 = tail call i64 %61(ptr noundef %63, i32 noundef %58, i64 noundef 100000) #2
  %65 = icmp slt i64 %64, 0
  br i1 %65, label %66, label %71

66:                                               ; preds = %57
  %67 = tail call zeroext i8 @DebugPrintEnabled() #2
  %.not40 = icmp eq i8 %67, 0
  br i1 %.not40, label %74, label %68

68:                                               ; preds = %66
  %69 = tail call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2147483648) #2
  %.not41 = icmp eq i8 %69, 0
  br i1 %.not41, label %74, label %70

70:                                               ; preds = %68
  tail call void (i64, ptr, ...) @DebugPrint(i64 noundef 2147483648, ptr noundef nonnull @.str.23, i64 noundef %64) #2
  br label %74

71:                                               ; preds = %57
  store i8 %2, ptr %55, align 8, !tbaa !27
  br label %72

72:                                               ; preds = %71, %54
  %73 = tail call i64 @MnpConfigReceiveFilters(ptr noundef nonnull %12)
  br label %74

74:                                               ; preds = %66, %70, %68, %49, %53, %51, %36, %40, %38, %23, %27, %25, %72
  %.0 = phi i64 [ %64, %70 ], [ %64, %68 ], [ %64, %66 ], [ %73, %72 ], [ %21, %27 ], [ %21, %25 ], [ %21, %23 ], [ %34, %40 ], [ %34, %38 ], [ %34, %36 ], [ %47, %53 ], [ %47, %51 ], [ %47, %49 ]
  ret i64 %.0
}

; Function Attrs: nounwind uwtable
declare dso_local i64 @MnpConfigReceiveFilters(ptr noundef) local_unnamed_addr #1

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, !11, i64 24, !11, i64 32, !12, i64 40, !11, i64 56, !10, i64 64, !13, i64 80, !7, i64 88, !14, i64 92, !8, i64 94}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"_LIST_ENTRY", !11, i64 0, !11, i64 8}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!"_EFI_SERVICE_BINDING_PROTOCOL", !11, i64 0, !11, i64 8}
!13 = !{!"long long", !8, i64 0}
!14 = !{!"short", !8, i64 0}
!15 = !{!6, !11, i64 24}
!16 = !{!17, !13, i64 88}
!17 = !{!"", !7, i64 0, !11, i64 8, !11, i64 16, !18, i64 24, !13, i64 48, !11, i64 56, !11, i64 64, !10, i64 72, !13, i64 88, !10, i64 96, !7, i64 112, !11, i64 120, !19, i64 128, !13, i64 184, !11, i64 192, !8, i64 200, !11, i64 208, !11, i64 216, !7, i64 224, !7, i64 228, !7, i64 232, !7, i64 236, !7, i64 240, !7, i64 244, !11, i64 248, !11, i64 256}
!18 = !{!"_EFI_VLAN_CONFIG_PROTOCOL", !11, i64 0, !11, i64 8, !11, i64 16}
!19 = !{!"", !7, i64 0, !13, i64 8, !10, i64 16, !10, i64 32, !7, i64 48, !7, i64 52}
!20 = !{!17, !11, i64 64}
!21 = !{!11, !11, i64 0}
!22 = !{!23, !11, i64 88}
!23 = !{!"", !24, i64 0, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !11, i64 56, !11, i64 64, !11, i64 72, !11, i64 80, !11, i64 88, !11, i64 96, !11, i64 104, !11, i64 112, !11, i64 120, !11, i64 128, !11, i64 136, !11, i64 144, !11, i64 152, !11, i64 160, !11, i64 168, !11, i64 176, !11, i64 184, !11, i64 192, !11, i64 200, !11, i64 208, !11, i64 216, !11, i64 224, !11, i64 232, !11, i64 240, !11, i64 248, !11, i64 256, !11, i64 264, !11, i64 272, !11, i64 280, !11, i64 288, !11, i64 296, !11, i64 304, !11, i64 312, !11, i64 320, !11, i64 328, !11, i64 336, !11, i64 344, !11, i64 352, !11, i64 360, !11, i64 368}
!24 = !{!"", !13, i64 0, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20}
!25 = !{!17, !11, i64 208}
!26 = !{!17, !11, i64 216}
!27 = !{!17, !8, i64 200}
!28 = !{!17, !11, i64 192}


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