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

; 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.IP4_ICMP_CLASS = type { i8, i8 }
%struct.IP4_ICMP_ERROR_HEAD = type { %struct.IP4_ICMP_HEAD, i32, %struct.IP4_HEAD }
%struct.IP4_ICMP_HEAD = type { i8, i8, i16 }
%struct.IP4_HEAD = type { i8, i8, i16, i16, i16, i8, i8, i16, i32, i32 }
%struct._IP4_PROTOCOL = type { i32, %struct._EFI_IP4_PROTOCOL, ptr, i64, ptr, %struct._LIST_ENTRY, %struct.NET_MAP, %struct.NET_MAP, %struct._LIST_ENTRY, %struct._LIST_ENTRY, %struct.EFI_LOCK, ptr, %struct._LIST_ENTRY, ptr, ptr, i32, ptr, i32, %struct.EFI_IP4_CONFIG_DATA }
%struct._EFI_IP4_PROTOCOL = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.NET_MAP = type { %struct._LIST_ENTRY, %struct._LIST_ENTRY, i64 }
%struct.EFI_LOCK = type { i64, i64, i32 }
%struct._LIST_ENTRY = 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.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.IP4_CLIP_INFO = type { i64, i64, i64, i64, i64, i32, i64 }
%struct._IP4_INTERFACE = type { i32, %struct._LIST_ENTRY, i64, i32, i32, i32, i32, i8, ptr, ptr, ptr, ptr, ptr, %struct._LIST_ENTRY, %struct._LIST_ENTRY, ptr, %struct.EFI_MAC_ADDRESS, %struct.EFI_MAC_ADDRESS, i32, %struct._LIST_ENTRY, i8 }
%struct.EFI_MAC_ADDRESS = type { [32 x i8] }

@mIcmpClass = external global [0 x %struct.IP4_ICMP_CLASS], 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

; Function Attrs: nounwind uwtable
define dso_local zeroext i8 @Ip4InstanceFrameAcceptable(ptr noundef %0, ptr noundef %1, ptr noundef %2) #1 {
  %4 = alloca i8, align 1
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca %struct.IP4_ICMP_ERROR_HEAD, align 1
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i16, align 2
  %12 = alloca i32, align 4
  %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 28, 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 2, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #3
  %14 = load ptr, ptr %5, align 8, !tbaa !5
  %15 = getelementptr inbounds %struct._IP4_PROTOCOL, ptr %14, i32 0, i32 18
  store ptr %15, ptr %9, align 8, !tbaa !5
  %16 = load ptr, ptr %9, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct.EFI_IP4_CONFIG_DATA, ptr %16, i32 0, i32 12
  %18 = load i32, ptr %17, align 4, !tbaa !9
  %19 = icmp eq i32 %18, -1
  br i1 %19, label %20, label %21

20:                                               ; preds = %3
  store i8 0, ptr %4, align 1
  store i32 1, ptr %13, align 4
  br label %154

21:                                               ; preds = %3
  %22 = load ptr, ptr %9, align 8, !tbaa !5
  %23 = getelementptr inbounds %struct.EFI_IP4_CONFIG_DATA, ptr %22, i32 0, i32 4
  %24 = load i8, ptr %23, align 4, !tbaa !13
  %25 = icmp ne i8 %24, 0
  br i1 %25, label %26, label %27

26:                                               ; preds = %21
  store i8 1, ptr %4, align 1
  store i32 1, ptr %13, align 4
  br label %154

27:                                               ; preds = %21
  %28 = load ptr, ptr %6, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.IP4_HEAD, ptr %28, i32 0, i32 6
  %30 = load i8, ptr %29, align 1, !tbaa !14
  %31 = zext i8 %30 to i16
  store i16 %31, ptr %11, align 2, !tbaa !17
  %32 = load i16, ptr %11, align 2, !tbaa !17
  %33 = zext i16 %32 to i32
  %34 = icmp eq i32 %33, 1
  br i1 %34, label %35, label %75

35:                                               ; preds = %27
  %36 = load ptr, ptr %9, align 8, !tbaa !5
  %37 = getelementptr inbounds %struct.EFI_IP4_CONFIG_DATA, ptr %36, i32 0, i32 1
  %38 = load i8, ptr %37, align 1, !tbaa !18
  %39 = icmp ne i8 %38, 0
  br i1 %39, label %75, label %40

40:                                               ; preds = %35
  %41 = load i16, ptr %11, align 2, !tbaa !17
  %42 = zext i16 %41 to i32
  %43 = load ptr, ptr %9, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.EFI_IP4_CONFIG_DATA, ptr %43, i32 0, i32 0
  %45 = load i8, ptr %44, align 4, !tbaa !19
  %46 = zext i8 %45 to i32
  %47 = icmp ne i32 %42, %46
  br i1 %47, label %48, label %75

48:                                               ; preds = %40
  %49 = load ptr, ptr %7, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.IP4_ICMP_ERROR_HEAD, ptr %8, i32 0, i32 0
  %51 = call i32 @NetbufCopy(ptr noundef %49, i32 noundef 0, i32 noundef 4, ptr noundef %50)
  %52 = getelementptr inbounds %struct.IP4_ICMP_ERROR_HEAD, ptr %8, i32 0, i32 0
  %53 = getelementptr inbounds %struct.IP4_ICMP_HEAD, ptr %52, i32 0, i32 0
  %54 = load i8, ptr %53, align 1, !tbaa !20
  %55 = zext i8 %54 to i64
  %56 = getelementptr inbounds [0 x %struct.IP4_ICMP_CLASS], ptr @mIcmpClass, i64 0, i64 %55
  %57 = getelementptr inbounds %struct.IP4_ICMP_CLASS, ptr %56, i32 0, i32 1
  %58 = load i8, ptr %57, align 1, !tbaa !23
  %59 = zext i8 %58 to i32
  %60 = icmp eq i32 %59, 1
  br i1 %60, label %61, label %74

61:                                               ; preds = %48
  %62 = load ptr, ptr %9, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.EFI_IP4_CONFIG_DATA, ptr %62, i32 0, i32 2
  %64 = load i8, ptr %63, align 2, !tbaa !25
  %65 = icmp ne i8 %64, 0
  br i1 %65, label %67, label %66

66:                                               ; preds = %61
  store i8 0, ptr %4, align 1
  store i32 1, ptr %13, align 4
  br label %154

67:                                               ; preds = %61
  %68 = load ptr, ptr %7, align 8, !tbaa !5
  %69 = call i32 @NetbufCopy(ptr noundef %68, i32 noundef 0, i32 noundef 28, ptr noundef %8)
  %70 = getelementptr inbounds %struct.IP4_ICMP_ERROR_HEAD, ptr %8, i32 0, i32 2
  %71 = getelementptr inbounds %struct.IP4_HEAD, ptr %70, i32 0, i32 6
  %72 = load i8, ptr %71, align 1, !tbaa !26
  %73 = zext i8 %72 to i16
  store i16 %73, ptr %11, align 2, !tbaa !17
  br label %74

74:                                               ; preds = %67, %48
  br label %75

75:                                               ; preds = %74, %40, %35, %27
  %76 = load ptr, ptr %9, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.EFI_IP4_CONFIG_DATA, ptr %76, i32 0, i32 1
  %78 = load i8, ptr %77, align 1, !tbaa !18
  %79 = icmp ne i8 %78, 0
  br i1 %79, label %89, label %80

80:                                               ; preds = %75
  %81 = load i16, ptr %11, align 2, !tbaa !17
  %82 = zext i16 %81 to i32
  %83 = load ptr, ptr %9, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.EFI_IP4_CONFIG_DATA, ptr %83, i32 0, i32 0
  %85 = load i8, ptr %84, align 4, !tbaa !19
  %86 = zext i8 %85 to i32
  %87 = icmp ne i32 %82, %86
  br i1 %87, label %88, label %89

88:                                               ; preds = %80
  store i8 0, ptr %4, align 1
  store i32 1, ptr %13, align 4
  br label %154

89:                                               ; preds = %80, %75
  %90 = load ptr, ptr %7, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct.NET_BUF, ptr %90, i32 0, i32 6
  %92 = getelementptr inbounds [64 x i8], ptr %91, i64 0, i64 0
  store ptr %92, ptr %10, align 8, !tbaa !5
  %93 = load ptr, ptr %10, align 8, !tbaa !5
  %94 = getelementptr inbounds %struct.IP4_CLIP_INFO, ptr %93, i32 0, i32 1
  %95 = load i64, ptr %94, align 8, !tbaa !27
  %96 = icmp sge i64 %95, 4
  br i1 %96, label %97, label %101

97:                                               ; preds = %89
  %98 = load ptr, ptr %9, align 8, !tbaa !5
  %99 = getelementptr inbounds %struct.EFI_IP4_CONFIG_DATA, ptr %98, i32 0, i32 3
  %100 = load i8, ptr %99, align 1, !tbaa !30
  store i8 %100, ptr %4, align 1
  store i32 1, ptr %13, align 4
  br label %154

101:                                              ; preds = %89
  %102 = load ptr, ptr %10, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.IP4_CLIP_INFO, ptr %102, i32 0, i32 1
  %104 = load i64, ptr %103, align 8, !tbaa !27
  %105 = icmp eq i64 %104, 3
  br i1 %105, label %106, label %153

106:                                              ; preds = %101
  %107 = load ptr, ptr %5, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct._IP4_PROTOCOL, ptr %107, i32 0, i32 18
  %109 = getelementptr inbounds %struct.EFI_IP4_CONFIG_DATA, ptr %108, i32 0, i32 5
  %110 = load i8, ptr %109, align 1, !tbaa !31
  %111 = icmp ne i8 %110, 0
  br i1 %111, label %120, label %112

112:                                              ; preds = %106
  %113 = load ptr, ptr %5, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct._IP4_PROTOCOL, ptr %113, i32 0, i32 11
  %115 = load ptr, ptr %114, align 8, !tbaa !37
  %116 = getelementptr inbounds %struct._IP4_INTERFACE, ptr %115, i32 0, i32 3
  %117 = load i32, ptr %116, align 8, !tbaa !38
  %118 = icmp eq i32 %117, 0
  br i1 %118, label %119, label %120

119:                                              ; preds = %112
  store i8 1, ptr %4, align 1
  store i32 1, ptr %13, align 4
  br label %154

120:                                              ; preds = %112, %106
  store i32 0, ptr %12, align 4, !tbaa !40
  br label %121

121:                                              ; preds = %142, %120
  %122 = load i32, ptr %12, align 4, !tbaa !40
  %123 = load ptr, ptr %5, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct._IP4_PROTOCOL, ptr %123, i32 0, i32 17
  %125 = load i32, ptr %124, align 8, !tbaa !41
  %126 = icmp ult i32 %122, %125
  br i1 %126, label %127, label %145

127:                                              ; preds = %121
  %128 = load ptr, ptr %5, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct._IP4_PROTOCOL, ptr %128, i32 0, i32 16
  %130 = load ptr, ptr %129, align 8, !tbaa !42
  %131 = load i32, ptr %12, align 4, !tbaa !40
  %132 = zext i32 %131 to i64
  %133 = getelementptr inbounds i32, ptr %130, i64 %132
  %134 = load i32, ptr %133, align 4, !tbaa !40
  %135 = load ptr, ptr %6, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.IP4_HEAD, ptr %135, i32 0, i32 9
  %137 = load i32, ptr %136, align 1, !tbaa !43
  %138 = call i32 @SwapBytes32(i32 noundef %137)
  %139 = icmp eq i32 %134, %138
  br i1 %139, label %140, label %141

140:                                              ; preds = %127
  br label %145

141:                                              ; preds = %127
  br label %142

142:                                              ; preds = %141
  %143 = load i32, ptr %12, align 4, !tbaa !40
  %144 = add i32 %143, 1
  store i32 %144, ptr %12, align 4, !tbaa !40
  br label %121, !llvm.loop !44

145:                                              ; preds = %140, %121
  %146 = load i32, ptr %12, align 4, !tbaa !40
  %147 = load ptr, ptr %5, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct._IP4_PROTOCOL, ptr %147, i32 0, i32 17
  %149 = load i32, ptr %148, align 8, !tbaa !41
  %150 = icmp ult i32 %146, %149
  %151 = zext i1 %150 to i32
  %152 = trunc i32 %151 to i8
  store i8 %152, ptr %4, align 1
  store i32 1, ptr %13, align 4
  br label %154

153:                                              ; preds = %101
  store i8 1, ptr %4, align 1
  store i32 1, ptr %13, align 4
  br label %154

154:                                              ; preds = %153, %145, %119, %97, %88, %66, %26, %20
  call void @llvm.lifetime.end.p0(i64 4, 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
  call void @llvm.lifetime.end.p0(i64 28, ptr %8) #3
  %155 = load i8, ptr %4, align 1
  ret i8 %155
}

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

declare i32 @SwapBytes32(i32 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, !12, i64 20}
!10 = !{!"", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !7, i64 4, !7, i64 5, !11, i64 6, !11, i64 10, !7, i64 14, !7, i64 15, !7, i64 16, !7, i64 17, !12, i64 20, !12, i64 24}
!11 = !{!"", !7, i64 0}
!12 = !{!"int", !7, i64 0}
!13 = !{!10, !7, i64 4}
!14 = !{!15, !7, i64 9}
!15 = !{!"", !7, i64 0, !7, i64 0, !7, i64 1, !16, i64 2, !16, i64 4, !16, i64 6, !7, i64 8, !7, i64 9, !16, i64 10, !12, i64 12, !12, i64 16}
!16 = !{!"short", !7, i64 0}
!17 = !{!16, !16, i64 0}
!18 = !{!10, !7, i64 1}
!19 = !{!10, !7, i64 0}
!20 = !{!21, !7, i64 0}
!21 = !{!"", !22, i64 0, !12, i64 4, !15, i64 8}
!22 = !{!"", !7, i64 0, !7, i64 1, !16, i64 2}
!23 = !{!24, !7, i64 1}
!24 = !{!"", !7, i64 0, !7, i64 1}
!25 = !{!10, !7, i64 2}
!26 = !{!21, !7, i64 17}
!27 = !{!28, !29, i64 8}
!28 = !{!"", !29, i64 0, !29, i64 8, !29, i64 16, !29, i64 24, !29, i64 32, !12, i64 40, !29, i64 48}
!29 = !{!"long long", !7, i64 0}
!30 = !{!10, !7, i64 3}
!31 = !{!32, !7, i64 313}
!32 = !{!"_IP4_PROTOCOL", !12, i64 0, !33, i64 8, !6, i64 72, !29, i64 80, !6, i64 88, !34, i64 96, !35, i64 112, !35, i64 152, !34, i64 192, !34, i64 208, !36, i64 224, !6, i64 248, !34, i64 256, !6, i64 272, !6, i64 280, !12, i64 288, !6, i64 296, !12, i64 304, !10, i64 308}
!33 = !{!"_EFI_IP4_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}
!34 = !{!"_LIST_ENTRY", !6, i64 0, !6, i64 8}
!35 = !{!"", !34, i64 0, !34, i64 16, !29, i64 32}
!36 = !{!"", !29, i64 0, !29, i64 8, !12, i64 16}
!37 = !{!32, !6, i64 248}
!38 = !{!39, !12, i64 32}
!39 = !{!"_IP4_INTERFACE", !12, i64 0, !34, i64 8, !29, i64 24, !12, i64 32, !12, i64 36, !12, i64 40, !12, i64 44, !7, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !34, i64 96, !34, i64 112, !6, i64 128, !11, i64 136, !11, i64 168, !12, i64 200, !34, i64 208, !7, i64 224}
!40 = !{!12, !12, i64 0}
!41 = !{!32, !12, i64 304}
!42 = !{!32, !6, i64 296}
!43 = !{!15, !12, i64 16}
!44 = distinct !{!44, !45}
!45 = !{!"llvm.loop.mustprogress"}


; 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.IP4_ICMP_CLASS = type { i8, i8 }
%struct.IP4_ICMP_ERROR_HEAD = type { %struct.IP4_ICMP_HEAD, i32, %struct.IP4_HEAD }
%struct.IP4_ICMP_HEAD = type { i8, i8, i16 }
%struct.IP4_HEAD = type { i8, i8, i16, i16, i16, i8, i8, i16, i32, i32 }

@mIcmpClass = external local_unnamed_addr global [0 x %struct.IP4_ICMP_CLASS], 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

; Function Attrs: nounwind uwtable
define dso_local zeroext i8 @Ip4InstanceFrameAcceptable(ptr nocapture noundef readonly %0, ptr nocapture noundef readonly %1, ptr noundef %2) local_unnamed_addr #1 {
  %4 = alloca %struct.IP4_ICMP_ERROR_HEAD, align 1
  call void @llvm.lifetime.start.p0(i64 28, ptr nonnull %4) #3
  %5 = getelementptr inbounds i8, ptr %0, i64 308
  %6 = getelementptr inbounds i8, ptr %0, i64 328
  %7 = load i32, ptr %6, align 4, !tbaa !5
  %8 = icmp eq i32 %7, -1
  br i1 %8, label %76, label %9

9:                                                ; preds = %3
  %10 = getelementptr inbounds i8, ptr %0, i64 312
  %11 = load i8, ptr %10, align 4, !tbaa !11
  %.not = icmp eq i8 %11, 0
  br i1 %.not, label %12, label %76

12:                                               ; preds = %9
  %13 = getelementptr inbounds i8, ptr %1, i64 9
  %14 = load i8, ptr %13, align 1, !tbaa !12
  %15 = icmp eq i8 %14, 1
  br i1 %15, label %16, label %35

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

19:                                               ; preds = %16
  %20 = load i8, ptr %5, align 4, !tbaa !16
  %.not33 = icmp eq i8 %20, 1
  br i1 %.not33, label %35, label %21

21:                                               ; preds = %19
  %22 = call i32 @NetbufCopy(ptr noundef %2, i32 noundef 0, i32 noundef 4, ptr noundef nonnull %4) #3
  %23 = load i8, ptr %4, align 1, !tbaa !17
  %24 = zext i8 %23 to i64
  %25 = getelementptr inbounds [0 x %struct.IP4_ICMP_CLASS], ptr @mIcmpClass, i64 0, i64 %24, i32 1
  %26 = load i8, ptr %25, align 1, !tbaa !20
  %27 = icmp eq i8 %26, 1
  br i1 %27, label %28, label %35

28:                                               ; preds = %21
  %29 = getelementptr inbounds i8, ptr %0, i64 310
  %30 = load i8, ptr %29, align 2, !tbaa !22
  %.not34 = icmp eq i8 %30, 0
  br i1 %.not34, label %76, label %31

31:                                               ; preds = %28
  %32 = call i32 @NetbufCopy(ptr noundef %2, i32 noundef 0, i32 noundef 28, ptr noundef nonnull %4) #3
  %33 = getelementptr inbounds i8, ptr %4, i64 17
  %34 = load i8, ptr %33, align 1, !tbaa !23
  br label %35

35:                                               ; preds = %21, %31, %19, %16, %12
  %.028.in = phi i8 [ 1, %16 ], [ %34, %31 ], [ 1, %21 ], [ 1, %19 ], [ %14, %12 ]
  %36 = getelementptr inbounds i8, ptr %0, i64 309
  %37 = load i8, ptr %36, align 1, !tbaa !15
  %.not35 = icmp eq i8 %37, 0
  br i1 %.not35, label %38, label %40

38:                                               ; preds = %35
  %39 = load i8, ptr %5, align 4, !tbaa !16
  %.not36 = icmp eq i8 %.028.in, %39
  br i1 %.not36, label %40, label %76

40:                                               ; preds = %38, %35
  %41 = getelementptr inbounds i8, ptr %2, i64 64
  %42 = load i64, ptr %41, align 8, !tbaa !24
  %43 = icmp sgt i64 %42, 3
  br i1 %43, label %44, label %47

44:                                               ; preds = %40
  %45 = getelementptr inbounds i8, ptr %0, i64 311
  %46 = load i8, ptr %45, align 1, !tbaa !27
  br label %76

47:                                               ; preds = %40
  %48 = icmp eq i64 %42, 3
  br i1 %48, label %49, label %76

49:                                               ; preds = %47
  %50 = getelementptr inbounds i8, ptr %0, i64 313
  %51 = load i8, ptr %50, align 1, !tbaa !28
  %.not37 = icmp eq i8 %51, 0
  br i1 %.not37, label %52, label %58

52:                                               ; preds = %49
  %53 = getelementptr inbounds i8, ptr %0, i64 248
  %54 = load ptr, ptr %53, align 8, !tbaa !35
  %55 = getelementptr inbounds i8, ptr %54, i64 32
  %56 = load i32, ptr %55, align 8, !tbaa !36
  %57 = icmp eq i32 %56, 0
  br i1 %57, label %76, label %58

58:                                               ; preds = %52, %49
  %59 = getelementptr inbounds i8, ptr %0, i64 296
  %60 = getelementptr inbounds i8, ptr %0, i64 304
  %61 = load i32, ptr %60, align 8, !tbaa !38
  %.not41 = icmp eq i32 %61, 0
  br i1 %.not41, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %58
  %62 = getelementptr inbounds i8, ptr %1, i64 16
  br label %63

63:                                               ; preds = %.lr.ph, %70
  %indvars.iv = phi i64 [ 0, %.lr.ph ], [ %indvars.iv.next, %70 ]
  %64 = load ptr, ptr %59, align 8, !tbaa !39
  %65 = getelementptr inbounds i32, ptr %64, i64 %indvars.iv
  %66 = load i32, ptr %65, align 4, !tbaa !40
  %67 = load i32, ptr %62, align 1, !tbaa !41
  %68 = call i32 @SwapBytes32(i32 noundef %67) #3
  %69 = icmp eq i32 %66, %68
  %.pre.pre = load i32, ptr %60, align 8, !tbaa !38
  br i1 %69, label %._crit_edge.loopexit, label %70

70:                                               ; preds = %63
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %71 = zext i32 %.pre.pre to i64
  %72 = icmp ult i64 %indvars.iv.next, %71
  br i1 %72, label %63, label %._crit_edge.loopexit, !llvm.loop !42

._crit_edge.loopexit:                             ; preds = %63, %70
  %.0.lcssa.ph.in = phi i64 [ %indvars.iv.next, %70 ], [ %indvars.iv, %63 ]
  %.0.lcssa.ph = trunc i64 %.0.lcssa.ph.in to i32
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit, %58
  %73 = phi i32 [ 0, %58 ], [ %.pre.pre, %._crit_edge.loopexit ]
  %.0.lcssa = phi i32 [ 0, %58 ], [ %.0.lcssa.ph, %._crit_edge.loopexit ]
  %74 = icmp ult i32 %.0.lcssa, %73
  %75 = zext i1 %74 to i8
  br label %76

76:                                               ; preds = %47, %52, %38, %28, %9, %3, %._crit_edge, %44
  %.029 = phi i8 [ %46, %44 ], [ %75, %._crit_edge ], [ 0, %3 ], [ 1, %9 ], [ 0, %28 ], [ 0, %38 ], [ 1, %52 ], [ 1, %47 ]
  call void @llvm.lifetime.end.p0(i64 28, ptr nonnull %4) #3
  ret i8 %.029
}

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

declare i32 @SwapBytes32(i32 noundef) local_unnamed_addr #2

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 = { 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, !10, i64 20}
!6 = !{!"", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !7, i64 4, !7, i64 5, !9, i64 6, !9, i64 10, !7, i64 14, !7, i64 15, !7, i64 16, !7, i64 17, !10, i64 20, !10, i64 24}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!"", !7, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!6, !7, i64 4}
!12 = !{!13, !7, i64 9}
!13 = !{!"", !7, i64 0, !7, i64 0, !7, i64 1, !14, i64 2, !14, i64 4, !14, i64 6, !7, i64 8, !7, i64 9, !14, i64 10, !10, i64 12, !10, i64 16}
!14 = !{!"short", !7, i64 0}
!15 = !{!6, !7, i64 1}
!16 = !{!6, !7, i64 0}
!17 = !{!18, !7, i64 0}
!18 = !{!"", !19, i64 0, !10, i64 4, !13, i64 8}
!19 = !{!"", !7, i64 0, !7, i64 1, !14, i64 2}
!20 = !{!21, !7, i64 1}
!21 = !{!"", !7, i64 0, !7, i64 1}
!22 = !{!6, !7, i64 2}
!23 = !{!18, !7, i64 17}
!24 = !{!25, !26, i64 8}
!25 = !{!"", !26, i64 0, !26, i64 8, !26, i64 16, !26, i64 24, !26, i64 32, !10, i64 40, !26, i64 48}
!26 = !{!"long long", !7, i64 0}
!27 = !{!6, !7, i64 3}
!28 = !{!29, !7, i64 313}
!29 = !{!"_IP4_PROTOCOL", !10, i64 0, !30, i64 8, !31, i64 72, !26, i64 80, !31, i64 88, !32, i64 96, !33, i64 112, !33, i64 152, !32, i64 192, !32, i64 208, !34, i64 224, !31, i64 248, !32, i64 256, !31, i64 272, !31, i64 280, !10, i64 288, !31, i64 296, !10, i64 304, !6, i64 308}
!30 = !{!"_EFI_IP4_PROTOCOL", !31, i64 0, !31, i64 8, !31, i64 16, !31, i64 24, !31, i64 32, !31, i64 40, !31, i64 48, !31, i64 56}
!31 = !{!"any pointer", !7, i64 0}
!32 = !{!"_LIST_ENTRY", !31, i64 0, !31, i64 8}
!33 = !{!"", !32, i64 0, !32, i64 16, !26, i64 32}
!34 = !{!"", !26, i64 0, !26, i64 8, !10, i64 16}
!35 = !{!29, !31, i64 248}
!36 = !{!37, !10, i64 32}
!37 = !{!"_IP4_INTERFACE", !10, i64 0, !32, i64 8, !26, i64 24, !10, i64 32, !10, i64 36, !10, i64 40, !10, i64 44, !7, i64 48, !31, i64 56, !31, i64 64, !31, i64 72, !31, i64 80, !31, i64 88, !32, i64 96, !32, i64 112, !31, i64 128, !9, i64 136, !9, i64 168, !10, i64 200, !32, i64 208, !7, i64 224}
!38 = !{!29, !10, i64 304}
!39 = !{!29, !31, i64 296}
!40 = !{!10, !10, i64 0}
!41 = !{!13, !10, i64 16}
!42 = distinct !{!42, !43}
!43 = !{!"llvm.loop.mustprogress"}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass