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

; 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._IP6_CONFIG_INSTANCE = type { i32, i8, %struct._LIST_ENTRY, i16, %struct.EFI_IP6_CONFIG_INTERFACE_INFO, %struct.EFI_IP6_CONFIG_INTERFACE_ID, i32, %struct.EFI_IP6_CONFIG_DUP_ADDR_DETECT_TRANSMITS, [7 x %struct.IP6_CONFIG_DATA_ITEM], %struct.NET_MAP, %struct.NET_MAP, %struct._EFI_IP6_CONFIG_PROTOCOL, ptr, ptr, ptr, ptr, i8, i32, ptr, i32, ptr, i32, %struct._IP6_FORM_CALLBACK_INFO, %struct.IP6_CONFIG_NVDATA }
%struct._LIST_ENTRY = type { ptr, ptr }
%struct.EFI_IP6_CONFIG_INTERFACE_INFO = type { [32 x i16], i8, i32, %struct.EFI_MAC_ADDRESS, i32, ptr, i32, ptr }
%struct.EFI_MAC_ADDRESS = type { [32 x i8] }
%struct.EFI_IP6_CONFIG_INTERFACE_ID = type { [8 x i8] }
%struct.EFI_IP6_CONFIG_DUP_ADDR_DETECT_TRANSMITS = type { i32 }
%struct.IP6_CONFIG_DATA_ITEM = type { ptr, ptr, i64, i8, %struct.NET_MAP, %union.IP6_CONFIG_DATA, i64 }
%union.IP6_CONFIG_DATA = type { ptr }
%struct.NET_MAP = type { %struct._LIST_ENTRY, %struct._LIST_ENTRY, i64 }
%struct._EFI_IP6_CONFIG_PROTOCOL = type { ptr, ptr, ptr, ptr }
%struct._IP6_FORM_CALLBACK_INFO = type { i32, ptr, %struct._EFI_HII_CONFIG_ACCESS_PROTOCOL, ptr, ptr }
%struct._EFI_HII_CONFIG_ACCESS_PROTOCOL = type { ptr, ptr, ptr }
%struct.IP6_CONFIG_NVDATA = type { i32, %struct.EFI_IP6_CONFIG_DUP_ADDR_DETECT_TRANSMITS, %struct.EFI_IP6_CONFIG_INTERFACE_ID, %struct._LIST_ENTRY, i32, %struct._LIST_ENTRY, i32, %struct._LIST_ENTRY, i32 }
%struct.EFI_BOOT_SERVICES = type { %struct.EFI_TABLE_HEADER, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.EFI_TABLE_HEADER = type { i64, i32, i32, i32, i32 }

@gBS = 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 void @FreePool(ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local i64 @Ip6ConfigDestroyDhcp6(ptr noundef) #2

declare ptr @RemoveEntryList(ptr noundef) #1

; Function Attrs: nounwind uwtable
define dso_local void @Ip6ConfigCleanInstance(ptr noundef %0) #2 {
  %2 = alloca ptr, align 8
  %3 = alloca i64, align 8
  %4 = alloca ptr, align 8
  %5 = alloca i32, align 4
  store ptr %0, ptr %2, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %3) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #3
  %6 = load ptr, ptr %2, align 8, !tbaa !5
  %7 = getelementptr inbounds %struct._IP6_CONFIG_INSTANCE, ptr %6, i32 0, i32 20
  %8 = load ptr, ptr %7, align 8, !tbaa !9
  %9 = icmp ne ptr %8, null
  br i1 %9, label %10, label %14

10:                                               ; preds = %1
  %11 = load ptr, ptr %2, align 8, !tbaa !5
  %12 = getelementptr inbounds %struct._IP6_CONFIG_INSTANCE, ptr %11, i32 0, i32 20
  %13 = load ptr, ptr %12, align 8, !tbaa !9
  call void @FreePool(ptr noundef %13)
  br label %14

14:                                               ; preds = %10, %1
  %15 = load ptr, ptr %2, align 8, !tbaa !5
  %16 = getelementptr inbounds %struct._IP6_CONFIG_INSTANCE, ptr %15, i32 0, i32 1
  %17 = load i8, ptr %16, align 4, !tbaa !23
  %18 = icmp ne i8 %17, 0
  br i1 %18, label %20, label %19

19:                                               ; preds = %14
  store i32 1, ptr %5, align 4
  br label %89

20:                                               ; preds = %14
  %21 = load ptr, ptr %2, align 8, !tbaa !5
  %22 = getelementptr inbounds %struct._IP6_CONFIG_INSTANCE, ptr %21, i32 0, i32 14
  %23 = load ptr, ptr %22, align 8, !tbaa !24
  %24 = icmp ne ptr %23, null
  br i1 %24, label %25, label %28

25:                                               ; preds = %20
  %26 = load ptr, ptr %2, align 8, !tbaa !5
  %27 = call i64 @Ip6ConfigDestroyDhcp6(ptr noundef %26)
  br label %28

28:                                               ; preds = %25, %20
  %29 = load ptr, ptr %2, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct._IP6_CONFIG_INSTANCE, ptr %29, i32 0, i32 18
  %31 = load ptr, ptr %30, align 8, !tbaa !25
  %32 = icmp ne ptr %31, null
  br i1 %32, label %33, label %41

33:                                               ; preds = %28
  %34 = load ptr, ptr @gBS, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %34, i32 0, i32 12
  %36 = load ptr, ptr %35, align 8, !tbaa !26
  %37 = load ptr, ptr %2, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct._IP6_CONFIG_INSTANCE, ptr %37, i32 0, i32 18
  %39 = load ptr, ptr %38, align 8, !tbaa !25
  %40 = call i64 %36(ptr noundef %39)
  br label %41

41:                                               ; preds = %33, %28
  %42 = load ptr, ptr %2, align 8, !tbaa !5
  %43 = getelementptr inbounds %struct._IP6_CONFIG_INSTANCE, ptr %42, i32 0, i32 10
  call void @NetMapClean(ptr noundef %43)
  %44 = load ptr, ptr %2, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct._IP6_CONFIG_INSTANCE, ptr %44, i32 0, i32 9
  call void @NetMapClean(ptr noundef %45)
  store i64 0, ptr %3, align 8, !tbaa !29
  br label %46

46:                                               ; preds = %81, %41
  %47 = load i64, ptr %3, align 8, !tbaa !29
  %48 = icmp ult i64 %47, 7
  br i1 %48, label %49, label %84

49:                                               ; preds = %46
  %50 = load ptr, ptr %2, align 8, !tbaa !5
  %51 = getelementptr inbounds %struct._IP6_CONFIG_INSTANCE, ptr %50, i32 0, i32 8
  %52 = load i64, ptr %3, align 8, !tbaa !29
  %53 = getelementptr inbounds [7 x %struct.IP6_CONFIG_DATA_ITEM], ptr %51, i64 0, i64 %52
  store ptr %53, ptr %4, align 8, !tbaa !5
  %54 = load ptr, ptr %4, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct.IP6_CONFIG_DATA_ITEM, ptr %54, i32 0, i32 3
  %56 = load i8, ptr %55, align 8, !tbaa !30
  %57 = zext i8 %56 to i32
  %58 = and i32 %57, 1
  %59 = trunc i32 %58 to i8
  %60 = icmp ne i8 %59, 0
  br i1 %60, label %75, label %61

61:                                               ; preds = %49
  %62 = load ptr, ptr %4, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct.IP6_CONFIG_DATA_ITEM, ptr %62, i32 0, i32 5
  %64 = load ptr, ptr %63, align 8, !tbaa !32
  %65 = icmp ne ptr %64, null
  br i1 %65, label %66, label %70

66:                                               ; preds = %61
  %67 = load ptr, ptr %4, align 8, !tbaa !5
  %68 = getelementptr inbounds %struct.IP6_CONFIG_DATA_ITEM, ptr %67, i32 0, i32 5
  %69 = load ptr, ptr %68, align 8, !tbaa !32
  call void @FreePool(ptr noundef %69)
  br label %70

70:                                               ; preds = %66, %61
  %71 = load ptr, ptr %4, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.IP6_CONFIG_DATA_ITEM, ptr %71, i32 0, i32 5
  store ptr null, ptr %72, align 8, !tbaa !32
  %73 = load ptr, ptr %4, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct.IP6_CONFIG_DATA_ITEM, ptr %73, i32 0, i32 6
  store i64 0, ptr %74, align 8, !tbaa !33
  br label %75

75:                                               ; preds = %70, %49
  %76 = load ptr, ptr %2, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct._IP6_CONFIG_INSTANCE, ptr %76, i32 0, i32 8
  %78 = load i64, ptr %3, align 8, !tbaa !29
  %79 = getelementptr inbounds [7 x %struct.IP6_CONFIG_DATA_ITEM], ptr %77, i64 0, i64 %78
  %80 = getelementptr inbounds %struct.IP6_CONFIG_DATA_ITEM, ptr %79, i32 0, i32 4
  call void @NetMapClean(ptr noundef %80)
  br label %81

81:                                               ; preds = %75
  %82 = load i64, ptr %3, align 8, !tbaa !29
  %83 = add i64 %82, 1
  store i64 %83, ptr %3, align 8, !tbaa !29
  br label %46, !llvm.loop !34

84:                                               ; preds = %46
  %85 = load ptr, ptr %2, align 8, !tbaa !5
  call void @Ip6ConfigFormUnload(ptr noundef %85)
  %86 = load ptr, ptr %2, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct._IP6_CONFIG_INSTANCE, ptr %86, i32 0, i32 2
  %88 = call ptr @RemoveEntryList(ptr noundef %87)
  store i32 0, ptr %5, align 4
  br label %89

89:                                               ; preds = %84, %19
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %3) #3
  %90 = load i32, ptr %5, align 4
  switch i32 %90, label %92 [
    i32 0, label %91
    i32 1, label %91
  ]

91:                                               ; preds = %89, %89
  ret void

92:                                               ; preds = %89
  unreachable
}

declare void @NetMapClean(ptr noundef) #1

declare void @Ip6ConfigFormUnload(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, !6, i64 968}
!10 = !{!"_IP6_CONFIG_INSTANCE", !11, i64 0, !7, i64 4, !12, i64 8, !13, i64 24, !14, i64 32, !15, i64 168, !11, i64 176, !16, i64 180, !7, i64 184, !17, i64 800, !17, i64 840, !19, i64 880, !6, i64 912, !6, i64 920, !6, i64 928, !6, i64 936, !7, i64 944, !11, i64 948, !6, i64 952, !11, i64 960, !6, i64 968, !11, i64 976, !20, i64 984, !22, i64 1040}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_LIST_ENTRY", !6, i64 0, !6, i64 8}
!13 = !{!"short", !7, i64 0}
!14 = !{!"", !7, i64 0, !7, i64 64, !11, i64 68, !15, i64 72, !11, i64 104, !6, i64 112, !11, i64 120, !6, i64 128}
!15 = !{!"", !7, i64 0}
!16 = !{!"", !11, i64 0}
!17 = !{!"", !12, i64 0, !12, i64 16, !18, i64 32}
!18 = !{!"long long", !7, i64 0}
!19 = !{!"_EFI_IP6_CONFIG_PROTOCOL", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24}
!20 = !{!"_IP6_FORM_CALLBACK_INFO", !11, i64 0, !6, i64 8, !21, i64 16, !6, i64 40, !6, i64 48}
!21 = !{!"_EFI_HII_CONFIG_ACCESS_PROTOCOL", !6, i64 0, !6, i64 8, !6, i64 16}
!22 = !{!"", !11, i64 0, !16, i64 4, !15, i64 8, !12, i64 16, !11, i64 32, !12, i64 40, !11, i64 56, !12, i64 64, !11, i64 80}
!23 = !{!10, !7, i64 4}
!24 = !{!10, !6, i64 928}
!25 = !{!10, !6, i64 952}
!26 = !{!27, !6, i64 112}
!27 = !{!"", !28, i64 0, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !6, i64 72, !6, i64 80, !6, i64 88, !6, i64 96, !6, i64 104, !6, i64 112, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144, !6, i64 152, !6, i64 160, !6, i64 168, !6, i64 176, !6, i64 184, !6, i64 192, !6, i64 200, !6, i64 208, !6, i64 216, !6, i64 224, !6, i64 232, !6, i64 240, !6, i64 248, !6, i64 256, !6, i64 264, !6, i64 272, !6, i64 280, !6, i64 288, !6, i64 296, !6, i64 304, !6, i64 312, !6, i64 320, !6, i64 328, !6, i64 336, !6, i64 344, !6, i64 352, !6, i64 360, !6, i64 368}
!28 = !{!"", !18, i64 0, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20}
!29 = !{!18, !18, i64 0}
!30 = !{!31, !7, i64 24}
!31 = !{!"", !6, i64 0, !6, i64 8, !18, i64 16, !7, i64 24, !17, i64 32, !7, i64 72, !18, i64 80}
!32 = !{!7, !7, i64 0}
!33 = !{!31, !18, i64 80}
!34 = distinct !{!34, !35}
!35 = !{!"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"

@gBS = external local_unnamed_addr global ptr, align 8

declare void @FreePool(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
declare dso_local i64 @Ip6ConfigDestroyDhcp6(ptr noundef) local_unnamed_addr #1

declare ptr @RemoveEntryList(ptr noundef) local_unnamed_addr #0

; Function Attrs: nounwind uwtable
define dso_local void @Ip6ConfigCleanInstance(ptr noundef %0) local_unnamed_addr #1 {
  %2 = getelementptr inbounds i8, ptr %0, i64 968
  %3 = load ptr, ptr %2, align 8, !tbaa !5
  %.not = icmp eq ptr %3, null
  br i1 %.not, label %5, label %4

4:                                                ; preds = %1
  tail call void @FreePool(ptr noundef nonnull %3) #3
  br label %5

5:                                                ; preds = %4, %1
  %6 = getelementptr inbounds i8, ptr %0, i64 4
  %7 = load i8, ptr %6, align 4, !tbaa !22
  %.not24 = icmp eq i8 %7, 0
  br i1 %.not24, label %96, label %8

8:                                                ; preds = %5
  %9 = getelementptr inbounds i8, ptr %0, i64 928
  %10 = load ptr, ptr %9, align 8, !tbaa !23
  %.not25 = icmp eq ptr %10, null
  br i1 %.not25, label %13, label %11

11:                                               ; preds = %8
  %12 = tail call i64 @Ip6ConfigDestroyDhcp6(ptr noundef nonnull %0)
  br label %13

13:                                               ; preds = %11, %8
  %14 = getelementptr inbounds i8, ptr %0, i64 952
  %15 = load ptr, ptr %14, align 8, !tbaa !24
  %.not26 = icmp eq ptr %15, null
  br i1 %.not26, label %21, label %16

16:                                               ; preds = %13
  %17 = load ptr, ptr @gBS, align 8, !tbaa !25
  %18 = getelementptr inbounds i8, ptr %17, i64 112
  %19 = load ptr, ptr %18, align 8, !tbaa !26
  %20 = tail call i64 %19(ptr noundef nonnull %15) #3
  br label %21

21:                                               ; preds = %16, %13
  %22 = getelementptr inbounds i8, ptr %0, i64 840
  tail call void @NetMapClean(ptr noundef nonnull %22) #3
  %23 = getelementptr inbounds i8, ptr %0, i64 800
  tail call void @NetMapClean(ptr noundef nonnull %23) #3
  %24 = getelementptr inbounds i8, ptr %0, i64 208
  %25 = load i8, ptr %24, align 8, !tbaa !29
  %26 = and i8 %25, 1
  %.not27 = icmp eq i8 %26, 0
  br i1 %.not27, label %27, label %32

27:                                               ; preds = %21
  %28 = getelementptr inbounds i8, ptr %0, i64 256
  %29 = load ptr, ptr %28, align 8, !tbaa !31
  %.not28 = icmp eq ptr %29, null
  br i1 %.not28, label %31, label %30

30:                                               ; preds = %27
  tail call void @FreePool(ptr noundef nonnull %29) #3
  br label %31

31:                                               ; preds = %30, %27
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %28, i8 0, i64 16, i1 false)
  br label %32

32:                                               ; preds = %31, %21
  %33 = getelementptr inbounds i8, ptr %0, i64 216
  tail call void @NetMapClean(ptr noundef nonnull %33) #3
  %34 = getelementptr inbounds i8, ptr %0, i64 296
  %35 = load i8, ptr %34, align 8, !tbaa !29
  %36 = and i8 %35, 1
  %.not27.1 = icmp eq i8 %36, 0
  br i1 %.not27.1, label %37, label %42

37:                                               ; preds = %32
  %38 = getelementptr inbounds i8, ptr %0, i64 344
  %39 = load ptr, ptr %38, align 8, !tbaa !31
  %.not28.1 = icmp eq ptr %39, null
  br i1 %.not28.1, label %41, label %40

40:                                               ; preds = %37
  tail call void @FreePool(ptr noundef nonnull %39) #3
  br label %41

41:                                               ; preds = %40, %37
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %38, i8 0, i64 16, i1 false)
  br label %42

42:                                               ; preds = %41, %32
  %43 = getelementptr inbounds i8, ptr %0, i64 304
  tail call void @NetMapClean(ptr noundef nonnull %43) #3
  %44 = getelementptr inbounds i8, ptr %0, i64 384
  %45 = load i8, ptr %44, align 8, !tbaa !29
  %46 = and i8 %45, 1
  %.not27.2 = icmp eq i8 %46, 0
  br i1 %.not27.2, label %47, label %52

47:                                               ; preds = %42
  %48 = getelementptr inbounds i8, ptr %0, i64 432
  %49 = load ptr, ptr %48, align 8, !tbaa !31
  %.not28.2 = icmp eq ptr %49, null
  br i1 %.not28.2, label %51, label %50

50:                                               ; preds = %47
  tail call void @FreePool(ptr noundef nonnull %49) #3
  br label %51

51:                                               ; preds = %50, %47
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %48, i8 0, i64 16, i1 false)
  br label %52

52:                                               ; preds = %51, %42
  %53 = getelementptr inbounds i8, ptr %0, i64 392
  tail call void @NetMapClean(ptr noundef nonnull %53) #3
  %54 = getelementptr inbounds i8, ptr %0, i64 472
  %55 = load i8, ptr %54, align 8, !tbaa !29
  %56 = and i8 %55, 1
  %.not27.3 = icmp eq i8 %56, 0
  br i1 %.not27.3, label %57, label %62

57:                                               ; preds = %52
  %58 = getelementptr inbounds i8, ptr %0, i64 520
  %59 = load ptr, ptr %58, align 8, !tbaa !31
  %.not28.3 = icmp eq ptr %59, null
  br i1 %.not28.3, label %61, label %60

60:                                               ; preds = %57
  tail call void @FreePool(ptr noundef nonnull %59) #3
  br label %61

61:                                               ; preds = %60, %57
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %58, i8 0, i64 16, i1 false)
  br label %62

62:                                               ; preds = %61, %52
  %63 = getelementptr inbounds i8, ptr %0, i64 480
  tail call void @NetMapClean(ptr noundef nonnull %63) #3
  %64 = getelementptr inbounds i8, ptr %0, i64 560
  %65 = load i8, ptr %64, align 8, !tbaa !29
  %66 = and i8 %65, 1
  %.not27.4 = icmp eq i8 %66, 0
  br i1 %.not27.4, label %67, label %72

67:                                               ; preds = %62
  %68 = getelementptr inbounds i8, ptr %0, i64 608
  %69 = load ptr, ptr %68, align 8, !tbaa !31
  %.not28.4 = icmp eq ptr %69, null
  br i1 %.not28.4, label %71, label %70

70:                                               ; preds = %67
  tail call void @FreePool(ptr noundef nonnull %69) #3
  br label %71

71:                                               ; preds = %70, %67
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %68, i8 0, i64 16, i1 false)
  br label %72

72:                                               ; preds = %71, %62
  %73 = getelementptr inbounds i8, ptr %0, i64 568
  tail call void @NetMapClean(ptr noundef nonnull %73) #3
  %74 = getelementptr inbounds i8, ptr %0, i64 648
  %75 = load i8, ptr %74, align 8, !tbaa !29
  %76 = and i8 %75, 1
  %.not27.5 = icmp eq i8 %76, 0
  br i1 %.not27.5, label %77, label %82

77:                                               ; preds = %72
  %78 = getelementptr inbounds i8, ptr %0, i64 696
  %79 = load ptr, ptr %78, align 8, !tbaa !31
  %.not28.5 = icmp eq ptr %79, null
  br i1 %.not28.5, label %81, label %80

80:                                               ; preds = %77
  tail call void @FreePool(ptr noundef nonnull %79) #3
  br label %81

81:                                               ; preds = %80, %77
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %78, i8 0, i64 16, i1 false)
  br label %82

82:                                               ; preds = %81, %72
  %83 = getelementptr inbounds i8, ptr %0, i64 656
  tail call void @NetMapClean(ptr noundef nonnull %83) #3
  %84 = getelementptr inbounds i8, ptr %0, i64 736
  %85 = load i8, ptr %84, align 8, !tbaa !29
  %86 = and i8 %85, 1
  %.not27.6 = icmp eq i8 %86, 0
  br i1 %.not27.6, label %87, label %92

87:                                               ; preds = %82
  %88 = getelementptr inbounds i8, ptr %0, i64 784
  %89 = load ptr, ptr %88, align 8, !tbaa !31
  %.not28.6 = icmp eq ptr %89, null
  br i1 %.not28.6, label %91, label %90

90:                                               ; preds = %87
  tail call void @FreePool(ptr noundef nonnull %89) #3
  br label %91

91:                                               ; preds = %90, %87
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %88, i8 0, i64 16, i1 false)
  br label %92

92:                                               ; preds = %91, %82
  %93 = getelementptr inbounds i8, ptr %0, i64 744
  tail call void @NetMapClean(ptr noundef nonnull %93) #3
  tail call void @Ip6ConfigFormUnload(ptr noundef nonnull %0) #3
  %94 = getelementptr inbounds i8, ptr %0, i64 8
  %95 = tail call ptr @RemoveEntryList(ptr noundef nonnull %94) #3
  br label %96

96:                                               ; preds = %5, %92
  ret void
}

declare void @NetMapClean(ptr noundef) local_unnamed_addr #0

declare void @Ip6ConfigFormUnload(ptr noundef) local_unnamed_addr #0

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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, !11, i64 968}
!6 = !{!"_IP6_CONFIG_INSTANCE", !7, i64 0, !8, i64 4, !10, i64 8, !12, i64 24, !13, i64 32, !14, i64 168, !7, i64 176, !15, i64 180, !8, i64 184, !16, i64 800, !16, i64 840, !18, i64 880, !11, i64 912, !11, i64 920, !11, i64 928, !11, i64 936, !8, i64 944, !7, i64 948, !11, i64 952, !7, i64 960, !11, i64 968, !7, i64 976, !19, i64 984, !21, i64 1040}
!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 = !{!"short", !8, i64 0}
!13 = !{!"", !8, i64 0, !8, i64 64, !7, i64 68, !14, i64 72, !7, i64 104, !11, i64 112, !7, i64 120, !11, i64 128}
!14 = !{!"", !8, i64 0}
!15 = !{!"", !7, i64 0}
!16 = !{!"", !10, i64 0, !10, i64 16, !17, i64 32}
!17 = !{!"long long", !8, i64 0}
!18 = !{!"_EFI_IP6_CONFIG_PROTOCOL", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24}
!19 = !{!"_IP6_FORM_CALLBACK_INFO", !7, i64 0, !11, i64 8, !20, i64 16, !11, i64 40, !11, i64 48}
!20 = !{!"_EFI_HII_CONFIG_ACCESS_PROTOCOL", !11, i64 0, !11, i64 8, !11, i64 16}
!21 = !{!"", !7, i64 0, !15, i64 4, !14, i64 8, !10, i64 16, !7, i64 32, !10, i64 40, !7, i64 56, !10, i64 64, !7, i64 80}
!22 = !{!6, !8, i64 4}
!23 = !{!6, !11, i64 928}
!24 = !{!6, !11, i64 952}
!25 = !{!11, !11, i64 0}
!26 = !{!27, !11, i64 112}
!27 = !{!"", !28, i64 0, !11, i64 24, !11, i64 32, !11, i64 40, !11, i64 48, !11, i64 56, !11, i64 64, !11, i64 72, !11, i64 80, !11, i64 88, !11, i64 96, !11, i64 104, !11, i64 112, !11, i64 120, !11, i64 128, !11, i64 136, !11, i64 144, !11, i64 152, !11, i64 160, !11, i64 168, !11, i64 176, !11, i64 184, !11, i64 192, !11, i64 200, !11, i64 208, !11, i64 216, !11, i64 224, !11, i64 232, !11, i64 240, !11, i64 248, !11, i64 256, !11, i64 264, !11, i64 272, !11, i64 280, !11, i64 288, !11, i64 296, !11, i64 304, !11, i64 312, !11, i64 320, !11, i64 328, !11, i64 336, !11, i64 344, !11, i64 352, !11, i64 360, !11, i64 368}
!28 = !{!"", !17, i64 0, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20}
!29 = !{!30, !8, i64 24}
!30 = !{!"", !11, i64 0, !11, i64 8, !17, i64 16, !8, i64 24, !16, i64 32, !8, i64 72, !17, i64 80}
!31 = !{!8, !8, i64 0}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,LICMPass,LoopRotatePass,MemCpyOptPass,SROAPass,SimplifyCFGPass,TailCallElimPass