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

; 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_SERVICE_BINDING_PROTOCOL = type { ptr, ptr }
%struct.EFI_IP4_CONFIG_DATA = type { i8, i8, i8, i8, i8, i8, %struct.EFI_IPv4_ADDRESS, %struct.EFI_IPv4_ADDRESS, i8, i8, i8, i8, i32, i32 }
%struct.EFI_IPv4_ADDRESS = type { [4 x i8] }
%struct._IP_IO_OPEN_DATA = type { %union.IP_IO_IP_CONFIG_DATA, ptr, ptr, ptr, ptr }
%union.IP_IO_IP_CONFIG_DATA = type { %struct.EFI_IP6_CONFIG_DATA }
%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._UDP4_SERVICE_DATA_ = type { i32, %struct._EFI_SERVICE_BINDING_PROTOCOL, ptr, ptr, %struct._LIST_ENTRY, i64, ptr, ptr }
%struct._LIST_ENTRY = type { ptr, ptr }
%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 }

@mUdp4ServiceBinding = external global %struct._EFI_SERVICE_BINDING_PROTOCOL, align 8
@mIp4IoDefaultIpConfigData = external global %struct.EFI_IP4_CONFIG_DATA, align 4
@gBS = external global ptr, align 8

; Function Attrs: nounwind uwtable
define dso_local i64 @Udp4CreateService(ptr noundef %0, ptr noundef %1, ptr noundef %2) #0 {
  %4 = alloca i64, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca i64, align 8
  %9 = alloca %struct._IP_IO_OPEN_DATA, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  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
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #4
  call void @llvm.lifetime.start.p0(i64 88, ptr %9) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #4
  %12 = load ptr, ptr %5, align 8, !tbaa !5
  %13 = call ptr @ZeroMem(ptr noundef %12, i64 noundef 80)
  %14 = load ptr, ptr %5, align 8, !tbaa !5
  %15 = getelementptr inbounds %struct._UDP4_SERVICE_DATA_, ptr %14, i32 0, i32 0
  store i32 879780949, ptr %15, align 8, !tbaa !9
  %16 = load ptr, ptr %5, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct._UDP4_SERVICE_DATA_, ptr %16, i32 0, i32 1
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %17, ptr align 8 @mUdp4ServiceBinding, i64 16, i1 false), !tbaa.struct !15
  %18 = load ptr, ptr %6, align 8, !tbaa !5
  %19 = load ptr, ptr %5, align 8, !tbaa !5
  %20 = getelementptr inbounds %struct._UDP4_SERVICE_DATA_, ptr %19, i32 0, i32 2
  store ptr %18, ptr %20, align 8, !tbaa !16
  %21 = load ptr, ptr %7, align 8, !tbaa !5
  %22 = load ptr, ptr %5, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct._UDP4_SERVICE_DATA_, ptr %22, i32 0, i32 3
  store ptr %21, ptr %23, align 8, !tbaa !17
  %24 = load ptr, ptr %5, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct._UDP4_SERVICE_DATA_, ptr %24, i32 0, i32 5
  store i64 0, ptr %25, align 8, !tbaa !18
  %26 = load ptr, ptr %5, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct._UDP4_SERVICE_DATA_, ptr %26, i32 0, i32 4
  %28 = call ptr @InitializeListHead(ptr noundef %27)
  %29 = load ptr, ptr %6, align 8, !tbaa !5
  %30 = load ptr, ptr %7, align 8, !tbaa !5
  %31 = call ptr @IpIoCreate(ptr noundef %29, ptr noundef %30, i8 noundef zeroext 4)
  %32 = load ptr, ptr %5, align 8, !tbaa !5
  %33 = getelementptr inbounds %struct._UDP4_SERVICE_DATA_, ptr %32, i32 0, i32 6
  store ptr %31, ptr %33, align 8, !tbaa !19
  %34 = load ptr, ptr %5, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct._UDP4_SERVICE_DATA_, ptr %34, i32 0, i32 6
  %36 = load ptr, ptr %35, align 8, !tbaa !19
  %37 = icmp eq ptr %36, null
  br i1 %37, label %38, label %39

38:                                               ; preds = %3
  store i64 -9223372036854775799, ptr %4, align 8
  store i32 1, ptr %11, align 4
  br label %99

39:                                               ; preds = %3
  %40 = getelementptr inbounds %struct._IP_IO_OPEN_DATA, ptr %9, i32 0, i32 0
  store ptr %40, ptr %10, align 8, !tbaa !5
  %41 = load ptr, ptr %10, align 8, !tbaa !5
  %42 = call ptr @CopyMem(ptr noundef %41, ptr noundef @mIp4IoDefaultIpConfigData, i64 noundef 28)
  %43 = load ptr, ptr %10, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.EFI_IP4_CONFIG_DATA, ptr %43, i32 0, i32 3
  store i8 1, ptr %44, align 1, !tbaa !20
  %45 = load ptr, ptr %5, align 8, !tbaa !5
  %46 = getelementptr inbounds %struct._IP_IO_OPEN_DATA, ptr %9, i32 0, i32 1
  store ptr %45, ptr %46, align 8, !tbaa !23
  %47 = getelementptr inbounds %struct._IP_IO_OPEN_DATA, ptr %9, i32 0, i32 2
  store ptr null, ptr %47, align 8, !tbaa !25
  %48 = getelementptr inbounds %struct._IP_IO_OPEN_DATA, ptr %9, i32 0, i32 3
  store ptr @Udp4DgramRcvd, ptr %48, align 8, !tbaa !26
  %49 = getelementptr inbounds %struct._IP_IO_OPEN_DATA, ptr %9, i32 0, i32 4
  store ptr @Udp4DgramSent, ptr %49, align 8, !tbaa !27
  %50 = load ptr, ptr %5, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct._UDP4_SERVICE_DATA_, ptr %50, i32 0, i32 6
  %52 = load ptr, ptr %51, align 8, !tbaa !19
  %53 = call i64 @IpIoOpen(ptr noundef %52, ptr noundef %9)
  store i64 %53, ptr %8, align 8, !tbaa !28
  %54 = load i64, ptr %8, align 8, !tbaa !28
  %55 = icmp slt i64 %54, 0
  br i1 %55, label %56, label %57

56:                                               ; preds = %39
  br label %80

57:                                               ; preds = %39
  %58 = load ptr, ptr @gBS, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %58, i32 0, i32 8
  %60 = load ptr, ptr %59, align 8, !tbaa !29
  %61 = load ptr, ptr %5, align 8, !tbaa !5
  %62 = load ptr, ptr %5, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct._UDP4_SERVICE_DATA_, ptr %62, i32 0, i32 7
  %64 = call i64 %60(i32 noundef -2147483136, i64 noundef 8, ptr noundef @Udp4CheckTimeout, ptr noundef %61, ptr noundef %63)
  store i64 %64, ptr %8, align 8, !tbaa !28
  %65 = load i64, ptr %8, align 8, !tbaa !28
  %66 = icmp slt i64 %65, 0
  br i1 %66, label %67, label %68

67:                                               ; preds = %57
  br label %80

68:                                               ; preds = %57
  %69 = load ptr, ptr @gBS, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %69, i32 0, i32 9
  %71 = load ptr, ptr %70, align 8, !tbaa !32
  %72 = load ptr, ptr %5, align 8, !tbaa !5
  %73 = getelementptr inbounds %struct._UDP4_SERVICE_DATA_, ptr %72, i32 0, i32 7
  %74 = load ptr, ptr %73, align 8, !tbaa !33
  %75 = call i64 %71(ptr noundef %74, i32 noundef 1, i64 noundef 500000)
  store i64 %75, ptr %8, align 8, !tbaa !28
  %76 = load i64, ptr %8, align 8, !tbaa !28
  %77 = icmp slt i64 %76, 0
  br i1 %77, label %78, label %79

78:                                               ; preds = %68
  br label %80

79:                                               ; preds = %68
  store i64 0, ptr %4, align 8
  store i32 1, ptr %11, align 4
  br label %99

80:                                               ; preds = %78, %67, %56
  %81 = load ptr, ptr %5, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct._UDP4_SERVICE_DATA_, ptr %81, i32 0, i32 7
  %83 = load ptr, ptr %82, align 8, !tbaa !33
  %84 = icmp ne ptr %83, null
  br i1 %84, label %85, label %93

85:                                               ; preds = %80
  %86 = load ptr, ptr @gBS, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %86, i32 0, i32 12
  %88 = load ptr, ptr %87, align 8, !tbaa !34
  %89 = load ptr, ptr %5, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct._UDP4_SERVICE_DATA_, ptr %89, i32 0, i32 7
  %91 = load ptr, ptr %90, align 8, !tbaa !33
  %92 = call i64 %88(ptr noundef %91)
  br label %93

93:                                               ; preds = %85, %80
  %94 = load ptr, ptr %5, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct._UDP4_SERVICE_DATA_, ptr %94, i32 0, i32 6
  %96 = load ptr, ptr %95, align 8, !tbaa !19
  %97 = call i64 @IpIoDestroy(ptr noundef %96)
  %98 = load i64, ptr %8, align 8, !tbaa !28
  store i64 %98, ptr %4, align 8
  store i32 1, ptr %11, align 4
  br label %99

99:                                               ; preds = %93, %79, %38
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #4
  call void @llvm.lifetime.end.p0(i64 88, ptr %9) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #4
  %100 = load i64, ptr %4, align 8
  ret i64 %100
}

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

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

; 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 ptr @InitializeListHead(ptr noundef) #2

declare ptr @IpIoCreate(ptr noundef, ptr noundef, i8 noundef zeroext) #2

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

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

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

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

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

declare i64 @IpIoDestroy(ptr noundef) #2

; Function Attrs: nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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 = { 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 = { 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, !11, i64 0}
!10 = !{!"_UDP4_SERVICE_DATA_", !11, i64 0, !12, i64 8, !6, i64 24, !6, i64 32, !13, i64 40, !14, i64 56, !6, i64 64, !6, i64 72}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_EFI_SERVICE_BINDING_PROTOCOL", !6, i64 0, !6, i64 8}
!13 = !{!"_LIST_ENTRY", !6, i64 0, !6, i64 8}
!14 = !{!"long long", !7, i64 0}
!15 = !{i64 0, i64 8, !5, i64 8, i64 8, !5}
!16 = !{!10, !6, i64 24}
!17 = !{!10, !6, i64 32}
!18 = !{!10, !14, i64 56}
!19 = !{!10, !6, i64 64}
!20 = !{!21, !7, i64 3}
!21 = !{!"", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !7, i64 4, !7, i64 5, !22, i64 6, !22, i64 10, !7, i64 14, !7, i64 15, !7, i64 16, !7, i64 17, !11, i64 20, !11, i64 24}
!22 = !{!"", !7, i64 0}
!23 = !{!24, !6, i64 56}
!24 = !{!"_IP_IO_OPEN_DATA", !7, i64 0, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80}
!25 = !{!24, !6, i64 64}
!26 = !{!24, !6, i64 72}
!27 = !{!24, !6, i64 80}
!28 = !{!14, !14, i64 0}
!29 = !{!30, !6, i64 80}
!30 = !{!"", !31, 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}
!31 = !{!"", !14, i64 0, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20}
!32 = !{!30, !6, i64 88}
!33 = !{!10, !6, i64 72}
!34 = !{!30, !6, i64 112}


; 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_SERVICE_BINDING_PROTOCOL = type { ptr, ptr }
%struct.EFI_IP4_CONFIG_DATA = type { i8, i8, i8, i8, i8, i8, %struct.EFI_IPv4_ADDRESS, %struct.EFI_IPv4_ADDRESS, i8, i8, i8, i8, i32, i32 }
%struct.EFI_IPv4_ADDRESS = type { [4 x i8] }
%struct._IP_IO_OPEN_DATA = type { %union.IP_IO_IP_CONFIG_DATA, ptr, ptr, ptr, ptr }
%union.IP_IO_IP_CONFIG_DATA = type { %struct.EFI_IP6_CONFIG_DATA }
%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] }

@mUdp4ServiceBinding = external local_unnamed_addr global %struct._EFI_SERVICE_BINDING_PROTOCOL, align 8
@mIp4IoDefaultIpConfigData = external global %struct.EFI_IP4_CONFIG_DATA, align 4
@gBS = external local_unnamed_addr global ptr, align 8

; Function Attrs: nounwind uwtable
define dso_local range(i64 -9223372036854775808, 1) i64 @Udp4CreateService(ptr noundef %0, ptr noundef %1, ptr noundef %2) local_unnamed_addr #0 {
  %4 = alloca %struct._IP_IO_OPEN_DATA, align 8
  call void @llvm.lifetime.start.p0(i64 88, ptr nonnull %4) #4
  %5 = tail call ptr @ZeroMem(ptr noundef %0, i64 noundef 80) #4
  store i32 879780949, ptr %0, align 8, !tbaa !5
  %6 = getelementptr inbounds i8, ptr %0, i64 8
  tail call void @llvm.memcpy.p0.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %6, ptr noundef nonnull align 8 dereferenceable(16) @mUdp4ServiceBinding, i64 16, i1 false), !tbaa.struct !14
  %7 = getelementptr inbounds i8, ptr %0, i64 24
  store ptr %1, ptr %7, align 8, !tbaa !16
  %8 = getelementptr inbounds i8, ptr %0, i64 32
  store ptr %2, ptr %8, align 8, !tbaa !17
  %9 = getelementptr inbounds i8, ptr %0, i64 56
  store i64 0, ptr %9, align 8, !tbaa !18
  %10 = getelementptr inbounds i8, ptr %0, i64 40
  %11 = tail call ptr @InitializeListHead(ptr noundef nonnull %10) #4
  %12 = tail call ptr @IpIoCreate(ptr noundef %1, ptr noundef %2, i8 noundef zeroext 4) #4
  %13 = getelementptr inbounds i8, ptr %0, i64 64
  store ptr %12, ptr %13, align 8, !tbaa !19
  %14 = icmp eq ptr %12, null
  br i1 %14, label %50, label %15

15:                                               ; preds = %3
  %16 = call ptr @CopyMem(ptr noundef nonnull %4, ptr noundef nonnull @mIp4IoDefaultIpConfigData, i64 noundef 28) #4
  %17 = getelementptr inbounds i8, ptr %4, i64 3
  store i8 1, ptr %17, align 1, !tbaa !20
  %18 = getelementptr inbounds i8, ptr %4, i64 56
  store ptr %0, ptr %18, align 8, !tbaa !23
  %19 = getelementptr inbounds i8, ptr %4, i64 64
  store ptr null, ptr %19, align 8, !tbaa !25
  %20 = getelementptr inbounds i8, ptr %4, i64 72
  store ptr @Udp4DgramRcvd, ptr %20, align 8, !tbaa !26
  %21 = getelementptr inbounds i8, ptr %4, i64 80
  store ptr @Udp4DgramSent, ptr %21, align 8, !tbaa !27
  %22 = load ptr, ptr %13, align 8, !tbaa !19
  %23 = call i64 @IpIoOpen(ptr noundef %22, ptr noundef nonnull %4) #4
  %24 = icmp slt i64 %23, 0
  br i1 %24, label %39, label %25

25:                                               ; preds = %15
  %26 = load ptr, ptr @gBS, align 8, !tbaa !15
  %27 = getelementptr inbounds i8, ptr %26, i64 80
  %28 = load ptr, ptr %27, align 8, !tbaa !28
  %29 = getelementptr inbounds i8, ptr %0, i64 72
  %30 = call i64 %28(i32 noundef -2147483136, i64 noundef 8, ptr noundef nonnull @Udp4CheckTimeout, ptr noundef nonnull %0, ptr noundef nonnull %29) #4
  %31 = icmp slt i64 %30, 0
  br i1 %31, label %39, label %32

32:                                               ; preds = %25
  %33 = load ptr, ptr @gBS, align 8, !tbaa !15
  %34 = getelementptr inbounds i8, ptr %33, i64 88
  %35 = load ptr, ptr %34, align 8, !tbaa !31
  %36 = load ptr, ptr %29, align 8, !tbaa !32
  %37 = call i64 %35(ptr noundef %36, i32 noundef 1, i64 noundef 500000) #4
  %38 = icmp slt i64 %37, 0
  br i1 %38, label %39, label %50

39:                                               ; preds = %32, %25, %15
  %.027 = phi i64 [ %23, %15 ], [ %30, %25 ], [ %37, %32 ]
  %40 = getelementptr inbounds i8, ptr %0, i64 72
  %41 = load ptr, ptr %40, align 8, !tbaa !32
  %.not = icmp eq ptr %41, null
  br i1 %.not, label %47, label %42

42:                                               ; preds = %39
  %43 = load ptr, ptr @gBS, align 8, !tbaa !15
  %44 = getelementptr inbounds i8, ptr %43, i64 112
  %45 = load ptr, ptr %44, align 8, !tbaa !33
  %46 = call i64 %45(ptr noundef nonnull %41) #4
  br label %47

47:                                               ; preds = %42, %39
  %48 = load ptr, ptr %13, align 8, !tbaa !19
  %49 = call i64 @IpIoDestroy(ptr noundef %48) #4
  br label %50

50:                                               ; preds = %32, %3, %47
  %.0 = phi i64 [ %.027, %47 ], [ -9223372036854775799, %3 ], [ 0, %32 ]
  call void @llvm.lifetime.end.p0(i64 88, ptr nonnull %4) #4
  ret i64 %.0
}

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

declare ptr @ZeroMem(ptr noundef, i64 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress 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 ptr @InitializeListHead(ptr noundef) local_unnamed_addr #2

declare ptr @IpIoCreate(ptr noundef, ptr noundef, i8 noundef zeroext) local_unnamed_addr #2

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

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

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

declare i64 @IpIoOpen(ptr noundef, ptr noundef) local_unnamed_addr #2

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

declare i64 @IpIoDestroy(ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite)
declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #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 = { mustprogress 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 = { mustprogress 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, !7, i64 0}
!6 = !{!"_UDP4_SERVICE_DATA_", !7, i64 0, !10, i64 8, !11, i64 24, !11, i64 32, !12, i64 40, !13, i64 56, !11, i64 64, !11, i64 72}
!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 = !{!"_LIST_ENTRY", !11, i64 0, !11, i64 8}
!13 = !{!"long long", !8, i64 0}
!14 = !{i64 0, i64 8, !15, i64 8, i64 8, !15}
!15 = !{!11, !11, i64 0}
!16 = !{!6, !11, i64 24}
!17 = !{!6, !11, i64 32}
!18 = !{!6, !13, i64 56}
!19 = !{!6, !11, i64 64}
!20 = !{!21, !8, i64 3}
!21 = !{!"", !8, i64 0, !8, i64 1, !8, i64 2, !8, i64 3, !8, i64 4, !8, i64 5, !22, i64 6, !22, i64 10, !8, i64 14, !8, i64 15, !8, i64 16, !8, i64 17, !7, i64 20, !7, i64 24}
!22 = !{!"", !8, i64 0}
!23 = !{!24, !11, i64 56}
!24 = !{!"_IP_IO_OPEN_DATA", !8, i64 0, !11, i64 56, !11, i64 64, !11, i64 72, !11, i64 80}
!25 = !{!24, !11, i64 64}
!26 = !{!24, !11, i64 72}
!27 = !{!24, !11, i64 80}
!28 = !{!29, !11, i64 80}
!29 = !{!"", !30, 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}
!30 = !{!"", !13, i64 0, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20}
!31 = !{!29, !11, i64 88}
!32 = !{!6, !11, i64 72}
!33 = !{!29, !11, i64 112}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,SROAPass,SimplifyCFGPass,TailCallElimPass