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

; 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_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_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._LIST_ENTRY = type { ptr, ptr }
%struct.EFI_IP6_CONFIG_INTERFACE_INFO = type { [32 x i16], i8, i32, %struct.EFI_MAC_ADDRESS, i32, ptr, i32, ptr }
%struct.EFI_MAC_ADDRESS = type { [32 x i8] }
%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 }

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

; 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
define dso_local i64 @EfiIp6ConfigGetData(ptr noundef %0, i32 noundef %1, ptr noundef %2, ptr noundef %3) #2 {
  %5 = alloca i64, align 8
  %6 = alloca ptr, align 8
  %7 = alloca i32, align 4
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca i64, align 8
  %11 = alloca i64, 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 i32 %1, ptr %7, align 4, !tbaa !9
  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 = icmp eq ptr %15, null
  br i1 %16, label %27, label %17

17:                                               ; preds = %4
  %18 = load ptr, ptr %8, align 8, !tbaa !5
  %19 = icmp eq ptr %18, null
  br i1 %19, label %27, label %20

20:                                               ; preds = %17
  %21 = load ptr, ptr %8, align 8, !tbaa !5
  %22 = load i64, ptr %21, align 8, !tbaa !11
  %23 = icmp ne i64 %22, 0
  br i1 %23, label %24, label %28

24:                                               ; preds = %20
  %25 = load ptr, ptr %9, align 8, !tbaa !5
  %26 = icmp eq ptr %25, null
  br i1 %26, label %27, label %28

27:                                               ; preds = %24, %17, %4
  store i64 -9223372036854775806, ptr %5, align 8
  store i32 1, ptr %14, align 4
  br label %132

28:                                               ; preds = %24, %20
  %29 = load i32, ptr %7, align 4, !tbaa !9
  %30 = icmp uge i32 %29, 7
  br i1 %30, label %31, label %32

31:                                               ; preds = %28
  store i64 -9223372036854775794, ptr %5, align 8
  store i32 1, ptr %14, align 4
  br label %132

32:                                               ; preds = %28
  %33 = load ptr, ptr @gBS, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %33, i32 0, i32 1
  %35 = load ptr, ptr %34, align 8, !tbaa !13
  %36 = call i64 %35(i64 noundef 8)
  store i64 %36, ptr %10, align 8, !tbaa !11
  %37 = call zeroext i8 @DebugAssertEnabled()
  %38 = zext i8 %37 to i32
  %39 = icmp ne i32 %38, 0
  br i1 %39, label %40, label %50

40:                                               ; preds = %32
  %41 = load ptr, ptr %6, align 8, !tbaa !5
  %42 = ptrtoint ptr %41 to i64
  %43 = sub i64 %42, ptrtoint (ptr getelementptr inbounds (%struct._IP6_CONFIG_INSTANCE, ptr null, i32 0, i32 11) to i64)
  %44 = inttoptr i64 %43 to ptr
  %45 = getelementptr inbounds %struct._IP6_CONFIG_INSTANCE, ptr %44, i32 0, i32 0
  %46 = load i32, ptr %45, align 8, !tbaa !16
  %47 = icmp ne i32 %46, 1127632969
  br i1 %47, label %48, label %50

48:                                               ; preds = %40
  call void @DebugAssert(ptr noundef @.str, i64 noundef 1958, ptr noundef @.str.1)
  %49 = load ptr, ptr %6, align 8, !tbaa !5
  br label %55

50:                                               ; preds = %40, %32
  %51 = load ptr, ptr %6, align 8, !tbaa !5
  %52 = ptrtoint ptr %51 to i64
  %53 = sub i64 %52, ptrtoint (ptr getelementptr inbounds (%struct._IP6_CONFIG_INSTANCE, ptr null, i32 0, i32 11) to i64)
  %54 = inttoptr i64 %53 to ptr
  br label %55

55:                                               ; preds = %50, %48
  %56 = phi ptr [ %49, %48 ], [ %54, %50 ]
  store ptr %56, ptr %12, align 8, !tbaa !5
  %57 = load ptr, ptr %12, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct._IP6_CONFIG_INSTANCE, ptr %57, i32 0, i32 8
  %59 = load i32, ptr %7, align 4, !tbaa !9
  %60 = zext i32 %59 to i64
  %61 = getelementptr inbounds [7 x %struct.IP6_CONFIG_DATA_ITEM], ptr %58, i64 0, i64 %60
  store ptr %61, ptr %13, align 8, !tbaa !5
  %62 = load ptr, ptr %12, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct._IP6_CONFIG_INSTANCE, ptr %62, i32 0, i32 8
  %64 = load i32, ptr %7, align 4, !tbaa !9
  %65 = zext i32 %64 to i64
  %66 = getelementptr inbounds [7 x %struct.IP6_CONFIG_DATA_ITEM], ptr %63, i64 0, i64 %65
  %67 = getelementptr inbounds %struct.IP6_CONFIG_DATA_ITEM, ptr %66, i32 0, i32 2
  %68 = load i64, ptr %67, align 8, !tbaa !28
  store i64 %68, ptr %11, align 8, !tbaa !11
  %69 = load i64, ptr %11, align 8, !tbaa !11
  %70 = icmp slt i64 %69, 0
  br i1 %70, label %126, label %71

71:                                               ; preds = %55
  %72 = load ptr, ptr %13, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.IP6_CONFIG_DATA_ITEM, ptr %72, i32 0, i32 1
  %74 = load ptr, ptr %73, align 8, !tbaa !30
  %75 = icmp ne ptr %74, null
  br i1 %75, label %76, label %84

76:                                               ; preds = %71
  %77 = load ptr, ptr %13, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.IP6_CONFIG_DATA_ITEM, ptr %77, i32 0, i32 1
  %79 = load ptr, ptr %78, align 8, !tbaa !30
  %80 = load ptr, ptr %12, align 8, !tbaa !5
  %81 = load ptr, ptr %8, align 8, !tbaa !5
  %82 = load ptr, ptr %9, align 8, !tbaa !5
  %83 = call i64 %79(ptr noundef %80, ptr noundef %81, ptr noundef %82)
  store i64 %83, ptr %11, align 8, !tbaa !11
  br label %125

84:                                               ; preds = %71
  %85 = load ptr, ptr %8, align 8, !tbaa !5
  %86 = load i64, ptr %85, align 8, !tbaa !11
  %87 = load ptr, ptr %12, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct._IP6_CONFIG_INSTANCE, ptr %87, i32 0, i32 8
  %89 = load i32, ptr %7, align 4, !tbaa !9
  %90 = zext i32 %89 to i64
  %91 = getelementptr inbounds [7 x %struct.IP6_CONFIG_DATA_ITEM], ptr %88, i64 0, i64 %90
  %92 = getelementptr inbounds %struct.IP6_CONFIG_DATA_ITEM, ptr %91, i32 0, i32 6
  %93 = load i64, ptr %92, align 8, !tbaa !31
  %94 = icmp ult i64 %86, %93
  br i1 %94, label %95, label %104

95:                                               ; preds = %84
  %96 = load ptr, ptr %12, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct._IP6_CONFIG_INSTANCE, ptr %96, i32 0, i32 8
  %98 = load i32, ptr %7, align 4, !tbaa !9
  %99 = zext i32 %98 to i64
  %100 = getelementptr inbounds [7 x %struct.IP6_CONFIG_DATA_ITEM], ptr %97, i64 0, i64 %99
  %101 = getelementptr inbounds %struct.IP6_CONFIG_DATA_ITEM, ptr %100, i32 0, i32 6
  %102 = load i64, ptr %101, align 8, !tbaa !31
  %103 = load ptr, ptr %8, align 8, !tbaa !5
  store i64 %102, ptr %103, align 8, !tbaa !11
  store i64 -9223372036854775803, ptr %11, align 8, !tbaa !11
  br label %124

104:                                              ; preds = %84
  %105 = load ptr, ptr %12, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct._IP6_CONFIG_INSTANCE, ptr %105, i32 0, i32 8
  %107 = load i32, ptr %7, align 4, !tbaa !9
  %108 = zext i32 %107 to i64
  %109 = getelementptr inbounds [7 x %struct.IP6_CONFIG_DATA_ITEM], ptr %106, i64 0, i64 %108
  %110 = getelementptr inbounds %struct.IP6_CONFIG_DATA_ITEM, ptr %109, i32 0, i32 6
  %111 = load i64, ptr %110, align 8, !tbaa !31
  %112 = load ptr, ptr %8, align 8, !tbaa !5
  store i64 %111, ptr %112, align 8, !tbaa !11
  %113 = load ptr, ptr %9, align 8, !tbaa !5
  %114 = load ptr, ptr %12, align 8, !tbaa !5
  %115 = getelementptr inbounds %struct._IP6_CONFIG_INSTANCE, ptr %114, i32 0, i32 8
  %116 = load i32, ptr %7, align 4, !tbaa !9
  %117 = zext i32 %116 to i64
  %118 = getelementptr inbounds [7 x %struct.IP6_CONFIG_DATA_ITEM], ptr %115, i64 0, i64 %117
  %119 = getelementptr inbounds %struct.IP6_CONFIG_DATA_ITEM, ptr %118, i32 0, i32 5
  %120 = load ptr, ptr %119, align 8, !tbaa !32
  %121 = load ptr, ptr %8, align 8, !tbaa !5
  %122 = load i64, ptr %121, align 8, !tbaa !11
  %123 = call ptr @CopyMem(ptr noundef %113, ptr noundef %120, i64 noundef %122)
  br label %124

124:                                              ; preds = %104, %95
  br label %125

125:                                              ; preds = %124, %76
  br label %126

126:                                              ; preds = %125, %55
  %127 = load ptr, ptr @gBS, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %127, i32 0, i32 2
  %129 = load ptr, ptr %128, align 8, !tbaa !33
  %130 = load i64, ptr %10, align 8, !tbaa !11
  call void %129(i64 noundef %130)
  %131 = load i64, ptr %11, align 8, !tbaa !11
  store i64 %131, ptr %5, align 8
  store i32 1, ptr %14, align 4
  br label %132

132:                                              ; preds = %126, %31, %27
  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
  %133 = load i64, ptr %5, align 8
  ret i64 %133
}

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, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long long", !7, i64 0}
!13 = !{!14, !6, i64 24}
!14 = !{!"", !15, 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}
!15 = !{!"", !12, i64 0, !10, i64 8, !10, i64 12, !10, i64 16, !10, i64 20}
!16 = !{!17, !10, i64 0}
!17 = !{!"_IP6_CONFIG_INSTANCE", !10, i64 0, !7, i64 4, !18, i64 8, !19, i64 24, !20, i64 32, !21, i64 168, !10, i64 176, !22, i64 180, !7, i64 184, !23, i64 800, !23, i64 840, !24, i64 880, !6, i64 912, !6, i64 920, !6, i64 928, !6, i64 936, !7, i64 944, !10, i64 948, !6, i64 952, !10, i64 960, !6, i64 968, !10, i64 976, !25, i64 984, !27, i64 1040}
!18 = !{!"_LIST_ENTRY", !6, i64 0, !6, i64 8}
!19 = !{!"short", !7, i64 0}
!20 = !{!"", !7, i64 0, !7, i64 64, !10, i64 68, !21, i64 72, !10, i64 104, !6, i64 112, !10, i64 120, !6, i64 128}
!21 = !{!"", !7, i64 0}
!22 = !{!"", !10, i64 0}
!23 = !{!"", !18, i64 0, !18, i64 16, !12, i64 32}
!24 = !{!"_EFI_IP6_CONFIG_PROTOCOL", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!25 = !{!"_IP6_FORM_CALLBACK_INFO", !10, i64 0, !6, i64 8, !26, i64 16, !6, i64 40, !6, i64 48}
!26 = !{!"_EFI_HII_CONFIG_ACCESS_PROTOCOL", !6, i64 0, !6, i64 8, !6, i64 16}
!27 = !{!"", !10, i64 0, !22, i64 4, !21, i64 8, !18, i64 16, !10, i64 32, !18, i64 40, !10, i64 56, !18, i64 64, !10, i64 80}
!28 = !{!29, !12, i64 16}
!29 = !{!"", !6, i64 0, !6, i64 8, !12, i64 16, !7, i64 24, !23, i64 32, !7, i64 72, !12, i64 80}
!30 = !{!29, !6, i64 8}
!31 = !{!29, !12, i64 80}
!32 = !{!7, !7, i64 0}
!33 = !{!14, !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"

%struct.IP6_CONFIG_DATA_ITEM = type { ptr, ptr, i64, i8, %struct.NET_MAP, %union.IP6_CONFIG_DATA, i64 }
%struct.NET_MAP = type { %struct._LIST_ENTRY, %struct._LIST_ENTRY, i64 }
%struct._LIST_ENTRY = type { ptr, ptr }
%union.IP6_CONFIG_DATA = type { ptr }

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

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
define dso_local i64 @EfiIp6ConfigGetData(ptr noundef %0, i32 noundef %1, ptr noundef %2, ptr noundef %3) local_unnamed_addr #1 {
  %5 = icmp eq ptr %0, null
  %6 = icmp eq ptr %2, null
  %or.cond = or i1 %5, %6
  br i1 %or.cond, label %47, label %7

7:                                                ; preds = %4
  %8 = load i64, ptr %2, align 8, !tbaa !5
  %9 = icmp ne i64 %8, 0
  %10 = icmp eq ptr %3, null
  %or.cond3 = and i1 %10, %9
  br i1 %or.cond3, label %47, label %11

11:                                               ; preds = %7
  %12 = icmp ugt i32 %1, 6
  br i1 %12, label %47, label %13

13:                                               ; preds = %11
  %14 = load ptr, ptr @gBS, align 8, !tbaa !9
  %15 = getelementptr inbounds i8, ptr %14, i64 24
  %16 = load ptr, ptr %15, align 8, !tbaa !11
  %17 = tail call i64 %16(i64 noundef 8) #2
  %18 = tail call zeroext i8 @DebugAssertEnabled() #2
  %.not = icmp eq i8 %18, 0
  %.pre = ptrtoint ptr %0 to i64
  %.pre46 = add i64 %.pre, -880
  %.pre48 = inttoptr i64 %.pre46 to ptr
  br i1 %.not, label %._crit_edge, label %19

19:                                               ; preds = %13
  %20 = load i32, ptr %.pre48, align 8, !tbaa !15
  %.not44 = icmp eq i32 %20, 1127632969
  br i1 %.not44, label %._crit_edge, label %21

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

._crit_edge:                                      ; preds = %13, %19, %21
  %22 = phi ptr [ %0, %21 ], [ %.pre48, %19 ], [ %.pre48, %13 ]
  %23 = getelementptr inbounds i8, ptr %22, i64 184
  %24 = zext nneg i32 %1 to i64
  %25 = getelementptr inbounds [7 x %struct.IP6_CONFIG_DATA_ITEM], ptr %23, i64 0, i64 %24
  %26 = getelementptr inbounds i8, ptr %25, i64 16
  %27 = load i64, ptr %26, align 8, !tbaa !27
  %28 = icmp slt i64 %27, 0
  br i1 %28, label %43, label %29

29:                                               ; preds = %._crit_edge
  %30 = getelementptr inbounds i8, ptr %25, i64 8
  %31 = load ptr, ptr %30, align 8, !tbaa !29
  %.not45 = icmp eq ptr %31, null
  br i1 %.not45, label %34, label %32

32:                                               ; preds = %29
  %33 = tail call i64 %31(ptr noundef nonnull %22, ptr noundef nonnull %2, ptr noundef %3) #2
  br label %43

34:                                               ; preds = %29
  %35 = load i64, ptr %2, align 8, !tbaa !5
  %36 = getelementptr inbounds i8, ptr %25, i64 80
  %37 = load i64, ptr %36, align 8, !tbaa !30
  %38 = icmp ult i64 %35, %37
  store i64 %37, ptr %2, align 8, !tbaa !5
  br i1 %38, label %43, label %39

39:                                               ; preds = %34
  %40 = getelementptr inbounds i8, ptr %25, i64 72
  %41 = load ptr, ptr %40, align 8, !tbaa !31
  %42 = tail call ptr @CopyMem(ptr noundef %3, ptr noundef %41, i64 noundef %37) #2
  br label %43

43:                                               ; preds = %34, %32, %39, %._crit_edge
  %.036 = phi i64 [ %27, %._crit_edge ], [ %33, %32 ], [ %27, %39 ], [ -9223372036854775803, %34 ]
  %44 = load ptr, ptr @gBS, align 8, !tbaa !9
  %45 = getelementptr inbounds i8, ptr %44, i64 32
  %46 = load ptr, ptr %45, align 8, !tbaa !32
  tail call void %46(i64 noundef %17) #2
  br label %47

47:                                               ; preds = %11, %4, %7, %43
  %.0 = phi i64 [ %.036, %43 ], [ -9223372036854775806, %7 ], [ -9223372036854775806, %4 ], [ -9223372036854775794, %11 ]
  ret i64 %.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, !6, i64 0}
!6 = !{!"long long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !10, i64 24}
!12 = !{!"", !13, i64 0, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !10, i64 96, !10, i64 104, !10, i64 112, !10, i64 120, !10, i64 128, !10, i64 136, !10, i64 144, !10, i64 152, !10, i64 160, !10, i64 168, !10, i64 176, !10, i64 184, !10, i64 192, !10, i64 200, !10, i64 208, !10, i64 216, !10, i64 224, !10, i64 232, !10, i64 240, !10, i64 248, !10, i64 256, !10, i64 264, !10, i64 272, !10, i64 280, !10, i64 288, !10, i64 296, !10, i64 304, !10, i64 312, !10, i64 320, !10, i64 328, !10, i64 336, !10, i64 344, !10, i64 352, !10, i64 360, !10, i64 368}
!13 = !{!"", !6, i64 0, !14, i64 8, !14, i64 12, !14, i64 16, !14, i64 20}
!14 = !{!"int", !7, i64 0}
!15 = !{!16, !14, i64 0}
!16 = !{!"_IP6_CONFIG_INSTANCE", !14, i64 0, !7, i64 4, !17, i64 8, !18, i64 24, !19, i64 32, !20, i64 168, !14, i64 176, !21, i64 180, !7, i64 184, !22, i64 800, !22, i64 840, !23, i64 880, !10, i64 912, !10, i64 920, !10, i64 928, !10, i64 936, !7, i64 944, !14, i64 948, !10, i64 952, !14, i64 960, !10, i64 968, !14, i64 976, !24, i64 984, !26, i64 1040}
!17 = !{!"_LIST_ENTRY", !10, i64 0, !10, i64 8}
!18 = !{!"short", !7, i64 0}
!19 = !{!"", !7, i64 0, !7, i64 64, !14, i64 68, !20, i64 72, !14, i64 104, !10, i64 112, !14, i64 120, !10, i64 128}
!20 = !{!"", !7, i64 0}
!21 = !{!"", !14, i64 0}
!22 = !{!"", !17, i64 0, !17, i64 16, !6, i64 32}
!23 = !{!"_EFI_IP6_CONFIG_PROTOCOL", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24}
!24 = !{!"_IP6_FORM_CALLBACK_INFO", !14, i64 0, !10, i64 8, !25, i64 16, !10, i64 40, !10, i64 48}
!25 = !{!"_EFI_HII_CONFIG_ACCESS_PROTOCOL", !10, i64 0, !10, i64 8, !10, i64 16}
!26 = !{!"", !14, i64 0, !21, i64 4, !20, i64 8, !17, i64 16, !14, i64 32, !17, i64 40, !14, i64 56, !17, i64 64, !14, i64 80}
!27 = !{!28, !6, i64 16}
!28 = !{!"", !10, i64 0, !10, i64 8, !6, i64 16, !7, i64 24, !22, i64 32, !7, i64 72, !6, i64 80}
!29 = !{!28, !10, i64 8}
!30 = !{!28, !6, i64 80}
!31 = !{!7, !7, i64 0}
!32 = !{!12, !10, i64 32}


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