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

; 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_DHCP6_RETRANSMISSION = type { i32, i32, i32, i32 }
%struct.EFI_DHCP6_PACKET_OPTION = type <{ i16, i16, [1 x i8] }>
%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._DHCP6_SERVICE = type { i32, ptr, ptr, %struct._EFI_SERVICE_BINDING_PROTOCOL, ptr, ptr, ptr, ptr, i32, %struct._LIST_ENTRY, i64 }
%struct._EFI_SERVICE_BINDING_PROTOCOL = type { ptr, 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 }
%struct._UDP_IO = type { i32, %struct._LIST_ENTRY, i64, i8, ptr, ptr, ptr, %struct.EFI_SIMPLE_NETWORK_MODE, %struct._LIST_ENTRY, ptr, %union.anon, %union.anon.0 }
%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] }
%union.anon = type { ptr }
%union.anon.0 = type { %struct.EFI_UDP6_CONFIG_DATA }
%struct.EFI_UDP6_CONFIG_DATA = type { i8, i8, i8, i8, i8, i32, i32, %struct.EFI_IPv6_ADDRESS, i16, %struct.EFI_IPv6_ADDRESS, i16 }
%struct.EFI_IPv6_ADDRESS = type { [16 x i8] }
%struct._EFI_UDP6_PROTOCOL = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr }

@.str = external hidden unnamed_addr constant [133 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [21 x i8], align 1
@gBS = external global ptr, align 8

; Function Attrs: nounwind uwtable
define dso_local i64 @EfiDhcp6InfoRequest(ptr noundef %0, i8 noundef zeroext %1, ptr noundef %2, i32 noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8) #0 {
  %10 = alloca i64, align 8
  %11 = alloca ptr, align 8
  %12 = alloca i8, align 1
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca i64, align 8
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca i64, align 8
  %24 = alloca ptr, align 8
  %25 = alloca i64, align 8
  %26 = alloca i64, align 8
  %27 = alloca i32, align 4
  store ptr %0, ptr %11, align 8, !tbaa !5
  store i8 %1, ptr %12, align 1, !tbaa !9
  store ptr %2, ptr %13, align 8, !tbaa !5
  store i32 %3, ptr %14, align 4, !tbaa !10
  store ptr %4, ptr %15, align 8, !tbaa !5
  store ptr %5, ptr %16, align 8, !tbaa !5
  store ptr %6, ptr %17, align 8, !tbaa !5
  store ptr %7, ptr %18, align 8, !tbaa !5
  store ptr %8, ptr %19, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %23) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %24) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %25) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #3
  %28 = load ptr, ptr %11, align 8, !tbaa !5
  %29 = icmp eq ptr %28, null
  br i1 %29, label %39, label %30

30:                                               ; preds = %9
  %31 = load ptr, ptr %13, align 8, !tbaa !5
  %32 = icmp eq ptr %31, null
  br i1 %32, label %39, label %33

33:                                               ; preds = %30
  %34 = load ptr, ptr %16, align 8, !tbaa !5
  %35 = icmp eq ptr %34, null
  br i1 %35, label %39, label %36

36:                                               ; preds = %33
  %37 = load ptr, ptr %18, align 8, !tbaa !5
  %38 = icmp eq ptr %37, null
  br i1 %38, label %39, label %40

39:                                               ; preds = %36, %33, %30, %9
  store i64 -9223372036854775806, ptr %10, align 8
  store i32 1, ptr %27, align 4
  br label %227

40:                                               ; preds = %36
  %41 = load ptr, ptr %16, align 8, !tbaa !5
  %42 = icmp ne ptr %41, null
  br i1 %42, label %43, label %54

43:                                               ; preds = %40
  %44 = load ptr, ptr %16, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.EFI_DHCP6_RETRANSMISSION, ptr %44, i32 0, i32 1
  %46 = load i32, ptr %45, align 4, !tbaa !12
  %47 = icmp eq i32 %46, 0
  br i1 %47, label %48, label %54

48:                                               ; preds = %43
  %49 = load ptr, ptr %16, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.EFI_DHCP6_RETRANSMISSION, ptr %49, i32 0, i32 3
  %51 = load i32, ptr %50, align 4, !tbaa !14
  %52 = icmp eq i32 %51, 0
  br i1 %52, label %53, label %54

53:                                               ; preds = %48
  store i64 -9223372036854775806, ptr %10, align 8
  store i32 1, ptr %27, align 4
  br label %227

54:                                               ; preds = %48, %43, %40
  %55 = load i32, ptr %14, align 4, !tbaa !10
  %56 = icmp ugt i32 %55, 0
  br i1 %56, label %57, label %61

57:                                               ; preds = %54
  %58 = load ptr, ptr %15, align 8, !tbaa !5
  %59 = icmp eq ptr %58, null
  br i1 %59, label %60, label %61

60:                                               ; preds = %57
  store i64 -9223372036854775806, ptr %10, align 8
  store i32 1, ptr %27, align 4
  br label %227

61:                                               ; preds = %57, %54
  %62 = load ptr, ptr %15, align 8, !tbaa !5
  %63 = icmp ne ptr %62, null
  br i1 %63, label %64, label %94

64:                                               ; preds = %61
  store i64 0, ptr %23, align 8, !tbaa !15
  br label %65

65:                                               ; preds = %90, %64
  %66 = load i64, ptr %23, align 8, !tbaa !15
  %67 = load i32, ptr %14, align 4, !tbaa !10
  %68 = zext i32 %67 to i64
  %69 = icmp ult i64 %66, %68
  br i1 %69, label %70, label %93

70:                                               ; preds = %65
  %71 = load ptr, ptr %15, align 8, !tbaa !5
  %72 = load i64, ptr %23, align 8, !tbaa !15
  %73 = getelementptr inbounds ptr, ptr %71, i64 %72
  %74 = load ptr, ptr %73, align 8, !tbaa !5
  %75 = getelementptr inbounds %struct.EFI_DHCP6_PACKET_OPTION, ptr %74, i32 0, i32 0
  %76 = load i16, ptr %75, align 1, !tbaa !17
  %77 = zext i16 %76 to i32
  %78 = icmp eq i32 %77, 1
  br i1 %78, label %88, label %79

79:                                               ; preds = %70
  %80 = load ptr, ptr %15, align 8, !tbaa !5
  %81 = load i64, ptr %23, align 8, !tbaa !15
  %82 = getelementptr inbounds ptr, ptr %80, i64 %81
  %83 = load ptr, ptr %82, align 8, !tbaa !5
  %84 = getelementptr inbounds %struct.EFI_DHCP6_PACKET_OPTION, ptr %83, i32 0, i32 0
  %85 = load i16, ptr %84, align 1, !tbaa !17
  %86 = zext i16 %85 to i32
  %87 = icmp eq i32 %86, 6
  br i1 %87, label %88, label %89

88:                                               ; preds = %79, %70
  store i64 -9223372036854775806, ptr %10, align 8
  store i32 1, ptr %27, align 4
  br label %227

89:                                               ; preds = %79
  br label %90

90:                                               ; preds = %89
  %91 = load i64, ptr %23, align 8, !tbaa !15
  %92 = add i64 %91, 1
  store i64 %92, ptr %23, align 8, !tbaa !15
  br label %65, !llvm.loop !20

93:                                               ; preds = %65
  br label %94

94:                                               ; preds = %93, %61
  %95 = call zeroext i8 @DebugAssertEnabled()
  %96 = zext i8 %95 to i32
  %97 = icmp ne i32 %96, 0
  br i1 %97, label %98, label %108

98:                                               ; preds = %94
  %99 = load ptr, ptr %11, align 8, !tbaa !5
  %100 = ptrtoint ptr %99 to i64
  %101 = sub i64 %100, ptrtoint (ptr getelementptr inbounds (%struct._DHCP6_INSTANCE, ptr null, i32 0, i32 4) to i64)
  %102 = inttoptr i64 %101 to ptr
  %103 = getelementptr inbounds %struct._DHCP6_INSTANCE, ptr %102, i32 0, i32 0
  %104 = load i32, ptr %103, align 8, !tbaa !22
  %105 = icmp ne i32 %104, 1228294212
  br i1 %105, label %106, label %108

106:                                              ; preds = %98
  call void @DebugAssert(ptr noundef @.str, i64 noundef 631, ptr noundef @.str.1)
  %107 = load ptr, ptr %11, align 8, !tbaa !5
  br label %113

108:                                              ; preds = %98, %94
  %109 = load ptr, ptr %11, align 8, !tbaa !5
  %110 = ptrtoint ptr %109 to i64
  %111 = sub i64 %110, ptrtoint (ptr getelementptr inbounds (%struct._DHCP6_INSTANCE, ptr null, i32 0, i32 4) to i64)
  %112 = inttoptr i64 %111 to ptr
  br label %113

113:                                              ; preds = %108, %106
  %114 = phi ptr [ %107, %106 ], [ %112, %108 ]
  store ptr %114, ptr %21, align 8, !tbaa !5
  %115 = load ptr, ptr %21, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct._DHCP6_INSTANCE, ptr %115, i32 0, i32 2
  %117 = load ptr, ptr %116, align 8, !tbaa !27
  store ptr %117, ptr %22, align 8, !tbaa !5
  %118 = load ptr, ptr %21, align 8, !tbaa !5
  %119 = load i8, ptr %12, align 1, !tbaa !9
  %120 = load ptr, ptr %13, align 8, !tbaa !5
  %121 = load i32, ptr %14, align 4, !tbaa !10
  %122 = load ptr, ptr %15, align 8, !tbaa !5
  %123 = load ptr, ptr %16, align 8, !tbaa !5
  %124 = load ptr, ptr %17, align 8, !tbaa !5
  %125 = load ptr, ptr %18, align 8, !tbaa !5
  %126 = load ptr, ptr %19, align 8, !tbaa !5
  %127 = call i64 @Dhcp6StartInfoRequest(ptr noundef %118, i8 noundef zeroext %119, ptr noundef %120, i32 noundef %121, ptr noundef %122, ptr noundef %123, ptr noundef %124, ptr noundef %125, ptr noundef %126)
  store i64 %127, ptr %20, align 8, !tbaa !15
  %128 = load i64, ptr %20, align 8, !tbaa !15
  %129 = icmp eq i64 %128, -9223372036854775791
  br i1 %129, label %130, label %194

130:                                              ; preds = %113
  %131 = load ptr, ptr %22, align 8, !tbaa !5
  %132 = getelementptr inbounds %struct._DHCP6_SERVICE, ptr %131, i32 0, i32 5
  %133 = load ptr, ptr %132, align 8, !tbaa !28
  %134 = call i64 @Dhcp6GetMappingTimeOut(ptr noundef %133, ptr noundef %26)
  store i64 %134, ptr %20, align 8, !tbaa !15
  %135 = load i64, ptr %20, align 8, !tbaa !15
  %136 = icmp slt i64 %135, 0
  br i1 %136, label %137, label %139

137:                                              ; preds = %130
  %138 = load i64, ptr %20, align 8, !tbaa !15
  store i64 %138, ptr %10, align 8
  store i32 1, ptr %27, align 4
  br label %227

139:                                              ; preds = %130
  %140 = load ptr, ptr @gBS, align 8, !tbaa !5
  %141 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %140, i32 0, i32 8
  %142 = load ptr, ptr %141, align 8, !tbaa !31
  %143 = call i64 %142(i32 noundef -2147483648, i64 noundef 8, ptr noundef null, ptr noundef null, ptr noundef %24)
  store i64 %143, ptr %20, align 8, !tbaa !15
  %144 = load i64, ptr %20, align 8, !tbaa !15
  %145 = icmp slt i64 %144, 0
  br i1 %145, label %146, label %148

146:                                              ; preds = %139
  %147 = load i64, ptr %20, align 8, !tbaa !15
  store i64 %147, ptr %10, align 8
  store i32 1, ptr %27, align 4
  br label %227

148:                                              ; preds = %139
  %149 = load ptr, ptr @gBS, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %149, i32 0, i32 9
  %151 = load ptr, ptr %150, align 8, !tbaa !34
  %152 = load ptr, ptr %24, align 8, !tbaa !5
  %153 = load i64, ptr %26, align 8, !tbaa !15
  %154 = call i64 %151(ptr noundef %152, i32 noundef 2, i64 noundef %153)
  store i64 %154, ptr %20, align 8, !tbaa !15
  %155 = load i64, ptr %20, align 8, !tbaa !15
  %156 = icmp slt i64 %155, 0
  br i1 %156, label %157, label %164

157:                                              ; preds = %148
  %158 = load ptr, ptr @gBS, align 8, !tbaa !5
  %159 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %158, i32 0, i32 12
  %160 = load ptr, ptr %159, align 8, !tbaa !35
  %161 = load ptr, ptr %24, align 8, !tbaa !5
  %162 = call i64 %160(ptr noundef %161)
  %163 = load i64, ptr %20, align 8, !tbaa !15
  store i64 %163, ptr %10, align 8
  store i32 1, ptr %27, align 4
  br label %227

164:                                              ; preds = %148
  br label %165

165:                                              ; preds = %185, %164
  %166 = load ptr, ptr @gBS, align 8, !tbaa !5
  %167 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %166, i32 0, i32 13
  %168 = load ptr, ptr %167, align 8, !tbaa !36
  %169 = load ptr, ptr %24, align 8, !tbaa !5
  %170 = call i64 %168(ptr noundef %169)
  store i64 %170, ptr %25, align 8, !tbaa !15
  %171 = load i64, ptr %25, align 8, !tbaa !15
  %172 = icmp slt i64 %171, 0
  br i1 %172, label %184, label %173

173:                                              ; preds = %165
  %174 = load ptr, ptr %21, align 8, !tbaa !5
  %175 = load i8, ptr %12, align 1, !tbaa !9
  %176 = load ptr, ptr %13, align 8, !tbaa !5
  %177 = load i32, ptr %14, align 4, !tbaa !10
  %178 = load ptr, ptr %15, align 8, !tbaa !5
  %179 = load ptr, ptr %16, align 8, !tbaa !5
  %180 = load ptr, ptr %17, align 8, !tbaa !5
  %181 = load ptr, ptr %18, align 8, !tbaa !5
  %182 = load ptr, ptr %19, align 8, !tbaa !5
  %183 = call i64 @Dhcp6StartInfoRequest(ptr noundef %174, i8 noundef zeroext %175, ptr noundef %176, i32 noundef %177, ptr noundef %178, ptr noundef %179, ptr noundef %180, ptr noundef %181, ptr noundef %182)
  store i64 %183, ptr %20, align 8, !tbaa !15
  br label %184

184:                                              ; preds = %173, %165
  br label %185

185:                                              ; preds = %184
  %186 = load i64, ptr %25, align 8, !tbaa !15
  %187 = icmp eq i64 %186, -9223372036854775802
  br i1 %187, label %165, label %188, !llvm.loop !37

188:                                              ; preds = %185
  %189 = load ptr, ptr @gBS, align 8, !tbaa !5
  %190 = getelementptr inbounds %struct.EFI_BOOT_SERVICES, ptr %189, i32 0, i32 12
  %191 = load ptr, ptr %190, align 8, !tbaa !35
  %192 = load ptr, ptr %24, align 8, !tbaa !5
  %193 = call i64 %191(ptr noundef %192)
  br label %194

194:                                              ; preds = %188, %113
  %195 = load i64, ptr %20, align 8, !tbaa !15
  %196 = icmp slt i64 %195, 0
  br i1 %196, label %197, label %199

197:                                              ; preds = %194
  %198 = load i64, ptr %20, align 8, !tbaa !15
  store i64 %198, ptr %10, align 8
  store i32 1, ptr %27, align 4
  br label %227

199:                                              ; preds = %194
  %200 = load ptr, ptr %17, align 8, !tbaa !5
  %201 = icmp eq ptr %200, null
  br i1 %201, label %202, label %226

202:                                              ; preds = %199
  br label %203

203:                                              ; preds = %208, %202
  %204 = load ptr, ptr %21, align 8, !tbaa !5
  %205 = getelementptr inbounds %struct._DHCP6_INSTANCE, ptr %204, i32 0, i32 14
  %206 = load volatile i64, ptr %205, align 8, !tbaa !38
  %207 = icmp eq i64 %206, -9223372036854775788
  br i1 %207, label %208, label %222

208:                                              ; preds = %203
  %209 = load ptr, ptr %22, align 8, !tbaa !5
  %210 = getelementptr inbounds %struct._DHCP6_SERVICE, ptr %209, i32 0, i32 7
  %211 = load ptr, ptr %210, align 8, !tbaa !39
  %212 = getelementptr inbounds %struct._UDP_IO, ptr %211, i32 0, i32 10
  %213 = load ptr, ptr %212, align 8, !tbaa !9
  %214 = getelementptr inbounds %struct._EFI_UDP6_PROTOCOL, ptr %213, i32 0, i32 6
  %215 = load ptr, ptr %214, align 8, !tbaa !40
  %216 = load ptr, ptr %22, align 8, !tbaa !5
  %217 = getelementptr inbounds %struct._DHCP6_SERVICE, ptr %216, i32 0, i32 7
  %218 = load ptr, ptr %217, align 8, !tbaa !39
  %219 = getelementptr inbounds %struct._UDP_IO, ptr %218, i32 0, i32 10
  %220 = load ptr, ptr %219, align 8, !tbaa !9
  %221 = call i64 %215(ptr noundef %220)
  br label %203, !llvm.loop !42

222:                                              ; preds = %203
  %223 = load ptr, ptr %21, align 8, !tbaa !5
  %224 = getelementptr inbounds %struct._DHCP6_INSTANCE, ptr %223, i32 0, i32 14
  %225 = load volatile i64, ptr %224, align 8, !tbaa !38
  store i64 %225, ptr %10, align 8
  store i32 1, ptr %27, align 4
  br label %227

226:                                              ; preds = %199
  store i64 0, ptr %10, align 8
  store i32 1, ptr %27, align 4
  br label %227

227:                                              ; preds = %226, %222, %197, %157, %146, %137, %88, %60, %53, %39
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #3
  %228 = load i64, ptr %10, align 8
  ret i64 %228
}

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

declare zeroext i8 @DebugAssertEnabled() #2

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

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

declare i64 @Dhcp6StartInfoRequest(ptr noundef, i8 noundef zeroext, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

declare i64 @Dhcp6GetMappingTimeOut(ptr noundef, ptr noundef) #2

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "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 = !{!7, !7, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"int", !7, i64 0}
!12 = !{!13, !11, i64 4}
!13 = !{!"", !11, i64 0, !11, i64 4, !11, i64 8, !11, i64 12}
!14 = !{!13, !11, i64 12}
!15 = !{!16, !16, i64 0}
!16 = !{!"long long", !7, i64 0}
!17 = !{!18, !19, i64 0}
!18 = !{!"", !19, i64 0, !19, i64 2, !7, i64 4}
!19 = !{!"short", !7, i64 0}
!20 = distinct !{!20, !21}
!21 = !{!"llvm.loop.mustprogress"}
!22 = !{!23, !11, i64 0}
!23 = !{!"_DHCP6_INSTANCE", !11, i64 0, !6, i64 8, !6, i64 16, !24, i64 24, !25, i64 40, !6, i64 112, !6, i64 120, !6, i64 128, !26, i64 136, !24, i64 160, !24, i64 176, !6, i64 192, !7, i64 200, !6, i64 208, !16, i64 216, !7, i64 224, !7, i64 225, !16, i64 232}
!24 = !{!"_LIST_ENTRY", !6, i64 0, !6, i64 8}
!25 = !{!"_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}
!26 = !{!"_DHCP6_IA_CB", !6, i64 0, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20}
!27 = !{!23, !6, i64 16}
!28 = !{!29, !6, i64 48}
!29 = !{!"_DHCP6_SERVICE", !11, i64 0, !6, i64 8, !6, i64 16, !30, i64 24, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64, !11, i64 72, !24, i64 80, !16, i64 96}
!30 = !{!"_EFI_SERVICE_BINDING_PROTOCOL", !6, i64 0, !6, i64 8}
!31 = !{!32, !6, i64 80}
!32 = !{!"", !33, 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}
!33 = !{!"", !16, i64 0, !11, i64 8, !11, i64 12, !11, i64 16, !11, i64 20}
!34 = !{!32, !6, i64 88}
!35 = !{!32, !6, i64 112}
!36 = !{!32, !6, i64 120}
!37 = distinct !{!37, !21}
!38 = !{!23, !16, i64 216}
!39 = !{!29, !6, i64 64}
!40 = !{!41, !6, i64 48}
!41 = !{!"_EFI_UDP6_PROTOCOL", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !6, i64 32, !6, i64 40, !6, i64 48}
!42 = distinct !{!42, !21}


; 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 [133 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [21 x i8], align 1
@gBS = external local_unnamed_addr global ptr, align 8

; Function Attrs: nounwind uwtable
define dso_local i64 @EfiDhcp6InfoRequest(ptr noundef %0, i8 noundef zeroext %1, ptr noundef %2, i32 noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8) local_unnamed_addr #0 {
  %10 = alloca ptr, align 8
  %11 = alloca i64, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #3
  %12 = insertelement <4 x ptr> poison, ptr %0, i64 0
  %13 = insertelement <4 x ptr> %12, ptr %2, i64 1
  %14 = insertelement <4 x ptr> %13, ptr %5, i64 2
  %15 = insertelement <4 x ptr> %14, ptr %7, i64 3
  %16 = icmp eq <4 x ptr> %15, zeroinitializer
  %17 = bitcast <4 x i1> %16 to i4
  %.not90 = icmp eq i4 %17, 0
  br i1 %.not90, label %18, label %.loopexit83

18:                                               ; preds = %9
  %19 = getelementptr inbounds i8, ptr %5, i64 4
  %20 = load i32, ptr %19, align 4, !tbaa !5
  %21 = icmp eq i32 %20, 0
  br i1 %21, label %22, label %26

22:                                               ; preds = %18
  %23 = getelementptr inbounds i8, ptr %5, i64 12
  %24 = load i32, ptr %23, align 4, !tbaa !10
  %25 = icmp eq i32 %24, 0
  br i1 %25, label %.loopexit83, label %26

26:                                               ; preds = %22, %18
  %27 = icmp ne i32 %3, 0
  %28 = icmp eq ptr %4, null
  %or.cond7 = and i1 %27, %28
  br i1 %or.cond7, label %.loopexit83, label %29

29:                                               ; preds = %26
  br i1 %28, label %.loopexit82, label %.preheader81

.preheader81:                                     ; preds = %29
  %30 = zext i32 %3 to i64
  %.not = icmp eq i32 %3, 0
  br i1 %.not, label %.loopexit82, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader81, %34
  %.06384 = phi i64 [ %35, %34 ], [ 0, %.preheader81 ]
  %31 = getelementptr inbounds ptr, ptr %4, i64 %.06384
  %32 = load ptr, ptr %31, align 8, !tbaa !11
  %33 = load i16, ptr %32, align 1, !tbaa !13
  switch i16 %33, label %34 [
    i16 1, label %.loopexit83
    i16 6, label %.loopexit83
  ]

34:                                               ; preds = %.lr.ph
  %35 = add nuw nsw i64 %.06384, 1
  %exitcond.not = icmp eq i64 %35, %30
  br i1 %exitcond.not, label %.loopexit82, label %.lr.ph, !llvm.loop !16

.loopexit82:                                      ; preds = %34, %.preheader81, %29
  %36 = tail call zeroext i8 @DebugAssertEnabled() #3
  %.not76 = icmp eq i8 %36, 0
  %.pre = ptrtoint ptr %0 to i64
  %.pre86 = add i64 %.pre, -40
  %.pre88 = inttoptr i64 %.pre86 to ptr
  br i1 %.not76, label %.loopexit82._crit_edge, label %37

37:                                               ; preds = %.loopexit82
  %38 = load i32, ptr %.pre88, align 8, !tbaa !18
  %.not77 = icmp eq i32 %38, 1228294212
  br i1 %.not77, label %.loopexit82._crit_edge, label %39

39:                                               ; preds = %37
  tail call void @DebugAssert(ptr noundef nonnull @.str, i64 noundef 631, ptr noundef nonnull @.str.1) #3
  br label %.loopexit82._crit_edge

.loopexit82._crit_edge:                           ; preds = %.loopexit82, %37, %39
  %40 = phi ptr [ %0, %39 ], [ %.pre88, %37 ], [ %.pre88, %.loopexit82 ]
  %41 = getelementptr inbounds i8, ptr %40, i64 16
  %42 = load ptr, ptr %41, align 8, !tbaa !24
  %43 = tail call i64 @Dhcp6StartInfoRequest(ptr noundef %40, i8 noundef zeroext %1, ptr noundef %2, i32 noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8) #3
  %44 = icmp eq i64 %43, -9223372036854775791
  br i1 %44, label %45, label %84

45:                                               ; preds = %.loopexit82._crit_edge
  %46 = getelementptr inbounds i8, ptr %42, i64 48
  %47 = load ptr, ptr %46, align 8, !tbaa !25
  %48 = call i64 @Dhcp6GetMappingTimeOut(ptr noundef %47, ptr noundef nonnull %11) #3
  %49 = icmp slt i64 %48, 0
  br i1 %49, label %.loopexit83, label %50

50:                                               ; preds = %45
  %51 = load ptr, ptr @gBS, align 8, !tbaa !11
  %52 = getelementptr inbounds i8, ptr %51, i64 80
  %53 = load ptr, ptr %52, align 8, !tbaa !28
  %54 = call i64 %53(i32 noundef -2147483648, i64 noundef 8, ptr noundef null, ptr noundef null, ptr noundef nonnull %10) #3
  %55 = icmp slt i64 %54, 0
  br i1 %55, label %.loopexit83, label %56

56:                                               ; preds = %50
  %57 = load ptr, ptr @gBS, align 8, !tbaa !11
  %58 = getelementptr inbounds i8, ptr %57, i64 88
  %59 = load ptr, ptr %58, align 8, !tbaa !31
  %60 = load ptr, ptr %10, align 8, !tbaa !11
  %61 = load i64, ptr %11, align 8, !tbaa !32
  %62 = call i64 %59(ptr noundef %60, i32 noundef 2, i64 noundef %61) #3
  %63 = icmp slt i64 %62, 0
  br i1 %63, label %64, label %.preheader80

64:                                               ; preds = %56
  %65 = load ptr, ptr @gBS, align 8, !tbaa !11
  %66 = getelementptr inbounds i8, ptr %65, i64 112
  %67 = load ptr, ptr %66, align 8, !tbaa !33
  %68 = load ptr, ptr %10, align 8, !tbaa !11
  %69 = call i64 %67(ptr noundef %68) #3
  br label %.loopexit83

.preheader80:                                     ; preds = %56, %77
  %70 = load ptr, ptr @gBS, align 8, !tbaa !11
  %71 = getelementptr inbounds i8, ptr %70, i64 120
  %72 = load ptr, ptr %71, align 8, !tbaa !34
  %73 = load ptr, ptr %10, align 8, !tbaa !11
  %74 = call i64 %72(ptr noundef %73) #3
  %75 = icmp slt i64 %74, 0
  br i1 %75, label %77, label %.thread

.thread:                                          ; preds = %.preheader80
  %76 = call i64 @Dhcp6StartInfoRequest(ptr noundef %40, i8 noundef zeroext %1, ptr noundef %2, i32 noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8) #3
  br label %.loopexit

77:                                               ; preds = %.preheader80
  %78 = icmp eq i64 %74, -9223372036854775802
  br i1 %78, label %.preheader80, label %.loopexit, !llvm.loop !35

.loopexit:                                        ; preds = %77, %.thread
  %.179 = phi i64 [ %76, %.thread ], [ %62, %77 ]
  %79 = load ptr, ptr @gBS, align 8, !tbaa !11
  %80 = getelementptr inbounds i8, ptr %79, i64 112
  %81 = load ptr, ptr %80, align 8, !tbaa !33
  %82 = load ptr, ptr %10, align 8, !tbaa !11
  %83 = call i64 %81(ptr noundef %82) #3
  br label %84

84:                                               ; preds = %.loopexit, %.loopexit82._crit_edge
  %.2 = phi i64 [ %.179, %.loopexit ], [ %43, %.loopexit82._crit_edge ]
  %85 = icmp slt i64 %.2, 0
  br i1 %85, label %.loopexit83, label %86

86:                                               ; preds = %84
  %87 = icmp eq ptr %6, null
  br i1 %87, label %.preheader, label %.loopexit83

.preheader:                                       ; preds = %86
  %88 = getelementptr inbounds i8, ptr %40, i64 216
  %89 = load volatile i64, ptr %88, align 8, !tbaa !36
  %90 = icmp eq i64 %89, -9223372036854775788
  br i1 %90, label %.lr.ph85, label %._crit_edge

.lr.ph85:                                         ; preds = %.preheader
  %91 = getelementptr inbounds i8, ptr %42, i64 64
  br label %92

92:                                               ; preds = %.lr.ph85, %92
  %93 = load ptr, ptr %91, align 8, !tbaa !37
  %94 = getelementptr inbounds i8, ptr %93, i64 744
  %95 = load ptr, ptr %94, align 8, !tbaa !38
  %96 = getelementptr inbounds i8, ptr %95, i64 48
  %97 = load ptr, ptr %96, align 8, !tbaa !39
  %98 = call i64 %97(ptr noundef %95) #3
  %99 = load volatile i64, ptr %88, align 8, !tbaa !36
  %100 = icmp eq i64 %99, -9223372036854775788
  br i1 %100, label %92, label %._crit_edge, !llvm.loop !41

._crit_edge:                                      ; preds = %92, %.preheader
  %101 = load volatile i64, ptr %88, align 8, !tbaa !36
  br label %.loopexit83

.loopexit83:                                      ; preds = %.lr.ph, %.lr.ph, %86, %84, %50, %45, %26, %22, %9, %._crit_edge, %64
  %.0 = phi i64 [ %62, %64 ], [ %101, %._crit_edge ], [ -9223372036854775806, %9 ], [ -9223372036854775806, %22 ], [ -9223372036854775806, %26 ], [ %48, %45 ], [ %54, %50 ], [ %.2, %84 ], [ 0, %86 ], [ -9223372036854775806, %.lr.ph ], [ -9223372036854775806, %.lr.ph ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #3
  ret i64 %.0
}

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

declare zeroext i8 @DebugAssertEnabled() local_unnamed_addr #2

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

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

declare i64 @Dhcp6StartInfoRequest(ptr noundef, i8 noundef zeroext, ptr noundef, i32 noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare i64 @Dhcp6GetMappingTimeOut(ptr noundef, ptr noundef) local_unnamed_addr #2

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


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalDCEPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass