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

; 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_SIMPLE_NETWORK_PROTOCOL = type { i64, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.EFI_MANAGED_NETWORK_RECEIVE_DATA = type { %struct.EFI_TIME, ptr, i32, i32, i32, i32, i8, i8, i8, i16, ptr, ptr, ptr, ptr }
%struct.EFI_TIME = type { i16, i8, i8, i8, i8, i8, i8, i32, i16, 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.MNP_GROUP_ADDRESS = type { %struct._LIST_ENTRY, %struct.EFI_MAC_ADDRESS, i64 }
%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 }

@.str = external hidden unnamed_addr constant [147 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [23 x i8], align 1

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

declare zeroext i8 @DebugAssertEnabled() #1

declare void @DebugAssert(ptr noundef, i64 noundef, ptr noundef) #1

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

declare ptr @NetbufGetByte(ptr noundef, i32 noundef, ptr noundef) #1

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

26:                                               ; preds = %5
  %27 = call zeroext i8 @DebugAssertEnabled()
  %28 = icmp ne i8 %27, 0
  br i1 %28, label %29, label %34

29:                                               ; preds = %26
  %30 = load ptr, ptr %13, align 8, !tbaa !5
  %31 = icmp ne ptr %30, null
  br i1 %31, label %33, label %32

32:                                               ; preds = %29
  call void @DebugAssert(ptr noundef @.str, i64 noundef 660, ptr noundef @.str.17)
  br label %33

33:                                               ; preds = %32, %29
  br label %34

34:                                               ; preds = %33, %26
  br label %35

35:                                               ; preds = %34
  br label %36

36:                                               ; preds = %35
  %37 = load ptr, ptr %8, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_RECEIVE_DATA, ptr %37, i32 0, i32 6
  store i8 0, ptr %38, align 8, !tbaa !22
  %39 = load ptr, ptr %8, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_RECEIVE_DATA, ptr %39, i32 0, i32 7
  store i8 0, ptr %40, align 1, !tbaa !25
  %41 = load ptr, ptr %8, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_RECEIVE_DATA, ptr %41, i32 0, i32 8
  store i8 0, ptr %42, align 2, !tbaa !26
  %43 = load ptr, ptr %10, align 8, !tbaa !5
  store i8 1, ptr %43, align 1, !tbaa !27
  %44 = load ptr, ptr %11, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %44, i32 0, i32 11
  %46 = load ptr, ptr %13, align 8, !tbaa !5
  %47 = load ptr, ptr %11, align 8, !tbaa !5
  %48 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %47, i32 0, i32 1
  %49 = load i32, ptr %48, align 4, !tbaa !28
  %50 = zext i32 %49 to i64
  %51 = call i64 @CompareMem(ptr noundef %45, ptr noundef %46, i64 noundef %50)
  %52 = icmp eq i64 %51, 0
  br i1 %52, label %129, label %53

53:                                               ; preds = %36
  %54 = load ptr, ptr %10, align 8, !tbaa !5
  store i8 0, ptr %54, align 1, !tbaa !27
  %55 = load ptr, ptr %11, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %55, i32 0, i32 12
  %57 = load ptr, ptr %13, align 8, !tbaa !5
  %58 = load ptr, ptr %11, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %58, i32 0, i32 1
  %60 = load i32, ptr %59, align 4, !tbaa !28
  %61 = zext i32 %60 to i64
  %62 = call i64 @CompareMem(ptr noundef %56, ptr noundef %57, i64 noundef %61)
  %63 = icmp eq i64 %62, 0
  br i1 %63, label %64, label %68

64:                                               ; preds = %53
  %65 = load ptr, ptr %8, align 8, !tbaa !5
  %66 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_RECEIVE_DATA, ptr %65, i32 0, i32 6
  store i8 1, ptr %66, align 8, !tbaa !22
  %67 = load ptr, ptr %10, align 8, !tbaa !5
  store i8 2, ptr %67, align 1, !tbaa !27
  br label %128

68:                                               ; preds = %53
  %69 = load ptr, ptr %13, align 8, !tbaa !5
  %70 = load i8, ptr %69, align 1, !tbaa !27
  %71 = zext i8 %70 to i32
  %72 = and i32 %71, 1
  %73 = icmp eq i32 %72, 1
  br i1 %73, label %74, label %124

74:                                               ; preds = %68
  %75 = load ptr, ptr %12, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %75, i32 0, i32 9
  %77 = getelementptr inbounds %struct._LIST_ENTRY, ptr %76, i32 0, i32 0
  %78 = load ptr, ptr %77, align 8, !tbaa !31
  store ptr %78, ptr %14, align 8, !tbaa !5
  br label %79

79:                                               ; preds = %104, %74
  %80 = load ptr, ptr %14, align 8, !tbaa !5
  %81 = load ptr, ptr %12, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %81, i32 0, i32 9
  %83 = icmp ne ptr %80, %82
  br i1 %83, label %84, label %108

84:                                               ; preds = %79
  %85 = load ptr, ptr %14, align 8, !tbaa !5
  %86 = ptrtoint ptr %85 to i64
  %87 = sub i64 %86, 0
  %88 = inttoptr i64 %87 to ptr
  %89 = load ptr, ptr %9, align 8, !tbaa !5
  store ptr %88, ptr %89, align 8, !tbaa !5
  %90 = load ptr, ptr %13, align 8, !tbaa !5
  %91 = load ptr, ptr %9, align 8, !tbaa !5
  %92 = load ptr, ptr %91, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.MNP_GROUP_ADDRESS, ptr %92, i32 0, i32 1
  %94 = load ptr, ptr %11, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %94, i32 0, i32 1
  %96 = load i32, ptr %95, align 4, !tbaa !28
  %97 = zext i32 %96 to i64
  %98 = call i64 @CompareMem(ptr noundef %90, ptr noundef %93, i64 noundef %97)
  %99 = icmp eq i64 %98, 0
  br i1 %99, label %100, label %103

100:                                              ; preds = %84
  %101 = load ptr, ptr %8, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_RECEIVE_DATA, ptr %101, i32 0, i32 7
  store i8 1, ptr %102, align 1, !tbaa !25
  br label %108

103:                                              ; preds = %84
  br label %104

104:                                              ; preds = %103
  %105 = load ptr, ptr %14, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct._LIST_ENTRY, ptr %105, i32 0, i32 0
  %107 = load ptr, ptr %106, align 8, !tbaa !32
  store ptr %107, ptr %14, align 8, !tbaa !5
  br label %79, !llvm.loop !33

108:                                              ; preds = %100, %79
  %109 = load ptr, ptr %8, align 8, !tbaa !5
  %110 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_RECEIVE_DATA, ptr %109, i32 0, i32 7
  %111 = load i8, ptr %110, align 1, !tbaa !25
  %112 = icmp ne i8 %111, 0
  br i1 %112, label %123, label %113

113:                                              ; preds = %108
  %114 = load ptr, ptr %9, align 8, !tbaa !5
  store ptr null, ptr %114, align 8, !tbaa !5
  %115 = load ptr, ptr %8, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_RECEIVE_DATA, ptr %115, i32 0, i32 8
  store i8 1, ptr %116, align 2, !tbaa !26
  %117 = load ptr, ptr %12, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct.MNP_DEVICE_DATA, ptr %117, i32 0, i32 21
  %119 = load i32, ptr %118, align 4, !tbaa !35
  %120 = icmp eq i32 %119, 0
  br i1 %120, label %121, label %122

121:                                              ; preds = %113
  store i32 1, ptr %15, align 4
  br label %168

122:                                              ; preds = %113
  br label %123

123:                                              ; preds = %122, %108
  br label %127

124:                                              ; preds = %68
  %125 = load ptr, ptr %8, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_RECEIVE_DATA, ptr %125, i32 0, i32 8
  store i8 1, ptr %126, align 2, !tbaa !26
  br label %127

127:                                              ; preds = %124, %123
  br label %128

128:                                              ; preds = %127, %64
  br label %129

129:                                              ; preds = %128, %36
  %130 = load ptr, ptr %8, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_RECEIVE_DATA, ptr %130, i32 0, i32 0
  %132 = call ptr @ZeroMem(ptr noundef %131, i64 noundef 16)
  %133 = load ptr, ptr %7, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct.NET_BUF, ptr %133, i32 0, i32 9
  %135 = load i32, ptr %134, align 4, !tbaa !36
  %136 = load ptr, ptr %8, align 8, !tbaa !5
  %137 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_RECEIVE_DATA, ptr %136, i32 0, i32 2
  store i32 %135, ptr %137, align 8, !tbaa !38
  %138 = load ptr, ptr %11, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %138, i32 0, i32 2
  %140 = load i32, ptr %139, align 4, !tbaa !39
  %141 = load ptr, ptr %8, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_RECEIVE_DATA, ptr %141, i32 0, i32 3
  store i32 %140, ptr %142, align 4, !tbaa !40
  %143 = load ptr, ptr %11, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %143, i32 0, i32 1
  %145 = load i32, ptr %144, align 4, !tbaa !28
  %146 = load ptr, ptr %8, align 8, !tbaa !5
  %147 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_RECEIVE_DATA, ptr %146, i32 0, i32 4
  store i32 %145, ptr %147, align 8, !tbaa !41
  %148 = load ptr, ptr %8, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_RECEIVE_DATA, ptr %148, i32 0, i32 2
  %150 = load i32, ptr %149, align 8, !tbaa !38
  %151 = load ptr, ptr %8, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_RECEIVE_DATA, ptr %151, i32 0, i32 3
  %153 = load i32, ptr %152, align 4, !tbaa !40
  %154 = sub i32 %150, %153
  %155 = load ptr, ptr %8, align 8, !tbaa !5
  %156 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_RECEIVE_DATA, ptr %155, i32 0, i32 5
  store i32 %154, ptr %156, align 4, !tbaa !42
  %157 = load ptr, ptr %13, align 8, !tbaa !5
  %158 = load ptr, ptr %11, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct.EFI_SIMPLE_NETWORK_MODE, ptr %158, i32 0, i32 1
  %160 = load i32, ptr %159, align 4, !tbaa !28
  %161 = mul i32 2, %160
  %162 = zext i32 %161 to i64
  %163 = getelementptr inbounds i8, ptr %157, i64 %162
  %164 = load i16, ptr %163, align 2, !tbaa !43
  %165 = call zeroext i16 @SwapBytes16(i16 noundef zeroext %164)
  %166 = load ptr, ptr %8, align 8, !tbaa !5
  %167 = getelementptr inbounds %struct.EFI_MANAGED_NETWORK_RECEIVE_DATA, ptr %166, i32 0, i32 9
  store i16 %165, ptr %167, align 4, !tbaa !44
  store i32 0, ptr %15, align 4
  br label %168

168:                                              ; preds = %129, %121
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #3
  %169 = load i32, ptr %15, align 4
  switch i32 %169, label %171 [
    i32 0, label %170
    i32 1, label %170
  ]

170:                                              ; preds = %168, %168
  ret void

171:                                              ; preds = %168
  unreachable
}

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

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

declare zeroext i16 @SwapBytes16(i16 noundef zeroext) #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 = { 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 64}
!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 120}
!21 = !{!"_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}
!22 = !{!23, !7, i64 40}
!23 = !{!"", !24, i64 0, !6, i64 16, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !7, i64 40, !7, i64 41, !7, i64 42, !15, i64 44, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72}
!24 = !{!"", !15, i64 0, !7, i64 2, !7, i64 3, !7, i64 4, !7, i64 5, !7, i64 6, !7, i64 7, !11, i64 8, !15, i64 12, !7, i64 14, !7, i64 15}
!25 = !{!23, !7, i64 41}
!26 = !{!23, !7, i64 42}
!27 = !{!7, !7, i64 0}
!28 = !{!29, !11, i64 4}
!29 = !{!"", !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, !30, i64 552, !30, i64 584, !30, i64 616, !7, i64 648, !7, i64 649, !7, i64 650, !7, i64 651, !7, i64 652}
!30 = !{!"", !7, i64 0}
!31 = !{!17, !6, i64 96}
!32 = !{!12, !6, i64 0}
!33 = distinct !{!33, !34}
!34 = !{!"llvm.loop.mustprogress"}
!35 = !{!17, !11, i64 236}
!36 = !{!37, !11, i64 132}
!37 = !{!"", !11, i64 0, !14, i64 8, !12, 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}
!38 = !{!23, !11, i64 24}
!39 = !{!29, !11, i64 8}
!40 = !{!23, !11, i64 28}
!41 = !{!23, !11, i64 32}
!42 = !{!23, !11, i64 36}
!43 = !{!15, !15, i64 0}
!44 = !{!23, !15, i64 44}


; 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"

@.str = external hidden unnamed_addr constant [147 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [23 x i8], align 1

declare zeroext i8 @DebugAssertEnabled() local_unnamed_addr #0

declare void @DebugAssert(ptr noundef, i64 noundef, ptr noundef) local_unnamed_addr #0

declare ptr @NetbufGetByte(ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local void @MnpAnalysePacket(ptr nocapture noundef readonly %0, ptr noundef %1, ptr noundef %2, ptr nocapture noundef writeonly %3, ptr nocapture noundef writeonly %4) local_unnamed_addr #1 {
  %6 = getelementptr inbounds i8, ptr %0, i64 24
  %7 = load ptr, ptr %6, align 8, !tbaa !5
  %8 = getelementptr inbounds i8, ptr %7, i64 64
  %9 = load ptr, ptr %8, align 8, !tbaa !15
  %10 = getelementptr inbounds i8, ptr %9, i64 120
  %11 = load ptr, ptr %10, align 8, !tbaa !19
  %12 = tail call ptr @NetbufGetByte(ptr noundef %1, i32 noundef 0, ptr noundef null) #2
  %13 = tail call zeroext i8 @DebugAssertEnabled() #2
  %14 = icmp eq i8 %13, 0
  %15 = icmp ne ptr %12, null
  %or.cond = select i1 %14, i1 true, i1 %15
  br i1 %or.cond, label %17, label %16

16:                                               ; preds = %5
  tail call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 660, ptr noundef nonnull @.str.17) #2
  br label %17

17:                                               ; preds = %16, %5
  %18 = getelementptr inbounds i8, ptr %2, i64 40
  store i8 0, ptr %18, align 8, !tbaa !21
  %19 = getelementptr inbounds i8, ptr %2, i64 41
  store i8 0, ptr %19, align 1, !tbaa !24
  %20 = getelementptr inbounds i8, ptr %2, i64 42
  store i8 0, ptr %20, align 2, !tbaa !25
  store i8 1, ptr %4, align 1, !tbaa !26
  %21 = getelementptr inbounds i8, ptr %11, i64 552
  %22 = getelementptr inbounds i8, ptr %11, i64 4
  %23 = load i32, ptr %22, align 4, !tbaa !27
  %24 = zext i32 %23 to i64
  %25 = tail call i64 @CompareMem(ptr noundef nonnull %21, ptr noundef %12, i64 noundef %24) #2
  %26 = icmp eq i64 %25, 0
  br i1 %26, label %52, label %27

27:                                               ; preds = %17
  store i8 0, ptr %4, align 1, !tbaa !26
  %28 = getelementptr inbounds i8, ptr %11, i64 584
  %29 = load i32, ptr %22, align 4, !tbaa !27
  %30 = zext i32 %29 to i64
  %31 = tail call i64 @CompareMem(ptr noundef nonnull %28, ptr noundef %12, i64 noundef %30) #2
  %32 = icmp eq i64 %31, 0
  br i1 %32, label %33, label %34

33:                                               ; preds = %27
  store i8 1, ptr %18, align 8, !tbaa !21
  store i8 2, ptr %4, align 1, !tbaa !26
  br label %52

34:                                               ; preds = %27
  %35 = load i8, ptr %12, align 1, !tbaa !26
  %36 = and i8 %35, 1
  %.not = icmp eq i8 %36, 0
  br i1 %.not, label %51, label %37

37:                                               ; preds = %34
  %38 = getelementptr inbounds i8, ptr %7, i64 96
  br label %39

39:                                               ; preds = %40, %37
  %.0.in = phi ptr [ %38, %37 ], [ %.0, %40 ]
  %.0 = load ptr, ptr %.0.in, align 8, !tbaa !30
  %.not47 = icmp eq ptr %.0, %38
  br i1 %.not47, label %46, label %40

40:                                               ; preds = %39
  store ptr %.0, ptr %3, align 8, !tbaa !31
  %41 = getelementptr inbounds i8, ptr %.0, i64 16
  %42 = load i32, ptr %22, align 4, !tbaa !27
  %43 = zext i32 %42 to i64
  %44 = tail call i64 @CompareMem(ptr noundef nonnull %12, ptr noundef nonnull %41, i64 noundef %43) #2
  %45 = icmp eq i64 %44, 0
  br i1 %45, label %.thread, label %39, !llvm.loop !32

.thread:                                          ; preds = %40
  store i8 1, ptr %19, align 1, !tbaa !24
  br label %52

46:                                               ; preds = %39
  %.pr = load i8, ptr %19, align 1, !tbaa !24
  %.not48 = icmp eq i8 %.pr, 0
  br i1 %.not48, label %47, label %52

47:                                               ; preds = %46
  store ptr null, ptr %3, align 8, !tbaa !31
  store i8 1, ptr %20, align 2, !tbaa !25
  %48 = getelementptr inbounds i8, ptr %7, i64 236
  %49 = load i32, ptr %48, align 4, !tbaa !34
  %50 = icmp eq i32 %49, 0
  br i1 %50, label %70, label %52

51:                                               ; preds = %34
  store i8 1, ptr %20, align 2, !tbaa !25
  br label %52

52:                                               ; preds = %.thread, %33, %46, %47, %51, %17
  %53 = tail call ptr @ZeroMem(ptr noundef nonnull %2, i64 noundef 16) #2
  %54 = getelementptr inbounds i8, ptr %1, i64 132
  %55 = load i32, ptr %54, align 4, !tbaa !35
  %56 = getelementptr inbounds i8, ptr %2, i64 24
  store i32 %55, ptr %56, align 8, !tbaa !37
  %57 = getelementptr inbounds i8, ptr %11, i64 8
  %58 = load i32, ptr %57, align 4, !tbaa !38
  %59 = getelementptr inbounds i8, ptr %2, i64 28
  store i32 %58, ptr %59, align 4, !tbaa !39
  %60 = load i32, ptr %22, align 4, !tbaa !27
  %61 = getelementptr inbounds i8, ptr %2, i64 32
  store i32 %60, ptr %61, align 8, !tbaa !40
  %62 = sub i32 %55, %58
  %63 = getelementptr inbounds i8, ptr %2, i64 36
  store i32 %62, ptr %63, align 4, !tbaa !41
  %64 = shl i32 %60, 1
  %65 = zext i32 %64 to i64
  %66 = getelementptr inbounds i8, ptr %12, i64 %65
  %67 = load i16, ptr %66, align 2, !tbaa !42
  %68 = tail call zeroext i16 @SwapBytes16(i16 noundef zeroext %67) #2
  %69 = getelementptr inbounds i8, ptr %2, i64 44
  store i16 %68, ptr %69, align 4, !tbaa !43
  br label %70

70:                                               ; preds = %47, %52
  ret void
}

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

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

declare zeroext i16 @SwapBytes16(i16 noundef zeroext) local_unnamed_addr #0

attributes #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 = { 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 = { 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 64}
!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 = !{!20, !11, i64 120}
!20 = !{!"_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}
!21 = !{!22, !8, i64 40}
!22 = !{!"", !23, i64 0, !11, i64 16, !7, i64 24, !7, i64 28, !7, i64 32, !7, i64 36, !8, i64 40, !8, i64 41, !8, i64 42, !14, i64 44, !11, i64 48, !11, i64 56, !11, i64 64, !11, i64 72}
!23 = !{!"", !14, i64 0, !8, i64 2, !8, i64 3, !8, i64 4, !8, i64 5, !8, i64 6, !8, i64 7, !7, i64 8, !14, i64 12, !8, i64 14, !8, i64 15}
!24 = !{!22, !8, i64 41}
!25 = !{!22, !8, i64 42}
!26 = !{!8, !8, i64 0}
!27 = !{!28, !7, i64 4}
!28 = !{!"", !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, !29, i64 552, !29, i64 584, !29, i64 616, !8, i64 648, !8, i64 649, !8, i64 650, !8, i64 651, !8, i64 652}
!29 = !{!"", !8, i64 0}
!30 = !{!10, !11, i64 0}
!31 = !{!11, !11, i64 0}
!32 = distinct !{!32, !33}
!33 = !{!"llvm.loop.mustprogress"}
!34 = !{!16, !7, i64 236}
!35 = !{!36, !7, i64 132}
!36 = !{!"", !7, i64 0, !13, i64 8, !10, i64 16, !8, i64 32, !11, i64 40, !11, i64 48, !8, i64 56, !11, i64 120, !7, i64 128, !7, i64 132, !8, i64 136}
!37 = !{!22, !7, i64 24}
!38 = !{!28, !7, i64 8}
!39 = !{!22, !7, i64 28}
!40 = !{!22, !7, i64 32}
!41 = !{!22, !7, i64 36}
!42 = !{!14, !14, i64 0}
!43 = !{!22, !14, i64 44}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass