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

; 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.EFI_MANAGED_NETWORK_CONFIG_DATA = type { i32, i32, i16, i8, i8, i8, i8, i8, i8, i8 }
%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.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_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 }

@mMnpDefaultConfigData = external dso_local global %struct.EFI_MANAGED_NETWORK_CONFIG_DATA, align 4
@.str = external hidden unnamed_addr constant [151 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [125 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [115 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

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

declare ptr @CopyMem(ptr noundef, ptr noundef, i64 noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local i64 @MnpStart(ptr noundef, i8 noundef zeroext, i8 noundef zeroext) #2

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

; Function Attrs: nounwind uwtable
declare dso_local void @MnpFlushRcvdDataQueue(ptr noundef) #2

; Function Attrs: nounwind uwtable
define dso_local i64 @MnpConfigureInstance(ptr noundef %0, ptr noundef %1) #2 {
  %3 = alloca i64, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i8, align 1
  %12 = 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 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 1, ptr %11) #3
  br label %13

13:                                               ; preds = %2
  %14 = call zeroext i8 @DebugAssertEnabled()
  %15 = icmp ne i8 %14, 0
  br i1 %15, label %16, label %26

16:                                               ; preds = %13
  %17 = load ptr, ptr %4, align 8, !tbaa !5
  %18 = icmp ne ptr %17, null
  br i1 %18, label %19, label %24

19:                                               ; preds = %16
  %20 = load ptr, ptr %4, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct.MNP_INSTANCE_DATA, ptr %20, i32 0, i32 0
  %22 = load i32, ptr %21, align 8, !tbaa !9
  %23 = icmp eq i32 %22, 1232105037
  br i1 %23, label %25, label %24

24:                                               ; preds = %19, %16
  call void @DebugAssert(ptr noundef @.str, i64 noundef 1233, ptr noundef @.str.25)
  br label %25

25:                                               ; preds = %24, %19
  br label %26

26:                                               ; preds = %25, %13
  br label %27

27:                                               ; preds = %26
  br label %28

28:                                               ; preds = %27
  %29 = load ptr, ptr %5, align 8, !tbaa !5
  %30 = icmp ne ptr %29, null
  br i1 %30, label %31, label %38

31:                                               ; preds = %28
  %32 = load ptr, ptr %5, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_CONFIG_DATA, ptr %32, i32 0, i32 8
  %34 = load i8, ptr %33, align 1, !tbaa !18
  %35 = zext i8 %34 to i32
  %36 = icmp ne i32 %35, 0
  br i1 %36, label %37, label %38

37:                                               ; preds = %31
  store i64 -9223372036854775805, ptr %3, align 8
  store i32 1, ptr %12, align 4
  br label %229

38:                                               ; preds = %31, %28
  store i64 0, ptr %6, align 8, !tbaa !19
  %39 = load ptr, ptr %4, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.MNP_INSTANCE_DATA, ptr %39, i32 0, i32 1
  %41 = load ptr, ptr %40, align 8, !tbaa !20
  store ptr %41, ptr %7, align 8, !tbaa !5
  %42 = load ptr, ptr %7, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct.MNP_SERVICE_DATA, ptr %42, i32 0, i32 2
  %44 = load ptr, ptr %43, align 8, !tbaa !21
  store ptr %44, ptr %8, align 8, !tbaa !5
  br label %45

45:                                               ; preds = %38
  %46 = call zeroext i8 @DebugAssertEnabled()
  %47 = icmp ne i8 %46, 0
  br i1 %47, label %48, label %58

48:                                               ; preds = %45
  %49 = load ptr, ptr %8, align 8, !tbaa !5
  %50 = icmp ne ptr %49, null
  br i1 %50, label %51, label %56

51:                                               ; preds = %48
  %52 = load ptr, ptr %8, align 8, !tbaa !5
  %53 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %52, i32 0, i32 0
  %54 = load i32, ptr %53, align 8, !tbaa !24
  %55 = icmp eq i32 %54, 1148218957
  br i1 %55, label %57, label %56

56:                                               ; preds = %51, %48
  call void @DebugAssert(ptr noundef @.str, i64 noundef 1246, ptr noundef @.str.1)
  br label %57

57:                                               ; preds = %56, %51
  br label %58

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

59:                                               ; preds = %58
  br label %60

60:                                               ; preds = %59
  %61 = load ptr, ptr %4, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.MNP_INSTANCE_DATA, ptr %61, i32 0, i32 5
  %63 = load i8, ptr %62, align 8, !tbaa !28
  %64 = zext i8 %63 to i32
  %65 = icmp ne i32 %64, 0
  br i1 %65, label %66, label %69

66:                                               ; preds = %60
  %67 = load ptr, ptr %5, align 8, !tbaa !5
  %68 = icmp ne ptr %67, null
  br label %69

69:                                               ; preds = %66, %60
  %70 = phi i1 [ false, %60 ], [ %68, %66 ]
  %71 = zext i1 %70 to i32
  %72 = trunc i32 %71 to i8
  store i8 %72, ptr %11, align 1, !tbaa !29
  %73 = load ptr, ptr %4, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.MNP_INSTANCE_DATA, ptr %73, i32 0, i32 12
  store ptr %74, ptr %9, align 8, !tbaa !5
  %75 = load ptr, ptr %5, align 8, !tbaa !5
  store ptr %75, ptr %10, align 8, !tbaa !5
  %76 = load ptr, ptr %10, align 8, !tbaa !5
  %77 = icmp eq ptr %76, null
  br i1 %77, label %78, label %79

78:                                               ; preds = %69
  store ptr @mMnpDefaultConfigData, ptr %10, align 8, !tbaa !5
  br label %79

79:                                               ; preds = %78, %69
  %80 = load ptr, ptr %4, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct.MNP_INSTANCE_DATA, ptr %80, i32 0, i32 13
  store i8 0, ptr %81, align 4, !tbaa !30
  %82 = load ptr, ptr %9, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_CONFIG_DATA, ptr %82, i32 0, i32 3
  %84 = load i8, ptr %83, align 2, !tbaa !31
  %85 = icmp ne i8 %84, 0
  br i1 %85, label %86, label %91

86:                                               ; preds = %79
  %87 = load ptr, ptr %8, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %87, i32 0, i32 18
  %89 = load i32, ptr %88, align 8, !tbaa !32
  %90 = add i32 %89, -1
  store i32 %90, ptr %88, align 8, !tbaa !32
  br label %91

91:                                               ; preds = %86, %79
  %92 = load ptr, ptr %9, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_CONFIG_DATA, ptr %92, i32 0, i32 4
  %94 = load i8, ptr %93, align 1, !tbaa !33
  %95 = icmp ne i8 %94, 0
  br i1 %95, label %96, label %101

96:                                               ; preds = %91
  %97 = load ptr, ptr %8, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %97, i32 0, i32 20
  %99 = load i32, ptr %98, align 8, !tbaa !34
  %100 = add i32 %99, -1
  store i32 %100, ptr %98, align 8, !tbaa !34
  br label %101

101:                                              ; preds = %96, %91
  %102 = load ptr, ptr %9, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_CONFIG_DATA, ptr %102, i32 0, i32 5
  %104 = load i8, ptr %103, align 4, !tbaa !35
  %105 = icmp ne i8 %104, 0
  br i1 %105, label %106, label %111

106:                                              ; preds = %101
  %107 = load ptr, ptr %8, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %107, i32 0, i32 19
  %109 = load i32, ptr %108, align 4, !tbaa !36
  %110 = add i32 %109, -1
  store i32 %110, ptr %108, align 4, !tbaa !36
  br label %111

111:                                              ; preds = %106, %101
  %112 = load ptr, ptr %9, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_CONFIG_DATA, ptr %112, i32 0, i32 6
  %114 = load i8, ptr %113, align 1, !tbaa !37
  %115 = icmp ne i8 %114, 0
  br i1 %115, label %116, label %121

116:                                              ; preds = %111
  %117 = load ptr, ptr %8, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %117, i32 0, i32 21
  %119 = load i32, ptr %118, align 4, !tbaa !38
  %120 = add i32 %119, -1
  store i32 %120, ptr %118, align 4, !tbaa !38
  br label %121

121:                                              ; preds = %116, %111
  %122 = load ptr, ptr %10, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_CONFIG_DATA, ptr %122, i32 0, i32 3
  %124 = load i8, ptr %123, align 2, !tbaa !31
  %125 = icmp ne i8 %124, 0
  br i1 %125, label %126, label %137

126:                                              ; preds = %121
  %127 = load ptr, ptr %8, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %127, i32 0, i32 18
  %129 = load i32, ptr %128, align 8, !tbaa !32
  %130 = add i32 %129, 1
  store i32 %130, ptr %128, align 8, !tbaa !32
  %131 = load ptr, ptr %4, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct.MNP_INSTANCE_DATA, ptr %131, i32 0, i32 13
  %133 = load i8, ptr %132, align 4, !tbaa !30
  %134 = zext i8 %133 to i32
  %135 = or i32 %134, 1
  %136 = trunc i32 %135 to i8
  store i8 %136, ptr %132, align 4, !tbaa !30
  br label %137

137:                                              ; preds = %126, %121
  %138 = load ptr, ptr %10, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_CONFIG_DATA, ptr %138, i32 0, i32 4
  %140 = load i8, ptr %139, align 1, !tbaa !33
  %141 = icmp ne i8 %140, 0
  br i1 %141, label %142, label %147

142:                                              ; preds = %137
  %143 = load ptr, ptr %8, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %143, i32 0, i32 20
  %145 = load i32, ptr %144, align 8, !tbaa !34
  %146 = add i32 %145, 1
  store i32 %146, ptr %144, align 8, !tbaa !34
  br label %147

147:                                              ; preds = %142, %137
  %148 = load ptr, ptr %10, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_CONFIG_DATA, ptr %148, i32 0, i32 5
  %150 = load i8, ptr %149, align 4, !tbaa !35
  %151 = icmp ne i8 %150, 0
  br i1 %151, label %152, label %163

152:                                              ; preds = %147
  %153 = load ptr, ptr %8, align 8, !tbaa !5
  %154 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %153, i32 0, i32 19
  %155 = load i32, ptr %154, align 4, !tbaa !36
  %156 = add i32 %155, 1
  store i32 %156, ptr %154, align 4, !tbaa !36
  %157 = load ptr, ptr %4, align 8, !tbaa !5
  %158 = getelementptr inbounds %struct.MNP_INSTANCE_DATA, ptr %157, i32 0, i32 13
  %159 = load i8, ptr %158, align 4, !tbaa !30
  %160 = zext i8 %159 to i32
  %161 = or i32 %160, 2
  %162 = trunc i32 %161 to i8
  store i8 %162, ptr %158, align 4, !tbaa !30
  br label %163

163:                                              ; preds = %152, %147
  %164 = load ptr, ptr %10, align 8, !tbaa !5
  %165 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_CONFIG_DATA, ptr %164, i32 0, i32 6
  %166 = load i8, ptr %165, align 1, !tbaa !37
  %167 = icmp ne i8 %166, 0
  br i1 %167, label %168, label %173

168:                                              ; preds = %163
  %169 = load ptr, ptr %8, align 8, !tbaa !5
  %170 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %169, i32 0, i32 21
  %171 = load i32, ptr %170, align 4, !tbaa !38
  %172 = add i32 %171, 1
  store i32 %172, ptr %170, align 4, !tbaa !38
  br label %173

173:                                              ; preds = %168, %163
  %174 = load ptr, ptr %9, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_CONFIG_DATA, ptr %174, i32 0, i32 7
  %176 = load i8, ptr %175, align 2, !tbaa !39
  %177 = icmp ne i8 %176, 0
  br i1 %177, label %178, label %180

178:                                              ; preds = %173
  %179 = load ptr, ptr %4, align 8, !tbaa !5
  call void @MnpFlushRcvdDataQueue(ptr noundef %179)
  br label %180

180:                                              ; preds = %178, %173
  %181 = load ptr, ptr %5, align 8, !tbaa !5
  %182 = icmp eq ptr %181, null
  br i1 %182, label %183, label %191

183:                                              ; preds = %180
  %184 = load ptr, ptr %4, align 8, !tbaa !5
  %185 = getelementptr inbounds %struct.MNP_INSTANCE_DATA, ptr %184, i32 0, i32 4
  %186 = getelementptr inbounds %struct._EFI_MANAGED_NETWORK_PROTOCOL, ptr %185, i32 0, i32 6
  %187 = load ptr, ptr %186, align 8, !tbaa !40
  %188 = load ptr, ptr %4, align 8, !tbaa !5
  %189 = getelementptr inbounds %struct.MNP_INSTANCE_DATA, ptr %188, i32 0, i32 4
  %190 = call i64 %187(ptr noundef %189, ptr noundef null)
  br label %191

191:                                              ; preds = %183, %180
  %192 = load ptr, ptr %10, align 8, !tbaa !5
  %193 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_CONFIG_DATA, ptr %192, i32 0, i32 4
  %194 = load i8, ptr %193, align 1, !tbaa !33
  %195 = icmp ne i8 %194, 0
  br i1 %195, label %199, label %196

196:                                              ; preds = %191
  %197 = load ptr, ptr %4, align 8, !tbaa !5
  %198 = call i64 @MnpGroupOp(ptr noundef %197, i8 noundef zeroext 0, ptr noundef null, ptr noundef null)
  br label %199

199:                                              ; preds = %196, %191
  %200 = load ptr, ptr %9, align 8, !tbaa !5
  %201 = load ptr, ptr %10, align 8, !tbaa !5
  %202 = call ptr @CopyMem(ptr noundef %200, ptr noundef %201, i64 noundef 20)
  %203 = load ptr, ptr %5, align 8, !tbaa !5
  %204 = icmp ne ptr %203, null
  %205 = zext i1 %204 to i32
  %206 = trunc i32 %205 to i8
  %207 = load ptr, ptr %4, align 8, !tbaa !5
  %208 = getelementptr inbounds %struct.MNP_INSTANCE_DATA, ptr %207, i32 0, i32 5
  store i8 %206, ptr %208, align 8, !tbaa !28
  %209 = load ptr, ptr %4, align 8, !tbaa !5
  %210 = getelementptr inbounds %struct.MNP_INSTANCE_DATA, ptr %209, i32 0, i32 5
  %211 = load i8, ptr %210, align 8, !tbaa !28
  %212 = icmp ne i8 %211, 0
  br i1 %212, label %213, label %224

213:                                              ; preds = %199
  %214 = load ptr, ptr %7, align 8, !tbaa !5
  %215 = load i8, ptr %11, align 1, !tbaa !29
  %216 = load ptr, ptr %10, align 8, !tbaa !5
  %217 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_CONFIG_DATA, ptr %216, i32 0, i32 9
  %218 = load i8, ptr %217, align 4, !tbaa !41
  %219 = icmp ne i8 %218, 0
  %220 = xor i1 %219, true
  %221 = zext i1 %220 to i32
  %222 = trunc i32 %221 to i8
  %223 = call i64 @MnpStart(ptr noundef %214, i8 noundef zeroext %215, i8 noundef zeroext %222)
  store i64 %223, ptr %6, align 8, !tbaa !19
  br label %227

224:                                              ; preds = %199
  %225 = load ptr, ptr %7, align 8, !tbaa !5
  %226 = call i64 @MnpStop(ptr noundef %225)
  store i64 %226, ptr %6, align 8, !tbaa !19
  br label %227

227:                                              ; preds = %224, %213
  %228 = load i64, ptr %6, align 8, !tbaa !19
  store i64 %228, ptr %3, align 8
  store i32 1, ptr %12, align 4
  br label %229

229:                                              ; preds = %227, %37
  call void @llvm.lifetime.end.p0(i64 1, 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
  %230 = load i64, ptr %3, align 8
  ret i64 %230
}

; Function Attrs: nounwind uwtable
declare dso_local i64 @MnpGroupOp(ptr noundef, i8 noundef zeroext, ptr noundef, 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 = !{!10, !11, i64 0}
!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 = !{!16, !7, i64 15}
!19 = !{!15, !15, i64 0}
!20 = !{!10, !6, i64 8}
!21 = !{!22, !6, i64 24}
!22 = !{!"", !11, i64 0, !12, i64 8, !6, i64 24, !6, i64 32, !23, i64 40, !6, i64 56, !12, i64 64, !15, i64 80, !11, i64 88, !17, i64 92, !7, i64 94}
!23 = !{!"_EFI_SERVICE_BINDING_PROTOCOL", !6, i64 0, !6, i64 8}
!24 = !{!25, !11, i64 0}
!25 = !{!"", !11, i64 0, !6, i64 8, !6, i64 16, !26, i64 24, !15, i64 48, !6, i64 56, !6, i64 64, !12, i64 72, !15, i64 88, !12, i64 96, !11, i64 112, !6, i64 120, !27, i64 128, !15, 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}
!26 = !{!"_EFI_VLAN_CONFIG_PROTOCOL", !6, i64 0, !6, i64 8, !6, i64 16}
!27 = !{!"", !11, i64 0, !15, i64 8, !12, i64 16, !12, i64 32, !11, i64 48, !11, i64 52}
!28 = !{!10, !7, i64 104}
!29 = !{!7, !7, i64 0}
!30 = !{!10, !7, i64 228}
!31 = !{!16, !7, i64 10}
!32 = !{!25, !11, i64 224}
!33 = !{!16, !7, i64 11}
!34 = !{!25, !11, i64 232}
!35 = !{!16, !7, i64 12}
!36 = !{!25, !11, i64 228}
!37 = !{!16, !7, i64 13}
!38 = !{!25, !11, i64 236}
!39 = !{!16, !7, i64 14}
!40 = !{!10, !6, i64 88}
!41 = !{!16, !7, i64 16}


; 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_CONFIG_DATA = type { i32, i32, i16, i8, i8, i8, i8, i8, i8, i8 }

@mMnpDefaultConfigData = external dso_local global %struct.EFI_MANAGED_NETWORK_CONFIG_DATA, align 4
@.str = external hidden unnamed_addr constant [151 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [125 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [115 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 ptr @CopyMem(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local i64 @MnpStart(ptr noundef, i8 noundef zeroext, i8 noundef zeroext) local_unnamed_addr #1

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

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

; Function Attrs: nounwind uwtable
define dso_local i64 @MnpConfigureInstance(ptr noundef %0, ptr noundef %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
  %.not53 = icmp eq ptr %0, null
  br i1 %.not53, label %8, label %5

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

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

9:                                                ; preds = %5, %8, %2
  %10 = icmp ne ptr %1, null
  br i1 %10, label %11, label %14

11:                                               ; preds = %9
  %12 = getelementptr inbounds i8, ptr %1, i64 15
  %13 = load i8, ptr %12, align 1, !tbaa !17
  %.not54 = icmp eq i8 %13, 0
  br i1 %.not54, label %14, label %114

14:                                               ; preds = %11, %9
  %15 = getelementptr inbounds i8, ptr %0, i64 8
  %16 = load ptr, ptr %15, align 8, !tbaa !18
  %17 = getelementptr inbounds i8, ptr %16, i64 24
  %18 = load ptr, ptr %17, align 8, !tbaa !19
  %19 = tail call zeroext i8 @DebugAssertEnabled() #2
  %.not55 = icmp eq i8 %19, 0
  br i1 %.not55, label %25, label %20

20:                                               ; preds = %14
  %.not56 = icmp eq ptr %18, null
  br i1 %.not56, label %24, label %21

21:                                               ; preds = %20
  %22 = load i32, ptr %18, align 8, !tbaa !22
  %23 = icmp eq i32 %22, 1148218957
  br i1 %23, label %25, label %24

24:                                               ; preds = %21, %20
  tail call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 1246, ptr noundef nonnull @.str.1) #2
  br label %25

25:                                               ; preds = %21, %24, %14
  %26 = getelementptr inbounds i8, ptr %0, i64 104
  %27 = load i8, ptr %26, align 8, !tbaa !26
  %28 = icmp ne i8 %27, 0
  %29 = and i1 %10, %28
  %30 = zext i1 %29 to i8
  %31 = getelementptr inbounds i8, ptr %0, i64 208
  %32 = icmp eq ptr %1, null
  %spec.store.select = select i1 %32, ptr @mMnpDefaultConfigData, ptr %1
  %33 = getelementptr inbounds i8, ptr %0, i64 228
  store i8 0, ptr %33, align 4, !tbaa !27
  %34 = getelementptr inbounds i8, ptr %0, i64 218
  %35 = load i8, ptr %34, align 2, !tbaa !28
  %.not57 = icmp eq i8 %35, 0
  br i1 %.not57, label %40, label %36

36:                                               ; preds = %25
  %37 = getelementptr inbounds i8, ptr %18, i64 224
  %38 = load i32, ptr %37, align 8, !tbaa !29
  %39 = add i32 %38, -1
  store i32 %39, ptr %37, align 8, !tbaa !29
  br label %40

40:                                               ; preds = %36, %25
  %41 = getelementptr inbounds i8, ptr %0, i64 219
  %42 = load i8, ptr %41, align 1, !tbaa !30
  %.not58 = icmp eq i8 %42, 0
  br i1 %.not58, label %47, label %43

43:                                               ; preds = %40
  %44 = getelementptr inbounds i8, ptr %18, i64 232
  %45 = load i32, ptr %44, align 8, !tbaa !31
  %46 = add i32 %45, -1
  store i32 %46, ptr %44, align 8, !tbaa !31
  br label %47

47:                                               ; preds = %43, %40
  %48 = getelementptr inbounds i8, ptr %0, i64 220
  %49 = load i8, ptr %48, align 4, !tbaa !32
  %.not59 = icmp eq i8 %49, 0
  br i1 %.not59, label %54, label %50

50:                                               ; preds = %47
  %51 = getelementptr inbounds i8, ptr %18, i64 228
  %52 = load i32, ptr %51, align 4, !tbaa !33
  %53 = add i32 %52, -1
  store i32 %53, ptr %51, align 4, !tbaa !33
  br label %54

54:                                               ; preds = %50, %47
  %55 = getelementptr inbounds i8, ptr %0, i64 221
  %56 = load i8, ptr %55, align 1, !tbaa !34
  %.not60 = icmp eq i8 %56, 0
  br i1 %.not60, label %61, label %57

57:                                               ; preds = %54
  %58 = getelementptr inbounds i8, ptr %18, i64 236
  %59 = load i32, ptr %58, align 4, !tbaa !35
  %60 = add i32 %59, -1
  store i32 %60, ptr %58, align 4, !tbaa !35
  br label %61

61:                                               ; preds = %57, %54
  %62 = getelementptr inbounds i8, ptr %spec.store.select, i64 10
  %63 = load i8, ptr %62, align 2, !tbaa !28
  %.not61 = icmp eq i8 %63, 0
  br i1 %.not61, label %68, label %64

64:                                               ; preds = %61
  %65 = getelementptr inbounds i8, ptr %18, i64 224
  %66 = load i32, ptr %65, align 8, !tbaa !29
  %67 = add i32 %66, 1
  store i32 %67, ptr %65, align 8, !tbaa !29
  store i8 1, ptr %33, align 4, !tbaa !27
  br label %68

68:                                               ; preds = %64, %61
  %69 = phi i8 [ 3, %64 ], [ 2, %61 ]
  %70 = getelementptr inbounds i8, ptr %spec.store.select, i64 11
  %71 = load i8, ptr %70, align 1, !tbaa !30
  %.not62 = icmp eq i8 %71, 0
  br i1 %.not62, label %76, label %72

72:                                               ; preds = %68
  %73 = getelementptr inbounds i8, ptr %18, i64 232
  %74 = load i32, ptr %73, align 8, !tbaa !31
  %75 = add i32 %74, 1
  store i32 %75, ptr %73, align 8, !tbaa !31
  br label %76

76:                                               ; preds = %72, %68
  %77 = getelementptr inbounds i8, ptr %spec.store.select, i64 12
  %78 = load i8, ptr %77, align 4, !tbaa !32
  %.not63 = icmp eq i8 %78, 0
  br i1 %.not63, label %83, label %79

79:                                               ; preds = %76
  %80 = getelementptr inbounds i8, ptr %18, i64 228
  %81 = load i32, ptr %80, align 4, !tbaa !33
  %82 = add i32 %81, 1
  store i32 %82, ptr %80, align 4, !tbaa !33
  store i8 %69, ptr %33, align 4, !tbaa !27
  br label %83

83:                                               ; preds = %79, %76
  %84 = getelementptr inbounds i8, ptr %spec.store.select, i64 13
  %85 = load i8, ptr %84, align 1, !tbaa !34
  %.not64 = icmp eq i8 %85, 0
  br i1 %.not64, label %90, label %86

86:                                               ; preds = %83
  %87 = getelementptr inbounds i8, ptr %18, i64 236
  %88 = load i32, ptr %87, align 4, !tbaa !35
  %89 = add i32 %88, 1
  store i32 %89, ptr %87, align 4, !tbaa !35
  br label %90

90:                                               ; preds = %86, %83
  %91 = getelementptr inbounds i8, ptr %0, i64 222
  %92 = load i8, ptr %91, align 2, !tbaa !36
  %.not65 = icmp eq i8 %92, 0
  br i1 %.not65, label %94, label %93

93:                                               ; preds = %90
  tail call void @MnpFlushRcvdDataQueue(ptr noundef nonnull %0)
  br label %94

94:                                               ; preds = %93, %90
  br i1 %32, label %95, label %100

95:                                               ; preds = %94
  %96 = getelementptr inbounds i8, ptr %0, i64 40
  %97 = getelementptr inbounds i8, ptr %0, i64 88
  %98 = load ptr, ptr %97, align 8, !tbaa !37
  %99 = tail call i64 %98(ptr noundef nonnull %96, ptr noundef null) #2
  br label %100

100:                                              ; preds = %95, %94
  %101 = load i8, ptr %70, align 1, !tbaa !30
  %.not66 = icmp eq i8 %101, 0
  br i1 %.not66, label %102, label %104

102:                                              ; preds = %100
  %103 = tail call i64 @MnpGroupOp(ptr noundef nonnull %0, i8 noundef zeroext 0, ptr noundef null, ptr noundef null)
  br label %104

104:                                              ; preds = %102, %100
  %105 = tail call ptr @CopyMem(ptr noundef nonnull %31, ptr noundef nonnull %spec.store.select, i64 noundef 20) #2
  %106 = zext i1 %10 to i8
  store i8 %106, ptr %26, align 8, !tbaa !26
  br i1 %10, label %107, label %112

107:                                              ; preds = %104
  %108 = getelementptr inbounds i8, ptr %1, i64 16
  %109 = load i8, ptr %108, align 4, !tbaa !38
  %.not67 = icmp eq i8 %109, 0
  %110 = zext i1 %.not67 to i8
  %111 = tail call i64 @MnpStart(ptr noundef nonnull %16, i8 noundef zeroext %30, i8 noundef zeroext %110)
  br label %114

112:                                              ; preds = %104
  %113 = tail call i64 @MnpStop(ptr noundef nonnull %16)
  br label %114

114:                                              ; preds = %107, %112, %11
  %.0 = phi i64 [ -9223372036854775805, %11 ], [ %111, %107 ], [ %113, %112 ]
  ret i64 %.0
}

; Function Attrs: nounwind uwtable
declare dso_local i64 @MnpGroupOp(ptr noundef, i8 noundef zeroext, ptr noundef, 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, !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 = !{!15, !8, i64 15}
!18 = !{!6, !10, i64 8}
!19 = !{!20, !10, i64 24}
!20 = !{!"", !7, i64 0, !11, i64 8, !10, i64 24, !10, i64 32, !21, i64 40, !10, i64 56, !11, i64 64, !14, i64 80, !7, i64 88, !16, i64 92, !8, i64 94}
!21 = !{!"_EFI_SERVICE_BINDING_PROTOCOL", !10, i64 0, !10, i64 8}
!22 = !{!23, !7, i64 0}
!23 = !{!"", !7, i64 0, !10, i64 8, !10, i64 16, !24, i64 24, !14, i64 48, !10, i64 56, !10, i64 64, !11, i64 72, !14, i64 88, !11, i64 96, !7, i64 112, !10, i64 120, !25, i64 128, !14, 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}
!24 = !{!"_EFI_VLAN_CONFIG_PROTOCOL", !10, i64 0, !10, i64 8, !10, i64 16}
!25 = !{!"", !7, i64 0, !14, i64 8, !11, i64 16, !11, i64 32, !7, i64 48, !7, i64 52}
!26 = !{!6, !8, i64 104}
!27 = !{!6, !8, i64 228}
!28 = !{!15, !8, i64 10}
!29 = !{!23, !7, i64 224}
!30 = !{!15, !8, i64 11}
!31 = !{!23, !7, i64 232}
!32 = !{!15, !8, i64 12}
!33 = !{!23, !7, i64 228}
!34 = !{!15, !8, i64 13}
!35 = !{!23, !7, i64 236}
!36 = !{!15, !8, i64 14}
!37 = !{!6, !10, i64 88}
!38 = !{!15, !8, i64 16}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass