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

; 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_IPv4_ADDRESS = type { [4 x i8] }
%struct.EFI_UDP4_CONFIG_DATA = type { i8, i8, i8, i8, i8, i8, i8, i32, i32, i8, %struct.EFI_IPv4_ADDRESS, %struct.EFI_IPv4_ADDRESS, i16, %struct.EFI_IPv4_ADDRESS, i16 }
%struct._MTFTP4_PROTOCOL = type { i32, %struct._LIST_ENTRY, %struct._EFI_MTFTP4_PROTOCOL, i64, i8, ptr, ptr, %struct.EFI_MTFTP4_CONFIG_DATA, ptr, %struct.MTFTP4_OPTION, i16, i16, i16, %struct._LIST_ENTRY, i32, i16, i16, i32, ptr, ptr, i32, i32, i32, i32, i32, i16, i8, ptr }
%struct._EFI_MTFTP4_PROTOCOL = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.EFI_MTFTP4_CONFIG_DATA = type { i8, %struct.EFI_IPv4_ADDRESS, %struct.EFI_IPv4_ADDRESS, i16, %struct.EFI_IPv4_ADDRESS, %struct.EFI_IPv4_ADDRESS, i16, i16, i16 }
%struct.MTFTP4_OPTION = type { i16, i8, i32, i32, i16, i8, i32 }
%struct._LIST_ENTRY = type { ptr, ptr }
%struct._UDP_IO = type { i32, %struct._LIST_ENTRY, i64, i8, ptr, ptr, ptr, %struct.EFI_SIMPLE_NETWORK_MODE, %struct._LIST_ENTRY, ptr, %union.anon, %union.anon.0 }
%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] }
%union.anon = type { ptr }
%union.anon.0 = type { %struct.EFI_UDP6_CONFIG_DATA }
%struct.EFI_UDP6_CONFIG_DATA = type { i8, i8, i8, i8, i8, i32, i32, %struct.EFI_IPv6_ADDRESS, i16, %struct.EFI_IPv6_ADDRESS, i16 }
%struct.EFI_IPv6_ADDRESS = type { [16 x i8] }
%struct._EFI_UDP4_PROTOCOL = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }

@mZeroIp4Addr = external global %struct.EFI_IPv4_ADDRESS, align 1

; 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

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

declare i32 @SwapBytes32(i32 noundef) #1

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

; Function Attrs: nounwind uwtable
define dso_local i64 @Mtftp4ConfigUnicastPort(ptr noundef %0, ptr noundef %1) #2 {
  %3 = alloca i64, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %struct.EFI_UDP4_CONFIG_DATA, align 4
  %8 = alloca i64, align 8
  %9 = alloca i32, align 4
  %10 = 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) #4
  call void @llvm.lifetime.start.p0(i64 36, ptr %7) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #4
  %11 = load ptr, ptr %5, align 8, !tbaa !5
  %12 = getelementptr inbounds %struct._MTFTP4_PROTOCOL, ptr %11, i32 0, i32 7
  store ptr %12, ptr %6, align 8, !tbaa !5
  %13 = getelementptr inbounds %struct.EFI_UDP4_CONFIG_DATA, ptr %7, i32 0, i32 0
  store i8 0, ptr %13, align 4, !tbaa !9
  %14 = getelementptr inbounds %struct.EFI_UDP4_CONFIG_DATA, ptr %7, i32 0, i32 1
  store i8 0, ptr %14, align 1, !tbaa !14
  %15 = getelementptr inbounds %struct.EFI_UDP4_CONFIG_DATA, ptr %7, i32 0, i32 2
  store i8 0, ptr %15, align 2, !tbaa !15
  %16 = getelementptr inbounds %struct.EFI_UDP4_CONFIG_DATA, ptr %7, i32 0, i32 3
  store i8 0, ptr %16, align 1, !tbaa !16
  %17 = getelementptr inbounds %struct.EFI_UDP4_CONFIG_DATA, ptr %7, i32 0, i32 4
  store i8 0, ptr %17, align 4, !tbaa !17
  %18 = getelementptr inbounds %struct.EFI_UDP4_CONFIG_DATA, ptr %7, i32 0, i32 5
  store i8 64, ptr %18, align 1, !tbaa !18
  %19 = getelementptr inbounds %struct.EFI_UDP4_CONFIG_DATA, ptr %7, i32 0, i32 6
  store i8 0, ptr %19, align 2, !tbaa !19
  %20 = getelementptr inbounds %struct.EFI_UDP4_CONFIG_DATA, ptr %7, i32 0, i32 7
  store i32 0, ptr %20, align 4, !tbaa !20
  %21 = getelementptr inbounds %struct.EFI_UDP4_CONFIG_DATA, ptr %7, i32 0, i32 8
  store i32 0, ptr %21, align 4, !tbaa !21
  %22 = load ptr, ptr %6, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.EFI_MTFTP4_CONFIG_DATA, ptr %22, i32 0, i32 0
  %24 = load i8, ptr %23, align 2, !tbaa !22
  %25 = getelementptr inbounds %struct.EFI_UDP4_CONFIG_DATA, ptr %7, i32 0, i32 9
  store i8 %24, ptr %25, align 4, !tbaa !24
  %26 = getelementptr inbounds %struct.EFI_UDP4_CONFIG_DATA, ptr %7, i32 0, i32 10
  %27 = load ptr, ptr %6, align 8, !tbaa !5
  %28 = getelementptr inbounds %struct.EFI_MTFTP4_CONFIG_DATA, ptr %27, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %26, ptr align 1 %28, i64 4, i1 false), !tbaa.struct !25
  %29 = getelementptr inbounds %struct.EFI_UDP4_CONFIG_DATA, ptr %7, i32 0, i32 11
  %30 = load ptr, ptr %6, align 8, !tbaa !5
  %31 = getelementptr inbounds %struct.EFI_MTFTP4_CONFIG_DATA, ptr %30, i32 0, i32 2
  call void @llvm.memcpy.p0.p0.i64(ptr align 1 %29, ptr align 1 %31, i64 4, i1 false), !tbaa.struct !25
  %32 = getelementptr inbounds %struct.EFI_UDP4_CONFIG_DATA, ptr %7, i32 0, i32 12
  store i16 0, ptr %32, align 2, !tbaa !27
  %33 = getelementptr inbounds %struct.EFI_UDP4_CONFIG_DATA, ptr %7, i32 0, i32 14
  store i16 0, ptr %33, align 4, !tbaa !28
  %34 = load ptr, ptr %5, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct._MTFTP4_PROTOCOL, ptr %34, i32 0, i32 14
  %36 = load i32, ptr %35, align 8, !tbaa !29
  %37 = call i32 @SwapBytes32(i32 noundef %36)
  store i32 %37, ptr %9, align 4, !tbaa !35
  %38 = getelementptr inbounds %struct.EFI_UDP4_CONFIG_DATA, ptr %7, i32 0, i32 13
  %39 = call ptr @CopyMem(ptr noundef %38, ptr noundef %9, i64 noundef 4)
  %40 = load ptr, ptr %4, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct._UDP_IO, ptr %40, i32 0, i32 10
  %42 = load ptr, ptr %41, align 8, !tbaa !26
  %43 = getelementptr inbounds %struct._EFI_UDP4_PROTOCOL, ptr %42, i32 0, i32 1
  %44 = load ptr, ptr %43, align 8, !tbaa !36
  %45 = load ptr, ptr %4, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct._UDP_IO, ptr %45, i32 0, i32 10
  %47 = load ptr, ptr %46, align 8, !tbaa !26
  %48 = call i64 %44(ptr noundef %47, ptr noundef %7)
  store i64 %48, ptr %8, align 8, !tbaa !38
  %49 = load i64, ptr %8, align 8, !tbaa !38
  %50 = icmp eq i64 %49, -9223372036854775791
  br i1 %50, label %51, label %58

51:                                               ; preds = %2
  %52 = load ptr, ptr %5, align 8, !tbaa !5
  %53 = load ptr, ptr %4, align 8, !tbaa !5
  %54 = call zeroext i8 @Mtftp4GetMapping(ptr noundef %52, ptr noundef %53, ptr noundef %7)
  %55 = zext i8 %54 to i32
  %56 = icmp ne i32 %55, 0
  br i1 %56, label %57, label %58

57:                                               ; preds = %51
  store i64 0, ptr %3, align 8
  store i32 1, ptr %10, align 4
  br label %95

58:                                               ; preds = %51, %2
  %59 = load ptr, ptr %6, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct.EFI_MTFTP4_CONFIG_DATA, ptr %59, i32 0, i32 0
  %61 = load i8, ptr %60, align 2, !tbaa !22
  %62 = icmp ne i8 %61, 0
  br i1 %62, label %93, label %63

63:                                               ; preds = %58
  %64 = load ptr, ptr %6, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct.EFI_MTFTP4_CONFIG_DATA, ptr %64, i32 0, i32 4
  %66 = call i64 @CompareMem(ptr noundef @mZeroIp4Addr, ptr noundef %65, i64 noundef 4)
  %67 = icmp eq i64 %66, 0
  br i1 %67, label %93, label %68

68:                                               ; preds = %63
  %69 = load ptr, ptr %4, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct._UDP_IO, ptr %69, i32 0, i32 10
  %71 = load ptr, ptr %70, align 8, !tbaa !26
  %72 = getelementptr inbounds %struct._EFI_UDP4_PROTOCOL, ptr %71, i32 0, i32 3
  %73 = load ptr, ptr %72, align 8, !tbaa !39
  %74 = load ptr, ptr %4, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct._UDP_IO, ptr %74, i32 0, i32 10
  %76 = load ptr, ptr %75, align 8, !tbaa !26
  %77 = load ptr, ptr %6, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct.EFI_MTFTP4_CONFIG_DATA, ptr %77, i32 0, i32 4
  %79 = call i64 %73(ptr noundef %76, i8 noundef zeroext 0, ptr noundef @mZeroIp4Addr, ptr noundef @mZeroIp4Addr, ptr noundef %78)
  store i64 %79, ptr %8, align 8, !tbaa !38
  %80 = load i64, ptr %8, align 8, !tbaa !38
  %81 = icmp slt i64 %80, 0
  br i1 %81, label %82, label %92

82:                                               ; preds = %68
  %83 = load ptr, ptr %4, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct._UDP_IO, ptr %83, i32 0, i32 10
  %85 = load ptr, ptr %84, align 8, !tbaa !26
  %86 = getelementptr inbounds %struct._EFI_UDP4_PROTOCOL, ptr %85, i32 0, i32 1
  %87 = load ptr, ptr %86, align 8, !tbaa !36
  %88 = load ptr, ptr %4, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct._UDP_IO, ptr %88, i32 0, i32 10
  %90 = load ptr, ptr %89, align 8, !tbaa !26
  %91 = call i64 %87(ptr noundef %90, ptr noundef null)
  br label %92

92:                                               ; preds = %82, %68
  br label %93

93:                                               ; preds = %92, %63, %58
  %94 = load i64, ptr %8, align 8, !tbaa !38
  store i64 %94, ptr %3, align 8
  store i32 1, ptr %10, align 4
  br label %95

95:                                               ; preds = %93, %57
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.end.p0(i64 36, ptr %7) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #4
  %96 = load i64, ptr %3, align 8
  ret i64 %96
}

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #3

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

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 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #4 = { 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 0}
!10 = !{!"", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !7, i64 4, !7, i64 5, !7, i64 6, !11, i64 8, !11, i64 12, !7, i64 16, !12, i64 17, !12, i64 21, !13, i64 26, !12, i64 28, !13, i64 32}
!11 = !{!"int", !7, i64 0}
!12 = !{!"", !7, i64 0}
!13 = !{!"short", !7, i64 0}
!14 = !{!10, !7, i64 1}
!15 = !{!10, !7, i64 2}
!16 = !{!10, !7, i64 3}
!17 = !{!10, !7, i64 4}
!18 = !{!10, !7, i64 5}
!19 = !{!10, !7, i64 6}
!20 = !{!10, !11, i64 8}
!21 = !{!10, !11, i64 12}
!22 = !{!23, !7, i64 0}
!23 = !{!"", !7, i64 0, !12, i64 1, !12, i64 5, !13, i64 10, !12, i64 12, !12, i64 16, !13, i64 20, !13, i64 22, !13, i64 24}
!24 = !{!10, !7, i64 16}
!25 = !{i64 0, i64 4, !26}
!26 = !{!7, !7, i64 0}
!27 = !{!10, !13, i64 26}
!28 = !{!10, !13, i64 32}
!29 = !{!30, !11, i64 208}
!30 = !{!"_MTFTP4_PROTOCOL", !11, i64 0, !31, i64 8, !32, i64 24, !33, i64 88, !7, i64 96, !6, i64 104, !6, i64 112, !23, i64 120, !6, i64 152, !34, i64 160, !13, i64 180, !13, i64 182, !13, i64 184, !31, i64 192, !11, i64 208, !13, i64 212, !13, i64 214, !11, i64 216, !6, i64 224, !6, i64 232, !11, i64 240, !11, i64 244, !11, i64 248, !11, i64 252, !11, i64 256, !13, i64 260, !7, i64 262, !6, i64 264}
!31 = !{!"_LIST_ENTRY", !6, i64 0, !6, i64 8}
!32 = !{!"_EFI_MTFTP4_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}
!33 = !{!"long long", !7, i64 0}
!34 = !{!"", !13, i64 0, !7, i64 2, !11, i64 4, !11, i64 8, !13, i64 12, !7, i64 14, !11, i64 16}
!35 = !{!11, !11, i64 0}
!36 = !{!37, !6, i64 8}
!37 = !{!"_EFI_UDP4_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}
!38 = !{!33, !33, i64 0}
!39 = !{!37, !6, 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_IPv4_ADDRESS = type { [4 x i8] }
%struct.EFI_UDP4_CONFIG_DATA = type { i8, i8, i8, i8, i8, i8, i8, i32, i32, i8, %struct.EFI_IPv4_ADDRESS, %struct.EFI_IPv4_ADDRESS, i16, %struct.EFI_IPv4_ADDRESS, i16 }

@mZeroIp4Addr = external global %struct.EFI_IPv4_ADDRESS, align 1

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

; Function Attrs: mustprogress 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) local_unnamed_addr #1

declare i32 @SwapBytes32(i32 noundef) local_unnamed_addr #1

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

; Function Attrs: nounwind uwtable
define dso_local i64 @Mtftp4ConfigUnicastPort(ptr noundef %0, ptr noundef %1) local_unnamed_addr #2 {
  %3 = alloca %struct.EFI_UDP4_CONFIG_DATA, align 4
  %4 = alloca i32, align 4
  call void @llvm.lifetime.start.p0(i64 36, ptr nonnull %3) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %4) #4
  %5 = getelementptr inbounds i8, ptr %1, i64 120
  %6 = getelementptr inbounds i8, ptr %3, i64 5
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 4 dereferenceable(5) %3, i8 0, i64 5, i1 false)
  store i8 64, ptr %6, align 1, !tbaa !5
  %7 = getelementptr inbounds i8, ptr %3, i64 6
  store i8 0, ptr %7, align 2, !tbaa !12
  %8 = getelementptr inbounds i8, ptr %3, i64 8
  store i32 0, ptr %8, align 4, !tbaa !13
  %9 = getelementptr inbounds i8, ptr %3, i64 12
  store i32 0, ptr %9, align 4, !tbaa !14
  %10 = load i8, ptr %5, align 2, !tbaa !15
  %11 = getelementptr inbounds i8, ptr %3, i64 16
  store i8 %10, ptr %11, align 4, !tbaa !17
  %12 = getelementptr inbounds i8, ptr %3, i64 17
  %13 = getelementptr inbounds i8, ptr %1, i64 121
  %14 = load <2 x i32>, ptr %13, align 1, !tbaa !18
  store <2 x i32> %14, ptr %12, align 1, !tbaa !18
  %15 = getelementptr inbounds i8, ptr %3, i64 26
  store i16 0, ptr %15, align 2, !tbaa !19
  %16 = getelementptr inbounds i8, ptr %3, i64 32
  store i16 0, ptr %16, align 4, !tbaa !20
  %17 = getelementptr inbounds i8, ptr %1, i64 208
  %18 = load i32, ptr %17, align 8, !tbaa !21
  %19 = tail call i32 @SwapBytes32(i32 noundef %18) #4
  store i32 %19, ptr %4, align 4, !tbaa !28
  %20 = getelementptr inbounds i8, ptr %3, i64 28
  %21 = call ptr @CopyMem(ptr noundef nonnull %20, ptr noundef nonnull %4, i64 noundef 4) #4
  %22 = getelementptr inbounds i8, ptr %0, i64 744
  %23 = load ptr, ptr %22, align 8, !tbaa !18
  %24 = getelementptr inbounds i8, ptr %23, i64 8
  %25 = load ptr, ptr %24, align 8, !tbaa !29
  %26 = call i64 %25(ptr noundef %23, ptr noundef nonnull %3) #4
  %27 = icmp eq i64 %26, -9223372036854775791
  br i1 %27, label %28, label %30

28:                                               ; preds = %2
  %29 = call zeroext i8 @Mtftp4GetMapping(ptr noundef nonnull %1, ptr noundef nonnull %0, ptr noundef nonnull %3)
  %.not = icmp eq i8 %29, 0
  br i1 %.not, label %30, label %47

30:                                               ; preds = %28, %2
  %31 = load i8, ptr %5, align 2, !tbaa !15
  %.not21 = icmp eq i8 %31, 0
  br i1 %.not21, label %32, label %47

32:                                               ; preds = %30
  %33 = getelementptr inbounds i8, ptr %1, i64 132
  %34 = call i64 @CompareMem(ptr noundef nonnull @mZeroIp4Addr, ptr noundef nonnull %33, i64 noundef 4) #4
  %35 = icmp eq i64 %34, 0
  br i1 %35, label %47, label %36

36:                                               ; preds = %32
  %37 = load ptr, ptr %22, align 8, !tbaa !18
  %38 = getelementptr inbounds i8, ptr %37, i64 24
  %39 = load ptr, ptr %38, align 8, !tbaa !31
  %40 = call i64 %39(ptr noundef %37, i8 noundef zeroext 0, ptr noundef nonnull @mZeroIp4Addr, ptr noundef nonnull @mZeroIp4Addr, ptr noundef nonnull %33) #4
  %41 = icmp slt i64 %40, 0
  br i1 %41, label %42, label %47

42:                                               ; preds = %36
  %43 = load ptr, ptr %22, align 8, !tbaa !18
  %44 = getelementptr inbounds i8, ptr %43, i64 8
  %45 = load ptr, ptr %44, align 8, !tbaa !29
  %46 = call i64 %45(ptr noundef %43, ptr noundef null) #4
  br label %47

47:                                               ; preds = %30, %32, %42, %36, %28
  %.019 = phi i64 [ 0, %28 ], [ %26, %30 ], [ %26, %32 ], [ %40, %42 ], [ %40, %36 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %4) #4
  call void @llvm.lifetime.end.p0(i64 36, ptr nonnull %3) #4
  ret i64 %.019
}

declare i64 @CompareMem(ptr noundef, ptr noundef, i64 noundef) local_unnamed_addr #1

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #3

attributes #0 = { mustprogress 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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #4 = { 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 5}
!6 = !{!"", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !7, i64 4, !7, i64 5, !7, i64 6, !9, i64 8, !9, i64 12, !7, i64 16, !10, i64 17, !10, i64 21, !11, i64 26, !10, i64 28, !11, i64 32}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!"int", !7, i64 0}
!10 = !{!"", !7, i64 0}
!11 = !{!"short", !7, i64 0}
!12 = !{!6, !7, i64 6}
!13 = !{!6, !9, i64 8}
!14 = !{!6, !9, i64 12}
!15 = !{!16, !7, i64 0}
!16 = !{!"", !7, i64 0, !10, i64 1, !10, i64 5, !11, i64 10, !10, i64 12, !10, i64 16, !11, i64 20, !11, i64 22, !11, i64 24}
!17 = !{!6, !7, i64 16}
!18 = !{!7, !7, i64 0}
!19 = !{!6, !11, i64 26}
!20 = !{!6, !11, i64 32}
!21 = !{!22, !9, i64 208}
!22 = !{!"_MTFTP4_PROTOCOL", !9, i64 0, !23, i64 8, !25, i64 24, !26, i64 88, !7, i64 96, !24, i64 104, !24, i64 112, !16, i64 120, !24, i64 152, !27, i64 160, !11, i64 180, !11, i64 182, !11, i64 184, !23, i64 192, !9, i64 208, !11, i64 212, !11, i64 214, !9, i64 216, !24, i64 224, !24, i64 232, !9, i64 240, !9, i64 244, !9, i64 248, !9, i64 252, !9, i64 256, !11, i64 260, !7, i64 262, !24, i64 264}
!23 = !{!"_LIST_ENTRY", !24, i64 0, !24, i64 8}
!24 = !{!"any pointer", !7, i64 0}
!25 = !{!"_EFI_MTFTP4_PROTOCOL", !24, i64 0, !24, i64 8, !24, i64 16, !24, i64 24, !24, i64 32, !24, i64 40, !24, i64 48, !24, i64 56}
!26 = !{!"long long", !7, i64 0}
!27 = !{!"", !11, i64 0, !7, i64 2, !9, i64 4, !9, i64 8, !11, i64 12, !7, i64 14, !9, i64 16}
!28 = !{!9, !9, i64 0}
!29 = !{!30, !24, i64 8}
!30 = !{!"_EFI_UDP4_PROTOCOL", !24, i64 0, !24, i64 8, !24, i64 16, !24, i64 24, !24, i64 32, !24, i64 40, !24, i64 48, !24, i64 56}
!31 = !{!30, !24, i64 24}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,MemCpyOptPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass