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

; 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.IGMP_HEAD = type { i8, i8, i16, i32 }
%struct._IP4_SERVICE = type { i32, %struct._EFI_SERVICE_BINDING_PROTOCOL, i64, i64, %struct._LIST_ENTRY, %struct._LIST_ENTRY, ptr, ptr, %struct.IP4_ASSEMBLE_TABLE, %struct.IGMP_SERVICE_DATA, ptr, ptr, ptr, ptr, %struct.EFI_MANAGED_NETWORK_CONFIG_DATA, %struct.EFI_SIMPLE_NETWORK_MODE, ptr, ptr, ptr, ptr, ptr, i32, i32 }
%struct._EFI_SERVICE_BINDING_PROTOCOL = type { ptr, ptr }
%struct._LIST_ENTRY = type { ptr, ptr }
%struct.IP4_ASSEMBLE_TABLE = type { [31 x %struct._LIST_ENTRY] }
%struct.IGMP_SERVICE_DATA = type { i64, %struct._LIST_ENTRY }
%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.NET_BUF = type { i32, i64, %struct._LIST_ENTRY, %union.NET_IP_HEAD, ptr, ptr, [64 x i8], ptr, i32, i32, [1 x %struct.NET_BLOCK_OP] }
%union.NET_IP_HEAD = type { ptr }
%struct.NET_BLOCK_OP = type { ptr, ptr, ptr, ptr, i32 }
%struct.IGMP_GROUP = type { %struct._LIST_ENTRY, i64, i32, i64, i8, %struct.EFI_MAC_ADDRESS }

; 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
declare dso_local ptr @Ip4FindGroup(ptr noundef, i32 noundef) #1

declare i32 @SwapBytes32(i32 noundef) #2

; Function Attrs: nounwind uwtable
define dso_local i64 @Ip4IgmpHandle(ptr noundef %0, ptr noundef %1, ptr noundef %2) #1 {
  %4 = alloca i64, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca %struct.IGMP_HEAD, align 1
  %10 = alloca ptr, align 8
  %11 = alloca i32, align 4
  %12 = alloca ptr, align 8
  %13 = 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) #3
  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 4, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  %14 = load ptr, ptr %5, align 8, !tbaa !5
  %15 = getelementptr inbounds %struct._IP4_SERVICE, ptr %14, i32 0, i32 9
  store ptr %15, ptr %8, align 8, !tbaa !5
  %16 = load ptr, ptr %7, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct.NET_BUF, ptr %16, i32 0, i32 9
  %18 = load i32, ptr %17, align 4, !tbaa !9
  %19 = zext i32 %18 to i64
  %20 = icmp ult i64 %19, 8
  br i1 %20, label %26, label %21

21:                                               ; preds = %3
  %22 = load ptr, ptr %7, align 8, !tbaa !5
  %23 = call zeroext i16 @NetbufChecksum(ptr noundef %22)
  %24 = zext i16 %23 to i32
  %25 = icmp ne i32 %24, 0
  br i1 %25, label %26, label %28

26:                                               ; preds = %21, %3
  %27 = load ptr, ptr %7, align 8, !tbaa !5
  call void @NetbufFree(ptr noundef %27)
  store i64 -9223372036854775806, ptr %4, align 8
  store i32 1, ptr %13, align 4
  br label %135

28:                                               ; preds = %21
  %29 = load ptr, ptr %7, align 8, !tbaa !5
  %30 = call i32 @NetbufCopy(ptr noundef %29, i32 noundef 0, i32 noundef 8, ptr noundef %9)
  %31 = getelementptr inbounds %struct.IGMP_HEAD, ptr %9, i32 0, i32 0
  %32 = load i8, ptr %31, align 1, !tbaa !14
  %33 = zext i8 %32 to i32
  switch i32 %33, label %133 [
    i32 17, label %34
    i32 18, label %113
    i32 22, label %113
  ]

34:                                               ; preds = %28
  %35 = getelementptr inbounds %struct.IGMP_HEAD, ptr %9, i32 0, i32 1
  %36 = load i8, ptr %35, align 1, !tbaa !17
  %37 = zext i8 %36 to i32
  %38 = icmp eq i32 %37, 0
  br i1 %38, label %39, label %43

39:                                               ; preds = %34
  %40 = load ptr, ptr %8, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.IGMP_SERVICE_DATA, ptr %40, i32 0, i32 0
  store i64 400, ptr %41, align 8, !tbaa !18
  %42 = getelementptr inbounds %struct.IGMP_HEAD, ptr %9, i32 0, i32 1
  store i8 100, ptr %42, align 1, !tbaa !17
  br label %43

43:                                               ; preds = %39, %34
  %44 = getelementptr inbounds %struct.IGMP_HEAD, ptr %9, i32 0, i32 1
  %45 = load i8, ptr %44, align 1, !tbaa !17
  %46 = zext i8 %45 to i32
  %47 = sdiv i32 %46, 10
  %48 = trunc i32 %47 to i8
  store i8 %48, ptr %44, align 1, !tbaa !17
  %49 = getelementptr inbounds %struct.IGMP_HEAD, ptr %9, i32 0, i32 3
  %50 = load i32, ptr %49, align 1, !tbaa !20
  %51 = call i32 @SwapBytes32(i32 noundef %50)
  store i32 %51, ptr %11, align 4, !tbaa !21
  %52 = load i32, ptr %11, align 4, !tbaa !21
  %53 = icmp eq i32 %52, -536870911
  br i1 %53, label %54, label %55

54:                                               ; preds = %43
  br label %133

55:                                               ; preds = %43
  %56 = load ptr, ptr %8, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.IGMP_SERVICE_DATA, ptr %56, i32 0, i32 1
  %58 = getelementptr inbounds %struct._LIST_ENTRY, ptr %57, i32 0, i32 0
  %59 = load ptr, ptr %58, align 8, !tbaa !22
  store ptr %59, ptr %12, align 8, !tbaa !5
  br label %60

60:                                               ; preds = %108, %55
  %61 = load ptr, ptr %12, align 8, !tbaa !5
  %62 = load ptr, ptr %8, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.IGMP_SERVICE_DATA, ptr %62, i32 0, i32 1
  %64 = icmp ne ptr %61, %63
  br i1 %64, label %65, label %112

65:                                               ; preds = %60
  %66 = load ptr, ptr %12, align 8, !tbaa !5
  %67 = ptrtoint ptr %66 to i64
  %68 = sub i64 %67, 0
  %69 = inttoptr i64 %68 to ptr
  store ptr %69, ptr %10, align 8, !tbaa !5
  %70 = load i32, ptr %11, align 4, !tbaa !21
  %71 = icmp eq i32 %70, 0
  br i1 %71, label %78, label %72

72:                                               ; preds = %65
  %73 = load i32, ptr %11, align 4, !tbaa !21
  %74 = load ptr, ptr %10, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.IGMP_GROUP, ptr %74, i32 0, i32 2
  %76 = load i32, ptr %75, align 8, !tbaa !23
  %77 = icmp eq i32 %73, %76
  br i1 %77, label %78, label %107

78:                                               ; preds = %72, %65
  %79 = load ptr, ptr %10, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.IGMP_GROUP, ptr %79, i32 0, i32 3
  %81 = load i64, ptr %80, align 8, !tbaa !26
  %82 = icmp eq i64 %81, 0
  br i1 %82, label %91, label %83

83:                                               ; preds = %78
  %84 = load ptr, ptr %10, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.IGMP_GROUP, ptr %84, i32 0, i32 3
  %86 = load i64, ptr %85, align 8, !tbaa !26
  %87 = getelementptr inbounds %struct.IGMP_HEAD, ptr %9, i32 0, i32 1
  %88 = load i8, ptr %87, align 1, !tbaa !17
  %89 = zext i8 %88 to i64
  %90 = icmp sgt i64 %86, %89
  br i1 %90, label %91, label %106

91:                                               ; preds = %83, %78
  %92 = getelementptr inbounds %struct.IGMP_HEAD, ptr %9, i32 0, i32 1
  %93 = load i8, ptr %92, align 1, !tbaa !17
  %94 = zext i8 %93 to i32
  %95 = icmp sgt i32 1, %94
  br i1 %95, label %96, label %97

96:                                               ; preds = %91
  br label %101

97:                                               ; preds = %91
  %98 = getelementptr inbounds %struct.IGMP_HEAD, ptr %9, i32 0, i32 1
  %99 = load i8, ptr %98, align 1, !tbaa !17
  %100 = zext i8 %99 to i32
  br label %101

101:                                              ; preds = %97, %96
  %102 = phi i32 [ 1, %96 ], [ %100, %97 ]
  %103 = sext i32 %102 to i64
  %104 = load ptr, ptr %10, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.IGMP_GROUP, ptr %104, i32 0, i32 3
  store i64 %103, ptr %105, align 8, !tbaa !26
  br label %106

106:                                              ; preds = %101, %83
  br label %107

107:                                              ; preds = %106, %72
  br label %108

108:                                              ; preds = %107
  %109 = load ptr, ptr %12, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct._LIST_ENTRY, ptr %109, i32 0, i32 0
  %111 = load ptr, ptr %110, align 8, !tbaa !27
  store ptr %111, ptr %12, align 8, !tbaa !5
  br label %60, !llvm.loop !28

112:                                              ; preds = %60
  br label %133

113:                                              ; preds = %28, %28
  %114 = getelementptr inbounds %struct.IGMP_HEAD, ptr %9, i32 0, i32 3
  %115 = load i32, ptr %114, align 1, !tbaa !20
  %116 = call i32 @SwapBytes32(i32 noundef %115)
  store i32 %116, ptr %11, align 4, !tbaa !21
  %117 = load ptr, ptr %8, align 8, !tbaa !5
  %118 = load i32, ptr %11, align 4, !tbaa !21
  %119 = call ptr @Ip4FindGroup(ptr noundef %117, i32 noundef %118)
  store ptr %119, ptr %10, align 8, !tbaa !5
  %120 = load ptr, ptr %10, align 8, !tbaa !5
  %121 = icmp ne ptr %120, null
  br i1 %121, label %122, label %132

122:                                              ; preds = %113
  %123 = load ptr, ptr %10, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.IGMP_GROUP, ptr %123, i32 0, i32 3
  %125 = load i64, ptr %124, align 8, !tbaa !26
  %126 = icmp sgt i64 %125, 0
  br i1 %126, label %127, label %132

127:                                              ; preds = %122
  %128 = load ptr, ptr %10, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.IGMP_GROUP, ptr %128, i32 0, i32 3
  store i64 0, ptr %129, align 8, !tbaa !26
  %130 = load ptr, ptr %10, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct.IGMP_GROUP, ptr %130, i32 0, i32 4
  store i8 0, ptr %131, align 8, !tbaa !30
  br label %132

132:                                              ; preds = %127, %122, %113
  br label %133

133:                                              ; preds = %132, %112, %54, %28
  %134 = load ptr, ptr %7, align 8, !tbaa !5
  call void @NetbufFree(ptr noundef %134)
  store i64 0, ptr %4, align 8
  store i32 1, ptr %13, align 4
  br label %135

135:                                              ; preds = %133, %26
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 4, 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
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  %136 = load i64, ptr %4, align 8
  ret i64 %136
}

declare zeroext i16 @NetbufChecksum(ptr noundef) #2

declare void @NetbufFree(ptr noundef) #2

declare i32 @NetbufCopy(ptr noundef, i32 noundef, i32 noundef, ptr 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, !11, i64 132}
!10 = !{!"", !11, i64 0, !12, i64 8, !13, i64 16, !7, i64 32, !6, i64 40, !6, i64 48, !7, i64 56, !6, i64 120, !11, i64 128, !11, i64 132, !7, i64 136}
!11 = !{!"int", !7, i64 0}
!12 = !{!"long long", !7, i64 0}
!13 = !{!"_LIST_ENTRY", !6, i64 0, !6, i64 8}
!14 = !{!15, !7, i64 0}
!15 = !{!"", !7, i64 0, !7, i64 1, !16, i64 2, !11, i64 4}
!16 = !{!"short", !7, i64 0}
!17 = !{!15, !7, i64 1}
!18 = !{!19, !12, i64 0}
!19 = !{!"", !12, i64 0, !13, i64 8}
!20 = !{!15, !11, i64 4}
!21 = !{!11, !11, i64 0}
!22 = !{!19, !6, i64 8}
!23 = !{!24, !11, i64 24}
!24 = !{!"", !13, i64 0, !12, i64 16, !11, i64 24, !12, i64 32, !7, i64 40, !25, i64 41}
!25 = !{!"", !7, i64 0}
!26 = !{!24, !12, i64 32}
!27 = !{!13, !6, i64 0}
!28 = distinct !{!28, !29}
!29 = !{!"llvm.loop.mustprogress"}
!30 = !{!24, !7, i64 40}


; 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.IGMP_HEAD = type { i8, i8, i16, i32 }

; 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

; Function Attrs: nounwind uwtable
declare dso_local ptr @Ip4FindGroup(ptr noundef, i32 noundef) local_unnamed_addr #1

declare i32 @SwapBytes32(i32 noundef) local_unnamed_addr #2

; Function Attrs: nounwind uwtable
define dso_local range(i64 -9223372036854775806, 1) i64 @Ip4IgmpHandle(ptr noundef %0, ptr nocapture noundef readnone %1, ptr noundef %2) local_unnamed_addr #1 {
  %4 = alloca %struct.IGMP_HEAD, align 1
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #4
  %5 = getelementptr inbounds i8, ptr %0, i64 584
  %6 = getelementptr inbounds i8, ptr %2, i64 132
  %7 = load i32, ptr %6, align 4, !tbaa !5
  %8 = icmp ult i32 %7, 8
  br i1 %8, label %11, label %9

9:                                                ; preds = %3
  %10 = tail call zeroext i16 @NetbufChecksum(ptr noundef nonnull %2) #4
  %.not = icmp eq i16 %10, 0
  br i1 %.not, label %12, label %11

11:                                               ; preds = %9, %3
  tail call void @NetbufFree(ptr noundef nonnull %2) #4
  br label %60

12:                                               ; preds = %9
  %13 = call i32 @NetbufCopy(ptr noundef nonnull %2, i32 noundef 0, i32 noundef 8, ptr noundef nonnull %4) #4
  %14 = load i8, ptr %4, align 1, !tbaa !13
  switch i8 %14, label %.loopexit [
    i8 17, label %15
    i8 18, label %49
    i8 22, label %49
  ]

15:                                               ; preds = %12
  %16 = getelementptr inbounds i8, ptr %4, i64 1
  %17 = load i8, ptr %16, align 1, !tbaa !16
  %18 = icmp eq i8 %17, 0
  br i1 %18, label %19, label %20

19:                                               ; preds = %15
  store i64 400, ptr %5, align 8, !tbaa !17
  br label %20

20:                                               ; preds = %19, %15
  %21 = phi i8 [ 100, %19 ], [ %17, %15 ]
  %22 = udiv i8 %21, 10
  store i8 %22, ptr %16, align 1, !tbaa !16
  %23 = getelementptr inbounds i8, ptr %4, i64 4
  %24 = load i32, ptr %23, align 1, !tbaa !19
  %25 = call i32 @SwapBytes32(i32 noundef %24) #4
  %26 = icmp eq i32 %25, -536870911
  br i1 %26, label %.loopexit, label %27

27:                                               ; preds = %20
  %28 = getelementptr inbounds i8, ptr %0, i64 592
  %.033 = load ptr, ptr %28, align 8, !tbaa !20
  %.not3034 = icmp eq ptr %.033, %28
  br i1 %.not3034, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %27
  %29 = icmp eq i32 %25, 0
  %30 = load i8, ptr %16, align 1
  %31 = zext i8 %30 to i64
  %narrow = call i8 @llvm.umax.i8(i8 %30, i8 1)
  %32 = zext i8 %narrow to i64
  br i1 %29, label %.lr.ph.split.us, label %.lr.ph.split

.lr.ph.split.us:                                  ; preds = %.lr.ph, %38
  %.035.us = phi ptr [ %.0.us, %38 ], [ %.033, %.lr.ph ]
  %33 = getelementptr inbounds i8, ptr %.035.us, i64 32
  %34 = load i64, ptr %33, align 8, !tbaa !21
  %35 = icmp eq i64 %34, 0
  %36 = icmp sgt i64 %34, %31
  %or.cond.us = select i1 %35, i1 true, i1 %36
  br i1 %or.cond.us, label %37, label %38

37:                                               ; preds = %.lr.ph.split.us
  store i64 %32, ptr %33, align 8, !tbaa !21
  br label %38

38:                                               ; preds = %37, %.lr.ph.split.us
  %.0.us = load ptr, ptr %.035.us, align 8, !tbaa !20
  %.not30.us = icmp eq ptr %.0.us, %28
  br i1 %.not30.us, label %.loopexit, label %.lr.ph.split.us, !llvm.loop !24

.lr.ph.split:                                     ; preds = %.lr.ph, %48
  %.035 = phi ptr [ %.0, %48 ], [ %.033, %.lr.ph ]
  %39 = getelementptr inbounds i8, ptr %.035, i64 24
  %40 = load i32, ptr %39, align 8, !tbaa !26
  %41 = icmp eq i32 %25, %40
  br i1 %41, label %42, label %48

42:                                               ; preds = %.lr.ph.split
  %43 = getelementptr inbounds i8, ptr %.035, i64 32
  %44 = load i64, ptr %43, align 8, !tbaa !21
  %45 = icmp eq i64 %44, 0
  %46 = icmp sgt i64 %44, %31
  %or.cond = select i1 %45, i1 true, i1 %46
  br i1 %or.cond, label %47, label %48

47:                                               ; preds = %42
  store i64 %32, ptr %43, align 8, !tbaa !21
  br label %48

48:                                               ; preds = %42, %.lr.ph.split, %47
  %.0 = load ptr, ptr %.035, align 8, !tbaa !20
  %.not30 = icmp eq ptr %.0, %28
  br i1 %.not30, label %.loopexit, label %.lr.ph.split, !llvm.loop !24

49:                                               ; preds = %12, %12
  %50 = getelementptr inbounds i8, ptr %4, i64 4
  %51 = load i32, ptr %50, align 1, !tbaa !19
  %52 = call i32 @SwapBytes32(i32 noundef %51) #4
  %53 = call ptr @Ip4FindGroup(ptr noundef nonnull %5, i32 noundef %52)
  %.not29 = icmp eq ptr %53, null
  br i1 %.not29, label %.loopexit, label %54

54:                                               ; preds = %49
  %55 = getelementptr inbounds i8, ptr %53, i64 32
  %56 = load i64, ptr %55, align 8, !tbaa !21
  %57 = icmp sgt i64 %56, 0
  br i1 %57, label %58, label %.loopexit

58:                                               ; preds = %54
  store i64 0, ptr %55, align 8, !tbaa !21
  %59 = getelementptr inbounds i8, ptr %53, i64 40
  store i8 0, ptr %59, align 8, !tbaa !27
  br label %.loopexit

.loopexit:                                        ; preds = %48, %38, %27, %49, %54, %58, %20, %12
  call void @NetbufFree(ptr noundef %2) #4
  br label %60

60:                                               ; preds = %.loopexit, %11
  %.025 = phi i64 [ -9223372036854775806, %11 ], [ 0, %.loopexit ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #4
  ret i64 %.025
}

declare zeroext i16 @NetbufChecksum(ptr noundef) local_unnamed_addr #2

declare void @NetbufFree(ptr noundef) local_unnamed_addr #2

declare i32 @NetbufCopy(ptr noundef, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i8 @llvm.umax.i8(i8, i8) #3

attributes #0 = { mustprogress 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 132}
!6 = !{!"", !7, i64 0, !10, i64 8, !11, i64 16, !8, i64 32, !12, i64 40, !12, i64 48, !8, i64 56, !12, i64 120, !7, i64 128, !7, i64 132, !8, i64 136}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"long long", !8, i64 0}
!11 = !{!"_LIST_ENTRY", !12, i64 0, !12, i64 8}
!12 = !{!"any pointer", !8, i64 0}
!13 = !{!14, !8, i64 0}
!14 = !{!"", !8, i64 0, !8, i64 1, !15, i64 2, !7, i64 4}
!15 = !{!"short", !8, i64 0}
!16 = !{!14, !8, i64 1}
!17 = !{!18, !10, i64 0}
!18 = !{!"", !10, i64 0, !11, i64 8}
!19 = !{!14, !7, i64 4}
!20 = !{!11, !12, i64 0}
!21 = !{!22, !10, i64 32}
!22 = !{!"", !11, i64 0, !10, i64 16, !7, i64 24, !10, i64 32, !8, i64 40, !23, i64 41}
!23 = !{!"", !8, i64 0}
!24 = distinct !{!24, !25}
!25 = !{!"llvm.loop.mustprogress"}
!26 = !{!22, !7, i64 24}
!27 = !{!22, !8, i64 40}


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass