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

; 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._DHCP6_INSTANCE = type { i32, ptr, ptr, %struct._LIST_ENTRY, %struct._EFI_DHCP6_PROTOCOL, ptr, ptr, ptr, %struct._DHCP6_IA_CB, %struct._LIST_ENTRY, %struct._LIST_ENTRY, ptr, i8, ptr, i64, i8, i8, i64 }
%struct._EFI_DHCP6_PROTOCOL = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct._DHCP6_IA_CB = type { ptr, i32, i32, i32, i32 }
%struct._LIST_ENTRY = type { ptr, ptr }
%struct.EFI_DHCP6_IA = type { %struct.EFI_DHCP6_IA_DESCRIPTOR, i32, ptr, i32, [1 x %struct.EFI_DHCP6_IA_ADDRESS] }
%struct.EFI_DHCP6_IA_DESCRIPTOR = type { i16, i32 }
%struct.EFI_DHCP6_IA_ADDRESS = type { %struct.EFI_IPv6_ADDRESS, i32, i32 }
%struct.EFI_IPv6_ADDRESS = type { [16 x i8] }
%struct.EFI_DHCP6_CONFIG_DATA = type { ptr, ptr, i32, ptr, %struct.EFI_DHCP6_IA_DESCRIPTOR, ptr, i8, i8, ptr }
%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 }

@.str = external hidden unnamed_addr constant [131 x i8], align 1
@gBS = external global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [18 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 void @FreePool(ptr noundef) #1

; Function Attrs: nounwind uwtable
declare dso_local void @Dhcp6CleanupRetry(ptr noundef, i32 noundef) #2

; Function Attrs: nounwind uwtable
define dso_local void @Dhcp6CleanupSession(ptr noundef %0, i64 noundef %1) #2 {
  %3 = alloca ptr, align 8
  %4 = alloca i64, align 8
  %5 = alloca i64, align 8
  %6 = alloca ptr, align 8
  store ptr %0, ptr %3, align 8, !tbaa !5
  store i64 %1, ptr %4, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %5) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  br label %7

7:                                                ; preds = %2
  %8 = call zeroext i8 @DebugAssertEnabled()
  %9 = icmp ne i8 %8, 0
  br i1 %9, label %10, label %17

10:                                               ; preds = %7
  %11 = load ptr, ptr %3, align 8, !tbaa !5
  %12 = getelementptr inbounds %struct._DHCP6_INSTANCE, ptr %11, i32 0, i32 6
  %13 = load ptr, ptr %12, align 8, !tbaa !11
  %14 = icmp ne ptr %13, null
  br i1 %14, label %16, label %15

15:                                               ; preds = %10
  call void @DebugAssert(ptr noundef @.str, i64 noundef 409, ptr noundef @.str.3)
  br label %16

16:                                               ; preds = %15, %10
  br label %17

17:                                               ; preds = %16, %7
  br label %18

18:                                               ; preds = %17
  br label %19

19:                                               ; preds = %18
  br label %20

20:                                               ; preds = %19
  %21 = call zeroext i8 @DebugAssertEnabled()
  %22 = icmp ne i8 %21, 0
  br i1 %22, label %23, label %31

23:                                               ; preds = %20
  %24 = load ptr, ptr %3, align 8, !tbaa !5
  %25 = getelementptr inbounds %struct._DHCP6_INSTANCE, ptr %24, i32 0, i32 8
  %26 = getelementptr inbounds %struct._DHCP6_IA_CB, ptr %25, i32 0, i32 0
  %27 = load ptr, ptr %26, align 8, !tbaa !17
  %28 = icmp ne ptr %27, null
  br i1 %28, label %30, label %29

29:                                               ; preds = %23
  call void @DebugAssert(ptr noundef @.str, i64 noundef 410, ptr noundef @.str.4)
  br label %30

30:                                               ; preds = %29, %23
  br label %31

31:                                               ; preds = %30, %20
  br label %32

32:                                               ; preds = %31
  br label %33

33:                                               ; preds = %32
  %34 = load ptr, ptr %3, align 8, !tbaa !5
  call void @Dhcp6CleanupRetry(ptr noundef %34, i32 noundef 1)
  %35 = load ptr, ptr %3, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct._DHCP6_INSTANCE, ptr %35, i32 0, i32 13
  %37 = load ptr, ptr %36, align 8, !tbaa !18
  %38 = icmp ne ptr %37, null
  br i1 %38, label %39, label %43

39:                                               ; preds = %33
  %40 = load ptr, ptr %3, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct._DHCP6_INSTANCE, ptr %40, i32 0, i32 13
  %42 = load ptr, ptr %41, align 8, !tbaa !18
  call void @FreePool(ptr noundef %42)
  br label %43

43:                                               ; preds = %39, %33
  %44 = load ptr, ptr %3, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct._DHCP6_INSTANCE, ptr %44, i32 0, i32 11
  %46 = load ptr, ptr %45, align 8, !tbaa !19
  %47 = icmp ne ptr %46, null
  br i1 %47, label %48, label %52

48:                                               ; preds = %43
  %49 = load ptr, ptr %3, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct._DHCP6_INSTANCE, ptr %49, i32 0, i32 11
  %51 = load ptr, ptr %50, align 8, !tbaa !19
  call void @FreePool(ptr noundef %51)
  br label %52

52:                                               ; preds = %48, %43
  %53 = load ptr, ptr %3, align 8, !tbaa !5
  %54 = getelementptr inbounds %struct._DHCP6_INSTANCE, ptr %53, i32 0, i32 8
  %55 = getelementptr inbounds %struct._DHCP6_IA_CB, ptr %54, i32 0, i32 0
  %56 = load ptr, ptr %55, align 8, !tbaa !17
  %57 = getelementptr inbounds %struct.EFI_DHCP6_IA, ptr %56, i32 0, i32 2
  %58 = load ptr, ptr %57, align 8, !tbaa !20
  %59 = icmp ne ptr %58, null
  br i1 %59, label %60, label %67

60:                                               ; preds = %52
  %61 = load ptr, ptr %3, align 8, !tbaa !5
  %62 = getelementptr inbounds %struct._DHCP6_INSTANCE, ptr %61, i32 0, i32 8
  %63 = getelementptr inbounds %struct._DHCP6_IA_CB, ptr %62, i32 0, i32 0
  %64 = load ptr, ptr %63, align 8, !tbaa !17
  %65 = getelementptr inbounds %struct.EFI_DHCP6_IA, ptr %64, i32 0, i32 2
  %66 = load ptr, ptr %65, align 8, !tbaa !20
  call void @FreePool(ptr noundef %66)
  br label %67

67:                                               ; preds = %60, %52
  %68 = load i64, ptr %4, align 8, !tbaa !9
  %69 = load ptr, ptr %3, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct._DHCP6_INSTANCE, ptr %69, i32 0, i32 14
  store volatile i64 %68, ptr %70, align 8, !tbaa !24
  %71 = load ptr, ptr %3, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct._DHCP6_INSTANCE, ptr %71, i32 0, i32 11
  store ptr null, ptr %72, align 8, !tbaa !19
  %73 = load ptr, ptr %3, align 8, !tbaa !5
  %74 = getelementptr inbounds %struct._DHCP6_INSTANCE, ptr %73, i32 0, i32 12
  store i8 0, ptr %74, align 8, !tbaa !25
  %75 = load ptr, ptr %3, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct._DHCP6_INSTANCE, ptr %75, i32 0, i32 13
  store ptr null, ptr %76, align 8, !tbaa !18
  %77 = load ptr, ptr %3, align 8, !tbaa !5
  %78 = getelementptr inbounds %struct._DHCP6_INSTANCE, ptr %77, i32 0, i32 8
  %79 = getelementptr inbounds %struct._DHCP6_IA_CB, ptr %78, i32 0, i32 1
  store i32 0, ptr %79, align 8, !tbaa !26
  %80 = load ptr, ptr %3, align 8, !tbaa !5
  %81 = getelementptr inbounds %struct._DHCP6_INSTANCE, ptr %80, i32 0, i32 8
  %82 = getelementptr inbounds %struct._DHCP6_IA_CB, ptr %81, i32 0, i32 2
  store i32 0, ptr %82, align 4, !tbaa !27
  %83 = load ptr, ptr %3, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct._DHCP6_INSTANCE, ptr %83, i32 0, i32 8
  %85 = getelementptr inbounds %struct._DHCP6_IA_CB, ptr %84, i32 0, i32 3
  store i32 0, ptr %85, align 8, !tbaa !28
  %86 = load ptr, ptr %3, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct._DHCP6_INSTANCE, ptr %86, i32 0, i32 8
  %88 = getelementptr inbounds %struct._DHCP6_IA_CB, ptr %87, i32 0, i32 4
  store i32 0, ptr %88, align 4, !tbaa !29
  %89 = load ptr, ptr %3, align 8, !tbaa !5
  %90 = getelementptr inbounds %struct._DHCP6_INSTANCE, ptr %89, i32 0, i32 17
  store i64 0, ptr %90, align 8, !tbaa !30
  %91 = load ptr, ptr %3, align 8, !tbaa !5
  %92 = getelementptr inbounds %struct._DHCP6_INSTANCE, ptr %91, i32 0, i32 8
  %93 = getelementptr inbounds %struct._DHCP6_IA_CB, ptr %92, i32 0, i32 0
  %94 = load ptr, ptr %93, align 8, !tbaa !17
  store ptr %94, ptr %6, align 8, !tbaa !5
  %95 = load ptr, ptr %6, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.EFI_DHCP6_IA, ptr %95, i32 0, i32 1
  store i32 0, ptr %96, align 8, !tbaa !31
  %97 = load ptr, ptr %6, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct.EFI_DHCP6_IA, ptr %97, i32 0, i32 2
  store ptr null, ptr %98, align 8, !tbaa !20
  store i64 0, ptr %5, align 8, !tbaa !9
  br label %99

99:                                               ; preds = %117, %67
  %100 = load i64, ptr %5, align 8, !tbaa !9
  %101 = load ptr, ptr %6, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct.EFI_DHCP6_IA, ptr %101, i32 0, i32 3
  %103 = load i32, ptr %102, align 8, !tbaa !32
  %104 = zext i32 %103 to i64
  %105 = icmp ult i64 %100, %104
  br i1 %105, label %106, label %120

106:                                              ; preds = %99
  %107 = load ptr, ptr %6, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.EFI_DHCP6_IA, ptr %107, i32 0, i32 4
  %109 = load i64, ptr %5, align 8, !tbaa !9
  %110 = getelementptr inbounds [1 x %struct.EFI_DHCP6_IA_ADDRESS], ptr %108, i64 0, i64 %109
  %111 = getelementptr inbounds %struct.EFI_DHCP6_IA_ADDRESS, ptr %110, i32 0, i32 1
  store i32 0, ptr %111, align 4, !tbaa !33
  %112 = load ptr, ptr %6, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct.EFI_DHCP6_IA, ptr %112, i32 0, i32 4
  %114 = load i64, ptr %5, align 8, !tbaa !9
  %115 = getelementptr inbounds [1 x %struct.EFI_DHCP6_IA_ADDRESS], ptr %113, i64 0, i64 %114
  %116 = getelementptr inbounds %struct.EFI_DHCP6_IA_ADDRESS, ptr %115, i32 0, i32 2
  store i32 0, ptr %116, align 4, !tbaa !36
  br label %117

117:                                              ; preds = %106
  %118 = load i64, ptr %5, align 8, !tbaa !9
  %119 = add i64 %118, 1
  store i64 %119, ptr %5, align 8, !tbaa !9
  br label %99, !llvm.loop !37

120:                                              ; preds = %99
  %121 = load ptr, ptr %3, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct._DHCP6_INSTANCE, ptr %121, i32 0, i32 6
  %123 = load ptr, ptr %122, align 8, !tbaa !11
  %124 = getelementptr inbounds %struct.EFI_DHCP6_CONFIG_DATA, ptr %123, i32 0, i32 5
  %125 = load ptr, ptr %124, align 8, !tbaa !39
  %126 = icmp ne ptr %125, null
  br i1 %126, label %127, label %137

127:                                              ; preds = %120
  %128 = load ptr, ptr @gBS, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %128, i32 0, i32 11
  %130 = load ptr, ptr %129, align 8, !tbaa !41
  %131 = load ptr, ptr %3, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct._DHCP6_INSTANCE, ptr %131, i32 0, i32 6
  %133 = load ptr, ptr %132, align 8, !tbaa !11
  %134 = getelementptr inbounds %struct.EFI_DHCP6_CONFIG_DATA, ptr %133, i32 0, i32 5
  %135 = load ptr, ptr %134, align 8, !tbaa !39
  %136 = call i64 %130(ptr noundef %135)
  br label %137

137:                                              ; preds = %127, %120
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #3
  ret void
}

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, !6, i64 120}
!12 = !{!"_DHCP6_INSTANCE", !13, i64 0, !6, i64 8, !6, i64 16, !14, i64 24, !15, i64 40, !6, i64 112, !6, i64 120, !6, i64 128, !16, i64 136, !14, i64 160, !14, i64 176, !6, i64 192, !7, i64 200, !6, i64 208, !10, i64 216, !7, i64 224, !7, i64 225, !10, i64 232}
!13 = !{!"int", !7, i64 0}
!14 = !{!"_LIST_ENTRY", !6, i64 0, !6, i64 8}
!15 = !{!"_EFI_DHCP6_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, !6, i64 64}
!16 = !{!"_DHCP6_IA_CB", !6, i64 0, !13, i64 8, !13, i64 12, !13, i64 16, !13, i64 20}
!17 = !{!12, !6, i64 136}
!18 = !{!12, !6, i64 208}
!19 = !{!12, !6, i64 192}
!20 = !{!21, !6, i64 16}
!21 = !{!"", !22, i64 0, !13, i64 8, !6, i64 16, !13, i64 24, !7, i64 28}
!22 = !{!"", !23, i64 0, !13, i64 4}
!23 = !{!"short", !7, i64 0}
!24 = !{!12, !10, i64 216}
!25 = !{!12, !7, i64 200}
!26 = !{!12, !13, i64 144}
!27 = !{!12, !13, i64 148}
!28 = !{!12, !13, i64 152}
!29 = !{!12, !13, i64 156}
!30 = !{!12, !10, i64 232}
!31 = !{!21, !13, i64 8}
!32 = !{!21, !13, i64 24}
!33 = !{!34, !13, i64 16}
!34 = !{!"", !35, i64 0, !13, i64 16, !13, i64 20}
!35 = !{!"", !7, i64 0}
!36 = !{!34, !13, i64 20}
!37 = distinct !{!37, !38}
!38 = !{!"llvm.loop.mustprogress"}
!39 = !{!40, !6, i64 40}
!40 = !{!"", !6, i64 0, !6, i64 8, !13, i64 16, !6, i64 24, !22, i64 32, !6, i64 40, !7, i64 48, !7, i64 49, !6, i64 56}
!41 = !{!42, !6, i64 104}
!42 = !{!"", !43, 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}
!43 = !{!"", !10, i64 0, !13, i64 8, !13, i64 12, !13, i64 16, !13, i64 20}


; 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_DHCP6_IA_ADDRESS = type { %struct.EFI_IPv6_ADDRESS, i32, i32 }
%struct.EFI_IPv6_ADDRESS = type { [16 x i8] }

@.str = external hidden unnamed_addr constant [131 x i8], align 1
@gBS = external local_unnamed_addr global ptr, align 8
@.str.3 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [18 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 void @FreePool(ptr noundef) local_unnamed_addr #0

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

; Function Attrs: nounwind uwtable
define dso_local void @Dhcp6CleanupSession(ptr noundef %0, i64 noundef %1) local_unnamed_addr #1 {
  %3 = tail call zeroext i8 @DebugAssertEnabled() #3
  %.not = icmp eq i8 %3, 0
  br i1 %.not, label %8, label %4

4:                                                ; preds = %2
  %5 = getelementptr inbounds i8, ptr %0, i64 120
  %6 = load ptr, ptr %5, align 8, !tbaa !5
  %.not34 = icmp eq ptr %6, null
  br i1 %.not34, label %7, label %8

7:                                                ; preds = %4
  tail call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 409, ptr noundef nonnull @.str.3) #3
  br label %8

8:                                                ; preds = %2, %7, %4
  %9 = tail call zeroext i8 @DebugAssertEnabled() #3
  %.not35 = icmp eq i8 %9, 0
  br i1 %.not35, label %14, label %10

10:                                               ; preds = %8
  %11 = getelementptr inbounds i8, ptr %0, i64 136
  %12 = load ptr, ptr %11, align 8, !tbaa !15
  %.not36 = icmp eq ptr %12, null
  br i1 %.not36, label %13, label %14

13:                                               ; preds = %10
  tail call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 410, ptr noundef nonnull @.str.4) #3
  br label %14

14:                                               ; preds = %10, %13, %8
  tail call void @Dhcp6CleanupRetry(ptr noundef %0, i32 noundef 1)
  %15 = getelementptr inbounds i8, ptr %0, i64 208
  %16 = load ptr, ptr %15, align 8, !tbaa !16
  %.not37 = icmp eq ptr %16, null
  br i1 %.not37, label %18, label %17

17:                                               ; preds = %14
  tail call void @FreePool(ptr noundef nonnull %16) #3
  br label %18

18:                                               ; preds = %17, %14
  %19 = getelementptr inbounds i8, ptr %0, i64 192
  %20 = load ptr, ptr %19, align 8, !tbaa !17
  %.not38 = icmp eq ptr %20, null
  br i1 %.not38, label %22, label %21

21:                                               ; preds = %18
  tail call void @FreePool(ptr noundef nonnull %20) #3
  br label %22

22:                                               ; preds = %21, %18
  %23 = getelementptr inbounds i8, ptr %0, i64 136
  %24 = load ptr, ptr %23, align 8, !tbaa !15
  %25 = getelementptr inbounds i8, ptr %24, i64 16
  %26 = load ptr, ptr %25, align 8, !tbaa !18
  %.not39 = icmp eq ptr %26, null
  br i1 %.not39, label %28, label %27

27:                                               ; preds = %22
  tail call void @FreePool(ptr noundef nonnull %26) #3
  br label %28

28:                                               ; preds = %27, %22
  %29 = getelementptr inbounds i8, ptr %0, i64 216
  store volatile i64 %1, ptr %29, align 8, !tbaa !22
  store ptr null, ptr %19, align 8, !tbaa !17
  %30 = getelementptr inbounds i8, ptr %0, i64 200
  store i8 0, ptr %30, align 8, !tbaa !23
  store ptr null, ptr %15, align 8, !tbaa !16
  %31 = getelementptr inbounds i8, ptr %0, i64 144
  %32 = getelementptr inbounds i8, ptr %0, i64 232
  store i64 0, ptr %32, align 8, !tbaa !24
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %31, i8 0, i64 16, i1 false)
  %33 = load ptr, ptr %23, align 8, !tbaa !15
  %34 = getelementptr inbounds i8, ptr %33, i64 8
  store i32 0, ptr %34, align 8, !tbaa !25
  %35 = getelementptr inbounds i8, ptr %33, i64 16
  store ptr null, ptr %35, align 8, !tbaa !18
  %36 = getelementptr inbounds i8, ptr %33, i64 24
  %37 = load i32, ptr %36, align 8, !tbaa !26
  %38 = zext i32 %37 to i64
  %.not42 = icmp eq i32 %37, 0
  br i1 %.not42, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %28
  %39 = getelementptr inbounds i8, ptr %33, i64 28
  %xtraiter = and i64 %38, 3
  %40 = icmp ult i32 %37, 4
  br i1 %40, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.lr.ph
  %unroll_iter = and i64 %38, 4294967292
  br label %41

41:                                               ; preds = %41, %.lr.ph.new
  %.041 = phi i64 [ 0, %.lr.ph.new ], [ %57, %41 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.3, %41 ]
  %42 = getelementptr inbounds [1 x %struct.EFI_DHCP6_IA_ADDRESS], ptr %39, i64 0, i64 %.041
  %43 = getelementptr inbounds i8, ptr %42, i64 16
  store i32 0, ptr %43, align 4, !tbaa !27
  %44 = getelementptr inbounds i8, ptr %42, i64 20
  store i32 0, ptr %44, align 4, !tbaa !30
  %45 = or disjoint i64 %.041, 1
  %46 = getelementptr inbounds [1 x %struct.EFI_DHCP6_IA_ADDRESS], ptr %39, i64 0, i64 %45
  %47 = getelementptr inbounds i8, ptr %46, i64 16
  store i32 0, ptr %47, align 4, !tbaa !27
  %48 = getelementptr inbounds i8, ptr %46, i64 20
  store i32 0, ptr %48, align 4, !tbaa !30
  %49 = or disjoint i64 %.041, 2
  %50 = getelementptr inbounds [1 x %struct.EFI_DHCP6_IA_ADDRESS], ptr %39, i64 0, i64 %49
  %51 = getelementptr inbounds i8, ptr %50, i64 16
  store i32 0, ptr %51, align 4, !tbaa !27
  %52 = getelementptr inbounds i8, ptr %50, i64 20
  store i32 0, ptr %52, align 4, !tbaa !30
  %53 = or disjoint i64 %.041, 3
  %54 = getelementptr inbounds [1 x %struct.EFI_DHCP6_IA_ADDRESS], ptr %39, i64 0, i64 %53
  %55 = getelementptr inbounds i8, ptr %54, i64 16
  store i32 0, ptr %55, align 4, !tbaa !27
  %56 = getelementptr inbounds i8, ptr %54, i64 20
  store i32 0, ptr %56, align 4, !tbaa !30
  %57 = add nuw nsw i64 %.041, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %._crit_edge.loopexit.unr-lcssa, label %41, !llvm.loop !31

._crit_edge.loopexit.unr-lcssa:                   ; preds = %41, %.lr.ph
  %.041.unr = phi i64 [ 0, %.lr.ph ], [ %57, %41 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %.epil.preheader

.epil.preheader:                                  ; preds = %._crit_edge.loopexit.unr-lcssa, %.epil.preheader
  %.041.epil = phi i64 [ %61, %.epil.preheader ], [ %.041.unr, %._crit_edge.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.epil.preheader ], [ 0, %._crit_edge.loopexit.unr-lcssa ]
  %58 = getelementptr inbounds [1 x %struct.EFI_DHCP6_IA_ADDRESS], ptr %39, i64 0, i64 %.041.epil
  %59 = getelementptr inbounds i8, ptr %58, i64 16
  store i32 0, ptr %59, align 4, !tbaa !27
  %60 = getelementptr inbounds i8, ptr %58, i64 20
  store i32 0, ptr %60, align 4, !tbaa !30
  %61 = add nuw nsw i64 %.041.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge, label %.epil.preheader, !llvm.loop !33

._crit_edge:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %.epil.preheader, %28
  %62 = getelementptr inbounds i8, ptr %0, i64 120
  %63 = load ptr, ptr %62, align 8, !tbaa !5
  %64 = getelementptr inbounds i8, ptr %63, i64 40
  %65 = load ptr, ptr %64, align 8, !tbaa !35
  %.not40 = icmp eq ptr %65, null
  br i1 %.not40, label %71, label %66

66:                                               ; preds = %._crit_edge
  %67 = load ptr, ptr @gBS, align 8, !tbaa !37
  %68 = getelementptr inbounds i8, ptr %67, i64 104
  %69 = load ptr, ptr %68, align 8, !tbaa !38
  %70 = tail call i64 %69(ptr noundef nonnull %65) #3
  br label %71

71:                                               ; preds = %66, %._crit_edge
  ret void
}

; 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, !10, i64 120}
!6 = !{!"_DHCP6_INSTANCE", !7, i64 0, !10, i64 8, !10, i64 16, !11, i64 24, !12, i64 40, !10, i64 112, !10, i64 120, !10, i64 128, !13, i64 136, !11, i64 160, !11, i64 176, !10, i64 192, !8, i64 200, !10, i64 208, !14, i64 216, !8, i64 224, !8, i64 225, !14, i64 232}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"any pointer", !8, i64 0}
!11 = !{!"_LIST_ENTRY", !10, i64 0, !10, i64 8}
!12 = !{!"_EFI_DHCP6_PROTOCOL", !10, i64 0, !10, i64 8, !10, i64 16, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64}
!13 = !{!"_DHCP6_IA_CB", !10, i64 0, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20}
!14 = !{!"long long", !8, i64 0}
!15 = !{!6, !10, i64 136}
!16 = !{!6, !10, i64 208}
!17 = !{!6, !10, i64 192}
!18 = !{!19, !10, i64 16}
!19 = !{!"", !20, i64 0, !7, i64 8, !10, i64 16, !7, i64 24, !8, i64 28}
!20 = !{!"", !21, i64 0, !7, i64 4}
!21 = !{!"short", !8, i64 0}
!22 = !{!6, !14, i64 216}
!23 = !{!6, !8, i64 200}
!24 = !{!6, !14, i64 232}
!25 = !{!19, !7, i64 8}
!26 = !{!19, !7, i64 24}
!27 = !{!28, !7, i64 16}
!28 = !{!"", !29, i64 0, !7, i64 16, !7, i64 20}
!29 = !{!"", !8, i64 0}
!30 = !{!28, !7, i64 20}
!31 = distinct !{!31, !32}
!32 = !{!"llvm.loop.mustprogress"}
!33 = distinct !{!33, !34}
!34 = !{!"llvm.loop.unroll.disable"}
!35 = !{!36, !10, i64 40}
!36 = !{!"", !10, i64 0, !10, i64 8, !7, i64 16, !10, i64 24, !20, i64 32, !10, i64 40, !8, i64 48, !8, i64 49, !10, i64 56}
!37 = !{!10, !10, i64 0}
!38 = !{!39, !10, i64 104}
!39 = !{!"", !40, i64 0, !10, i64 24, !10, i64 32, !10, i64 40, !10, i64 48, !10, i64 56, !10, i64 64, !10, i64 72, !10, i64 80, !10, i64 88, !10, i64 96, !10, i64 104, !10, i64 112, !10, i64 120, !10, i64 128, !10, i64 136, !10, i64 144, !10, i64 152, !10, i64 160, !10, i64 168, !10, i64 176, !10, i64 184, !10, i64 192, !10, i64 200, !10, i64 208, !10, i64 216, !10, i64 224, !10, i64 232, !10, i64 240, !10, i64 248, !10, i64 256, !10, i64 264, !10, i64 272, !10, i64 280, !10, i64 288, !10, i64 296, !10, i64 304, !10, i64 312, !10, i64 320, !10, i64 328, !10, i64 336, !10, i64 344, !10, i64 352, !10, i64 360, !10, i64 368}
!40 = !{!"", !14, i64 0, !7, i64 8, !7, i64 12, !7, i64 16, !7, i64 20}


; Effective O3 passes: EarlyCSEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,MemCpyOptPass,SROAPass,SimplifyCFGPass,TailCallElimPass