; LLVM IR from thalium/icebox :: third_party/virtualbox/src/VBox/Devices/EFI/Firmware/NetworkPkg/Ip6Dxe (EfiIp6Configure)

; 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._IP6_PROTOCOL = type { i32, %struct._EFI_IP6_PROTOCOL, ptr, i64, ptr, %struct._LIST_ENTRY, i8, %struct.NET_MAP, %struct.NET_MAP, %struct._LIST_ENTRY, %struct._LIST_ENTRY, %struct.EFI_LOCK, ptr, %struct._LIST_ENTRY, ptr, i32, %struct.EFI_IP6_CONFIG_DATA, i8 }
%struct._EFI_IP6_PROTOCOL = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.NET_MAP = type { %struct._LIST_ENTRY, %struct._LIST_ENTRY, i64 }
%struct.EFI_LOCK = type { i64, i64, i32 }
%struct._LIST_ENTRY = type { ptr, ptr }
%struct.EFI_IP6_CONFIG_DATA = type { i8, i8, i8, i8, %struct.EFI_IPv6_ADDRESS, %struct.EFI_IPv6_ADDRESS, i8, i8, i32, i32, i32 }
%struct.EFI_IPv6_ADDRESS = type { [16 x i8] }
%struct._IP6_SERVICE = type { i32, %struct._EFI_SERVICE_BINDING_PROTOCOL, i64, i64, %struct._LIST_ENTRY, %struct._LIST_ENTRY, ptr, ptr, %struct.IP6_LINK_RX_TOKEN, %struct.IP6_ASSEMBLE_TABLE, %struct.IP6_MLD_SERVICE_DATA, %struct.EFI_IPv6_ADDRESS, i8, i8, i8, i8, i8, i32, i32, i32, i32, %struct._LIST_ENTRY, %struct._LIST_ENTRY, %struct._LIST_ENTRY, %struct._LIST_ENTRY, i32, i8, ptr, i8, i8, i32, ptr, ptr, ptr, ptr, %struct.EFI_MANAGED_NETWORK_CONFIG_DATA, %struct.EFI_SIMPLE_NETWORK_MODE, ptr, ptr, %struct._IP6_CONFIG_INSTANCE, ptr, i32, i32 }
%struct._EFI_SERVICE_BINDING_PROTOCOL = type { ptr, ptr }
%struct.IP6_LINK_RX_TOKEN = type { i32, ptr, ptr, %struct.EFI_MANAGED_NETWORK_COMPLETION_TOKEN }
%struct.EFI_MANAGED_NETWORK_COMPLETION_TOKEN = type { ptr, i64, %union.anon }
%union.anon = type { ptr }
%struct.IP6_ASSEMBLE_TABLE = type { [127 x %struct._LIST_ENTRY] }
%struct.IP6_MLD_SERVICE_DATA = type { i64, %struct._LIST_ENTRY }
%struct.EFI_MANAGED_NETWORK_CONFIG_DATA = type { i32, i32, i16, i8, i8, i8, i8, i8, i8, i8 }
%struct.EFI_SIMPLE_NETWORK_MODE = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, [16 x %struct.EFI_MAC_ADDRESS], %struct.EFI_MAC_ADDRESS, %struct.EFI_MAC_ADDRESS, %struct.EFI_MAC_ADDRESS, i8, i8, i8, i8, i8 }
%struct.EFI_MAC_ADDRESS = type { [32 x i8] }
%struct._IP6_CONFIG_INSTANCE = type { i32, i8, %struct._LIST_ENTRY, i16, %struct.EFI_IP6_CONFIG_INTERFACE_INFO, %struct.EFI_IP6_CONFIG_INTERFACE_ID, i32, %struct.EFI_IP6_CONFIG_DUP_ADDR_DETECT_TRANSMITS, [7 x %struct.IP6_CONFIG_DATA_ITEM], %struct.NET_MAP, %struct.NET_MAP, %struct._EFI_IP6_CONFIG_PROTOCOL, ptr, ptr, ptr, ptr, i8, i32, ptr, i32, ptr, i32, %struct._IP6_FORM_CALLBACK_INFO, %struct.IP6_CONFIG_NVDATA }
%struct.EFI_IP6_CONFIG_INTERFACE_INFO = type { [32 x i16], i8, i32, %struct.EFI_MAC_ADDRESS, i32, ptr, i32, ptr }
%struct.EFI_IP6_CONFIG_INTERFACE_ID = type { [8 x i8] }
%struct.EFI_IP6_CONFIG_DUP_ADDR_DETECT_TRANSMITS = type { i32 }
%struct.IP6_CONFIG_DATA_ITEM = type { ptr, ptr, i64, i8, %struct.NET_MAP, %union.IP6_CONFIG_DATA, i64 }
%union.IP6_CONFIG_DATA = type { ptr }
%struct._EFI_IP6_CONFIG_PROTOCOL = type { ptr, ptr, ptr, ptr }
%struct._IP6_FORM_CALLBACK_INFO = type { i32, ptr, %struct._EFI_HII_CONFIG_ACCESS_PROTOCOL, ptr, ptr }
%struct._EFI_HII_CONFIG_ACCESS_PROTOCOL = type { ptr, ptr, ptr }
%struct.IP6_CONFIG_NVDATA = type { i32, %struct.EFI_IP6_CONFIG_DUP_ADDR_DETECT_TRANSMITS, %struct.EFI_IP6_CONFIG_INTERFACE_ID, %struct._LIST_ENTRY, i32, %struct._LIST_ENTRY, i32, %struct._LIST_ENTRY, 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 }
%struct._IP6_INTERFACE = type { i32, %struct._LIST_ENTRY, i64, %struct._LIST_ENTRY, i32, i8, ptr, ptr, ptr, %struct._LIST_ENTRY, %struct._LIST_ENTRY, i32, %struct._LIST_ENTRY, %struct._LIST_ENTRY, %struct._LIST_ENTRY, i8 }

@gBS = external global ptr, align 8
@.str = external hidden unnamed_addr constant [129 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [21 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i64 @EfiIp6Configure(ptr noundef %0, ptr noundef %1) #0 {
  %3 = alloca i64, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca i64, align 8
  %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 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
  %12 = load ptr, ptr %4, align 8, !tbaa !5
  %13 = icmp eq ptr %12, null
  br i1 %13, label %14, label %15

14:                                               ; preds = %2
  store i64 -9223372036854775806, ptr %3, align 8
  store i32 1, ptr %11, align 4
  br label %129

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

19:                                               ; preds = %15
  %20 = load ptr, ptr %4, align 8, !tbaa !5
  %21 = ptrtoint ptr %20 to i64
  %22 = sub i64 %21, ptrtoint (ptr getelementptr inbounds (%struct._IP6_PROTOCOL, ptr null, i32 0, i32 1) to i64)
  %23 = inttoptr i64 %22 to ptr
  %24 = getelementptr inbounds %struct._IP6_PROTOCOL, ptr %23, i32 0, i32 0
  %25 = load i32, ptr %24, align 8, !tbaa !9
  %26 = icmp ne i32 %25, 1345736777
  br i1 %26, label %27, label %29

27:                                               ; preds = %19
  call void @DebugAssert(ptr noundef @.str, i64 noundef 635, ptr noundef @.str.1)
  %28 = load ptr, ptr %4, align 8, !tbaa !5
  br label %34

29:                                               ; preds = %19, %15
  %30 = load ptr, ptr %4, align 8, !tbaa !5
  %31 = ptrtoint ptr %30 to i64
  %32 = sub i64 %31, ptrtoint (ptr getelementptr inbounds (%struct._IP6_PROTOCOL, ptr null, i32 0, i32 1) to i64)
  %33 = inttoptr i64 %32 to ptr
  br label %34

34:                                               ; preds = %29, %27
  %35 = phi ptr [ %28, %27 ], [ %33, %29 ]
  store ptr %35, ptr %6, align 8, !tbaa !5
  %36 = load ptr, ptr %6, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct._IP6_PROTOCOL, ptr %36, i32 0, i32 4
  %38 = load ptr, ptr %37, align 8, !tbaa !19
  store ptr %38, ptr %10, align 8, !tbaa !5
  %39 = load ptr, ptr %10, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct._IP6_SERVICE, ptr %39, i32 0, i32 13
  %41 = load i8, ptr %40, align 1, !tbaa !20
  %42 = zext i8 %41 to i32
  %43 = icmp ne i32 %42, 0
  br i1 %43, label %44, label %48

44:                                               ; preds = %34
  %45 = load ptr, ptr %5, align 8, !tbaa !5
  %46 = icmp ne ptr %45, null
  br i1 %46, label %47, label %48

47:                                               ; preds = %44
  store i64 -9223372036854775801, ptr %3, align 8
  store i32 1, ptr %11, align 4
  br label %129

48:                                               ; preds = %44, %34
  %49 = load ptr, ptr @gBS, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %49, i32 0, i32 1
  %51 = load ptr, ptr %50, align 8, !tbaa !36
  %52 = call i64 %51(i64 noundef 8)
  store i64 %52, ptr %8, align 8, !tbaa !39
  store i64 -9223372036854775806, ptr %9, align 8, !tbaa !39
  %53 = load ptr, ptr %5, align 8, !tbaa !5
  %54 = icmp ne ptr %53, null
  br i1 %54, label %55, label %100

55:                                               ; preds = %48
  %56 = load ptr, ptr %10, align 8, !tbaa !5
  %57 = load ptr, ptr %5, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.EFI_IP6_CONFIG_DATA, ptr %57, i32 0, i32 5
  %59 = call zeroext i8 @Ip6IsValidAddress(ptr noundef %56, ptr noundef %58, i8 noundef zeroext 1)
  %60 = icmp ne i8 %59, 0
  br i1 %60, label %62, label %61

61:                                               ; preds = %55
  br label %123

62:                                               ; preds = %55
  %63 = load ptr, ptr %5, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.EFI_IP6_CONFIG_DATA, ptr %63, i32 0, i32 0
  %65 = load i8, ptr %64, align 4, !tbaa !40
  %66 = call zeroext i8 @Ip6IsIllegalProtocol(i8 noundef zeroext %65)
  %67 = icmp ne i8 %66, 0
  br i1 %67, label %68, label %69

68:                                               ; preds = %62
  br label %123

69:                                               ; preds = %62
  %70 = load ptr, ptr %6, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct._IP6_PROTOCOL, ptr %70, i32 0, i32 3
  %72 = load i64, ptr %71, align 8, !tbaa !41
  %73 = icmp eq i64 %72, 1
  br i1 %73, label %74, label %99

74:                                               ; preds = %69
  %75 = load ptr, ptr %6, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct._IP6_PROTOCOL, ptr %75, i32 0, i32 16
  store ptr %76, ptr %7, align 8, !tbaa !5
  %77 = load ptr, ptr %7, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.EFI_IP6_CONFIG_DATA, ptr %77, i32 0, i32 5
  %79 = load ptr, ptr %5, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.EFI_IP6_CONFIG_DATA, ptr %79, i32 0, i32 5
  %81 = call i64 @CompareMem(ptr noundef %78, ptr noundef %80, i64 noundef 16)
  %82 = icmp eq i64 %81, 0
  br i1 %82, label %84, label %83

83:                                               ; preds = %74
  store i64 -9223372036854775788, ptr %9, align 8, !tbaa !39
  br label %123

84:                                               ; preds = %74
  %85 = load ptr, ptr %7, align 8, !tbaa !5
  %86 = getelementptr inbounds %struct.EFI_IP6_CONFIG_DATA, ptr %85, i32 0, i32 5
  %87 = call zeroext i8 @NetIp6IsUnspecifiedAddr(ptr noundef %86)
  %88 = zext i8 %87 to i32
  %89 = icmp ne i32 %88, 0
  br i1 %89, label %90, label %98

90:                                               ; preds = %84
  %91 = load ptr, ptr %6, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct._IP6_PROTOCOL, ptr %91, i32 0, i32 12
  %93 = load ptr, ptr %92, align 8, !tbaa !42
  %94 = getelementptr inbounds %struct._IP6_INTERFACE, ptr %93, i32 0, i32 5
  %95 = load i8, ptr %94, align 4, !tbaa !43
  %96 = icmp ne i8 %95, 0
  br i1 %96, label %98, label %97

97:                                               ; preds = %90
  store i64 -9223372036854775791, ptr %9, align 8, !tbaa !39
  br label %123

98:                                               ; preds = %90, %84
  br label %99

99:                                               ; preds = %98, %69
  br label %100

100:                                              ; preds = %99, %48
  %101 = load ptr, ptr %5, align 8, !tbaa !5
  %102 = icmp ne ptr %101, null
  br i1 %102, label %103, label %107

103:                                              ; preds = %100
  %104 = load ptr, ptr %6, align 8, !tbaa !5
  %105 = load ptr, ptr %5, align 8, !tbaa !5
  %106 = call i64 @Ip6ConfigProtocol(ptr noundef %104, ptr noundef %105)
  store i64 %106, ptr %9, align 8, !tbaa !39
  br label %118

107:                                              ; preds = %100
  %108 = load ptr, ptr %6, align 8, !tbaa !5
  %109 = call i64 @Ip6CleanProtocol(ptr noundef %108)
  store i64 %109, ptr %9, align 8, !tbaa !39
  %110 = load ptr, ptr %6, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct._IP6_PROTOCOL, ptr %110, i32 0, i32 3
  %112 = load i64, ptr %111, align 8, !tbaa !41
  %113 = icmp eq i64 %112, 1
  br i1 %113, label %114, label %117

114:                                              ; preds = %107
  %115 = load ptr, ptr %6, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct._IP6_PROTOCOL, ptr %115, i32 0, i32 3
  store i64 0, ptr %116, align 8, !tbaa !41
  br label %117

117:                                              ; preds = %114, %107
  br label %118

118:                                              ; preds = %117, %103
  %119 = load ptr, ptr %6, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct._IP6_PROTOCOL, ptr %119, i32 0, i32 4
  %121 = load ptr, ptr %120, align 8, !tbaa !19
  %122 = call i64 @Ip6ServiceConfigMnp(ptr noundef %121, i8 noundef zeroext 0)
  br label %123

123:                                              ; preds = %118, %97, %83, %68, %61
  %124 = load ptr, ptr @gBS, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %124, i32 0, i32 2
  %126 = load ptr, ptr %125, align 8, !tbaa !45
  %127 = load i64, ptr %8, align 8, !tbaa !39
  call void %126(i64 noundef %127)
  %128 = load i64, ptr %9, align 8, !tbaa !39
  store i64 %128, ptr %3, align 8
  store i32 1, ptr %11, align 4
  br label %129

129:                                              ; preds = %123, %47, %14
  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
  %130 = load i64, ptr %3, align 8
  ret i64 %130
}

; 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 @NetIp6IsUnspecifiedAddr(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 zeroext i8 @Ip6IsValidAddress(ptr noundef, ptr noundef, i8 noundef zeroext) #0

; Function Attrs: nounwind uwtable
declare dso_local zeroext i8 @Ip6IsIllegalProtocol(i8 noundef zeroext) #0

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

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

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

declare i64 @CompareMem(ptr noundef, ptr noundef, i64 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, !11, i64 0}
!10 = !{!"_IP6_PROTOCOL", !11, i64 0, !12, i64 8, !6, i64 80, !13, i64 88, !6, i64 96, !14, i64 104, !7, i64 120, !15, i64 128, !15, i64 168, !14, i64 208, !14, i64 224, !16, i64 240, !6, i64 264, !14, i64 272, !6, i64 288, !11, i64 296, !17, i64 300, !7, i64 352}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_EFI_IP6_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, !6, i64 64}
!13 = !{!"long long", !7, i64 0}
!14 = !{!"_LIST_ENTRY", !6, i64 0, !6, i64 8}
!15 = !{!"", !14, i64 0, !14, i64 16, !13, i64 32}
!16 = !{!"", !13, i64 0, !13, i64 8, !11, i64 16}
!17 = !{!"", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !18, i64 4, !18, i64 20, !7, i64 36, !7, i64 37, !11, i64 40, !11, i64 44, !11, i64 48}
!18 = !{!"", !7, i64 0}
!19 = !{!10, !6, i64 96}
!20 = !{!21, !7, i64 2209}
!21 = !{!"_IP6_SERVICE", !11, i64 0, !22, i64 8, !13, i64 24, !13, i64 32, !14, i64 40, !14, i64 56, !6, i64 72, !6, i64 80, !23, i64 88, !18, i64 136, !25, i64 2168, !18, i64 2192, !7, i64 2208, !7, i64 2209, !7, i64 2210, !7, i64 2211, !7, i64 2212, !11, i64 2216, !11, i64 2220, !11, i64 2224, !11, i64 2228, !14, i64 2232, !14, i64 2248, !14, i64 2264, !14, i64 2280, !11, i64 2296, !7, i64 2300, !6, i64 2304, !7, i64 2312, !7, i64 2313, !11, i64 2316, !6, i64 2320, !6, i64 2328, !6, i64 2336, !6, i64 2344, !26, i64 2352, !28, i64 2372, !6, i64 3032, !6, i64 3040, !29, i64 3048, !6, i64 4176, !11, i64 4184, !11, i64 4188}
!22 = !{!"_EFI_SERVICE_BINDING_PROTOCOL", !6, i64 0, !6, i64 8}
!23 = !{!"", !11, i64 0, !6, i64 8, !6, i64 16, !24, i64 24}
!24 = !{!"", !6, i64 0, !13, i64 8, !7, i64 16}
!25 = !{!"", !13, i64 0, !14, i64 8}
!26 = !{!"", !11, i64 0, !11, i64 4, !27, i64 8, !7, i64 10, !7, i64 11, !7, i64 12, !7, i64 13, !7, i64 14, !7, i64 15, !7, i64 16}
!27 = !{!"short", !7, i64 0}
!28 = !{!"", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !7, i64 40, !18, i64 552, !18, i64 584, !18, i64 616, !7, i64 648, !7, i64 649, !7, i64 650, !7, i64 651, !7, i64 652}
!29 = !{!"_IP6_CONFIG_INSTANCE", !11, i64 0, !7, i64 4, !14, i64 8, !27, i64 24, !30, i64 32, !18, i64 168, !11, i64 176, !31, i64 180, !7, i64 184, !15, i64 800, !15, i64 840, !32, i64 880, !6, i64 912, !6, i64 920, !6, i64 928, !6, i64 936, !7, i64 944, !11, i64 948, !6, i64 952, !11, i64 960, !6, i64 968, !11, i64 976, !33, i64 984, !35, i64 1040}
!30 = !{!"", !7, i64 0, !7, i64 64, !11, i64 68, !18, i64 72, !11, i64 104, !6, i64 112, !11, i64 120, !6, i64 128}
!31 = !{!"", !11, i64 0}
!32 = !{!"_EFI_IP6_CONFIG_PROTOCOL", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!33 = !{!"_IP6_FORM_CALLBACK_INFO", !11, i64 0, !6, i64 8, !34, i64 16, !6, i64 40, !6, i64 48}
!34 = !{!"_EFI_HII_CONFIG_ACCESS_PROTOCOL", !6, i64 0, !6, i64 8, !6, i64 16}
!35 = !{!"", !11, i64 0, !31, i64 4, !18, i64 8, !14, i64 16, !11, i64 32, !14, i64 40, !11, i64 56, !14, i64 64, !11, i64 80}
!36 = !{!37, !6, i64 24}
!37 = !{!"", !38, 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}
!38 = !{!"", !13, i64 0, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20}
!39 = !{!13, !13, i64 0}
!40 = !{!17, !7, i64 0}
!41 = !{!10, !13, i64 88}
!42 = !{!10, !6, i64 264}
!43 = !{!44, !7, i64 52}
!44 = !{!"_IP6_INTERFACE", !11, i64 0, !14, i64 8, !13, i64 24, !14, i64 32, !11, i64 48, !7, i64 52, !6, i64 56, !6, i64 64, !6, i64 72, !14, i64 80, !14, i64 96, !11, i64 112, !14, i64 120, !14, i64 136, !14, i64 152, !7, i64 168}
!45 = !{!37, !6, i64 32}


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

@gBS = external local_unnamed_addr global ptr, align 8
@.str = external hidden unnamed_addr constant [129 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [21 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i64 @EfiIp6Configure(ptr noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = icmp eq ptr %0, null
  br i1 %3, label %56, label %4

4:                                                ; preds = %2
  %5 = tail call zeroext i8 @DebugAssertEnabled() #2
  %.not = icmp eq i8 %5, 0
  %.pre = ptrtoint ptr %0 to i64
  %.pre36 = add i64 %.pre, -8
  %.pre38 = inttoptr i64 %.pre36 to ptr
  br i1 %.not, label %._crit_edge, label %6

6:                                                ; preds = %4
  %7 = load i32, ptr %.pre38, align 8, !tbaa !5
  %.not31 = icmp eq i32 %7, 1345736777
  br i1 %.not31, label %._crit_edge, label %8

8:                                                ; preds = %6
  tail call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 635, ptr noundef nonnull @.str.1) #2
  br label %._crit_edge

._crit_edge:                                      ; preds = %4, %6, %8
  %9 = phi ptr [ %0, %8 ], [ %.pre38, %6 ], [ %.pre38, %4 ]
  %10 = getelementptr inbounds i8, ptr %9, i64 96
  %11 = load ptr, ptr %10, align 8, !tbaa !18
  %12 = getelementptr inbounds i8, ptr %11, i64 2209
  %13 = load i8, ptr %12, align 1, !tbaa !19
  %14 = icmp ne i8 %13, 0
  %15 = icmp ne ptr %1, null
  %or.cond = and i1 %15, %14
  br i1 %or.cond, label %56, label %16

16:                                               ; preds = %._crit_edge
  %17 = load ptr, ptr @gBS, align 8, !tbaa !35
  %18 = getelementptr inbounds i8, ptr %17, i64 24
  %19 = load ptr, ptr %18, align 8, !tbaa !36
  %20 = tail call i64 %19(i64 noundef 8) #2
  br i1 %15, label %21, label %.critedge

21:                                               ; preds = %16
  %22 = getelementptr inbounds i8, ptr %1, i64 20
  %23 = tail call zeroext i8 @Ip6IsValidAddress(ptr noundef nonnull %11, ptr noundef nonnull %22, i8 noundef zeroext 1)
  %.not32 = icmp eq i8 %23, 0
  br i1 %.not32, label %52, label %24

24:                                               ; preds = %21
  %25 = load i8, ptr %1, align 4, !tbaa !39
  %26 = tail call zeroext i8 @Ip6IsIllegalProtocol(i8 noundef zeroext %25)
  %.not33 = icmp eq i8 %26, 0
  br i1 %.not33, label %27, label %52

27:                                               ; preds = %24
  %28 = getelementptr inbounds i8, ptr %9, i64 88
  %29 = load i64, ptr %28, align 8, !tbaa !40
  %30 = icmp eq i64 %29, 1
  br i1 %30, label %31, label %42

31:                                               ; preds = %27
  %32 = getelementptr inbounds i8, ptr %9, i64 320
  %33 = tail call i64 @CompareMem(ptr noundef nonnull %32, ptr noundef nonnull %22, i64 noundef 16) #2
  %34 = icmp eq i64 %33, 0
  br i1 %34, label %35, label %52

35:                                               ; preds = %31
  %36 = tail call zeroext i8 @NetIp6IsUnspecifiedAddr(ptr noundef nonnull %32) #2
  %.not34 = icmp eq i8 %36, 0
  br i1 %.not34, label %42, label %37

37:                                               ; preds = %35
  %38 = getelementptr inbounds i8, ptr %9, i64 264
  %39 = load ptr, ptr %38, align 8, !tbaa !41
  %40 = getelementptr inbounds i8, ptr %39, i64 52
  %41 = load i8, ptr %40, align 4, !tbaa !42
  %.not35 = icmp eq i8 %41, 0
  br i1 %.not35, label %52, label %42

42:                                               ; preds = %35, %37, %27
  %43 = tail call i64 @Ip6ConfigProtocol(ptr noundef nonnull %9, ptr noundef nonnull %1)
  br label %49

.critedge:                                        ; preds = %16
  %44 = tail call i64 @Ip6CleanProtocol(ptr noundef nonnull %9)
  %45 = getelementptr inbounds i8, ptr %9, i64 88
  %46 = load i64, ptr %45, align 8, !tbaa !40
  %47 = icmp eq i64 %46, 1
  br i1 %47, label %48, label %49

48:                                               ; preds = %.critedge
  store i64 0, ptr %45, align 8, !tbaa !40
  br label %49

49:                                               ; preds = %.critedge, %48, %42
  %.027 = phi i64 [ %43, %42 ], [ %44, %48 ], [ %44, %.critedge ]
  %50 = load ptr, ptr %10, align 8, !tbaa !18
  %51 = tail call i64 @Ip6ServiceConfigMnp(ptr noundef %50, i8 noundef zeroext 0)
  br label %52

52:                                               ; preds = %37, %31, %24, %21, %49
  %.1 = phi i64 [ -9223372036854775806, %24 ], [ %.027, %49 ], [ -9223372036854775806, %21 ], [ -9223372036854775788, %31 ], [ -9223372036854775791, %37 ]
  %53 = load ptr, ptr @gBS, align 8, !tbaa !35
  %54 = getelementptr inbounds i8, ptr %53, i64 32
  %55 = load ptr, ptr %54, align 8, !tbaa !44
  tail call void %55(i64 noundef %20) #2
  br label %56

56:                                               ; preds = %._crit_edge, %2, %52
  %.0 = phi i64 [ %.1, %52 ], [ -9223372036854775806, %2 ], [ -9223372036854775801, %._crit_edge ]
  ret i64 %.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 @NetIp6IsUnspecifiedAddr(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local zeroext i8 @Ip6IsValidAddress(ptr noundef, ptr noundef, i8 noundef zeroext) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local zeroext i8 @Ip6IsIllegalProtocol(i8 noundef zeroext) local_unnamed_addr #0

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

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

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

declare i64 @CompareMem(ptr noundef, ptr noundef, i64 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, !7, i64 0}
!6 = !{!"_IP6_PROTOCOL", !7, i64 0, !10, i64 8, !11, i64 80, !12, i64 88, !11, i64 96, !13, i64 104, !8, i64 120, !14, i64 128, !14, i64 168, !13, i64 208, !13, i64 224, !15, i64 240, !11, i64 264, !13, i64 272, !11, i64 288, !7, i64 296, !16, i64 300, !8, i64 352}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"_EFI_IP6_PROTOCOL", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !11, i64 56, !11, i64 64}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!"long long", !8, i64 0}
!13 = !{!"_LIST_ENTRY", !11, i64 0, !11, i64 8}
!14 = !{!"", !13, i64 0, !13, i64 16, !12, i64 32}
!15 = !{!"", !12, i64 0, !12, i64 8, !7, i64 16}
!16 = !{!"", !8, i64 0, !8, i64 1, !8, i64 2, !8, i64 3, !17, i64 4, !17, i64 20, !8, i64 36, !8, i64 37, !7, i64 40, !7, i64 44, !7, i64 48}
!17 = !{!"", !8, i64 0}
!18 = !{!6, !11, i64 96}
!19 = !{!20, !8, i64 2209}
!20 = !{!"_IP6_SERVICE", !7, i64 0, !21, i64 8, !12, i64 24, !12, i64 32, !13, i64 40, !13, i64 56, !11, i64 72, !11, i64 80, !22, i64 88, !17, i64 136, !24, i64 2168, !17, i64 2192, !8, i64 2208, !8, i64 2209, !8, i64 2210, !8, i64 2211, !8, i64 2212, !7, i64 2216, !7, i64 2220, !7, i64 2224, !7, i64 2228, !13, i64 2232, !13, i64 2248, !13, i64 2264, !13, i64 2280, !7, i64 2296, !8, i64 2300, !11, i64 2304, !8, i64 2312, !8, i64 2313, !7, i64 2316, !11, i64 2320, !11, i64 2328, !11, i64 2336, !11, i64 2344, !25, i64 2352, !27, i64 2372, !11, i64 3032, !11, i64 3040, !28, i64 3048, !11, i64 4176, !7, i64 4184, !7, i64 4188}
!21 = !{!"_EFI_SERVICE_BINDING_PROTOCOL", !11, i64 0, !11, i64 8}
!22 = !{!"", !7, i64 0, !11, i64 8, !11, i64 16, !23, i64 24}
!23 = !{!"", !11, i64 0, !12, i64 8, !8, i64 16}
!24 = !{!"", !12, i64 0, !13, i64 8}
!25 = !{!"", !7, i64 0, !7, i64 4, !26, i64 8, !8, i64 10, !8, i64 11, !8, i64 12, !8, i64 13, !8, i64 14, !8, i64 15, !8, i64 16}
!26 = !{!"short", !8, i64 0}
!27 = !{!"", !7, i64 0, !7, i64 4, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20, !7, i64 24, !7, i64 28, !7, i64 32, !7, i64 36, !8, i64 40, !17, i64 552, !17, i64 584, !17, i64 616, !8, i64 648, !8, i64 649, !8, i64 650, !8, i64 651, !8, i64 652}
!28 = !{!"_IP6_CONFIG_INSTANCE", !7, i64 0, !8, i64 4, !13, i64 8, !26, i64 24, !29, i64 32, !17, i64 168, !7, i64 176, !30, i64 180, !8, i64 184, !14, i64 800, !14, i64 840, !31, i64 880, !11, i64 912, !11, i64 920, !11, i64 928, !11, i64 936, !8, i64 944, !7, i64 948, !11, i64 952, !7, i64 960, !11, i64 968, !7, i64 976, !32, i64 984, !34, i64 1040}
!29 = !{!"", !8, i64 0, !8, i64 64, !7, i64 68, !17, i64 72, !7, i64 104, !11, i64 112, !7, i64 120, !11, i64 128}
!30 = !{!"", !7, i64 0}
!31 = !{!"_EFI_IP6_CONFIG_PROTOCOL", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24}
!32 = !{!"_IP6_FORM_CALLBACK_INFO", !7, i64 0, !11, i64 8, !33, i64 16, !11, i64 40, !11, i64 48}
!33 = !{!"_EFI_HII_CONFIG_ACCESS_PROTOCOL", !11, i64 0, !11, i64 8, !11, i64 16}
!34 = !{!"", !7, i64 0, !30, i64 4, !17, i64 8, !13, i64 16, !7, i64 32, !13, i64 40, !7, i64 56, !13, i64 64, !7, i64 80}
!35 = !{!11, !11, i64 0}
!36 = !{!37, !11, i64 24}
!37 = !{!"", !38, 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}
!38 = !{!"", !12, i64 0, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20}
!39 = !{!16, !8, i64 0}
!40 = !{!6, !12, i64 88}
!41 = !{!6, !11, i64 264}
!42 = !{!43, !8, i64 52}
!43 = !{!"_IP6_INTERFACE", !7, i64 0, !13, i64 8, !12, i64 24, !13, i64 32, !7, i64 48, !8, i64 52, !11, i64 56, !11, i64 64, !11, i64 72, !13, i64 80, !13, i64 96, !7, i64 112, !13, i64 120, !13, i64 136, !13, i64 152, !8, i64 168}
!44 = !{!37, !11, i64 32}


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