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

; 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_INTERFACE = type { i32, %struct._LIST_ENTRY, i64, %struct._LIST_ENTRY, i32, i8, ptr, ptr, ptr, %struct._LIST_ENTRY, %struct._LIST_ENTRY, i32, %struct._LIST_ENTRY, %struct._LIST_ENTRY, %struct._LIST_ENTRY, i8 }
%struct._LIST_ENTRY = type { ptr, ptr }
%struct._IP6_SERVICE = type { i32, %struct._EFI_SERVICE_BINDING_PROTOCOL, i64, i64, %struct._LIST_ENTRY, %struct._LIST_ENTRY, ptr, ptr, %struct.IP6_LINK_RX_TOKEN, %struct.IP6_ASSEMBLE_TABLE, %struct.IP6_MLD_SERVICE_DATA, %struct.EFI_IPv6_ADDRESS, i8, i8, i8, i8, i8, i32, i32, i32, i32, %struct._LIST_ENTRY, %struct._LIST_ENTRY, %struct._LIST_ENTRY, %struct._LIST_ENTRY, i32, i8, ptr, i8, i8, i32, ptr, ptr, ptr, ptr, %struct.EFI_MANAGED_NETWORK_CONFIG_DATA, %struct.EFI_SIMPLE_NETWORK_MODE, ptr, ptr, %struct._IP6_CONFIG_INSTANCE, ptr, i32, i32 }
%struct._EFI_SERVICE_BINDING_PROTOCOL = type { ptr, ptr }
%struct.IP6_LINK_RX_TOKEN = type { i32, ptr, ptr, %struct.EFI_MANAGED_NETWORK_COMPLETION_TOKEN }
%struct.EFI_MANAGED_NETWORK_COMPLETION_TOKEN = type { ptr, i64, %union.anon }
%union.anon = type { ptr }
%struct.IP6_ASSEMBLE_TABLE = type { [127 x %struct._LIST_ENTRY] }
%struct.IP6_MLD_SERVICE_DATA = type { i64, %struct._LIST_ENTRY }
%struct.EFI_IPv6_ADDRESS = type { [16 x i8] }
%struct.EFI_MANAGED_NETWORK_CONFIG_DATA = type { i32, i32, i16, i8, i8, i8, i8, i8, 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._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.EFI_IP6_CONFIG_INTERFACE_INFO = type { [32 x i16], i8, i32, %struct.EFI_MAC_ADDRESS, i32, ptr, i32, ptr }
%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._IP6_ADDRESS_INFO = type { i32, %struct._LIST_ENTRY, %struct.EFI_IPv6_ADDRESS, i8, i8, i32, i32 }
%struct._IP6_DAD_ENTRY = type { i32, %struct._LIST_ENTRY, i32, i32, i32, i32, ptr, %struct.EFI_IPv6_ADDRESS, ptr, ptr }

@.str = external hidden unnamed_addr constant [127 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [107 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [28 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 i32 @NetRandomInitSeed() #1

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

declare zeroext i8 @DebugAssertEnabled() #1

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

declare ptr @AllocatePool(i64 noundef) #1

declare void @FreePool(ptr noundef) #1

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

; Function Attrs: nounwind uwtable
declare dso_local void @Ip6OnDADFinished(i8 noundef zeroext, ptr noundef, ptr noundef) #2

; Function Attrs: nounwind uwtable
define dso_local i64 @Ip6InitDADProcess(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) #2 {
  %5 = alloca i64, align 8
  %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 i64, align 8
  %14 = alloca i32, align 4
  %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
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #3
  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 4, ptr %14) #3
  br label %16

16:                                               ; preds = %4
  %17 = call zeroext i8 @DebugAssertEnabled()
  %18 = icmp ne i8 %17, 0
  br i1 %18, label %19, label %29

19:                                               ; preds = %16
  %20 = load ptr, ptr %6, align 8, !tbaa !5
  %21 = icmp ne ptr %20, null
  br i1 %21, label %22, label %27

22:                                               ; preds = %19
  %23 = load ptr, ptr %6, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct._IP6_INTERFACE, ptr %23, i32 0, i32 0
  %25 = load i32, ptr %24, align 8, !tbaa !9
  %26 = icmp eq i32 %25, 1228296265
  br i1 %26, label %28, label %27

27:                                               ; preds = %22, %19
  call void @DebugAssert(ptr noundef @.str, i64 noundef 982, ptr noundef @.str.12)
  br label %28

28:                                               ; preds = %27, %22
  br label %29

29:                                               ; preds = %28, %16
  br label %30

30:                                               ; preds = %29
  br label %31

31:                                               ; preds = %30
  br label %32

32:                                               ; preds = %31
  %33 = call zeroext i8 @DebugAssertEnabled()
  %34 = icmp ne i8 %33, 0
  br i1 %34, label %35, label %40

35:                                               ; preds = %32
  %36 = load ptr, ptr %7, align 8, !tbaa !5
  %37 = icmp ne ptr %36, null
  br i1 %37, label %39, label %38

38:                                               ; preds = %35
  call void @DebugAssert(ptr noundef @.str, i64 noundef 983, ptr noundef @.str.13)
  br label %39

39:                                               ; preds = %38, %35
  br label %40

40:                                               ; preds = %39, %32
  br label %41

41:                                               ; preds = %40
  br label %42

42:                                               ; preds = %41
  store i64 0, ptr %13, align 8, !tbaa !14
  %43 = load ptr, ptr %6, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct._IP6_INTERFACE, ptr %43, i32 0, i32 6
  %45 = load ptr, ptr %44, align 8, !tbaa !15
  store ptr %45, ptr %12, align 8, !tbaa !5
  %46 = load ptr, ptr %12, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct._IP6_SERVICE, ptr %46, i32 0, i32 39
  %48 = getelementptr inbounds %struct._IP6_CONFIG_INSTANCE, ptr %47, i32 0, i32 7
  store ptr %48, ptr %11, align 8, !tbaa !5
  %49 = call ptr @AllocatePool(i64 noundef 80)
  store ptr %49, ptr %10, align 8, !tbaa !5
  %50 = load ptr, ptr %10, align 8, !tbaa !5
  %51 = icmp eq ptr %50, null
  br i1 %51, label %52, label %53

52:                                               ; preds = %42
  store i64 -9223372036854775799, ptr %5, align 8
  store i32 1, ptr %15, align 4
  br label %118

53:                                               ; preds = %42
  %54 = load ptr, ptr %7, align 8, !tbaa !5
  %55 = getelementptr inbounds %struct._IP6_ADDRESS_INFO, ptr %54, i32 0, i32 2
  %56 = load ptr, ptr %10, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct._IP6_DAD_ENTRY, ptr %56, i32 0, i32 7
  call void @Ip6CreateSNMulticastAddr(ptr noundef %55, ptr noundef %57)
  %58 = load ptr, ptr %12, align 8, !tbaa !5
  %59 = load ptr, ptr %6, align 8, !tbaa !5
  %60 = load ptr, ptr %10, align 8, !tbaa !5
  %61 = getelementptr inbounds %struct._IP6_DAD_ENTRY, ptr %60, i32 0, i32 7
  %62 = call i64 @Ip6JoinGroup(ptr noundef %58, ptr noundef %59, ptr noundef %61)
  store i64 %62, ptr %13, align 8, !tbaa !14
  %63 = load i64, ptr %13, align 8, !tbaa !14
  %64 = icmp slt i64 %63, 0
  br i1 %64, label %65, label %68

65:                                               ; preds = %53
  %66 = load ptr, ptr %10, align 8, !tbaa !5
  call void @FreePool(ptr noundef %66)
  %67 = load i64, ptr %13, align 8, !tbaa !14
  store i64 %67, ptr %5, align 8
  store i32 1, ptr %15, align 4
  br label %118

68:                                               ; preds = %53
  %69 = load ptr, ptr %10, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct._IP6_DAD_ENTRY, ptr %69, i32 0, i32 0
  store i32 1162104905, ptr %70, align 8, !tbaa !16
  %71 = load ptr, ptr %11, align 8, !tbaa !5
  %72 = getelementptr inbounds %struct.EFI_IP6_CONFIG_DUP_ADDR_DETECT_TRANSMITS, ptr %71, i32 0, i32 0
  %73 = load i32, ptr %72, align 4, !tbaa !19
  %74 = load ptr, ptr %10, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct._IP6_DAD_ENTRY, ptr %74, i32 0, i32 2
  store i32 %73, ptr %75, align 8, !tbaa !21
  %76 = load ptr, ptr %10, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct._IP6_DAD_ENTRY, ptr %76, i32 0, i32 3
  store i32 0, ptr %77, align 4, !tbaa !22
  %78 = load ptr, ptr %10, align 8, !tbaa !5
  %79 = getelementptr inbounds %struct._IP6_DAD_ENTRY, ptr %78, i32 0, i32 4
  store i32 0, ptr %79, align 8, !tbaa !23
  store i32 10, ptr %14, align 4, !tbaa !24
  %80 = load i32, ptr %14, align 4, !tbaa !24
  %81 = zext i32 %80 to i64
  %82 = call i32 @NetRandomInitSeed()
  %83 = zext i32 %82 to i64
  %84 = mul i64 %83, 1103515245
  %85 = add i64 %84, 12345
  %86 = trunc i64 %85 to i32
  %87 = zext i32 %86 to i64
  %88 = urem i64 %87, 4294967295
  %89 = urem i64 %88, 5
  %90 = add i64 %89, 1
  %91 = mul i64 %81, %90
  %92 = udiv i64 %91, 5
  %93 = trunc i64 %92 to i32
  %94 = load ptr, ptr %10, align 8, !tbaa !5
  %95 = getelementptr inbounds %struct._IP6_DAD_ENTRY, ptr %94, i32 0, i32 5
  store i32 %93, ptr %95, align 4, !tbaa !25
  %96 = load ptr, ptr %7, align 8, !tbaa !5
  %97 = load ptr, ptr %10, align 8, !tbaa !5
  %98 = getelementptr inbounds %struct._IP6_DAD_ENTRY, ptr %97, i32 0, i32 6
  store ptr %96, ptr %98, align 8, !tbaa !26
  %99 = load ptr, ptr %8, align 8, !tbaa !5
  %100 = load ptr, ptr %10, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct._IP6_DAD_ENTRY, ptr %100, i32 0, i32 8
  store ptr %99, ptr %101, align 8, !tbaa !27
  %102 = load ptr, ptr %9, align 8, !tbaa !5
  %103 = load ptr, ptr %10, align 8, !tbaa !5
  %104 = getelementptr inbounds %struct._IP6_DAD_ENTRY, ptr %103, i32 0, i32 9
  store ptr %102, ptr %104, align 8, !tbaa !28
  %105 = load ptr, ptr %6, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct._IP6_INTERFACE, ptr %105, i32 0, i32 12
  %107 = load ptr, ptr %10, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct._IP6_DAD_ENTRY, ptr %107, i32 0, i32 1
  %109 = call ptr @InsertTailList(ptr noundef %106, ptr noundef %108)
  %110 = load ptr, ptr %10, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct._IP6_DAD_ENTRY, ptr %110, i32 0, i32 2
  %112 = load i32, ptr %111, align 8, !tbaa !21
  %113 = icmp eq i32 %112, 0
  br i1 %113, label %114, label %117

114:                                              ; preds = %68
  %115 = load ptr, ptr %6, align 8, !tbaa !5
  %116 = load ptr, ptr %10, align 8, !tbaa !5
  call void @Ip6OnDADFinished(i8 noundef zeroext 1, ptr noundef %115, ptr noundef %116)
  br label %117

117:                                              ; preds = %114, %68
  store i64 0, ptr %5, align 8
  store i32 1, ptr %15, align 4
  br label %118

118:                                              ; preds = %117, %65, %52
  call void @llvm.lifetime.end.p0(i64 4, 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
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #3
  %119 = load i64, ptr %5, align 8
  ret i64 %119
}

declare void @Ip6CreateSNMulticastAddr(ptr noundef, ptr noundef) #1

declare i64 @Ip6JoinGroup(ptr noundef, 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, !11, i64 0}
!10 = !{!"_IP6_INTERFACE", !11, i64 0, !12, i64 8, !13, i64 24, !12, i64 32, !11, i64 48, !7, i64 52, !6, i64 56, !6, i64 64, !6, i64 72, !12, i64 80, !12, i64 96, !11, i64 112, !12, i64 120, !12, i64 136, !12, i64 152, !7, i64 168}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_LIST_ENTRY", !6, i64 0, !6, i64 8}
!13 = !{!"long long", !7, i64 0}
!14 = !{!13, !13, i64 0}
!15 = !{!10, !6, i64 56}
!16 = !{!17, !11, i64 0}
!17 = !{!"_IP6_DAD_ENTRY", !11, i64 0, !12, i64 8, !11, i64 24, !11, i64 28, !11, i64 32, !11, i64 36, !6, i64 40, !18, i64 48, !6, i64 64, !6, i64 72}
!18 = !{!"", !7, i64 0}
!19 = !{!20, !11, i64 0}
!20 = !{!"", !11, i64 0}
!21 = !{!17, !11, i64 24}
!22 = !{!17, !11, i64 28}
!23 = !{!17, !11, i64 32}
!24 = !{!11, !11, i64 0}
!25 = !{!17, !11, i64 36}
!26 = !{!17, !6, i64 40}
!27 = !{!17, !6, i64 64}
!28 = !{!17, !6, i64 72}


; 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 [127 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [107 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [28 x i8], align 1

declare i32 @NetRandomInitSeed() local_unnamed_addr #0

declare zeroext i8 @DebugAssertEnabled() local_unnamed_addr #0

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

declare ptr @AllocatePool(i64 noundef) local_unnamed_addr #0

declare void @FreePool(ptr noundef) local_unnamed_addr #0

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

; Function Attrs: nounwind uwtable
declare dso_local void @Ip6OnDADFinished(i8 noundef zeroext, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local range(i64 -9223372036854775808, 1) i64 @Ip6InitDADProcess(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) local_unnamed_addr #1 {
  %5 = tail call zeroext i8 @DebugAssertEnabled() #2
  %.not = icmp eq i8 %5, 0
  br i1 %.not, label %11, label %6

6:                                                ; preds = %4
  %.not36 = icmp eq ptr %0, null
  br i1 %.not36, label %10, label %7

7:                                                ; preds = %6
  %8 = load i32, ptr %0, align 8, !tbaa !5
  %9 = icmp eq i32 %8, 1228296265
  br i1 %9, label %11, label %10

10:                                               ; preds = %7, %6
  tail call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 982, ptr noundef nonnull @.str.12) #2
  br label %11

11:                                               ; preds = %4, %10, %7
  %12 = tail call zeroext i8 @DebugAssertEnabled() #2
  %13 = icmp eq i8 %12, 0
  %14 = icmp ne ptr %1, null
  %or.cond = or i1 %14, %13
  br i1 %or.cond, label %16, label %15

15:                                               ; preds = %11
  tail call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 983, ptr noundef nonnull @.str.13) #2
  br label %16

16:                                               ; preds = %15, %11
  %17 = getelementptr inbounds i8, ptr %0, i64 56
  %18 = load ptr, ptr %17, align 8, !tbaa !13
  %19 = getelementptr inbounds i8, ptr %18, i64 3228
  %20 = tail call ptr @AllocatePool(i64 noundef 80) #2
  %21 = icmp eq ptr %20, null
  br i1 %21, label %52, label %22

22:                                               ; preds = %16
  %23 = getelementptr inbounds i8, ptr %1, i64 24
  %24 = getelementptr inbounds i8, ptr %20, i64 48
  tail call void @Ip6CreateSNMulticastAddr(ptr noundef nonnull %23, ptr noundef nonnull %24) #2
  %25 = tail call i64 @Ip6JoinGroup(ptr noundef %18, ptr noundef nonnull %0, ptr noundef nonnull %24) #2
  %26 = icmp slt i64 %25, 0
  br i1 %26, label %27, label %28

27:                                               ; preds = %22
  tail call void @FreePool(ptr noundef nonnull %20) #2
  br label %52

28:                                               ; preds = %22
  store i32 1162104905, ptr %20, align 8, !tbaa !14
  %29 = load i32, ptr %19, align 4, !tbaa !17
  %30 = getelementptr inbounds i8, ptr %20, i64 24
  store i32 %29, ptr %30, align 8, !tbaa !19
  %31 = getelementptr inbounds i8, ptr %20, i64 28
  store i32 0, ptr %31, align 4, !tbaa !20
  %32 = getelementptr inbounds i8, ptr %20, i64 32
  store i32 0, ptr %32, align 8, !tbaa !21
  %33 = tail call i32 @NetRandomInitSeed() #2
  %.fr = freeze i32 %33
  %34 = mul i32 %.fr, 1103515245
  %35 = add i32 %34, 12345
  %.not38 = icmp eq i32 %35, -1
  %36 = add nsw i32 %34, 12346
  %37 = select i1 %.not38, i32 %36, i32 %35
  %38 = urem i32 %37, 5
  %39 = trunc nuw nsw i32 %38 to i8
  %40 = mul nuw nsw i8 %39, 10
  %.lhs.trunc = add nuw nsw i8 %40, 10
  %41 = udiv i8 %.lhs.trunc, 5
  %.zext = zext nneg i8 %41 to i32
  %42 = getelementptr inbounds i8, ptr %20, i64 36
  store i32 %.zext, ptr %42, align 4, !tbaa !22
  %43 = getelementptr inbounds i8, ptr %20, i64 40
  store ptr %1, ptr %43, align 8, !tbaa !23
  %44 = getelementptr inbounds i8, ptr %20, i64 64
  store ptr %2, ptr %44, align 8, !tbaa !24
  %45 = getelementptr inbounds i8, ptr %20, i64 72
  store ptr %3, ptr %45, align 8, !tbaa !25
  %46 = getelementptr inbounds i8, ptr %0, i64 120
  %47 = getelementptr inbounds i8, ptr %20, i64 8
  %48 = tail call ptr @InsertTailList(ptr noundef nonnull %46, ptr noundef nonnull %47) #2
  %49 = load i32, ptr %30, align 8, !tbaa !19
  %50 = icmp eq i32 %49, 0
  br i1 %50, label %51, label %52

51:                                               ; preds = %28
  tail call void @Ip6OnDADFinished(i8 noundef zeroext 1, ptr noundef nonnull %0, ptr noundef nonnull %20)
  br label %52

52:                                               ; preds = %28, %51, %16, %27
  %.0 = phi i64 [ %25, %27 ], [ -9223372036854775799, %16 ], [ 0, %51 ], [ 0, %28 ]
  ret i64 %.0
}

declare void @Ip6CreateSNMulticastAddr(ptr noundef, ptr noundef) local_unnamed_addr #0

declare i64 @Ip6JoinGroup(ptr noundef, ptr noundef, ptr noundef) 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, !7, i64 0}
!6 = !{!"_IP6_INTERFACE", !7, i64 0, !10, i64 8, !12, i64 24, !10, i64 32, !7, i64 48, !8, i64 52, !11, i64 56, !11, i64 64, !11, i64 72, !10, i64 80, !10, i64 96, !7, i64 112, !10, i64 120, !10, i64 136, !10, i64 152, !8, i64 168}
!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 = !{!"long long", !8, i64 0}
!13 = !{!6, !11, i64 56}
!14 = !{!15, !7, i64 0}
!15 = !{!"_IP6_DAD_ENTRY", !7, i64 0, !10, i64 8, !7, i64 24, !7, i64 28, !7, i64 32, !7, i64 36, !11, i64 40, !16, i64 48, !11, i64 64, !11, i64 72}
!16 = !{!"", !8, i64 0}
!17 = !{!18, !7, i64 0}
!18 = !{!"", !7, i64 0}
!19 = !{!15, !7, i64 24}
!20 = !{!15, !7, i64 28}
!21 = !{!15, !7, i64 32}
!22 = !{!15, !7, i64 36}
!23 = !{!15, !11, i64 40}
!24 = !{!15, !11, i64 64}
!25 = !{!15, !11, i64 72}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,ReassociatePass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass