; LLVM IR from thalium/icebox :: third_party/virtualbox/src/VBox/Devices/EFI/Firmware/NetworkPkg/IScsiDxe (IScsiAddNic)

; 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_MAC_ADDRESS = type { [32 x i8] }
%struct.ISCSI_PRIVATE_DATA = type { [223 x i16], %struct._LIST_ENTRY, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, %struct._LIST_ENTRY, [224 x i8], i64, ptr }
%struct._LIST_ENTRY = type { ptr, ptr }
%struct.ISCSI_NIC_INFO = type { %struct._LIST_ENTRY, i32, %struct.EFI_MAC_ADDRESS, i8, i16, i64, i64, i64 }

@mPrivate = external global ptr, align 8

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

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

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

; Function Attrs: nounwind uwtable
define dso_local i64 @IScsiAddNic(ptr noundef %0) #2 {
  %2 = alloca i64, align 8
  %3 = alloca ptr, align 8
  %4 = alloca i64, align 8
  %5 = alloca ptr, align 8
  %6 = alloca ptr, align 8
  %7 = alloca %struct.EFI_MAC_ADDRESS, align 1
  %8 = alloca i64, align 8
  %9 = alloca i16, align 2
  %10 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.start.p0(i64 32, ptr %7) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.start.p0(i64 2, ptr %9) #3
  %11 = load ptr, ptr %3, align 8, !tbaa !5
  %12 = call i64 @NetLibGetMacAddress(ptr noundef %11, ptr noundef %7, ptr noundef %8)
  store i64 %12, ptr %4, align 8, !tbaa !9
  %13 = load i64, ptr %4, align 8, !tbaa !9
  %14 = icmp slt i64 %13, 0
  br i1 %14, label %15, label %17

15:                                               ; preds = %1
  %16 = load i64, ptr %4, align 8, !tbaa !9
  store i64 %16, ptr %2, align 8
  store i32 1, ptr %10, align 4
  br label %137

17:                                               ; preds = %1
  %18 = load ptr, ptr %3, align 8, !tbaa !5
  %19 = call zeroext i16 @NetLibGetVlanId(ptr noundef %18)
  store i16 %19, ptr %9, align 2, !tbaa !11
  %20 = load ptr, ptr @mPrivate, align 8, !tbaa !5
  %21 = getelementptr inbounds %struct.ISCSI_PRIVATE_DATA, ptr %20, i32 0, i32 1
  %22 = getelementptr inbounds %struct._LIST_ENTRY, ptr %21, i32 0, i32 0
  %23 = load ptr, ptr %22, align 8, !tbaa !13
  store ptr %23, ptr %6, align 8, !tbaa !5
  br label %24

24:                                               ; preds = %79, %17
  %25 = load ptr, ptr %6, align 8, !tbaa !5
  %26 = load ptr, ptr @mPrivate, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.ISCSI_PRIVATE_DATA, ptr %26, i32 0, i32 1
  %28 = icmp ne ptr %25, %27
  br i1 %28, label %29, label %83

29:                                               ; preds = %24
  %30 = load ptr, ptr %6, align 8, !tbaa !5
  %31 = ptrtoint ptr %30 to i64
  %32 = sub i64 %31, 0
  %33 = inttoptr i64 %32 to ptr
  store ptr %33, ptr %5, align 8, !tbaa !5
  %34 = load ptr, ptr %5, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.ISCSI_NIC_INFO, ptr %34, i32 0, i32 1
  %36 = load i32, ptr %35, align 8, !tbaa !16
  %37 = zext i32 %36 to i64
  %38 = load i64, ptr %8, align 8, !tbaa !9
  %39 = icmp eq i64 %37, %38
  br i1 %39, label %40, label %62

40:                                               ; preds = %29
  %41 = load ptr, ptr %5, align 8, !tbaa !5
  %42 = getelementptr inbounds %struct.ISCSI_NIC_INFO, ptr %41, i32 0, i32 2
  %43 = getelementptr inbounds %struct.EFI_MAC_ADDRESS, ptr %7, i32 0, i32 0
  %44 = getelementptr inbounds [32 x i8], ptr %43, i64 0, i64 0
  %45 = load i64, ptr %8, align 8, !tbaa !9
  %46 = call i64 @CompareMem(ptr noundef %42, ptr noundef %44, i64 noundef %45)
  %47 = icmp eq i64 %46, 0
  br i1 %47, label %48, label %62

48:                                               ; preds = %40
  %49 = load ptr, ptr %5, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.ISCSI_NIC_INFO, ptr %49, i32 0, i32 4
  %51 = load i16, ptr %50, align 2, !tbaa !20
  %52 = zext i16 %51 to i32
  %53 = load i16, ptr %9, align 2, !tbaa !11
  %54 = zext i16 %53 to i32
  %55 = icmp eq i32 %52, %54
  br i1 %55, label %56, label %62

56:                                               ; preds = %48
  %57 = load ptr, ptr %5, align 8, !tbaa !5
  %58 = getelementptr inbounds %struct.ISCSI_NIC_INFO, ptr %57, i32 0, i32 3
  %59 = load i8, ptr %58, align 4, !tbaa !21
  %60 = load ptr, ptr @mPrivate, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct.ISCSI_PRIVATE_DATA, ptr %60, i32 0, i32 3
  store i8 %59, ptr %61, align 1, !tbaa !22
  store i64 0, ptr %2, align 8
  store i32 1, ptr %10, align 4
  br label %137

62:                                               ; preds = %48, %40, %29
  %63 = load ptr, ptr @mPrivate, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.ISCSI_PRIVATE_DATA, ptr %63, i32 0, i32 4
  %65 = load i8, ptr %64, align 2, !tbaa !23
  %66 = zext i8 %65 to i32
  %67 = load ptr, ptr %5, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.ISCSI_NIC_INFO, ptr %67, i32 0, i32 3
  %69 = load i8, ptr %68, align 4, !tbaa !21
  %70 = zext i8 %69 to i32
  %71 = icmp slt i32 %66, %70
  br i1 %71, label %72, label %78

72:                                               ; preds = %62
  %73 = load ptr, ptr %5, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.ISCSI_NIC_INFO, ptr %73, i32 0, i32 3
  %75 = load i8, ptr %74, align 4, !tbaa !21
  %76 = load ptr, ptr @mPrivate, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.ISCSI_PRIVATE_DATA, ptr %76, i32 0, i32 4
  store i8 %75, ptr %77, align 2, !tbaa !23
  br label %78

78:                                               ; preds = %72, %62
  br label %79

79:                                               ; preds = %78
  %80 = load ptr, ptr %6, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct._LIST_ENTRY, ptr %80, i32 0, i32 0
  %82 = load ptr, ptr %81, align 8, !tbaa !24
  store ptr %82, ptr %6, align 8, !tbaa !5
  br label %24, !llvm.loop !25

83:                                               ; preds = %24
  %84 = call ptr @AllocateZeroPool(i64 noundef 80)
  store ptr %84, ptr %5, align 8, !tbaa !5
  %85 = load ptr, ptr %5, align 8, !tbaa !5
  %86 = icmp eq ptr %85, null
  br i1 %86, label %87, label %88

87:                                               ; preds = %83
  store i64 -9223372036854775799, ptr %2, align 8
  store i32 1, ptr %10, align 4
  br label %137

88:                                               ; preds = %83
  %89 = load ptr, ptr %5, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct.ISCSI_NIC_INFO, ptr %89, i32 0, i32 2
  %91 = getelementptr inbounds %struct.EFI_MAC_ADDRESS, ptr %7, i32 0, i32 0
  %92 = getelementptr inbounds [32 x i8], ptr %91, i64 0, i64 0
  %93 = load i64, ptr %8, align 8, !tbaa !9
  %94 = call ptr @CopyMem(ptr noundef %90, ptr noundef %92, i64 noundef %93)
  %95 = load i64, ptr %8, align 8, !tbaa !9
  %96 = trunc i64 %95 to i32
  %97 = load ptr, ptr %5, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.ISCSI_NIC_INFO, ptr %97, i32 0, i32 1
  store i32 %96, ptr %98, align 8, !tbaa !16
  %99 = load i16, ptr %9, align 2, !tbaa !11
  %100 = load ptr, ptr %5, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct.ISCSI_NIC_INFO, ptr %100, i32 0, i32 4
  store i16 %99, ptr %101, align 2, !tbaa !20
  %102 = load ptr, ptr @mPrivate, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.ISCSI_PRIVATE_DATA, ptr %102, i32 0, i32 4
  %104 = load i8, ptr %103, align 2, !tbaa !23
  %105 = zext i8 %104 to i32
  %106 = add nsw i32 %105, 1
  %107 = trunc i32 %106 to i8
  %108 = load ptr, ptr %5, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.ISCSI_NIC_INFO, ptr %108, i32 0, i32 3
  store i8 %107, ptr %109, align 4, !tbaa !21
  %110 = load ptr, ptr %5, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.ISCSI_NIC_INFO, ptr %110, i32 0, i32 3
  %112 = load i8, ptr %111, align 4, !tbaa !21
  %113 = load ptr, ptr @mPrivate, align 8, !tbaa !5
  %114 = getelementptr inbounds %struct.ISCSI_PRIVATE_DATA, ptr %113, i32 0, i32 4
  store i8 %112, ptr %114, align 2, !tbaa !23
  %115 = load ptr, ptr %3, align 8, !tbaa !5
  %116 = load ptr, ptr %5, align 8, !tbaa !5
  %117 = getelementptr inbounds %struct.ISCSI_NIC_INFO, ptr %116, i32 0, i32 5
  %118 = load ptr, ptr %5, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct.ISCSI_NIC_INFO, ptr %118, i32 0, i32 6
  %120 = load ptr, ptr %5, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct.ISCSI_NIC_INFO, ptr %120, i32 0, i32 7
  %122 = call zeroext i16 @IScsiGetNICPciLocation(ptr noundef %115, ptr noundef %117, ptr noundef %119, ptr noundef %121)
  %123 = load ptr, ptr @mPrivate, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct.ISCSI_PRIVATE_DATA, ptr %123, i32 0, i32 1
  %125 = load ptr, ptr %5, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.ISCSI_NIC_INFO, ptr %125, i32 0, i32 0
  %127 = call ptr @InsertTailList(ptr noundef %124, ptr noundef %126)
  %128 = load ptr, ptr @mPrivate, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.ISCSI_PRIVATE_DATA, ptr %128, i32 0, i32 2
  %130 = load i8, ptr %129, align 8, !tbaa !27
  %131 = add i8 %130, 1
  store i8 %131, ptr %129, align 8, !tbaa !27
  %132 = load ptr, ptr %5, align 8, !tbaa !5
  %133 = getelementptr inbounds %struct.ISCSI_NIC_INFO, ptr %132, i32 0, i32 3
  %134 = load i8, ptr %133, align 4, !tbaa !21
  %135 = load ptr, ptr @mPrivate, align 8, !tbaa !5
  %136 = getelementptr inbounds %struct.ISCSI_PRIVATE_DATA, ptr %135, i32 0, i32 3
  store i8 %134, ptr %136, align 1, !tbaa !22
  store i64 0, ptr %2, align 8
  store i32 1, ptr %10, align 4
  br label %137

137:                                              ; preds = %88, %87, %56, %15
  call void @llvm.lifetime.end.p0(i64 2, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 32, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #3
  %138 = load i64, ptr %2, align 8
  ret i64 %138
}

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

declare zeroext i16 @NetLibGetVlanId(ptr noundef) #1

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

declare ptr @AllocateZeroPool(i64 noundef) #1

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

declare ptr @InsertTailList(ptr noundef, ptr noundef) #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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, !10, i64 0}
!10 = !{!"long long", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"short", !7, i64 0}
!13 = !{!14, !6, i64 448}
!14 = !{!"", !7, i64 0, !15, i64 448, !7, i64 464, !7, i64 465, !7, i64 466, !7, i64 467, !7, i64 468, !7, i64 469, !7, i64 470, !7, i64 471, !7, i64 472, !7, i64 473, !7, i64 474, !7, i64 475, !15, i64 480, !7, i64 496, !10, i64 720, !6, i64 728}
!15 = !{!"_LIST_ENTRY", !6, i64 0, !6, i64 8}
!16 = !{!17, !18, i64 16}
!17 = !{!"", !15, i64 0, !18, i64 16, !19, i64 20, !7, i64 52, !12, i64 54, !10, i64 56, !10, i64 64, !10, i64 72}
!18 = !{!"int", !7, i64 0}
!19 = !{!"", !7, i64 0}
!20 = !{!17, !12, i64 54}
!21 = !{!17, !7, i64 52}
!22 = !{!14, !7, i64 465}
!23 = !{!14, !7, i64 466}
!24 = !{!15, !6, i64 0}
!25 = distinct !{!25, !26}
!26 = !{!"llvm.loop.mustprogress"}
!27 = !{!14, !7, i64 464}


; 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_MAC_ADDRESS = type { [32 x i8] }

@mPrivate = external local_unnamed_addr global ptr, align 8

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

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

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

; Function Attrs: nounwind uwtable
define dso_local range(i64 -9223372036854775808, 1) i64 @IScsiAddNic(ptr noundef %0) local_unnamed_addr #2 {
  %2 = alloca %struct.EFI_MAC_ADDRESS, align 1
  %3 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %2) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #3
  %4 = call i64 @NetLibGetMacAddress(ptr noundef %0, ptr noundef nonnull %2, ptr noundef nonnull %3) #3
  %5 = icmp slt i64 %4, 0
  br i1 %5, label %64, label %6

6:                                                ; preds = %1
  %7 = call zeroext i16 @NetLibGetVlanId(ptr noundef %0) #3
  %8 = load ptr, ptr @mPrivate, align 8, !tbaa !5
  %9 = getelementptr inbounds i8, ptr %8, i64 448
  %.02732 = load ptr, ptr %9, align 8, !tbaa !9
  %.not33 = icmp eq ptr %.02732, %9
  br i1 %.not33, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %6, %34
  %10 = phi ptr [ %27, %34 ], [ %8, %6 ]
  %.02734 = phi ptr [ %.027, %34 ], [ %.02732, %6 ]
  %11 = getelementptr inbounds i8, ptr %.02734, i64 16
  %12 = load i32, ptr %11, align 8, !tbaa !11
  %13 = zext i32 %12 to i64
  %14 = load i64, ptr %3, align 8, !tbaa !17
  %15 = icmp eq i64 %14, %13
  br i1 %15, label %16, label %26

16:                                               ; preds = %.lr.ph
  %17 = getelementptr inbounds i8, ptr %.02734, i64 20
  %18 = call i64 @CompareMem(ptr noundef nonnull %17, ptr noundef nonnull %2, i64 noundef %13) #3
  %19 = icmp eq i64 %18, 0
  br i1 %19, label %20, label %._crit_edge36

._crit_edge36:                                    ; preds = %16
  %.pre = load ptr, ptr @mPrivate, align 8, !tbaa !5
  br label %26

20:                                               ; preds = %16
  %21 = getelementptr inbounds i8, ptr %.02734, i64 54
  %22 = load i16, ptr %21, align 2, !tbaa !18
  %23 = icmp eq i16 %22, %7
  %.pre37 = load ptr, ptr @mPrivate, align 8, !tbaa !5
  br i1 %23, label %24, label %26

24:                                               ; preds = %20
  %25 = getelementptr inbounds i8, ptr %.02734, i64 52
  br label %.sink.split

26:                                               ; preds = %._crit_edge36, %20, %.lr.ph
  %27 = phi ptr [ %.pre, %._crit_edge36 ], [ %.pre37, %20 ], [ %10, %.lr.ph ]
  %28 = getelementptr inbounds i8, ptr %27, i64 466
  %29 = load i8, ptr %28, align 2, !tbaa !19
  %30 = getelementptr inbounds i8, ptr %.02734, i64 52
  %31 = load i8, ptr %30, align 4, !tbaa !21
  %32 = icmp ult i8 %29, %31
  br i1 %32, label %33, label %34

33:                                               ; preds = %26
  store i8 %31, ptr %28, align 2, !tbaa !19
  br label %34

34:                                               ; preds = %26, %33
  %.027 = load ptr, ptr %.02734, align 8, !tbaa !9
  %35 = getelementptr inbounds i8, ptr %27, i64 448
  %.not = icmp eq ptr %.027, %35
  br i1 %.not, label %._crit_edge, label %.lr.ph, !llvm.loop !22

._crit_edge:                                      ; preds = %34, %6
  %36 = call ptr @AllocateZeroPool(i64 noundef 80) #3
  %37 = icmp eq ptr %36, null
  br i1 %37, label %64, label %38

38:                                               ; preds = %._crit_edge
  %39 = getelementptr inbounds i8, ptr %36, i64 20
  %40 = load i64, ptr %3, align 8, !tbaa !17
  %41 = call ptr @CopyMem(ptr noundef nonnull %39, ptr noundef nonnull %2, i64 noundef %40) #3
  %42 = load i64, ptr %3, align 8, !tbaa !17
  %43 = trunc i64 %42 to i32
  %44 = getelementptr inbounds i8, ptr %36, i64 16
  store i32 %43, ptr %44, align 8, !tbaa !11
  %45 = getelementptr inbounds i8, ptr %36, i64 54
  store i16 %7, ptr %45, align 2, !tbaa !18
  %46 = load ptr, ptr @mPrivate, align 8, !tbaa !5
  %47 = getelementptr inbounds i8, ptr %46, i64 466
  %48 = load i8, ptr %47, align 2, !tbaa !19
  %49 = add i8 %48, 1
  %50 = getelementptr inbounds i8, ptr %36, i64 52
  store i8 %49, ptr %50, align 4, !tbaa !21
  store i8 %49, ptr %47, align 2, !tbaa !19
  %51 = getelementptr inbounds i8, ptr %36, i64 56
  %52 = getelementptr inbounds i8, ptr %36, i64 64
  %53 = getelementptr inbounds i8, ptr %36, i64 72
  %54 = call zeroext i16 @IScsiGetNICPciLocation(ptr noundef %0, ptr noundef nonnull %51, ptr noundef nonnull %52, ptr noundef nonnull %53)
  %55 = load ptr, ptr @mPrivate, align 8, !tbaa !5
  %56 = getelementptr inbounds i8, ptr %55, i64 448
  %57 = call ptr @InsertTailList(ptr noundef nonnull %56, ptr noundef nonnull %36) #3
  %58 = load ptr, ptr @mPrivate, align 8, !tbaa !5
  %59 = getelementptr inbounds i8, ptr %58, i64 464
  %60 = load i8, ptr %59, align 8, !tbaa !24
  %61 = add i8 %60, 1
  store i8 %61, ptr %59, align 8, !tbaa !24
  br label %.sink.split

.sink.split:                                      ; preds = %24, %38
  %.sink41 = phi ptr [ %50, %38 ], [ %25, %24 ]
  %.sink40 = phi ptr [ %58, %38 ], [ %.pre37, %24 ]
  %62 = load i8, ptr %.sink41, align 4, !tbaa !21
  %63 = getelementptr inbounds i8, ptr %.sink40, i64 465
  store i8 %62, ptr %63, align 1, !tbaa !25
  br label %64

64:                                               ; preds = %.sink.split, %._crit_edge, %1
  %.0 = phi i64 [ %4, %1 ], [ -9223372036854775799, %._crit_edge ], [ 0, %.sink.split ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #3
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %2) #3
  ret i64 %.0
}

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

declare zeroext i16 @NetLibGetVlanId(ptr noundef) local_unnamed_addr #1

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

declare ptr @AllocateZeroPool(i64 noundef) local_unnamed_addr #1

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

declare ptr @InsertTailList(ptr noundef, ptr noundef) local_unnamed_addr #1

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { 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 0}
!10 = !{!"_LIST_ENTRY", !6, i64 0, !6, i64 8}
!11 = !{!12, !13, i64 16}
!12 = !{!"", !10, i64 0, !13, i64 16, !14, i64 20, !7, i64 52, !15, i64 54, !16, i64 56, !16, i64 64, !16, i64 72}
!13 = !{!"int", !7, i64 0}
!14 = !{!"", !7, i64 0}
!15 = !{!"short", !7, i64 0}
!16 = !{!"long long", !7, i64 0}
!17 = !{!16, !16, i64 0}
!18 = !{!12, !15, i64 54}
!19 = !{!20, !7, i64 466}
!20 = !{!"", !7, i64 0, !10, i64 448, !7, i64 464, !7, i64 465, !7, i64 466, !7, i64 467, !7, i64 468, !7, i64 469, !7, i64 470, !7, i64 471, !7, i64 472, !7, i64 473, !7, i64 474, !7, i64 475, !10, i64 480, !7, i64 496, !16, i64 720, !6, i64 728}
!21 = !{!12, !7, i64 52}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.mustprogress"}
!24 = !{!20, !7, i64 464}
!25 = !{!20, !7, i64 465}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SROAPass,SimplifyCFGPass