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

; 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_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_IPv6_ADDRESS = type { [16 x i8] }
%struct._LIST_ENTRY = type { ptr, ptr }
%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.NET_MAP = type { %struct._LIST_ENTRY, %struct._LIST_ENTRY, i64 }
%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._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 }
%struct._IP6_ADDRESS_INFO = type { i32, %struct._LIST_ENTRY, %struct.EFI_IPv6_ADDRESS, i8, i8, i32, i32 }

@.str = external hidden unnamed_addr constant [131 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [21 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 i64 @CompareMem(ptr noundef, ptr noundef, i64 noundef) #1

; Function Attrs: nounwind uwtable
define dso_local zeroext i8 @Ip6IsOneOfSetAddress(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) #2 {
  %5 = alloca i8, align 1
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca ptr, align 8
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  %15 = load ptr, ptr %6, align 8, !tbaa !5
  %16 = getelementptr inbounds %struct._IP6_SERVICE, ptr %15, i32 0, i32 12
  %17 = load i8, ptr %16, align 8, !tbaa !9
  %18 = zext i8 %17 to i32
  %19 = icmp ne i32 %18, 0
  br i1 %19, label %20, label %40

20:                                               ; preds = %4
  %21 = load ptr, ptr %6, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct._IP6_SERVICE, ptr %21, i32 0, i32 11
  %23 = load ptr, ptr %7, align 8, !tbaa !5
  %24 = call i64 @CompareMem(ptr noundef %22, ptr noundef %23, i64 noundef 16)
  %25 = icmp eq i64 %24, 0
  br i1 %25, label %26, label %40

26:                                               ; preds = %20
  %27 = load ptr, ptr %8, align 8, !tbaa !5
  %28 = icmp ne ptr %27, null
  br i1 %28, label %29, label %34

29:                                               ; preds = %26
  %30 = load ptr, ptr %6, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct._IP6_SERVICE, ptr %30, i32 0, i32 6
  %32 = load ptr, ptr %31, align 8, !tbaa !30
  %33 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %32, ptr %33, align 8, !tbaa !5
  br label %34

34:                                               ; preds = %29, %26
  %35 = load ptr, ptr %9, align 8, !tbaa !5
  %36 = icmp ne ptr %35, null
  br i1 %36, label %37, label %39

37:                                               ; preds = %34
  %38 = load ptr, ptr %9, align 8, !tbaa !5
  store ptr null, ptr %38, align 8, !tbaa !5
  br label %39

39:                                               ; preds = %37, %34
  store i8 1, ptr %5, align 1
  store i32 1, ptr %14, align 4
  br label %130

40:                                               ; preds = %20, %4
  %41 = load ptr, ptr %6, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct._IP6_SERVICE, ptr %41, i32 0, i32 5
  %43 = getelementptr inbounds %struct._LIST_ENTRY, ptr %42, i32 0, i32 0
  %44 = load ptr, ptr %43, align 8, !tbaa !31
  store ptr %44, ptr %10, align 8, !tbaa !5
  br label %45

45:                                               ; preds = %125, %40
  %46 = load ptr, ptr %10, align 8, !tbaa !5
  %47 = load ptr, ptr %6, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct._IP6_SERVICE, ptr %47, i32 0, i32 5
  %49 = icmp ne ptr %46, %48
  br i1 %49, label %50, label %129

50:                                               ; preds = %45
  %51 = call zeroext i8 @DebugAssertEnabled()
  %52 = zext i8 %51 to i32
  %53 = icmp ne i32 %52, 0
  br i1 %53, label %54, label %64

54:                                               ; preds = %50
  %55 = load ptr, ptr %10, align 8, !tbaa !5
  %56 = ptrtoint ptr %55 to i64
  %57 = sub i64 %56, ptrtoint (ptr getelementptr inbounds (%struct._IP6_INTERFACE, ptr null, i32 0, i32 1) to i64)
  %58 = inttoptr i64 %57 to ptr
  %59 = getelementptr inbounds %struct._IP6_INTERFACE, ptr %58, i32 0, i32 0
  %60 = load i32, ptr %59, align 8, !tbaa !32
  %61 = icmp ne i32 %60, 1228296265
  br i1 %61, label %62, label %64

62:                                               ; preds = %54
  call void @DebugAssert(ptr noundef @.str, i64 noundef 537, ptr noundef @.str.1)
  %63 = load ptr, ptr %10, align 8, !tbaa !5
  br label %69

64:                                               ; preds = %54, %50
  %65 = load ptr, ptr %10, align 8, !tbaa !5
  %66 = ptrtoint ptr %65 to i64
  %67 = sub i64 %66, ptrtoint (ptr getelementptr inbounds (%struct._IP6_INTERFACE, ptr null, i32 0, i32 1) to i64)
  %68 = inttoptr i64 %67 to ptr
  br label %69

69:                                               ; preds = %64, %62
  %70 = phi ptr [ %63, %62 ], [ %68, %64 ]
  store ptr %70, ptr %12, align 8, !tbaa !5
  %71 = load ptr, ptr %12, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct._IP6_INTERFACE, ptr %71, i32 0, i32 3
  %73 = getelementptr inbounds %struct._LIST_ENTRY, ptr %72, i32 0, i32 0
  %74 = load ptr, ptr %73, align 8, !tbaa !34
  store ptr %74, ptr %11, align 8, !tbaa !5
  br label %75

75:                                               ; preds = %120, %69
  %76 = load ptr, ptr %11, align 8, !tbaa !5
  %77 = load ptr, ptr %12, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct._IP6_INTERFACE, ptr %77, i32 0, i32 3
  %79 = icmp ne ptr %76, %78
  br i1 %79, label %80, label %124

80:                                               ; preds = %75
  %81 = call zeroext i8 @DebugAssertEnabled()
  %82 = zext i8 %81 to i32
  %83 = icmp ne i32 %82, 0
  br i1 %83, label %84, label %94

84:                                               ; preds = %80
  %85 = load ptr, ptr %11, align 8, !tbaa !5
  %86 = ptrtoint ptr %85 to i64
  %87 = sub i64 %86, ptrtoint (ptr getelementptr inbounds (%struct._IP6_ADDRESS_INFO, ptr null, i32 0, i32 1) to i64)
  %88 = inttoptr i64 %87 to ptr
  %89 = getelementptr inbounds %struct._IP6_ADDRESS_INFO, ptr %88, i32 0, i32 0
  %90 = load i32, ptr %89, align 8, !tbaa !35
  %91 = icmp ne i32 %90, 1229017161
  br i1 %91, label %92, label %94

92:                                               ; preds = %84
  call void @DebugAssert(ptr noundef @.str, i64 noundef 540, ptr noundef @.str.1)
  %93 = load ptr, ptr %11, align 8, !tbaa !5
  br label %99

94:                                               ; preds = %84, %80
  %95 = load ptr, ptr %11, align 8, !tbaa !5
  %96 = ptrtoint ptr %95 to i64
  %97 = sub i64 %96, ptrtoint (ptr getelementptr inbounds (%struct._IP6_ADDRESS_INFO, ptr null, i32 0, i32 1) to i64)
  %98 = inttoptr i64 %97 to ptr
  br label %99

99:                                               ; preds = %94, %92
  %100 = phi ptr [ %93, %92 ], [ %98, %94 ]
  store ptr %100, ptr %13, align 8, !tbaa !5
  %101 = load ptr, ptr %13, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct._IP6_ADDRESS_INFO, ptr %101, i32 0, i32 2
  %103 = load ptr, ptr %7, align 8, !tbaa !5
  %104 = call i64 @CompareMem(ptr noundef %102, ptr noundef %103, i64 noundef 16)
  %105 = icmp eq i64 %104, 0
  br i1 %105, label %106, label %119

106:                                              ; preds = %99
  %107 = load ptr, ptr %8, align 8, !tbaa !5
  %108 = icmp ne ptr %107, null
  br i1 %108, label %109, label %112

109:                                              ; preds = %106
  %110 = load ptr, ptr %12, align 8, !tbaa !5
  %111 = load ptr, ptr %8, align 8, !tbaa !5
  store ptr %110, ptr %111, align 8, !tbaa !5
  br label %112

112:                                              ; preds = %109, %106
  %113 = load ptr, ptr %9, align 8, !tbaa !5
  %114 = icmp ne ptr %113, null
  br i1 %114, label %115, label %118

115:                                              ; preds = %112
  %116 = load ptr, ptr %13, align 8, !tbaa !5
  %117 = load ptr, ptr %9, align 8, !tbaa !5
  store ptr %116, ptr %117, align 8, !tbaa !5
  br label %118

118:                                              ; preds = %115, %112
  store i8 1, ptr %5, align 1
  store i32 1, ptr %14, align 4
  br label %130

119:                                              ; preds = %99
  br label %120

120:                                              ; preds = %119
  %121 = load ptr, ptr %11, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct._LIST_ENTRY, ptr %121, i32 0, i32 0
  %123 = load ptr, ptr %122, align 8, !tbaa !37
  store ptr %123, ptr %11, align 8, !tbaa !5
  br label %75, !llvm.loop !38

124:                                              ; preds = %75
  br label %125

125:                                              ; preds = %124
  %126 = load ptr, ptr %10, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct._LIST_ENTRY, ptr %126, i32 0, i32 0
  %128 = load ptr, ptr %127, align 8, !tbaa !37
  store ptr %128, ptr %10, align 8, !tbaa !5
  br label %45, !llvm.loop !40

129:                                              ; preds = %45
  store i8 0, ptr %5, align 1
  store i32 1, ptr %14, align 4
  br label %130

130:                                              ; preds = %129, %118, %39
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  %131 = load i8, ptr %5, align 1
  ret i8 %131
}

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, !7, i64 2208}
!10 = !{!"_IP6_SERVICE", !11, i64 0, !12, i64 8, !13, i64 24, !13, i64 32, !14, i64 40, !14, i64 56, !6, i64 72, !6, i64 80, !15, i64 88, !17, i64 136, !18, i64 2168, !17, 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, !19, i64 2352, !21, i64 2372, !6, i64 3032, !6, i64 3040, !22, i64 3048, !6, i64 4176, !11, i64 4184, !11, i64 4188}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_EFI_SERVICE_BINDING_PROTOCOL", !6, i64 0, !6, i64 8}
!13 = !{!"long long", !7, i64 0}
!14 = !{!"_LIST_ENTRY", !6, i64 0, !6, i64 8}
!15 = !{!"", !11, i64 0, !6, i64 8, !6, i64 16, !16, i64 24}
!16 = !{!"", !6, i64 0, !13, i64 8, !7, i64 16}
!17 = !{!"", !7, i64 0}
!18 = !{!"", !13, i64 0, !14, i64 8}
!19 = !{!"", !11, i64 0, !11, i64 4, !20, i64 8, !7, i64 10, !7, i64 11, !7, i64 12, !7, i64 13, !7, i64 14, !7, i64 15, !7, i64 16}
!20 = !{!"short", !7, i64 0}
!21 = !{!"", !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, !17, i64 552, !17, i64 584, !17, i64 616, !7, i64 648, !7, i64 649, !7, i64 650, !7, i64 651, !7, i64 652}
!22 = !{!"_IP6_CONFIG_INSTANCE", !11, i64 0, !7, i64 4, !14, i64 8, !20, i64 24, !23, i64 32, !17, i64 168, !11, i64 176, !24, i64 180, !7, i64 184, !25, i64 800, !25, i64 840, !26, 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, !27, i64 984, !29, i64 1040}
!23 = !{!"", !7, i64 0, !7, i64 64, !11, i64 68, !17, i64 72, !11, i64 104, !6, i64 112, !11, i64 120, !6, i64 128}
!24 = !{!"", !11, i64 0}
!25 = !{!"", !14, i64 0, !14, i64 16, !13, i64 32}
!26 = !{!"_EFI_IP6_CONFIG_PROTOCOL", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!27 = !{!"_IP6_FORM_CALLBACK_INFO", !11, i64 0, !6, i64 8, !28, i64 16, !6, i64 40, !6, i64 48}
!28 = !{!"_EFI_HII_CONFIG_ACCESS_PROTOCOL", !6, i64 0, !6, i64 8, !6, i64 16}
!29 = !{!"", !11, i64 0, !24, i64 4, !17, i64 8, !14, i64 16, !11, i64 32, !14, i64 40, !11, i64 56, !14, i64 64, !11, i64 80}
!30 = !{!10, !6, i64 72}
!31 = !{!10, !6, i64 56}
!32 = !{!33, !11, i64 0}
!33 = !{!"_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}
!34 = !{!33, !6, i64 32}
!35 = !{!36, !11, i64 0}
!36 = !{!"_IP6_ADDRESS_INFO", !11, i64 0, !14, i64 8, !17, i64 24, !7, i64 40, !7, i64 41, !11, i64 44, !11, i64 48}
!37 = !{!14, !6, i64 0}
!38 = distinct !{!38, !39}
!39 = !{!"llvm.loop.mustprogress"}
!40 = distinct !{!40, !39}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

@.str = external hidden unnamed_addr constant [131 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [21 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 i64 @CompareMem(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local zeroext range(i8 0, 2) i8 @Ip6IsOneOfSetAddress(ptr noundef %0, ptr noundef %1, ptr noundef writeonly %2, ptr noundef writeonly %3) local_unnamed_addr #1 {
  %5 = getelementptr inbounds i8, ptr %0, i64 2208
  %6 = load i8, ptr %5, align 8, !tbaa !5
  %.not = icmp eq i8 %6, 0
  br i1 %.not, label %16, label %7

7:                                                ; preds = %4
  %8 = getelementptr inbounds i8, ptr %0, i64 2192
  %9 = tail call i64 @CompareMem(ptr noundef nonnull %8, ptr noundef %1, i64 noundef 16) #2
  %10 = icmp eq i64 %9, 0
  br i1 %10, label %11, label %16

11:                                               ; preds = %7
  %.not43 = icmp eq ptr %2, null
  br i1 %.not43, label %15, label %12

12:                                               ; preds = %11
  %13 = getelementptr inbounds i8, ptr %0, i64 72
  %14 = load ptr, ptr %13, align 8, !tbaa !29
  store ptr %14, ptr %2, align 8, !tbaa !30
  br label %15

15:                                               ; preds = %12, %11
  %.not44 = icmp eq ptr %3, null
  br i1 %.not44, label %.loopexit45, label %.loopexit45.sink.split

16:                                               ; preds = %7, %4
  %17 = getelementptr inbounds i8, ptr %0, i64 56
  %.03047 = load ptr, ptr %17, align 8, !tbaa !31
  %.not3548 = icmp eq ptr %.03047, %17
  br i1 %.not3548, label %.loopexit45, label %.lr.ph

.loopexit:                                        ; preds = %24
  %.030 = load ptr, ptr %.03049, align 8, !tbaa !31
  %.not35 = icmp eq ptr %.030, %17
  br i1 %.not35, label %.loopexit45, label %.lr.ph, !llvm.loop !32

.lr.ph:                                           ; preds = %16, %.loopexit
  %.03049 = phi ptr [ %.030, %.loopexit ], [ %.03047, %16 ]
  %18 = tail call zeroext i8 @DebugAssertEnabled() #2
  %.not36 = icmp eq i8 %18, 0
  %.pre = ptrtoint ptr %.03049 to i64
  %.pre52 = add i64 %.pre, -8
  %.pre54 = inttoptr i64 %.pre52 to ptr
  br i1 %.not36, label %.lr.ph._crit_edge, label %19

19:                                               ; preds = %.lr.ph
  %20 = load i32, ptr %.pre54, align 8, !tbaa !34
  %.not37 = icmp eq i32 %20, 1228296265
  br i1 %.not37, label %.lr.ph._crit_edge, label %21

21:                                               ; preds = %19
  tail call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 537, ptr noundef nonnull @.str.1) #2
  br label %.lr.ph._crit_edge

.lr.ph._crit_edge:                                ; preds = %.lr.ph, %19, %21
  %22 = phi ptr [ %.03049, %21 ], [ %.pre54, %19 ], [ %.pre54, %.lr.ph ]
  %23 = getelementptr inbounds i8, ptr %22, i64 32
  br label %24

24:                                               ; preds = %._crit_edge, %.lr.ph._crit_edge
  %.031.in = phi ptr [ %23, %.lr.ph._crit_edge ], [ %.031, %._crit_edge ]
  %.031 = load ptr, ptr %.031.in, align 8, !tbaa !31
  %.not38 = icmp eq ptr %.031, %23
  br i1 %.not38, label %.loopexit, label %25

25:                                               ; preds = %24
  %26 = tail call zeroext i8 @DebugAssertEnabled() #2
  %.not39 = icmp eq i8 %26, 0
  %.pre56 = ptrtoint ptr %.031 to i64
  %.pre58 = add i64 %.pre56, -8
  %.pre60 = inttoptr i64 %.pre58 to ptr
  br i1 %.not39, label %._crit_edge, label %27

27:                                               ; preds = %25
  %28 = load i32, ptr %.pre60, align 8, !tbaa !36
  %.not40 = icmp eq i32 %28, 1229017161
  br i1 %.not40, label %._crit_edge, label %29

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

._crit_edge:                                      ; preds = %25, %27, %29
  %30 = phi ptr [ %.031, %29 ], [ %.pre60, %27 ], [ %.pre60, %25 ]
  %31 = getelementptr inbounds i8, ptr %30, i64 24
  %32 = tail call i64 @CompareMem(ptr noundef nonnull %31, ptr noundef %1, i64 noundef 16) #2
  %33 = icmp eq i64 %32, 0
  br i1 %33, label %34, label %24, !llvm.loop !38

34:                                               ; preds = %._crit_edge
  %.not41 = icmp eq ptr %2, null
  br i1 %.not41, label %36, label %35

35:                                               ; preds = %34
  store ptr %22, ptr %2, align 8, !tbaa !30
  br label %36

36:                                               ; preds = %35, %34
  %.not42 = icmp eq ptr %3, null
  br i1 %.not42, label %.loopexit45, label %.loopexit45.sink.split

.loopexit45.sink.split:                           ; preds = %36, %15
  %.lcssa.sink = phi ptr [ null, %15 ], [ %30, %36 ]
  store ptr %.lcssa.sink, ptr %3, align 8, !tbaa !30
  br label %.loopexit45

.loopexit45:                                      ; preds = %.loopexit, %.loopexit45.sink.split, %16, %36, %15
  %.0 = phi i8 [ 1, %15 ], [ 1, %36 ], [ 0, %16 ], [ 1, %.loopexit45.sink.split ], [ 0, %.loopexit ]
  ret i8 %.0
}

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, !8, i64 2208}
!6 = !{!"_IP6_SERVICE", !7, i64 0, !10, i64 8, !12, i64 24, !12, i64 32, !13, i64 40, !13, i64 56, !11, i64 72, !11, i64 80, !14, i64 88, !16, i64 136, !17, i64 2168, !16, 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, !18, i64 2352, !20, i64 2372, !11, i64 3032, !11, i64 3040, !21, i64 3048, !11, i64 4176, !7, i64 4184, !7, i64 4188}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"_EFI_SERVICE_BINDING_PROTOCOL", !11, i64 0, !11, i64 8}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!"long long", !8, i64 0}
!13 = !{!"_LIST_ENTRY", !11, i64 0, !11, i64 8}
!14 = !{!"", !7, i64 0, !11, i64 8, !11, i64 16, !15, i64 24}
!15 = !{!"", !11, i64 0, !12, i64 8, !8, i64 16}
!16 = !{!"", !8, i64 0}
!17 = !{!"", !12, i64 0, !13, i64 8}
!18 = !{!"", !7, i64 0, !7, i64 4, !19, i64 8, !8, i64 10, !8, i64 11, !8, i64 12, !8, i64 13, !8, i64 14, !8, i64 15, !8, i64 16}
!19 = !{!"short", !8, i64 0}
!20 = !{!"", !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, !16, i64 552, !16, i64 584, !16, i64 616, !8, i64 648, !8, i64 649, !8, i64 650, !8, i64 651, !8, i64 652}
!21 = !{!"_IP6_CONFIG_INSTANCE", !7, i64 0, !8, i64 4, !13, i64 8, !19, i64 24, !22, i64 32, !16, i64 168, !7, i64 176, !23, i64 180, !8, i64 184, !24, i64 800, !24, i64 840, !25, 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, !26, i64 984, !28, i64 1040}
!22 = !{!"", !8, i64 0, !8, i64 64, !7, i64 68, !16, i64 72, !7, i64 104, !11, i64 112, !7, i64 120, !11, i64 128}
!23 = !{!"", !7, i64 0}
!24 = !{!"", !13, i64 0, !13, i64 16, !12, i64 32}
!25 = !{!"_EFI_IP6_CONFIG_PROTOCOL", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24}
!26 = !{!"_IP6_FORM_CALLBACK_INFO", !7, i64 0, !11, i64 8, !27, i64 16, !11, i64 40, !11, i64 48}
!27 = !{!"_EFI_HII_CONFIG_ACCESS_PROTOCOL", !11, i64 0, !11, i64 8, !11, i64 16}
!28 = !{!"", !7, i64 0, !23, i64 4, !16, i64 8, !13, i64 16, !7, i64 32, !13, i64 40, !7, i64 56, !13, i64 64, !7, i64 80}
!29 = !{!6, !11, i64 72}
!30 = !{!11, !11, i64 0}
!31 = !{!13, !11, i64 0}
!32 = distinct !{!32, !33}
!33 = !{!"llvm.loop.mustprogress"}
!34 = !{!35, !7, i64 0}
!35 = !{!"_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}
!36 = !{!37, !7, i64 0}
!37 = !{!"_IP6_ADDRESS_INFO", !7, i64 0, !13, i64 8, !16, i64 24, !8, i64 40, !8, i64 41, !7, i64 44, !7, i64 48}
!38 = distinct !{!38, !33}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass