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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.MNP_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._LIST_ENTRY = 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 }
%struct.EFI_MANAGED_NETWORK_TRANSMIT_DATA = type { ptr, ptr, i16, i32, i16, i16, [1 x %struct.EFI_MANAGED_NETWORK_FRAGMENT_DATA] }
%struct.EFI_MANAGED_NETWORK_FRAGMENT_DATA = type { i32, ptr }
%struct._EFI_SIMPLE_NETWORK_PROTOCOL = type { i64, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%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] }

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

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

; Function Attrs: nounwind uwtable
define dso_local void @MnpBuildTxPacket(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) #1 {
  %5 = alloca ptr, align 8
  %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 i16, align 2
  %12 = alloca ptr, align 8
  store ptr %0, ptr %5, align 8, !tbaa !5
  store ptr %1, ptr %6, align 8, !tbaa !5
  store ptr %2, ptr %7, align 8, !tbaa !5
  store ptr %3, ptr %8, align 8, !tbaa !5
  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 2, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  %13 = load ptr, ptr %5, align 8, !tbaa !5
  %14 = getelementptr inbounds %struct.MNP_SERVICE_DATA, ptr %13, i32 0, i32 2
  %15 = load ptr, ptr %14, align 8, !tbaa !9
  store ptr %15, ptr %12, align 8, !tbaa !5
  %16 = load ptr, ptr %12, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %16, i32 0, i32 25
  %18 = load ptr, ptr %17, align 8, !tbaa !16
  %19 = getelementptr inbounds i8, ptr %18, i64 4
  %20 = load ptr, ptr %7, align 8, !tbaa !5
  store ptr %19, ptr %20, align 8, !tbaa !5
  %21 = load ptr, ptr %6, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_TRANSMIT_DATA, ptr %21, i32 0, i32 0
  %23 = load ptr, ptr %22, align 8, !tbaa !20
  %24 = icmp eq ptr %23, null
  br i1 %24, label %25, label %52

25:                                               ; preds = %4
  %26 = load ptr, ptr %6, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_TRANSMIT_DATA, ptr %26, i32 0, i32 5
  %28 = load i16, ptr %27, align 2, !tbaa !22
  %29 = zext i16 %28 to i32
  %30 = icmp eq i32 %29, 1
  br i1 %30, label %31, label %52

31:                                               ; preds = %25
  %32 = load ptr, ptr %7, align 8, !tbaa !5
  %33 = load ptr, ptr %32, align 8, !tbaa !5
  %34 = load ptr, ptr %6, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_TRANSMIT_DATA, ptr %34, i32 0, i32 6
  %36 = getelementptr inbounds [1 x %struct.EFI_MANAGED_NETWORK_FRAGMENT_DATA], ptr %35, i64 0, i64 0
  %37 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_FRAGMENT_DATA, ptr %36, i32 0, i32 1
  %38 = load ptr, ptr %37, align 8, !tbaa !23
  %39 = load ptr, ptr %6, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_TRANSMIT_DATA, ptr %39, i32 0, i32 6
  %41 = getelementptr inbounds [1 x %struct.EFI_MANAGED_NETWORK_FRAGMENT_DATA], ptr %40, i64 0, i64 0
  %42 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_FRAGMENT_DATA, ptr %41, i32 0, i32 0
  %43 = load i32, ptr %42, align 8, !tbaa !25
  %44 = zext i32 %43 to i64
  %45 = call ptr @CopyMem(ptr noundef %33, ptr noundef %38, i64 noundef %44)
  %46 = load ptr, ptr %6, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_TRANSMIT_DATA, ptr %46, i32 0, i32 6
  %48 = getelementptr inbounds [1 x %struct.EFI_MANAGED_NETWORK_FRAGMENT_DATA], ptr %47, i64 0, i64 0
  %49 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_FRAGMENT_DATA, ptr %48, i32 0, i32 0
  %50 = load i32, ptr %49, align 8, !tbaa !25
  %51 = load ptr, ptr %8, align 8, !tbaa !5
  store i32 %50, ptr %51, align 4, !tbaa !26
  br label %130

52:                                               ; preds = %25, %4
  %53 = load ptr, ptr %12, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %53, i32 0, i32 6
  %55 = load ptr, ptr %54, align 8, !tbaa !27
  %56 = getelementptr inbounds %struct._EFI_SIMPLE_NETWORK_PROTOCOL, ptr %55, i32 0, i32 15
  %57 = load ptr, ptr %56, align 8, !tbaa !28
  store ptr %57, ptr %9, align 8, !tbaa !5
  %58 = load ptr, ptr %7, align 8, !tbaa !5
  %59 = load ptr, ptr %58, align 8, !tbaa !5
  store ptr %59, ptr %10, align 8, !tbaa !5
  %60 = load ptr, ptr %8, align 8, !tbaa !5
  store i32 0, ptr %60, align 4, !tbaa !26
  %61 = load ptr, ptr %6, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_TRANSMIT_DATA, ptr %61, i32 0, i32 0
  %63 = load ptr, ptr %62, align 8, !tbaa !20
  %64 = icmp ne ptr %63, null
  br i1 %64, label %65, label %78

65:                                               ; preds = %52
  %66 = load ptr, ptr %9, align 8, !tbaa !5
  %67 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %66, i32 0, i32 2
  %68 = load i32, ptr %67, align 4, !tbaa !30
  %69 = load ptr, ptr %10, align 8, !tbaa !5
  %70 = zext i32 %68 to i64
  %71 = getelementptr inbounds i8, ptr %69, i64 %70
  store ptr %71, ptr %10, align 8, !tbaa !5
  %72 = load ptr, ptr %9, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %72, i32 0, i32 2
  %74 = load i32, ptr %73, align 4, !tbaa !30
  %75 = load ptr, ptr %8, align 8, !tbaa !5
  %76 = load i32, ptr %75, align 4, !tbaa !26
  %77 = add i32 %76, %74
  store i32 %77, ptr %75, align 4, !tbaa !26
  br label %78

78:                                               ; preds = %65, %52
  store i16 0, ptr %11, align 2, !tbaa !33
  br label %79

79:                                               ; preds = %115, %78
  %80 = load i16, ptr %11, align 2, !tbaa !33
  %81 = zext i16 %80 to i32
  %82 = load ptr, ptr %6, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_TRANSMIT_DATA, ptr %82, i32 0, i32 5
  %84 = load i16, ptr %83, align 2, !tbaa !22
  %85 = zext i16 %84 to i32
  %86 = icmp slt i32 %81, %85
  br i1 %86, label %87, label %118

87:                                               ; preds = %79
  %88 = load ptr, ptr %10, align 8, !tbaa !5
  %89 = load ptr, ptr %6, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_TRANSMIT_DATA, ptr %89, i32 0, i32 6
  %91 = load i16, ptr %11, align 2, !tbaa !33
  %92 = zext i16 %91 to i64
  %93 = getelementptr inbounds [1 x %struct.EFI_MANAGED_NETWORK_FRAGMENT_DATA], ptr %90, i64 0, i64 %92
  %94 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_FRAGMENT_DATA, ptr %93, i32 0, i32 1
  %95 = load ptr, ptr %94, align 8, !tbaa !23
  %96 = load ptr, ptr %6, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_TRANSMIT_DATA, ptr %96, i32 0, i32 6
  %98 = load i16, ptr %11, align 2, !tbaa !33
  %99 = zext i16 %98 to i64
  %100 = getelementptr inbounds [1 x %struct.EFI_MANAGED_NETWORK_FRAGMENT_DATA], ptr %97, i64 0, i64 %99
  %101 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_FRAGMENT_DATA, ptr %100, i32 0, i32 0
  %102 = load i32, ptr %101, align 8, !tbaa !25
  %103 = zext i32 %102 to i64
  %104 = call ptr @CopyMem(ptr noundef %88, ptr noundef %95, i64 noundef %103)
  %105 = load ptr, ptr %6, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_TRANSMIT_DATA, ptr %105, i32 0, i32 6
  %107 = load i16, ptr %11, align 2, !tbaa !33
  %108 = zext i16 %107 to i64
  %109 = getelementptr inbounds [1 x %struct.EFI_MANAGED_NETWORK_FRAGMENT_DATA], ptr %106, i64 0, i64 %108
  %110 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_FRAGMENT_DATA, ptr %109, i32 0, i32 0
  %111 = load i32, ptr %110, align 8, !tbaa !25
  %112 = load ptr, ptr %10, align 8, !tbaa !5
  %113 = zext i32 %111 to i64
  %114 = getelementptr inbounds i8, ptr %112, i64 %113
  store ptr %114, ptr %10, align 8, !tbaa !5
  br label %115

115:                                              ; preds = %87
  %116 = load i16, ptr %11, align 2, !tbaa !33
  %117 = add i16 %116, 1
  store i16 %117, ptr %11, align 2, !tbaa !33
  br label %79, !llvm.loop !34

118:                                              ; preds = %79
  %119 = load ptr, ptr %6, align 8, !tbaa !5
  %120 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_TRANSMIT_DATA, ptr %119, i32 0, i32 3
  %121 = load i32, ptr %120, align 4, !tbaa !36
  %122 = load ptr, ptr %6, align 8, !tbaa !5
  %123 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_TRANSMIT_DATA, ptr %122, i32 0, i32 4
  %124 = load i16, ptr %123, align 8, !tbaa !37
  %125 = zext i16 %124 to i32
  %126 = add i32 %121, %125
  %127 = load ptr, ptr %8, align 8, !tbaa !5
  %128 = load i32, ptr %127, align 4, !tbaa !26
  %129 = add i32 %128, %126
  store i32 %129, ptr %127, align 4, !tbaa !26
  br label %130

130:                                              ; preds = %118, %31
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 2, 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
  ret void
}

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

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
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 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 24}
!10 = !{!"", !11, i64 0, !12, i64 8, !6, i64 24, !6, i64 32, !13, i64 40, !6, i64 56, !12, i64 64, !14, i64 80, !11, i64 88, !15, i64 92, !7, i64 94}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_LIST_ENTRY", !6, i64 0, !6, i64 8}
!13 = !{!"_EFI_SERVICE_BINDING_PROTOCOL", !6, i64 0, !6, i64 8}
!14 = !{!"long long", !7, i64 0}
!15 = !{!"short", !7, i64 0}
!16 = !{!17, !6, i64 256}
!17 = !{!"", !11, i64 0, !6, i64 8, !6, i64 16, !18, i64 24, !14, i64 48, !6, i64 56, !6, i64 64, !12, i64 72, !14, i64 88, !12, i64 96, !11, i64 112, !6, i64 120, !19, i64 128, !14, 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}
!18 = !{!"_EFI_VLAN_CONFIG_PROTOCOL", !6, i64 0, !6, i64 8, !6, i64 16}
!19 = !{!"", !11, i64 0, !14, i64 8, !12, i64 16, !12, i64 32, !11, i64 48, !11, i64 52}
!20 = !{!21, !6, i64 0}
!21 = !{!"", !6, i64 0, !6, i64 8, !15, i64 16, !11, i64 20, !15, i64 24, !15, i64 26, !7, i64 32}
!22 = !{!21, !15, i64 26}
!23 = !{!24, !6, i64 8}
!24 = !{!"", !11, i64 0, !6, i64 8}
!25 = !{!24, !11, i64 0}
!26 = !{!11, !11, i64 0}
!27 = !{!17, !6, i64 64}
!28 = !{!29, !6, i64 120}
!29 = !{!"_EFI_SIMPLE_NETWORK_PROTOCOL", !14, 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, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120}
!30 = !{!31, !11, i64 8}
!31 = !{!"", !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, !32, i64 552, !32, i64 584, !32, i64 616, !7, i64 648, !7, i64 649, !7, i64 650, !7, i64 651, !7, i64 652}
!32 = !{!"", !7, i64 0}
!33 = !{!15, !15, i64 0}
!34 = distinct !{!34, !35}
!35 = !{!"llvm.loop.mustprogress"}
!36 = !{!21, !11, i64 20}
!37 = !{!21, !15, i64 24}


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

%struct.EFI_MANAGED_NETWORK_FRAGMENT_DATA = type { i32, ptr }

; Function Attrs: nounwind uwtable
define dso_local void @MnpBuildTxPacket(ptr nocapture noundef readonly %0, ptr nocapture noundef readonly %1, ptr nocapture noundef writeonly %2, ptr nocapture noundef %3) local_unnamed_addr #0 {
  %5 = getelementptr inbounds i8, ptr %0, i64 24
  %6 = load ptr, ptr %5, align 8, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %6, i64 256
  %8 = load ptr, ptr %7, align 8, !tbaa !15
  %9 = getelementptr inbounds i8, ptr %8, i64 4
  store ptr %9, ptr %2, align 8, !tbaa !19
  %10 = load ptr, ptr %1, align 8, !tbaa !20
  %11 = icmp eq ptr %10, null
  br i1 %11, label %12, label %24

12:                                               ; preds = %4
  %13 = getelementptr inbounds i8, ptr %1, i64 26
  %14 = load i16, ptr %13, align 2, !tbaa !22
  %15 = icmp eq i16 %14, 1
  br i1 %15, label %16, label %.thread

16:                                               ; preds = %12
  %17 = getelementptr inbounds i8, ptr %1, i64 32
  %18 = getelementptr inbounds i8, ptr %1, i64 40
  %19 = load ptr, ptr %18, align 8, !tbaa !23
  %20 = load i32, ptr %17, align 8, !tbaa !25
  %21 = zext i32 %20 to i64
  %22 = tail call ptr @CopyMem(ptr noundef nonnull %9, ptr noundef %19, i64 noundef %21) #2
  %23 = load i32, ptr %17, align 8, !tbaa !25
  br label %57

24:                                               ; preds = %4
  %25 = getelementptr inbounds i8, ptr %6, i64 64
  %26 = load ptr, ptr %25, align 8, !tbaa !26
  %27 = getelementptr inbounds i8, ptr %26, i64 120
  %28 = load ptr, ptr %27, align 8, !tbaa !27
  store i32 0, ptr %3, align 4, !tbaa !29
  %29 = getelementptr inbounds i8, ptr %28, i64 8
  %30 = load i32, ptr %29, align 4, !tbaa !30
  %31 = zext i32 %30 to i64
  %32 = getelementptr inbounds i8, ptr %9, i64 %31
  %.phi.trans.insert = getelementptr inbounds i8, ptr %1, i64 26
  %.pre = load i16, ptr %.phi.trans.insert, align 2, !tbaa !22
  br label %.thread

.thread:                                          ; preds = %12, %24
  %33 = phi i16 [ %.pre, %24 ], [ %14, %12 ]
  %storemerge32 = phi i32 [ %30, %24 ], [ 0, %12 ]
  %.0 = phi ptr [ %32, %24 ], [ %9, %12 ]
  store i32 %storemerge32, ptr %3, align 4, !tbaa !29
  %34 = getelementptr inbounds i8, ptr %1, i64 26
  %.not = icmp eq i16 %33, 0
  br i1 %.not, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.thread
  %35 = getelementptr inbounds i8, ptr %1, i64 32
  br label %36

36:                                               ; preds = %.lr.ph, %36
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %36 ]
  %.134 = phi ptr [ %.0, %.lr.ph ], [ %45, %36 ]
  %37 = getelementptr inbounds [1 x %struct.EFI_MANAGED_NETWORK_FRAGMENT_DATA], ptr %35, i64 0, i64 %indvars.iv
  %38 = getelementptr inbounds i8, ptr %37, i64 8
  %39 = load ptr, ptr %38, align 8, !tbaa !23
  %40 = load i32, ptr %37, align 8, !tbaa !25
  %41 = zext i32 %40 to i64
  %42 = tail call ptr @CopyMem(ptr noundef %.134, ptr noundef %39, i64 noundef %41) #2
  %43 = load i32, ptr %37, align 8, !tbaa !25
  %44 = zext i32 %43 to i64
  %45 = getelementptr inbounds i8, ptr %.134, i64 %44
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %46 = load i16, ptr %34, align 2, !tbaa !22
  %47 = zext i16 %46 to i64
  %48 = icmp ult i64 %indvars.iv.next, %47
  br i1 %48, label %36, label %._crit_edge.loopexit, !llvm.loop !33

._crit_edge.loopexit:                             ; preds = %36
  %.pre36 = load i32, ptr %3, align 4, !tbaa !29
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %.thread
  %49 = phi i32 [ %.pre36, %._crit_edge.loopexit ], [ %storemerge32, %.thread ]
  %50 = getelementptr inbounds i8, ptr %1, i64 20
  %51 = load i32, ptr %50, align 4, !tbaa !35
  %52 = getelementptr inbounds i8, ptr %1, i64 24
  %53 = load i16, ptr %52, align 8, !tbaa !36
  %54 = zext i16 %53 to i32
  %55 = add i32 %51, %54
  %56 = add i32 %55, %49
  br label %57

57:                                               ; preds = %._crit_edge, %16
  %storemerge = phi i32 [ %56, %._crit_edge ], [ %23, %16 ]
  store i32 %storemerge, ptr %3, align 4, !tbaa !29
  ret void
}

declare ptr @CopyMem(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, !11, i64 24}
!6 = !{!"", !7, i64 0, !10, i64 8, !11, i64 24, !11, i64 32, !12, i64 40, !11, i64 56, !10, i64 64, !13, i64 80, !7, i64 88, !14, i64 92, !8, i64 94}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"_LIST_ENTRY", !11, i64 0, !11, i64 8}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!"_EFI_SERVICE_BINDING_PROTOCOL", !11, i64 0, !11, i64 8}
!13 = !{!"long long", !8, i64 0}
!14 = !{!"short", !8, i64 0}
!15 = !{!16, !11, i64 256}
!16 = !{!"", !7, i64 0, !11, i64 8, !11, i64 16, !17, i64 24, !13, i64 48, !11, i64 56, !11, i64 64, !10, i64 72, !13, i64 88, !10, i64 96, !7, i64 112, !11, i64 120, !18, i64 128, !13, i64 184, !11, i64 192, !8, i64 200, !11, i64 208, !11, i64 216, !7, i64 224, !7, i64 228, !7, i64 232, !7, i64 236, !7, i64 240, !7, i64 244, !11, i64 248, !11, i64 256}
!17 = !{!"_EFI_VLAN_CONFIG_PROTOCOL", !11, i64 0, !11, i64 8, !11, i64 16}
!18 = !{!"", !7, i64 0, !13, i64 8, !10, i64 16, !10, i64 32, !7, i64 48, !7, i64 52}
!19 = !{!11, !11, i64 0}
!20 = !{!21, !11, i64 0}
!21 = !{!"", !11, i64 0, !11, i64 8, !14, i64 16, !7, i64 20, !14, i64 24, !14, i64 26, !8, i64 32}
!22 = !{!21, !14, i64 26}
!23 = !{!24, !11, i64 8}
!24 = !{!"", !7, i64 0, !11, i64 8}
!25 = !{!24, !7, i64 0}
!26 = !{!16, !11, i64 64}
!27 = !{!28, !11, i64 120}
!28 = !{!"_EFI_SIMPLE_NETWORK_PROTOCOL", !13, 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, i64 72, !11, i64 80, !11, i64 88, !11, i64 96, !11, i64 104, !11, i64 112, !11, i64 120}
!29 = !{!7, !7, i64 0}
!30 = !{!31, !7, i64 8}
!31 = !{!"", !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, !32, i64 552, !32, i64 584, !32, i64 616, !8, i64 648, !8, i64 649, !8, i64 650, !8, i64 651, !8, i64 652}
!32 = !{!"", !8, i64 0}
!33 = distinct !{!33, !34}
!34 = !{!"llvm.loop.mustprogress"}
!35 = !{!21, !7, i64 20}
!36 = !{!21, !14, i64 24}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass,TailCallElimPass