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

; 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_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._LIST_ENTRY = type { ptr, ptr }
%struct.EFI_MANAGED_NETWORK_CONFIG_DATA = type { i32, i32, i16, i8, i8, i8, i8, i8, i8, i8 }
%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.EFI_MANAGED_NETWORK_COMPLETION_TOKEN = type { ptr, i64, %union.anon }
%union.anon = type { ptr }
%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 }

@.str = external hidden unnamed_addr constant [147 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [127 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [75 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [62 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [80 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [51 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local zeroext i8 @MnpIsValidTxToken(ptr noundef %0, ptr noundef %1) #0 {
  %3 = alloca i8, align 1
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  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 4, ptr %8) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  %12 = load ptr, ptr %4, align 8, !tbaa !5
  %13 = getelementptr inbounds %struct.MNP_INSTANCE_DATA, ptr %12, i32 0, i32 1
  %14 = load ptr, ptr %13, align 8, !tbaa !9
  store ptr %14, ptr %6, 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 %6, align 8, !tbaa !5
  %20 = icmp ne ptr %19, null
  br i1 %20, label %21, label %26

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

26:                                               ; preds = %21, %18
  call void @DebugAssert(ptr noundef @.str, i64 noundef 41, ptr noundef @.str.1)
  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.EFI_MANAGED_NETWORK_COMPLETION_TOKEN, ptr %31, i32 0, i32 2
  %33 = load ptr, ptr %32, align 8, !tbaa !21
  store ptr %33, ptr %7, align 8, !tbaa !5
  %34 = load ptr, ptr %5, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_COMPLETION_TOKEN, ptr %34, i32 0, i32 0
  %36 = load ptr, ptr %35, align 8, !tbaa !22
  %37 = icmp eq ptr %36, null
  br i1 %37, label %47, label %38

38:                                               ; preds = %30
  %39 = load ptr, ptr %7, align 8, !tbaa !5
  %40 = icmp eq ptr %39, null
  br i1 %40, label %47, label %41

41:                                               ; preds = %38
  %42 = load ptr, ptr %7, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_TRANSMIT_DATA, ptr %42, i32 0, i32 5
  %44 = load i16, ptr %43, align 2, !tbaa !24
  %45 = zext i16 %44 to i32
  %46 = icmp eq i32 %45, 0
  br i1 %46, label %47, label %62

47:                                               ; preds = %41, %38, %30
  br label %48

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

51:                                               ; preds = %48
  br label %52

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

55:                                               ; preds = %52
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2, ptr noundef @.str.2)
  br label %56

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

57:                                               ; preds = %56
  br label %58

58:                                               ; preds = %57
  br label %59

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

60:                                               ; preds = %59
  br label %61

61:                                               ; preds = %60
  store i8 0, ptr %3, align 1
  store i32 1, ptr %11, align 4
  br label %208

62:                                               ; preds = %41
  %63 = load ptr, ptr %7, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_TRANSMIT_DATA, ptr %63, i32 0, i32 0
  %65 = load ptr, ptr %64, align 8, !tbaa !26
  %66 = icmp ne ptr %65, null
  br i1 %66, label %67, label %88

67:                                               ; preds = %62
  %68 = load ptr, ptr %7, align 8, !tbaa !5
  %69 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_TRANSMIT_DATA, ptr %68, i32 0, i32 4
  %70 = load i16, ptr %69, align 8, !tbaa !27
  %71 = zext i16 %70 to i32
  %72 = icmp ne i32 %71, 0
  br i1 %72, label %73, label %88

73:                                               ; preds = %67
  br label %74

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

77:                                               ; preds = %74
  br label %78

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

81:                                               ; preds = %78
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2, ptr noundef @.str.3)
  br label %82

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

83:                                               ; preds = %82
  br label %84

84:                                               ; preds = %83
  br label %85

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

86:                                               ; preds = %85
  br label %87

87:                                               ; preds = %86
  store i8 0, ptr %3, align 1
  store i32 1, ptr %11, align 4
  br label %208

88:                                               ; preds = %67, %62
  store i32 0, ptr %9, align 4, !tbaa !28
  %89 = load ptr, ptr %7, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_TRANSMIT_DATA, ptr %89, i32 0, i32 6
  %91 = getelementptr inbounds [1 x %struct.EFI_MANAGED_NETWORK_FRAGMENT_DATA], ptr %90, i64 0, i64 0
  store ptr %91, ptr %10, align 8, !tbaa !5
  store i32 0, ptr %8, align 4, !tbaa !28
  br label %92

92:                                               ; preds = %139, %88
  %93 = load i32, ptr %8, align 4, !tbaa !28
  %94 = load ptr, ptr %7, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_TRANSMIT_DATA, ptr %94, i32 0, i32 5
  %96 = load i16, ptr %95, align 2, !tbaa !24
  %97 = zext i16 %96 to i32
  %98 = icmp ult i32 %93, %97
  br i1 %98, label %99, label %142

99:                                               ; preds = %92
  %100 = load ptr, ptr %10, align 8, !tbaa !5
  %101 = load i32, ptr %8, align 4, !tbaa !28
  %102 = zext i32 %101 to i64
  %103 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_FRAGMENT_DATA, ptr %100, i64 %102
  %104 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_FRAGMENT_DATA, ptr %103, i32 0, i32 0
  %105 = load i32, ptr %104, align 8, !tbaa !29
  %106 = icmp eq i32 %105, 0
  br i1 %106, label %115, label %107

107:                                              ; preds = %99
  %108 = load ptr, ptr %10, align 8, !tbaa !5
  %109 = load i32, ptr %8, align 4, !tbaa !28
  %110 = zext i32 %109 to i64
  %111 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_FRAGMENT_DATA, ptr %108, i64 %110
  %112 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_FRAGMENT_DATA, ptr %111, i32 0, i32 1
  %113 = load ptr, ptr %112, align 8, !tbaa !31
  %114 = icmp eq ptr %113, null
  br i1 %114, label %115, label %130

115:                                              ; preds = %107, %99
  br label %116

116:                                              ; preds = %115
  %117 = call zeroext i8 @DebugPrintEnabled()
  %118 = icmp ne i8 %117, 0
  br i1 %118, label %119, label %127

119:                                              ; preds = %116
  br label %120

120:                                              ; preds = %119
  %121 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2)
  %122 = icmp ne i8 %121, 0
  br i1 %122, label %123, label %124

123:                                              ; preds = %120
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2, ptr noundef @.str.4)
  br label %124

124:                                              ; preds = %123, %120
  br label %125

125:                                              ; preds = %124
  br label %126

126:                                              ; preds = %125
  br label %127

127:                                              ; preds = %126, %116
  br label %128

128:                                              ; preds = %127
  br label %129

129:                                              ; preds = %128
  store i8 0, ptr %3, align 1
  store i32 1, ptr %11, align 4
  br label %208

130:                                              ; preds = %107
  %131 = load ptr, ptr %10, align 8, !tbaa !5
  %132 = load i32, ptr %8, align 4, !tbaa !28
  %133 = zext i32 %132 to i64
  %134 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_FRAGMENT_DATA, ptr %131, i64 %133
  %135 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_FRAGMENT_DATA, ptr %134, i32 0, i32 0
  %136 = load i32, ptr %135, align 8, !tbaa !29
  %137 = load i32, ptr %9, align 4, !tbaa !28
  %138 = add i32 %137, %136
  store i32 %138, ptr %9, align 4, !tbaa !28
  br label %139

139:                                              ; preds = %130
  %140 = load i32, ptr %8, align 4, !tbaa !28
  %141 = add i32 %140, 1
  store i32 %141, ptr %8, align 4, !tbaa !28
  br label %92, !llvm.loop !32

142:                                              ; preds = %92
  %143 = load ptr, ptr %7, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_TRANSMIT_DATA, ptr %143, i32 0, i32 0
  %145 = load ptr, ptr %144, align 8, !tbaa !26
  %146 = icmp eq ptr %145, null
  br i1 %146, label %147, label %158

147:                                              ; preds = %142
  %148 = load ptr, ptr %10, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_FRAGMENT_DATA, ptr %148, i64 0
  %150 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_FRAGMENT_DATA, ptr %149, i32 0, i32 0
  %151 = load i32, ptr %150, align 8, !tbaa !29
  %152 = load ptr, ptr %7, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_TRANSMIT_DATA, ptr %152, i32 0, i32 4
  %154 = load i16, ptr %153, align 8, !tbaa !27
  %155 = zext i16 %154 to i32
  %156 = icmp ult i32 %151, %155
  br i1 %156, label %157, label %158

157:                                              ; preds = %147
  store i8 0, ptr %3, align 1
  store i32 1, ptr %11, align 4
  br label %208

158:                                              ; preds = %147, %142
  %159 = load i32, ptr %9, align 4, !tbaa !28
  %160 = load ptr, ptr %7, align 8, !tbaa !5
  %161 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_TRANSMIT_DATA, ptr %160, i32 0, i32 3
  %162 = load i32, ptr %161, align 4, !tbaa !34
  %163 = load ptr, ptr %7, align 8, !tbaa !5
  %164 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_TRANSMIT_DATA, ptr %163, i32 0, i32 4
  %165 = load i16, ptr %164, align 8, !tbaa !27
  %166 = zext i16 %165 to i32
  %167 = add i32 %162, %166
  %168 = icmp ne i32 %159, %167
  br i1 %168, label %169, label %184

169:                                              ; preds = %158
  br label %170

170:                                              ; preds = %169
  %171 = call zeroext i8 @DebugPrintEnabled()
  %172 = icmp ne i8 %171, 0
  br i1 %172, label %173, label %181

173:                                              ; preds = %170
  br label %174

174:                                              ; preds = %173
  %175 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2)
  %176 = icmp ne i8 %175, 0
  br i1 %176, label %177, label %178

177:                                              ; preds = %174
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2, ptr noundef @.str.5)
  br label %178

178:                                              ; preds = %177, %174
  br label %179

179:                                              ; preds = %178
  br label %180

180:                                              ; preds = %179
  br label %181

181:                                              ; preds = %180, %170
  br label %182

182:                                              ; preds = %181
  br label %183

183:                                              ; preds = %182
  store i8 0, ptr %3, align 1
  store i32 1, ptr %11, align 4
  br label %208

184:                                              ; preds = %158
  %185 = load ptr, ptr %7, align 8, !tbaa !5
  %186 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_TRANSMIT_DATA, ptr %185, i32 0, i32 3
  %187 = load i32, ptr %186, align 4, !tbaa !34
  %188 = load ptr, ptr %6, align 8, !tbaa !5
  %189 = getelementptr inbounds %struct.MNP_SERVICE_DATA, ptr %188, i32 0, i32 8
  %190 = load i32, ptr %189, align 8, !tbaa !35
  %191 = icmp ugt i32 %187, %190
  br i1 %191, label %192, label %207

192:                                              ; preds = %184
  br label %193

193:                                              ; preds = %192
  %194 = call zeroext i8 @DebugPrintEnabled()
  %195 = icmp ne i8 %194, 0
  br i1 %195, label %196, label %204

196:                                              ; preds = %193
  br label %197

197:                                              ; preds = %196
  %198 = call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2)
  %199 = icmp ne i8 %198, 0
  br i1 %199, label %200, label %201

200:                                              ; preds = %197
  call void (i64, ptr, ...) @DebugPrint(i64 noundef 2, ptr noundef @.str.6)
  br label %201

201:                                              ; preds = %200, %197
  br label %202

202:                                              ; preds = %201
  br label %203

203:                                              ; preds = %202
  br label %204

204:                                              ; preds = %203, %193
  br label %205

205:                                              ; preds = %204
  br label %206

206:                                              ; preds = %205
  store i8 0, ptr %3, align 1
  store i32 1, ptr %11, align 4
  br label %208

207:                                              ; preds = %184
  store i8 1, ptr %3, align 1
  store i32 1, ptr %11, align 4
  br label %208

208:                                              ; preds = %207, %206, %183, %157, %129, %87, %61
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 4, 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
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  %209 = load i8, ptr %3, align 1
  ret i8 %209
}

; 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

declare zeroext i8 @DebugPrintEnabled() #2

declare zeroext i8 @DebugPrintLevelEnabled(i64 noundef) #2

declare void @DebugPrint(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

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, !6, i64 8}
!10 = !{!"", !11, i64 0, !6, i64 8, !6, i64 16, !12, i64 24, !13, i64 40, !7, i64 104, !7, i64 105, !12, i64 112, !14, i64 128, !12, i64 168, !12, i64 184, !15, i64 200, !16, i64 208, !7, i64 228}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_LIST_ENTRY", !6, i64 0, !6, i64 8}
!13 = !{!"_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}
!14 = !{!"", !12, i64 0, !12, i64 16, !15, i64 32}
!15 = !{!"long long", !7, i64 0}
!16 = !{!"", !11, i64 0, !11, i64 4, !17, i64 8, !7, i64 10, !7, i64 11, !7, i64 12, !7, i64 13, !7, i64 14, !7, i64 15, !7, i64 16}
!17 = !{!"short", !7, i64 0}
!18 = !{!19, !11, i64 0}
!19 = !{!"", !11, i64 0, !12, i64 8, !6, i64 24, !6, i64 32, !20, i64 40, !6, i64 56, !12, i64 64, !15, i64 80, !11, i64 88, !17, i64 92, !7, i64 94}
!20 = !{!"_EFI_SERVICE_BINDING_PROTOCOL", !6, i64 0, !6, i64 8}
!21 = !{!7, !7, i64 0}
!22 = !{!23, !6, i64 0}
!23 = !{!"", !6, i64 0, !15, i64 8, !7, i64 16}
!24 = !{!25, !17, i64 26}
!25 = !{!"", !6, i64 0, !6, i64 8, !17, i64 16, !11, i64 20, !17, i64 24, !17, i64 26, !7, i64 32}
!26 = !{!25, !6, i64 0}
!27 = !{!25, !17, i64 24}
!28 = !{!11, !11, i64 0}
!29 = !{!30, !11, i64 0}
!30 = !{!"", !11, i64 0, !6, i64 8}
!31 = !{!30, !6, i64 8}
!32 = distinct !{!32, !33}
!33 = !{!"llvm.loop.mustprogress"}
!34 = !{!25, !11, i64 20}
!35 = !{!19, !11, i64 88}


; 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.EFI_MANAGED_NETWORK_FRAGMENT_DATA = type { i32, ptr }

@.str = external hidden unnamed_addr constant [147 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [127 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [35 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [75 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [62 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [80 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [51 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local zeroext range(i8 0, 2) i8 @MnpIsValidTxToken(ptr nocapture noundef readonly %0, ptr nocapture noundef readonly %1) local_unnamed_addr #0 {
  %3 = getelementptr inbounds i8, ptr %0, i64 8
  %4 = load ptr, ptr %3, align 8, !tbaa !5
  %5 = tail call zeroext i8 @DebugAssertEnabled() #2
  %.not = icmp eq i8 %5, 0
  br i1 %.not, label %11, label %6

6:                                                ; preds = %2
  %.not34 = icmp eq ptr %4, null
  br i1 %.not34, label %10, label %7

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

10:                                               ; preds = %7, %6
  tail call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 41, ptr noundef nonnull @.str.1) #2
  br label %11

11:                                               ; preds = %7, %10, %2
  %12 = getelementptr inbounds i8, ptr %1, i64 16
  %13 = load ptr, ptr %12, align 8, !tbaa !20
  %14 = load ptr, ptr %1, align 8, !tbaa !21
  %15 = icmp eq ptr %14, null
  %16 = icmp eq ptr %13, null
  %or.cond = select i1 %15, i1 true, i1 %16
  br i1 %or.cond, label %21, label %17

17:                                               ; preds = %11
  %18 = getelementptr inbounds i8, ptr %13, i64 26
  %19 = load i16, ptr %18, align 2, !tbaa !23
  %20 = icmp eq i16 %19, 0
  br i1 %20, label %21, label %25

21:                                               ; preds = %11, %17
  %22 = tail call zeroext i8 @DebugPrintEnabled() #2
  %.not46 = icmp eq i8 %22, 0
  br i1 %.not46, label %73, label %23

23:                                               ; preds = %21
  %24 = tail call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2) #2
  %.not47 = icmp eq i8 %24, 0
  br i1 %.not47, label %73, label %.sink.split

25:                                               ; preds = %17
  %26 = load ptr, ptr %13, align 8, !tbaa !25
  %.not35 = icmp eq ptr %26, null
  br i1 %.not35, label %34, label %27

27:                                               ; preds = %25
  %28 = getelementptr inbounds i8, ptr %13, i64 24
  %29 = load i16, ptr %28, align 8, !tbaa !26
  %.not36 = icmp eq i16 %29, 0
  br i1 %.not36, label %34, label %30

30:                                               ; preds = %27
  %31 = tail call zeroext i8 @DebugPrintEnabled() #2
  %.not44 = icmp eq i8 %31, 0
  br i1 %.not44, label %73, label %32

32:                                               ; preds = %30
  %33 = tail call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2) #2
  %.not45 = icmp eq i8 %33, 0
  br i1 %.not45, label %73, label %.sink.split

34:                                               ; preds = %27, %25
  %35 = getelementptr inbounds i8, ptr %13, i64 32
  %wide.trip.count = zext i16 %19 to i64
  br label %36

36:                                               ; preds = %34, %48
  %indvars.iv = phi i64 [ 0, %34 ], [ %indvars.iv.next, %48 ]
  %.02950 = phi i32 [ 0, %34 ], [ %49, %48 ]
  %37 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_FRAGMENT_DATA, ptr %35, i64 %indvars.iv
  %38 = load i32, ptr %37, align 8, !tbaa !27
  %39 = icmp eq i32 %38, 0
  br i1 %39, label %44, label %40

40:                                               ; preds = %36
  %41 = getelementptr inbounds i8, ptr %37, i64 8
  %42 = load ptr, ptr %41, align 8, !tbaa !29
  %43 = icmp eq ptr %42, null
  br i1 %43, label %44, label %48

44:                                               ; preds = %36, %40
  %45 = tail call zeroext i8 @DebugPrintEnabled() #2
  %.not42 = icmp eq i8 %45, 0
  br i1 %.not42, label %73, label %46

46:                                               ; preds = %44
  %47 = tail call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2) #2
  %.not43 = icmp eq i8 %47, 0
  br i1 %.not43, label %73, label %.sink.split

48:                                               ; preds = %40
  %49 = add i32 %38, %.02950
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %50, label %36, !llvm.loop !30

50:                                               ; preds = %48
  br i1 %.not35, label %51, label %._crit_edge

._crit_edge:                                      ; preds = %50
  %.phi.trans.insert = getelementptr inbounds i8, ptr %13, i64 24
  %.pre = load i16, ptr %.phi.trans.insert, align 8, !tbaa !26
  %.pre52 = zext i16 %.pre to i32
  br label %57

51:                                               ; preds = %50
  %52 = load i32, ptr %35, align 8, !tbaa !27
  %53 = getelementptr inbounds i8, ptr %13, i64 24
  %54 = load i16, ptr %53, align 8, !tbaa !26
  %55 = zext i16 %54 to i32
  %56 = icmp ult i32 %52, %55
  br i1 %56, label %73, label %57

57:                                               ; preds = %._crit_edge, %51
  %.pre-phi = phi i32 [ %.pre52, %._crit_edge ], [ %55, %51 ]
  %58 = getelementptr inbounds i8, ptr %13, i64 20
  %59 = load i32, ptr %58, align 4, !tbaa !32
  %60 = add i32 %59, %.pre-phi
  %.not37 = icmp eq i32 %49, %60
  br i1 %.not37, label %65, label %61

61:                                               ; preds = %57
  %62 = tail call zeroext i8 @DebugPrintEnabled() #2
  %.not40 = icmp eq i8 %62, 0
  br i1 %.not40, label %73, label %63

63:                                               ; preds = %61
  %64 = tail call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2) #2
  %.not41 = icmp eq i8 %64, 0
  br i1 %.not41, label %73, label %.sink.split

65:                                               ; preds = %57
  %66 = getelementptr inbounds i8, ptr %4, i64 88
  %67 = load i32, ptr %66, align 8, !tbaa !33
  %68 = icmp ugt i32 %59, %67
  br i1 %68, label %69, label %73

69:                                               ; preds = %65
  %70 = tail call zeroext i8 @DebugPrintEnabled() #2
  %.not38 = icmp eq i8 %70, 0
  br i1 %.not38, label %73, label %71

71:                                               ; preds = %69
  %72 = tail call zeroext i8 @DebugPrintLevelEnabled(i64 noundef 2) #2
  %.not39 = icmp eq i8 %72, 0
  br i1 %.not39, label %73, label %.sink.split

.sink.split:                                      ; preds = %71, %63, %46, %32, %23
  %.str.6.sink = phi ptr [ @.str.2, %23 ], [ @.str.3, %32 ], [ @.str.4, %46 ], [ @.str.5, %63 ], [ @.str.6, %71 ]
  tail call void (i64, ptr, ...) @DebugPrint(i64 noundef 2, ptr noundef nonnull %.str.6.sink) #2
  br label %73

73:                                               ; preds = %.sink.split, %65, %69, %71, %61, %63, %51, %44, %46, %30, %32, %21, %23
  %.0 = phi i8 [ 0, %23 ], [ 0, %21 ], [ 0, %32 ], [ 0, %30 ], [ 0, %46 ], [ 0, %44 ], [ 0, %51 ], [ 0, %63 ], [ 0, %61 ], [ 0, %71 ], [ 0, %69 ], [ 1, %65 ], [ 0, %.sink.split ]
  ret i8 %.0
}

declare zeroext i8 @DebugAssertEnabled() local_unnamed_addr #1

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

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

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 = { "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, !10, i64 8}
!6 = !{!"", !7, i64 0, !10, i64 8, !10, i64 16, !11, i64 24, !12, i64 40, !8, i64 104, !8, i64 105, !11, i64 112, !13, i64 128, !11, i64 168, !11, i64 184, !14, i64 200, !15, i64 208, !8, i64 228}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"_LIST_ENTRY", !10, i64 0, !10, i64 8}
!12 = !{!"_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}
!13 = !{!"", !11, i64 0, !11, i64 16, !14, i64 32}
!14 = !{!"long long", !8, i64 0}
!15 = !{!"", !7, i64 0, !7, i64 4, !16, i64 8, !8, i64 10, !8, i64 11, !8, i64 12, !8, i64 13, !8, i64 14, !8, i64 15, !8, i64 16}
!16 = !{!"short", !8, i64 0}
!17 = !{!18, !7, i64 0}
!18 = !{!"", !7, i64 0, !11, i64 8, !10, i64 24, !10, i64 32, !19, i64 40, !10, i64 56, !11, i64 64, !14, i64 80, !7, i64 88, !16, i64 92, !8, i64 94}
!19 = !{!"_EFI_SERVICE_BINDING_PROTOCOL", !10, i64 0, !10, i64 8}
!20 = !{!8, !8, i64 0}
!21 = !{!22, !10, i64 0}
!22 = !{!"", !10, i64 0, !14, i64 8, !8, i64 16}
!23 = !{!24, !16, i64 26}
!24 = !{!"", !10, i64 0, !10, i64 8, !16, i64 16, !7, i64 20, !16, i64 24, !16, i64 26, !8, i64 32}
!25 = !{!24, !10, i64 0}
!26 = !{!24, !16, i64 24}
!27 = !{!28, !7, i64 0}
!28 = !{!"", !7, i64 0, !10, i64 8}
!29 = !{!28, !10, i64 8}
!30 = distinct !{!30, !31}
!31 = !{!"llvm.loop.mustprogress"}
!32 = !{!24, !7, i64 20}
!33 = !{!18, !7, i64 88}


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,LCSSAPass,LICMPass,LoopRotatePass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass