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

; 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.GUID = type { i32, i16, i16, [8 x i8] }
%struct._EFI_ISCSI_INITIATOR_NAME_PROTOCOL = type { ptr, ptr }
%struct.ISCSI_PRIVATE_DATA = type { [223 x i16], %struct._LIST_ENTRY, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, %struct._LIST_ENTRY, [224 x i8], i64, ptr }
%struct._LIST_ENTRY = type { ptr, ptr }
%struct._ISCSI_ATTEMPT_CONFIG_NVDATA = type <{ %struct._LIST_ENTRY, i8, i8, i8, i8, i8, i8, i16, i16, [96 x i8], [96 x i8], %union.EFI_IP_ADDRESS, %union.EFI_IP_ADDRESS, %union.EFI_IP_ADDRESS, %struct._ISCSI_SESSION_CONFIG_NVDATA, i8, %union.anon }>
%union.EFI_IP_ADDRESS = type { [4 x i32] }
%struct._ISCSI_SESSION_CONFIG_NVDATA = type <{ i16, i8, i8, %union.EFI_IP_ADDRESS, %struct.EFI_IPv4_ADDRESS, %union.EFI_IP_ADDRESS, i8, i8, [224 x i8], %union.EFI_IP_ADDRESS, i8, [8 x i8], i16, i8, [6 x i8] }>
%struct.EFI_IPv4_ADDRESS = type { [4 x i8] }
%union.anon = type { %struct._ISCSI_CHAP_AUTH_CONFIG_NVDATA }
%struct._ISCSI_CHAP_AUTH_CONFIG_NVDATA = type { i8, [127 x i8], [17 x i8], [127 x i8], [17 x i8] }
%struct._ISCSI_DRIVER_DATA = type { i32, ptr, ptr, %struct._ISCSI_PRIVATE_PROTOCOL, ptr, %struct._EFI_EXT_SCSI_PASS_THRU_PROTOCOL, %struct.EFI_EXT_SCSI_PASS_THRU_MODE, ptr, ptr, ptr, ptr }
%struct._ISCSI_PRIVATE_PROTOCOL = type { i32 }
%struct._EFI_EXT_SCSI_PASS_THRU_PROTOCOL = type { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }
%struct.EFI_EXT_SCSI_PASS_THRU_MODE = type { i32, i32, i32 }
%struct.EFI_RUNTIME_SERVICES = type { %struct.EFI_TABLE_HEADER, 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.ISCSI_NIC_INFO = type { %struct._LIST_ENTRY, i32, %struct.EFI_MAC_ADDRESS, i8, i16, i64, i64, i64 }
%struct.EFI_MAC_ADDRESS = type { [32 x i8] }
%struct._ISCSI_FORM_CALLBACK_INFO = type { i32, ptr, %struct._EFI_HII_CONFIG_ACCESS_PROTOCOL, ptr, ptr, ptr, ptr }
%struct._EFI_HII_CONFIG_ACCESS_PROTOCOL = type { ptr, ptr, ptr }

@.str.1 = external hidden unnamed_addr constant [133 x i8], align 1
@mPrivate = external global ptr, align 8
@gRT = external global ptr, align 8
@.str.4 = external hidden unnamed_addr constant [13 x i32], align 4
@gIScsiConfigGuid = external global %struct.GUID, align 4
@.str.5 = external hidden unnamed_addr constant [5 x i32], align 4
@gEfiIScsiInitiatorNameProtocolGuid = external global %struct.GUID, align 4
@gIScsiInitiatorName = external global %struct._EFI_ISCSI_INITIATOR_NAME_PROTOCOL, align 8
@.str.7 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [67 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [9 x i32], align 4
@.str.10 = external hidden unnamed_addr constant [8 x i32], align 4
@.str.11 = external hidden unnamed_addr constant [17 x i32], align 4
@.str.12 = external hidden unnamed_addr constant [4 x i32], align 4
@.str.13 = external hidden unnamed_addr constant [4 x i32], align 4
@.str.14 = external hidden unnamed_addr constant [14 x i32], align 4
@.str.15 = external hidden unnamed_addr constant [72 x i32], align 4
@mCallbackInfo = external global ptr, align 8
@.str.16 = external hidden unnamed_addr constant [46 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

; 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

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

declare i64 @UnicodeSPrint(ptr noundef, i64 noundef, ptr noundef, ...) #1

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

declare ptr @RemoveEntryList(ptr noundef) #1

declare void @FreePool(ptr noundef) #1

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

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

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

; Function Attrs: nounwind uwtable
define dso_local i64 @IScsiGetConfigData(ptr noundef %0) #2 {
  %2 = alloca i64, align 8
  %3 = alloca ptr, align 8
  %4 = alloca i64, align 8
  %5 = alloca [96 x i16], align 16
  %6 = alloca i64, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca i64, align 8
  %12 = alloca [64 x i16], align 16
  %13 = alloca [64 x i16], align 16
  %14 = alloca i32, align 4
  store ptr %0, ptr %3, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %4) #3
  call void @llvm.lifetime.start.p0(i64 192, ptr %5) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %9) #3
  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 128, ptr %12) #3
  call void @llvm.lifetime.start.p0(i64 128, ptr %13) #3
  %15 = call ptr @IScsiGetVariableAndSize(ptr noundef @.str.4, ptr noundef @gIScsiConfigGuid, ptr noundef %11)
  store ptr %15, ptr %10, align 8, !tbaa !5
  %16 = load ptr, ptr %10, align 8, !tbaa !5
  %17 = icmp eq ptr %16, null
  br i1 %17, label %21, label %18

18:                                               ; preds = %1
  %19 = load i64, ptr %11, align 8, !tbaa !9
  %20 = icmp eq i64 %19, 0
  br i1 %20, label %21, label %22

21:                                               ; preds = %18, %1
  store i64 -9223372036854775794, ptr %2, align 8
  store i32 1, ptr %14, align 4
  br label %687

22:                                               ; preds = %18
  %23 = load ptr, ptr @mPrivate, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.ISCSI_PRIVATE_DATA, ptr %23, i32 0, i32 16
  store i64 224, ptr %24, align 8, !tbaa !11
  %25 = load ptr, ptr @gIScsiInitiatorName, align 8, !tbaa !14
  %26 = load ptr, ptr @mPrivate, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.ISCSI_PRIVATE_DATA, ptr %26, i32 0, i32 16
  %28 = load ptr, ptr @mPrivate, align 8, !tbaa !5
  %29 = getelementptr inbounds %struct.ISCSI_PRIVATE_DATA, ptr %28, i32 0, i32 15
  %30 = getelementptr inbounds [224 x i8], ptr %29, i64 0, i64 0
  %31 = call i64 %25(ptr noundef @gIScsiInitiatorName, ptr noundef %27, ptr noundef %30)
  store i64 %31, ptr %4, align 8, !tbaa !9
  %32 = load i64, ptr %4, align 8, !tbaa !9
  %33 = icmp slt i64 %32, 0
  br i1 %33, label %34, label %36

34:                                               ; preds = %22
  %35 = load i64, ptr %4, align 8, !tbaa !9
  store i64 %35, ptr %2, align 8
  store i32 1, ptr %14, align 4
  br label %687

36:                                               ; preds = %22
  store i64 0, ptr %6, align 8, !tbaa !9
  br label %37

37:                                               ; preds = %637, %36
  %38 = load i64, ptr %6, align 8, !tbaa !9
  %39 = load i64, ptr %11, align 8, !tbaa !9
  %40 = udiv i64 %39, 1
  %41 = icmp ult i64 %38, %40
  br i1 %41, label %42, label %640

42:                                               ; preds = %37
  %43 = load ptr, ptr %10, align 8, !tbaa !5
  %44 = load i64, ptr %6, align 8, !tbaa !9
  %45 = getelementptr inbounds i8, ptr %43, i64 %44
  %46 = load i8, ptr %45, align 1, !tbaa !16
  %47 = call ptr @IScsiConfigGetAttemptByConfigIndex(i8 noundef zeroext %46)
  store ptr %47, ptr %9, align 8, !tbaa !5
  %48 = load ptr, ptr %9, align 8, !tbaa !5
  %49 = icmp ne ptr %48, null
  br i1 %49, label %50, label %58

50:                                               ; preds = %42
  %51 = load ptr, ptr %9, align 8, !tbaa !5
  %52 = getelementptr inbounds %struct._ISCSI_ATTEMPT_CONFIG_NVDATA, ptr %51, i32 0, i32 14
  %53 = getelementptr inbounds %struct._ISCSI_SESSION_CONFIG_NVDATA, ptr %52, i32 0, i32 1
  %54 = load i8, ptr %53, align 1, !tbaa !17
  %55 = zext i8 %54 to i32
  %56 = icmp eq i32 %55, 0
  br i1 %56, label %57, label %58

57:                                               ; preds = %50
  br label %637

58:                                               ; preds = %50, %42
  %59 = load ptr, ptr %9, align 8, !tbaa !5
  %60 = icmp ne ptr %59, null
  br i1 %60, label %61, label %276

61:                                               ; preds = %58
  %62 = load ptr, ptr %9, align 8, !tbaa !5
  %63 = getelementptr inbounds %struct._ISCSI_ATTEMPT_CONFIG_NVDATA, ptr %62, i32 0, i32 14
  %64 = getelementptr inbounds %struct._ISCSI_SESSION_CONFIG_NVDATA, ptr %63, i32 0, i32 1
  %65 = load i8, ptr %64, align 1, !tbaa !17
  %66 = zext i8 %65 to i32
  %67 = icmp ne i32 %66, 0
  br i1 %67, label %68, label %276

68:                                               ; preds = %61
  %69 = load ptr, ptr %9, align 8, !tbaa !5
  %70 = getelementptr inbounds %struct._ISCSI_ATTEMPT_CONFIG_NVDATA, ptr %69, i32 0, i32 14
  %71 = getelementptr inbounds %struct._ISCSI_SESSION_CONFIG_NVDATA, ptr %70, i32 0, i32 2
  %72 = load i8, ptr %71, align 1, !tbaa !22
  %73 = zext i8 %72 to i32
  %74 = icmp eq i32 %73, 2
  br i1 %74, label %75, label %182

75:                                               ; preds = %68
  %76 = load ptr, ptr %9, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct._ISCSI_ATTEMPT_CONFIG_NVDATA, ptr %76, i32 0, i32 6
  %78 = load i8, ptr %77, align 1, !tbaa !23
  %79 = zext i8 %78 to i32
  %80 = icmp ne i32 %79, 5
  br i1 %80, label %81, label %182

81:                                               ; preds = %75
  %82 = load ptr, ptr @mPrivate, align 8, !tbaa !5
  %83 = getelementptr inbounds %struct.ISCSI_PRIVATE_DATA, ptr %82, i32 0, i32 5
  %84 = load i8, ptr %83, align 1, !tbaa !24
  %85 = zext i8 %84 to i32
  %86 = icmp ne i32 %85, 0
  br i1 %86, label %87, label %94

87:                                               ; preds = %81
  %88 = load ptr, ptr %9, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct._ISCSI_ATTEMPT_CONFIG_NVDATA, ptr %88, i32 0, i32 6
  %90 = load i8, ptr %89, align 1, !tbaa !23
  %91 = zext i8 %90 to i32
  %92 = icmp eq i32 %91, 4
  br i1 %92, label %93, label %94

93:                                               ; preds = %87
  br label %637

94:                                               ; preds = %87, %81
  %95 = load ptr, ptr @mPrivate, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.ISCSI_PRIVATE_DATA, ptr %95, i32 0, i32 5
  %97 = load i8, ptr %96, align 1, !tbaa !24
  %98 = icmp ne i8 %97, 0
  br i1 %98, label %106, label %99

99:                                               ; preds = %94
  %100 = load ptr, ptr %9, align 8, !tbaa !5
  %101 = getelementptr inbounds %struct._ISCSI_ATTEMPT_CONFIG_NVDATA, ptr %100, i32 0, i32 6
  %102 = load i8, ptr %101, align 1, !tbaa !23
  %103 = zext i8 %102 to i32
  %104 = icmp eq i32 %103, 3
  br i1 %104, label %105, label %106

105:                                              ; preds = %99
  br label %637

106:                                              ; preds = %99, %94
  %107 = load ptr, ptr @mPrivate, align 8, !tbaa !5
  %108 = getelementptr inbounds %struct.ISCSI_PRIVATE_DATA, ptr %107, i32 0, i32 5
  %109 = load i8, ptr %108, align 1, !tbaa !24
  %110 = zext i8 %109 to i32
  %111 = icmp ne i32 %110, 0
  %112 = zext i1 %111 to i64
  %113 = select i1 %111, i32 4, i32 3
  %114 = trunc i32 %113 to i8
  %115 = load ptr, ptr %9, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct._ISCSI_ATTEMPT_CONFIG_NVDATA, ptr %115, i32 0, i32 6
  store i8 %114, ptr %116, align 1, !tbaa !23
  %117 = load ptr, ptr %9, align 8, !tbaa !5
  %118 = getelementptr inbounds %struct._ISCSI_ATTEMPT_CONFIG_NVDATA, ptr %117, i32 0, i32 14
  %119 = getelementptr inbounds %struct._ISCSI_SESSION_CONFIG_NVDATA, ptr %118, i32 0, i32 6
  store i8 1, ptr %119, align 1, !tbaa !25
  %120 = load ptr, ptr %9, align 8, !tbaa !5
  %121 = getelementptr inbounds %struct._ISCSI_ATTEMPT_CONFIG_NVDATA, ptr %120, i32 0, i32 14
  %122 = getelementptr inbounds %struct._ISCSI_SESSION_CONFIG_NVDATA, ptr %121, i32 0, i32 7
  store i8 1, ptr %122, align 1, !tbaa !26
  %123 = load ptr, ptr %9, align 8, !tbaa !5
  %124 = getelementptr inbounds %struct._ISCSI_ATTEMPT_CONFIG_NVDATA, ptr %123, i32 0, i32 3
  store i8 0, ptr %124, align 1, !tbaa !27
  %125 = load ptr, ptr @mPrivate, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.ISCSI_PRIVATE_DATA, ptr %125, i32 0, i32 5
  %127 = load i8, ptr %126, align 1, !tbaa !24
  %128 = icmp ne i8 %127, 0
  br i1 %128, label %144, label %129

129:                                              ; preds = %106
  %130 = load ptr, ptr %3, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct._ISCSI_DRIVER_DATA, ptr %130, i32 0, i32 1
  %132 = load ptr, ptr %131, align 8, !tbaa !28
  %133 = load ptr, ptr %3, align 8, !tbaa !5
  %134 = getelementptr inbounds %struct._ISCSI_DRIVER_DATA, ptr %133, i32 0, i32 2
  %135 = load ptr, ptr %134, align 8, !tbaa !34
  %136 = load ptr, ptr %9, align 8, !tbaa !5
  %137 = call i64 @IScsiDoDhcp(ptr noundef %132, ptr noundef %135, ptr noundef %136)
  store i64 %137, ptr %4, align 8, !tbaa !9
  %138 = load i64, ptr %4, align 8, !tbaa !9
  %139 = icmp slt i64 %138, 0
  br i1 %139, label %143, label %140

140:                                              ; preds = %129
  %141 = load ptr, ptr %9, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct._ISCSI_ATTEMPT_CONFIG_NVDATA, ptr %141, i32 0, i32 3
  store i8 1, ptr %142, align 1, !tbaa !27
  br label %143

143:                                              ; preds = %140, %129
  br label %159

144:                                              ; preds = %106
  %145 = load ptr, ptr %3, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct._ISCSI_DRIVER_DATA, ptr %145, i32 0, i32 1
  %147 = load ptr, ptr %146, align 8, !tbaa !28
  %148 = load ptr, ptr %3, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct._ISCSI_DRIVER_DATA, ptr %148, i32 0, i32 2
  %150 = load ptr, ptr %149, align 8, !tbaa !34
  %151 = load ptr, ptr %9, align 8, !tbaa !5
  %152 = call i64 @IScsiDoDhcp6(ptr noundef %147, ptr noundef %150, ptr noundef %151)
  store i64 %152, ptr %4, align 8, !tbaa !9
  %153 = load i64, ptr %4, align 8, !tbaa !9
  %154 = icmp slt i64 %153, 0
  br i1 %154, label %158, label %155

155:                                              ; preds = %144
  %156 = load ptr, ptr %9, align 8, !tbaa !5
  %157 = getelementptr inbounds %struct._ISCSI_ATTEMPT_CONFIG_NVDATA, ptr %156, i32 0, i32 3
  store i8 1, ptr %157, align 1, !tbaa !27
  br label %158

158:                                              ; preds = %155, %144
  br label %159

159:                                              ; preds = %158, %143
  %160 = load ptr, ptr %9, align 8, !tbaa !5
  %161 = getelementptr inbounds %struct._ISCSI_ATTEMPT_CONFIG_NVDATA, ptr %160, i32 0, i32 10
  %162 = getelementptr inbounds [96 x i8], ptr %161, i64 0, i64 0
  %163 = getelementptr inbounds [96 x i16], ptr %5, i64 0, i64 0
  %164 = call ptr @AsciiStrToUnicodeStr(ptr noundef %162, ptr noundef %163)
  %165 = load ptr, ptr @mPrivate, align 8, !tbaa !5
  %166 = getelementptr inbounds %struct.ISCSI_PRIVATE_DATA, ptr %165, i32 0, i32 0
  %167 = getelementptr inbounds [223 x i16], ptr %166, i64 0, i64 0
  %168 = getelementptr inbounds [96 x i16], ptr %5, i64 0, i64 0
  %169 = load ptr, ptr %9, align 8, !tbaa !5
  %170 = getelementptr inbounds %struct._ISCSI_ATTEMPT_CONFIG_NVDATA, ptr %169, i32 0, i32 2
  %171 = load i8, ptr %170, align 1, !tbaa !35
  %172 = zext i8 %171 to i64
  %173 = call i64 (ptr, i64, ptr, ...) @UnicodeSPrint(ptr noundef %167, i64 noundef 223, ptr noundef @.str.5, ptr noundef %168, i64 noundef %172)
  %174 = load ptr, ptr @gRT, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct.EFI_RUNTIME_SERVICES, ptr %174, i32 0, i32 9
  %176 = load ptr, ptr %175, align 8, !tbaa !36
  %177 = load ptr, ptr @mPrivate, align 8, !tbaa !5
  %178 = getelementptr inbounds %struct.ISCSI_PRIVATE_DATA, ptr %177, i32 0, i32 0
  %179 = getelementptr inbounds [223 x i16], ptr %178, i64 0, i64 0
  %180 = load ptr, ptr %9, align 8, !tbaa !5
  %181 = call i64 %176(ptr noundef %179, ptr noundef @gEfiIScsiInitiatorNameProtocolGuid, i32 noundef 3, i64 noundef 856, ptr noundef %180)
  br label %637

182:                                              ; preds = %75, %68
  %183 = load ptr, ptr %9, align 8, !tbaa !5
  %184 = getelementptr inbounds %struct._ISCSI_ATTEMPT_CONFIG_NVDATA, ptr %183, i32 0, i32 14
  %185 = getelementptr inbounds %struct._ISCSI_SESSION_CONFIG_NVDATA, ptr %184, i32 0, i32 6
  %186 = load i8, ptr %185, align 1, !tbaa !25
  %187 = zext i8 %186 to i32
  %188 = icmp ne i32 %187, 0
  br i1 %188, label %189, label %275

189:                                              ; preds = %182
  %190 = load ptr, ptr %9, align 8, !tbaa !5
  %191 = getelementptr inbounds %struct._ISCSI_ATTEMPT_CONFIG_NVDATA, ptr %190, i32 0, i32 5
  %192 = load i8, ptr %191, align 1, !tbaa !39
  %193 = icmp ne i8 %192, 0
  br i1 %193, label %275, label %194

194:                                              ; preds = %189
  %195 = load ptr, ptr %9, align 8, !tbaa !5
  %196 = getelementptr inbounds %struct._ISCSI_ATTEMPT_CONFIG_NVDATA, ptr %195, i32 0, i32 3
  store i8 0, ptr %196, align 1, !tbaa !27
  %197 = load ptr, ptr @mPrivate, align 8, !tbaa !5
  %198 = getelementptr inbounds %struct.ISCSI_PRIVATE_DATA, ptr %197, i32 0, i32 5
  %199 = load i8, ptr %198, align 1, !tbaa !24
  %200 = icmp ne i8 %199, 0
  br i1 %200, label %223, label %201

201:                                              ; preds = %194
  %202 = load ptr, ptr %9, align 8, !tbaa !5
  %203 = getelementptr inbounds %struct._ISCSI_ATTEMPT_CONFIG_NVDATA, ptr %202, i32 0, i32 14
  %204 = getelementptr inbounds %struct._ISCSI_SESSION_CONFIG_NVDATA, ptr %203, i32 0, i32 2
  %205 = load i8, ptr %204, align 1, !tbaa !22
  %206 = zext i8 %205 to i32
  %207 = icmp eq i32 %206, 0
  br i1 %207, label %208, label %223

208:                                              ; preds = %201
  %209 = load ptr, ptr %3, align 8, !tbaa !5
  %210 = getelementptr inbounds %struct._ISCSI_DRIVER_DATA, ptr %209, i32 0, i32 1
  %211 = load ptr, ptr %210, align 8, !tbaa !28
  %212 = load ptr, ptr %3, align 8, !tbaa !5
  %213 = getelementptr inbounds %struct._ISCSI_DRIVER_DATA, ptr %212, i32 0, i32 2
  %214 = load ptr, ptr %213, align 8, !tbaa !34
  %215 = load ptr, ptr %9, align 8, !tbaa !5
  %216 = call i64 @IScsiDoDhcp(ptr noundef %211, ptr noundef %214, ptr noundef %215)
  store i64 %216, ptr %4, align 8, !tbaa !9
  %217 = load i64, ptr %4, align 8, !tbaa !9
  %218 = icmp slt i64 %217, 0
  br i1 %218, label %222, label %219

219:                                              ; preds = %208
  %220 = load ptr, ptr %9, align 8, !tbaa !5
  %221 = getelementptr inbounds %struct._ISCSI_ATTEMPT_CONFIG_NVDATA, ptr %220, i32 0, i32 3
  store i8 1, ptr %221, align 1, !tbaa !27
  br label %222

222:                                              ; preds = %219, %208
  br label %252

223:                                              ; preds = %201, %194
  %224 = load ptr, ptr @mPrivate, align 8, !tbaa !5
  %225 = getelementptr inbounds %struct.ISCSI_PRIVATE_DATA, ptr %224, i32 0, i32 5
  %226 = load i8, ptr %225, align 1, !tbaa !24
  %227 = zext i8 %226 to i32
  %228 = icmp ne i32 %227, 0
  br i1 %228, label %229, label %251

229:                                              ; preds = %223
  %230 = load ptr, ptr %9, align 8, !tbaa !5
  %231 = getelementptr inbounds %struct._ISCSI_ATTEMPT_CONFIG_NVDATA, ptr %230, i32 0, i32 14
  %232 = getelementptr inbounds %struct._ISCSI_SESSION_CONFIG_NVDATA, ptr %231, i32 0, i32 2
  %233 = load i8, ptr %232, align 1, !tbaa !22
  %234 = zext i8 %233 to i32
  %235 = icmp eq i32 %234, 1
  br i1 %235, label %236, label %251

236:                                              ; preds = %229
  %237 = load ptr, ptr %3, align 8, !tbaa !5
  %238 = getelementptr inbounds %struct._ISCSI_DRIVER_DATA, ptr %237, i32 0, i32 1
  %239 = load ptr, ptr %238, align 8, !tbaa !28
  %240 = load ptr, ptr %3, align 8, !tbaa !5
  %241 = getelementptr inbounds %struct._ISCSI_DRIVER_DATA, ptr %240, i32 0, i32 2
  %242 = load ptr, ptr %241, align 8, !tbaa !34
  %243 = load ptr, ptr %9, align 8, !tbaa !5
  %244 = call i64 @IScsiDoDhcp6(ptr noundef %239, ptr noundef %242, ptr noundef %243)
  store i64 %244, ptr %4, align 8, !tbaa !9
  %245 = load i64, ptr %4, align 8, !tbaa !9
  %246 = icmp slt i64 %245, 0
  br i1 %246, label %250, label %247

247:                                              ; preds = %236
  %248 = load ptr, ptr %9, align 8, !tbaa !5
  %249 = getelementptr inbounds %struct._ISCSI_ATTEMPT_CONFIG_NVDATA, ptr %248, i32 0, i32 3
  store i8 1, ptr %249, align 1, !tbaa !27
  br label %250

250:                                              ; preds = %247, %236
  br label %251

251:                                              ; preds = %250, %229, %223
  br label %252

252:                                              ; preds = %251, %222
  %253 = load ptr, ptr %9, align 8, !tbaa !5
  %254 = getelementptr inbounds %struct._ISCSI_ATTEMPT_CONFIG_NVDATA, ptr %253, i32 0, i32 10
  %255 = getelementptr inbounds [96 x i8], ptr %254, i64 0, i64 0
  %256 = getelementptr inbounds [96 x i16], ptr %5, i64 0, i64 0
  %257 = call ptr @AsciiStrToUnicodeStr(ptr noundef %255, ptr noundef %256)
  %258 = load ptr, ptr @mPrivate, align 8, !tbaa !5
  %259 = getelementptr inbounds %struct.ISCSI_PRIVATE_DATA, ptr %258, i32 0, i32 0
  %260 = getelementptr inbounds [223 x i16], ptr %259, i64 0, i64 0
  %261 = getelementptr inbounds [96 x i16], ptr %5, i64 0, i64 0
  %262 = load ptr, ptr %9, align 8, !tbaa !5
  %263 = getelementptr inbounds %struct._ISCSI_ATTEMPT_CONFIG_NVDATA, ptr %262, i32 0, i32 2
  %264 = load i8, ptr %263, align 1, !tbaa !35
  %265 = zext i8 %264 to i64
  %266 = call i64 (ptr, i64, ptr, ...) @UnicodeSPrint(ptr noundef %260, i64 noundef 223, ptr noundef @.str.5, ptr noundef %261, i64 noundef %265)
  %267 = load ptr, ptr @gRT, align 8, !tbaa !5
  %268 = getelementptr inbounds %struct.EFI_RUNTIME_SERVICES, ptr %267, i32 0, i32 9
  %269 = load ptr, ptr %268, align 8, !tbaa !36
  %270 = load ptr, ptr @mPrivate, align 8, !tbaa !5
  %271 = getelementptr inbounds %struct.ISCSI_PRIVATE_DATA, ptr %270, i32 0, i32 0
  %272 = getelementptr inbounds [223 x i16], ptr %271, i64 0, i64 0
  %273 = load ptr, ptr %9, align 8, !tbaa !5
  %274 = call i64 %269(ptr noundef %272, ptr noundef @gEfiIScsiInitiatorNameProtocolGuid, i32 noundef 3, i64 noundef 856, ptr noundef %273)
  br label %637

275:                                              ; preds = %189, %182
  br label %637

276:                                              ; preds = %61, %58
  br label %277

277:                                              ; preds = %276
  %278 = load ptr, ptr @mPrivate, align 8, !tbaa !5
  %279 = getelementptr inbounds %struct.ISCSI_PRIVATE_DATA, ptr %278, i32 0, i32 3
  %280 = load i8, ptr %279, align 1, !tbaa !40
  %281 = call ptr @IScsiGetNicInfoByIndex(i8 noundef zeroext %280)
  store ptr %281, ptr %7, align 8, !tbaa !5
  br label %282

282:                                              ; preds = %277
  %283 = call zeroext i8 @DebugAssertEnabled()
  %284 = icmp ne i8 %283, 0
  br i1 %284, label %285, label %290

285:                                              ; preds = %282
  %286 = load ptr, ptr %7, align 8, !tbaa !5
  %287 = icmp ne ptr %286, null
  br i1 %287, label %289, label %288

288:                                              ; preds = %285
  call void @DebugAssert(ptr noundef @.str.1, i64 noundef 1166, ptr noundef @.str.7)
  br label %289

289:                                              ; preds = %288, %285
  br label %290

290:                                              ; preds = %289, %282
  br label %291

291:                                              ; preds = %290
  br label %292

292:                                              ; preds = %291
  %293 = load ptr, ptr %7, align 8, !tbaa !5
  %294 = getelementptr inbounds %struct.ISCSI_NIC_INFO, ptr %293, i32 0, i32 2
  %295 = load ptr, ptr %7, align 8, !tbaa !5
  %296 = getelementptr inbounds %struct.ISCSI_NIC_INFO, ptr %295, i32 0, i32 1
  %297 = load i32, ptr %296, align 8, !tbaa !41
  %298 = load ptr, ptr %7, align 8, !tbaa !5
  %299 = getelementptr inbounds %struct.ISCSI_NIC_INFO, ptr %298, i32 0, i32 4
  %300 = load i16, ptr %299, align 2, !tbaa !43
  %301 = getelementptr inbounds [96 x i16], ptr %5, i64 0, i64 0
  call void @IScsiMacAddrToStr(ptr noundef %294, i32 noundef %297, i16 noundef zeroext %300, ptr noundef %301)
  %302 = load ptr, ptr @mPrivate, align 8, !tbaa !5
  %303 = getelementptr inbounds %struct.ISCSI_PRIVATE_DATA, ptr %302, i32 0, i32 0
  %304 = getelementptr inbounds [223 x i16], ptr %303, i64 0, i64 0
  %305 = getelementptr inbounds [96 x i16], ptr %5, i64 0, i64 0
  %306 = load ptr, ptr %10, align 8, !tbaa !5
  %307 = load i64, ptr %6, align 8, !tbaa !9
  %308 = getelementptr inbounds i8, ptr %306, i64 %307
  %309 = load i8, ptr %308, align 1, !tbaa !16
  %310 = zext i8 %309 to i64
  %311 = call i64 (ptr, i64, ptr, ...) @UnicodeSPrint(ptr noundef %304, i64 noundef 128, ptr noundef @.str.5, ptr noundef %305, i64 noundef %310)
  %312 = load ptr, ptr @mPrivate, align 8, !tbaa !5
  %313 = getelementptr inbounds %struct.ISCSI_PRIVATE_DATA, ptr %312, i32 0, i32 0
  %314 = getelementptr inbounds [223 x i16], ptr %313, i64 0, i64 0
  %315 = call i64 @GetVariable2(ptr noundef %314, ptr noundef @gEfiIScsiInitiatorNameProtocolGuid, ptr noundef %8, ptr noundef null)
  %316 = load ptr, ptr %8, align 8, !tbaa !5
  %317 = icmp eq ptr %316, null
  br i1 %317, label %318, label %319

318:                                              ; preds = %292
  br label %637

319:                                              ; preds = %292
  br label %320

320:                                              ; preds = %319
  %321 = call zeroext i8 @DebugAssertEnabled()
  %322 = icmp ne i8 %321, 0
  br i1 %322, label %323, label %336

323:                                              ; preds = %320
  %324 = load ptr, ptr %10, align 8, !tbaa !5
  %325 = load i64, ptr %6, align 8, !tbaa !9
  %326 = getelementptr inbounds i8, ptr %324, i64 %325
  %327 = load i8, ptr %326, align 1, !tbaa !16
  %328 = zext i8 %327 to i32
  %329 = load ptr, ptr %8, align 8, !tbaa !5
  %330 = getelementptr inbounds %struct._ISCSI_ATTEMPT_CONFIG_NVDATA, ptr %329, i32 0, i32 2
  %331 = load i8, ptr %330, align 1, !tbaa !35
  %332 = zext i8 %331 to i32
  %333 = icmp eq i32 %328, %332
  br i1 %333, label %335, label %334

334:                                              ; preds = %323
  call void @DebugAssert(ptr noundef @.str.1, i64 noundef 1187, ptr noundef @.str.8)
  br label %335

335:                                              ; preds = %334, %323
  br label %336

336:                                              ; preds = %335, %320
  br label %337

337:                                              ; preds = %336
  br label %338

338:                                              ; preds = %337
  %339 = load ptr, ptr %7, align 8, !tbaa !5
  %340 = getelementptr inbounds %struct.ISCSI_NIC_INFO, ptr %339, i32 0, i32 3
  %341 = load i8, ptr %340, align 4, !tbaa !44
  %342 = load ptr, ptr %8, align 8, !tbaa !5
  %343 = getelementptr inbounds %struct._ISCSI_ATTEMPT_CONFIG_NVDATA, ptr %342, i32 0, i32 1
  store i8 %341, ptr %343, align 1, !tbaa !45
  %344 = load ptr, ptr %8, align 8, !tbaa !5
  %345 = getelementptr inbounds %struct._ISCSI_ATTEMPT_CONFIG_NVDATA, ptr %344, i32 0, i32 3
  store i8 0, ptr %345, align 1, !tbaa !27
  %346 = load ptr, ptr @mPrivate, align 8, !tbaa !5
  %347 = getelementptr inbounds %struct.ISCSI_PRIVATE_DATA, ptr %346, i32 0, i32 7
  %348 = load i8, ptr %347, align 1, !tbaa !46
  %349 = zext i8 %348 to i32
  %350 = icmp ne i32 %349, 0
  %351 = zext i1 %350 to i64
  %352 = select i1 %350, i32 1, i32 0
  %353 = trunc i32 %352 to i8
  %354 = load ptr, ptr %8, align 8, !tbaa !5
  %355 = getelementptr inbounds %struct._ISCSI_ATTEMPT_CONFIG_NVDATA, ptr %354, i32 0, i32 4
  store i8 %353, ptr %355, align 1, !tbaa !47
  %356 = load ptr, ptr %8, align 8, !tbaa !5
  %357 = getelementptr inbounds %struct._ISCSI_ATTEMPT_CONFIG_NVDATA, ptr %356, i32 0, i32 5
  store i8 0, ptr %357, align 1, !tbaa !39
  %358 = load ptr, ptr %8, align 8, !tbaa !5
  %359 = getelementptr inbounds %struct._ISCSI_ATTEMPT_CONFIG_NVDATA, ptr %358, i32 0, i32 14
  %360 = getelementptr inbounds %struct._ISCSI_SESSION_CONFIG_NVDATA, ptr %359, i32 0, i32 2
  %361 = load i8, ptr %360, align 1, !tbaa !22
  %362 = zext i8 %361 to i32
  %363 = icmp eq i32 %362, 2
  br i1 %363, label %364, label %381

364:                                              ; preds = %338
  %365 = load ptr, ptr %8, align 8, !tbaa !5
  %366 = getelementptr inbounds %struct._ISCSI_ATTEMPT_CONFIG_NVDATA, ptr %365, i32 0, i32 14
  %367 = getelementptr inbounds %struct._ISCSI_SESSION_CONFIG_NVDATA, ptr %366, i32 0, i32 6
  store i8 1, ptr %367, align 1, !tbaa !25
  %368 = load ptr, ptr %8, align 8, !tbaa !5
  %369 = getelementptr inbounds %struct._ISCSI_ATTEMPT_CONFIG_NVDATA, ptr %368, i32 0, i32 14
  %370 = getelementptr inbounds %struct._ISCSI_SESSION_CONFIG_NVDATA, ptr %369, i32 0, i32 7
  store i8 1, ptr %370, align 1, !tbaa !26
  %371 = load ptr, ptr @mPrivate, align 8, !tbaa !5
  %372 = getelementptr inbounds %struct.ISCSI_PRIVATE_DATA, ptr %371, i32 0, i32 5
  %373 = load i8, ptr %372, align 1, !tbaa !24
  %374 = zext i8 %373 to i32
  %375 = icmp ne i32 %374, 0
  %376 = zext i1 %375 to i64
  %377 = select i1 %375, i32 4, i32 3
  %378 = trunc i32 %377 to i8
  %379 = load ptr, ptr %8, align 8, !tbaa !5
  %380 = getelementptr inbounds %struct._ISCSI_ATTEMPT_CONFIG_NVDATA, ptr %379, i32 0, i32 6
  store i8 %378, ptr %380, align 1, !tbaa !23
  br label %381

381:                                              ; preds = %364, %338
  %382 = load ptr, ptr %8, align 8, !tbaa !5
  %383 = getelementptr inbounds %struct._ISCSI_ATTEMPT_CONFIG_NVDATA, ptr %382, i32 0, i32 14
  %384 = getelementptr inbounds %struct._ISCSI_SESSION_CONFIG_NVDATA, ptr %383, i32 0, i32 1
  %385 = load i8, ptr %384, align 1, !tbaa !17
  %386 = zext i8 %385 to i32
  %387 = icmp ne i32 %386, 0
  br i1 %387, label %388, label %486

388:                                              ; preds = %381
  %389 = load ptr, ptr %8, align 8, !tbaa !5
  %390 = getelementptr inbounds %struct._ISCSI_ATTEMPT_CONFIG_NVDATA, ptr %389, i32 0, i32 14
  %391 = getelementptr inbounds %struct._ISCSI_SESSION_CONFIG_NVDATA, ptr %390, i32 0, i32 6
  %392 = load i8, ptr %391, align 1, !tbaa !25
  %393 = zext i8 %392 to i32
  %394 = icmp ne i32 %393, 0
  br i1 %394, label %395, label %486

395:                                              ; preds = %388
  %396 = load ptr, ptr @mPrivate, align 8, !tbaa !5
  %397 = getelementptr inbounds %struct.ISCSI_PRIVATE_DATA, ptr %396, i32 0, i32 5
  %398 = load i8, ptr %397, align 1, !tbaa !24
  %399 = icmp ne i8 %398, 0
  br i1 %399, label %428, label %400

400:                                              ; preds = %395
  %401 = load ptr, ptr %8, align 8, !tbaa !5
  %402 = getelementptr inbounds %struct._ISCSI_ATTEMPT_CONFIG_NVDATA, ptr %401, i32 0, i32 14
  %403 = getelementptr inbounds %struct._ISCSI_SESSION_CONFIG_NVDATA, ptr %402, i32 0, i32 2
  %404 = load i8, ptr %403, align 1, !tbaa !22
  %405 = zext i8 %404 to i32
  %406 = icmp eq i32 %405, 0
  br i1 %406, label %413, label %407

407:                                              ; preds = %400
  %408 = load ptr, ptr %8, align 8, !tbaa !5
  %409 = getelementptr inbounds %struct._ISCSI_ATTEMPT_CONFIG_NVDATA, ptr %408, i32 0, i32 6
  %410 = load i8, ptr %409, align 1, !tbaa !23
  %411 = zext i8 %410 to i32
  %412 = icmp eq i32 %411, 3
  br i1 %412, label %413, label %428

413:                                              ; preds = %407, %400
  %414 = load ptr, ptr %3, align 8, !tbaa !5
  %415 = getelementptr inbounds %struct._ISCSI_DRIVER_DATA, ptr %414, i32 0, i32 1
  %416 = load ptr, ptr %415, align 8, !tbaa !28
  %417 = load ptr, ptr %3, align 8, !tbaa !5
  %418 = getelementptr inbounds %struct._ISCSI_DRIVER_DATA, ptr %417, i32 0, i32 2
  %419 = load ptr, ptr %418, align 8, !tbaa !34
  %420 = load ptr, ptr %8, align 8, !tbaa !5
  %421 = call i64 @IScsiDoDhcp(ptr noundef %416, ptr noundef %419, ptr noundef %420)
  store i64 %421, ptr %4, align 8, !tbaa !9
  %422 = load i64, ptr %4, align 8, !tbaa !9
  %423 = icmp slt i64 %422, 0
  br i1 %423, label %427, label %424

424:                                              ; preds = %413
  %425 = load ptr, ptr %8, align 8, !tbaa !5
  %426 = getelementptr inbounds %struct._ISCSI_ATTEMPT_CONFIG_NVDATA, ptr %425, i32 0, i32 3
  store i8 1, ptr %426, align 1, !tbaa !27
  br label %427

427:                                              ; preds = %424, %413
  br label %463

428:                                              ; preds = %407, %395
  %429 = load ptr, ptr @mPrivate, align 8, !tbaa !5
  %430 = getelementptr inbounds %struct.ISCSI_PRIVATE_DATA, ptr %429, i32 0, i32 5
  %431 = load i8, ptr %430, align 1, !tbaa !24
  %432 = zext i8 %431 to i32
  %433 = icmp ne i32 %432, 0
  br i1 %433, label %434, label %462

434:                                              ; preds = %428
  %435 = load ptr, ptr %8, align 8, !tbaa !5
  %436 = getelementptr inbounds %struct._ISCSI_ATTEMPT_CONFIG_NVDATA, ptr %435, i32 0, i32 14
  %437 = getelementptr inbounds %struct._ISCSI_SESSION_CONFIG_NVDATA, ptr %436, i32 0, i32 2
  %438 = load i8, ptr %437, align 1, !tbaa !22
  %439 = zext i8 %438 to i32
  %440 = icmp eq i32 %439, 1
  br i1 %440, label %447, label %441

441:                                              ; preds = %434
  %442 = load ptr, ptr %8, align 8, !tbaa !5
  %443 = getelementptr inbounds %struct._ISCSI_ATTEMPT_CONFIG_NVDATA, ptr %442, i32 0, i32 6
  %444 = load i8, ptr %443, align 1, !tbaa !23
  %445 = zext i8 %444 to i32
  %446 = icmp eq i32 %445, 4
  br i1 %446, label %447, label %462

447:                                              ; preds = %441, %434
  %448 = load ptr, ptr %3, align 8, !tbaa !5
  %449 = getelementptr inbounds %struct._ISCSI_DRIVER_DATA, ptr %448, i32 0, i32 1
  %450 = load ptr, ptr %449, align 8, !tbaa !28
  %451 = load ptr, ptr %3, align 8, !tbaa !5
  %452 = getelementptr inbounds %struct._ISCSI_DRIVER_DATA, ptr %451, i32 0, i32 2
  %453 = load ptr, ptr %452, align 8, !tbaa !34
  %454 = load ptr, ptr %8, align 8, !tbaa !5
  %455 = call i64 @IScsiDoDhcp6(ptr noundef %450, ptr noundef %453, ptr noundef %454)
  store i64 %455, ptr %4, align 8, !tbaa !9
  %456 = load i64, ptr %4, align 8, !tbaa !9
  %457 = icmp slt i64 %456, 0
  br i1 %457, label %461, label %458

458:                                              ; preds = %447
  %459 = load ptr, ptr %8, align 8, !tbaa !5
  %460 = getelementptr inbounds %struct._ISCSI_ATTEMPT_CONFIG_NVDATA, ptr %459, i32 0, i32 3
  store i8 1, ptr %460, align 1, !tbaa !27
  br label %461

461:                                              ; preds = %458, %447
  br label %462

462:                                              ; preds = %461, %441, %428
  br label %463

463:                                              ; preds = %462, %427
  %464 = load ptr, ptr %8, align 8, !tbaa !5
  %465 = getelementptr inbounds %struct._ISCSI_ATTEMPT_CONFIG_NVDATA, ptr %464, i32 0, i32 10
  %466 = getelementptr inbounds [96 x i8], ptr %465, i64 0, i64 0
  %467 = getelementptr inbounds [96 x i16], ptr %5, i64 0, i64 0
  %468 = call ptr @AsciiStrToUnicodeStr(ptr noundef %466, ptr noundef %467)
  %469 = load ptr, ptr @mPrivate, align 8, !tbaa !5
  %470 = getelementptr inbounds %struct.ISCSI_PRIVATE_DATA, ptr %469, i32 0, i32 0
  %471 = getelementptr inbounds [223 x i16], ptr %470, i64 0, i64 0
  %472 = getelementptr inbounds [96 x i16], ptr %5, i64 0, i64 0
  %473 = load ptr, ptr %8, align 8, !tbaa !5
  %474 = getelementptr inbounds %struct._ISCSI_ATTEMPT_CONFIG_NVDATA, ptr %473, i32 0, i32 2
  %475 = load i8, ptr %474, align 1, !tbaa !35
  %476 = zext i8 %475 to i64
  %477 = call i64 (ptr, i64, ptr, ...) @UnicodeSPrint(ptr noundef %471, i64 noundef 223, ptr noundef @.str.5, ptr noundef %472, i64 noundef %476)
  %478 = load ptr, ptr @gRT, align 8, !tbaa !5
  %479 = getelementptr inbounds %struct.EFI_RUNTIME_SERVICES, ptr %478, i32 0, i32 9
  %480 = load ptr, ptr %479, align 8, !tbaa !36
  %481 = load ptr, ptr @mPrivate, align 8, !tbaa !5
  %482 = getelementptr inbounds %struct.ISCSI_PRIVATE_DATA, ptr %481, i32 0, i32 0
  %483 = getelementptr inbounds [223 x i16], ptr %482, i64 0, i64 0
  %484 = load ptr, ptr %8, align 8, !tbaa !5
  %485 = call i64 %480(ptr noundef %483, ptr noundef @gEfiIScsiInitiatorNameProtocolGuid, i32 noundef 3, i64 noundef 856, ptr noundef %484)
  br label %486

486:                                              ; preds = %463, %388, %381
  %487 = load ptr, ptr %8, align 8, !tbaa !5
  %488 = getelementptr inbounds %struct._ISCSI_ATTEMPT_CONFIG_NVDATA, ptr %487, i32 0, i32 14
  %489 = getelementptr inbounds %struct._ISCSI_SESSION_CONFIG_NVDATA, ptr %488, i32 0, i32 1
  %490 = load i8, ptr %489, align 1, !tbaa !17
  %491 = zext i8 %490 to i32
  %492 = icmp eq i32 %491, 0
  br i1 %492, label %493, label %496

493:                                              ; preds = %486
  %494 = getelementptr inbounds [64 x i16], ptr %12, i64 0, i64 0
  %495 = call i64 (ptr, i64, ptr, ...) @UnicodeSPrint(ptr noundef %494, i64 noundef 64, ptr noundef @.str.9)
  br label %518

496:                                              ; preds = %486
  %497 = load ptr, ptr %8, align 8, !tbaa !5
  %498 = getelementptr inbounds %struct._ISCSI_ATTEMPT_CONFIG_NVDATA, ptr %497, i32 0, i32 14
  %499 = getelementptr inbounds %struct._ISCSI_SESSION_CONFIG_NVDATA, ptr %498, i32 0, i32 1
  %500 = load i8, ptr %499, align 1, !tbaa !17
  %501 = zext i8 %500 to i32
  %502 = icmp eq i32 %501, 1
  br i1 %502, label %503, label %506

503:                                              ; preds = %496
  %504 = getelementptr inbounds [64 x i16], ptr %12, i64 0, i64 0
  %505 = call i64 (ptr, i64, ptr, ...) @UnicodeSPrint(ptr noundef %504, i64 noundef 64, ptr noundef @.str.10)
  br label %517

506:                                              ; preds = %496
  %507 = load ptr, ptr %8, align 8, !tbaa !5
  %508 = getelementptr inbounds %struct._ISCSI_ATTEMPT_CONFIG_NVDATA, ptr %507, i32 0, i32 14
  %509 = getelementptr inbounds %struct._ISCSI_SESSION_CONFIG_NVDATA, ptr %508, i32 0, i32 1
  %510 = load i8, ptr %509, align 1, !tbaa !17
  %511 = zext i8 %510 to i32
  %512 = icmp eq i32 %511, 2
  br i1 %512, label %513, label %516

513:                                              ; preds = %506
  %514 = getelementptr inbounds [64 x i16], ptr %12, i64 0, i64 0
  %515 = call i64 (ptr, i64, ptr, ...) @UnicodeSPrint(ptr noundef %514, i64 noundef 64, ptr noundef @.str.11)
  br label %516

516:                                              ; preds = %513, %506
  br label %517

517:                                              ; preds = %516, %503
  br label %518

518:                                              ; preds = %517, %493
  %519 = load ptr, ptr %8, align 8, !tbaa !5
  %520 = getelementptr inbounds %struct._ISCSI_ATTEMPT_CONFIG_NVDATA, ptr %519, i32 0, i32 14
  %521 = getelementptr inbounds %struct._ISCSI_SESSION_CONFIG_NVDATA, ptr %520, i32 0, i32 2
  %522 = load i8, ptr %521, align 1, !tbaa !22
  %523 = zext i8 %522 to i32
  %524 = icmp eq i32 %523, 0
  br i1 %524, label %525, label %528

525:                                              ; preds = %518
  %526 = getelementptr inbounds [64 x i16], ptr %13, i64 0, i64 0
  %527 = call i64 (ptr, i64, ptr, ...) @UnicodeSPrint(ptr noundef %526, i64 noundef 64, ptr noundef @.str.12)
  br label %550

528:                                              ; preds = %518
  %529 = load ptr, ptr %8, align 8, !tbaa !5
  %530 = getelementptr inbounds %struct._ISCSI_ATTEMPT_CONFIG_NVDATA, ptr %529, i32 0, i32 14
  %531 = getelementptr inbounds %struct._ISCSI_SESSION_CONFIG_NVDATA, ptr %530, i32 0, i32 2
  %532 = load i8, ptr %531, align 1, !tbaa !22
  %533 = zext i8 %532 to i32
  %534 = icmp eq i32 %533, 1
  br i1 %534, label %535, label %538

535:                                              ; preds = %528
  %536 = getelementptr inbounds [64 x i16], ptr %13, i64 0, i64 0
  %537 = call i64 (ptr, i64, ptr, ...) @UnicodeSPrint(ptr noundef %536, i64 noundef 64, ptr noundef @.str.13)
  br label %549

538:                                              ; preds = %528
  %539 = load ptr, ptr %8, align 8, !tbaa !5
  %540 = getelementptr inbounds %struct._ISCSI_ATTEMPT_CONFIG_NVDATA, ptr %539, i32 0, i32 14
  %541 = getelementptr inbounds %struct._ISCSI_SESSION_CONFIG_NVDATA, ptr %540, i32 0, i32 2
  %542 = load i8, ptr %541, align 1, !tbaa !22
  %543 = zext i8 %542 to i32
  %544 = icmp eq i32 %543, 2
  br i1 %544, label %545, label %548

545:                                              ; preds = %538
  %546 = getelementptr inbounds [64 x i16], ptr %13, i64 0, i64 0
  %547 = call i64 (ptr, i64, ptr, ...) @UnicodeSPrint(ptr noundef %546, i64 noundef 64, ptr noundef @.str.14)
  br label %548

548:                                              ; preds = %545, %538
  br label %549

549:                                              ; preds = %548, %535
  br label %550

550:                                              ; preds = %549, %525
  %551 = load ptr, ptr @mPrivate, align 8, !tbaa !5
  %552 = getelementptr inbounds %struct.ISCSI_PRIVATE_DATA, ptr %551, i32 0, i32 0
  %553 = getelementptr inbounds [223 x i16], ptr %552, i64 0, i64 0
  %554 = getelementptr inbounds [96 x i16], ptr %5, i64 0, i64 0
  %555 = load ptr, ptr %7, align 8, !tbaa !5
  %556 = getelementptr inbounds %struct.ISCSI_NIC_INFO, ptr %555, i32 0, i32 5
  %557 = load i64, ptr %556, align 8, !tbaa !48
  %558 = load ptr, ptr %7, align 8, !tbaa !5
  %559 = getelementptr inbounds %struct.ISCSI_NIC_INFO, ptr %558, i32 0, i32 6
  %560 = load i64, ptr %559, align 8, !tbaa !49
  %561 = load ptr, ptr %7, align 8, !tbaa !5
  %562 = getelementptr inbounds %struct.ISCSI_NIC_INFO, ptr %561, i32 0, i32 7
  %563 = load i64, ptr %562, align 8, !tbaa !50
  %564 = getelementptr inbounds [64 x i16], ptr %12, i64 0, i64 0
  %565 = getelementptr inbounds [64 x i16], ptr %13, i64 0, i64 0
  %566 = call i64 (ptr, i64, ptr, ...) @UnicodeSPrint(ptr noundef %553, i64 noundef 223, ptr noundef @.str.15, ptr noundef %554, i64 noundef %557, i64 noundef %560, i64 noundef %563, ptr noundef %564, ptr noundef %565)
  %567 = load ptr, ptr @mCallbackInfo, align 8, !tbaa !5
  %568 = getelementptr inbounds %struct._ISCSI_FORM_CALLBACK_INFO, ptr %567, i32 0, i32 5
  %569 = load ptr, ptr %568, align 8, !tbaa !51
  %570 = load ptr, ptr @mPrivate, align 8, !tbaa !5
  %571 = getelementptr inbounds %struct.ISCSI_PRIVATE_DATA, ptr %570, i32 0, i32 0
  %572 = getelementptr inbounds [223 x i16], ptr %571, i64 0, i64 0
  %573 = call zeroext i16 @HiiSetString(ptr noundef %569, i16 noundef zeroext 0, ptr noundef %572, ptr noundef null)
  %574 = load ptr, ptr %8, align 8, !tbaa !5
  %575 = getelementptr inbounds %struct._ISCSI_ATTEMPT_CONFIG_NVDATA, ptr %574, i32 0, i32 8
  store i16 %573, ptr %575, align 1, !tbaa !54
  br label %576

576:                                              ; preds = %550
  %577 = call zeroext i8 @DebugAssertEnabled()
  %578 = icmp ne i8 %577, 0
  br i1 %578, label %579, label %587

579:                                              ; preds = %576
  %580 = load ptr, ptr %8, align 8, !tbaa !5
  %581 = getelementptr inbounds %struct._ISCSI_ATTEMPT_CONFIG_NVDATA, ptr %580, i32 0, i32 8
  %582 = load i16, ptr %581, align 1, !tbaa !54
  %583 = zext i16 %582 to i32
  %584 = icmp ne i32 %583, 0
  br i1 %584, label %586, label %585

585:                                              ; preds = %579
  call void @DebugAssert(ptr noundef @.str.1, i64 noundef 1283, ptr noundef @.str.16)
  br label %586

586:                                              ; preds = %585, %579
  br label %587

587:                                              ; preds = %586, %576
  br label %588

588:                                              ; preds = %587
  br label %589

589:                                              ; preds = %588
  %590 = load ptr, ptr @mPrivate, align 8, !tbaa !5
  %591 = getelementptr inbounds %struct.ISCSI_PRIVATE_DATA, ptr %590, i32 0, i32 14
  %592 = load ptr, ptr %8, align 8, !tbaa !5
  %593 = getelementptr inbounds %struct._ISCSI_ATTEMPT_CONFIG_NVDATA, ptr %592, i32 0, i32 0
  %594 = call ptr @InsertTailList(ptr noundef %591, ptr noundef %593)
  %595 = load ptr, ptr @mPrivate, align 8, !tbaa !5
  %596 = getelementptr inbounds %struct.ISCSI_PRIVATE_DATA, ptr %595, i32 0, i32 13
  %597 = load i8, ptr %596, align 1, !tbaa !55
  %598 = add i8 %597, 1
  store i8 %598, ptr %596, align 1, !tbaa !55
  %599 = load ptr, ptr %8, align 8, !tbaa !5
  %600 = getelementptr inbounds %struct._ISCSI_ATTEMPT_CONFIG_NVDATA, ptr %599, i32 0, i32 14
  %601 = getelementptr inbounds %struct._ISCSI_SESSION_CONFIG_NVDATA, ptr %600, i32 0, i32 1
  %602 = load i8, ptr %601, align 1, !tbaa !17
  %603 = zext i8 %602 to i32
  %604 = icmp eq i32 %603, 2
  br i1 %604, label %605, label %623

605:                                              ; preds = %589
  %606 = load ptr, ptr @mPrivate, align 8, !tbaa !5
  %607 = getelementptr inbounds %struct.ISCSI_PRIVATE_DATA, ptr %606, i32 0, i32 8
  %608 = load i8, ptr %607, align 2, !tbaa !56
  %609 = add i8 %608, 1
  store i8 %609, ptr %607, align 2, !tbaa !56
  %610 = load ptr, ptr @mPrivate, align 8, !tbaa !5
  %611 = getelementptr inbounds %struct.ISCSI_PRIVATE_DATA, ptr %610, i32 0, i32 7
  store i8 1, ptr %611, align 1, !tbaa !46
  %612 = load ptr, ptr %8, align 8, !tbaa !5
  %613 = getelementptr inbounds %struct._ISCSI_ATTEMPT_CONFIG_NVDATA, ptr %612, i32 0, i32 15
  %614 = load i8, ptr %613, align 1, !tbaa !57
  %615 = zext i8 %614 to i32
  %616 = icmp eq i32 %615, 2
  br i1 %616, label %617, label %622

617:                                              ; preds = %605
  %618 = load ptr, ptr @mPrivate, align 8, !tbaa !5
  %619 = getelementptr inbounds %struct.ISCSI_PRIVATE_DATA, ptr %618, i32 0, i32 9
  %620 = load i8, ptr %619, align 1, !tbaa !58
  %621 = add i8 %620, 1
  store i8 %621, ptr %619, align 1, !tbaa !58
  br label %622

622:                                              ; preds = %617, %605
  br label %636

623:                                              ; preds = %589
  %624 = load ptr, ptr %8, align 8, !tbaa !5
  %625 = getelementptr inbounds %struct._ISCSI_ATTEMPT_CONFIG_NVDATA, ptr %624, i32 0, i32 14
  %626 = getelementptr inbounds %struct._ISCSI_SESSION_CONFIG_NVDATA, ptr %625, i32 0, i32 1
  %627 = load i8, ptr %626, align 1, !tbaa !17
  %628 = zext i8 %627 to i32
  %629 = icmp eq i32 %628, 1
  br i1 %629, label %630, label %635

630:                                              ; preds = %623
  %631 = load ptr, ptr @mPrivate, align 8, !tbaa !5
  %632 = getelementptr inbounds %struct.ISCSI_PRIVATE_DATA, ptr %631, i32 0, i32 10
  %633 = load i8, ptr %632, align 8, !tbaa !59
  %634 = add i8 %633, 1
  store i8 %634, ptr %632, align 8, !tbaa !59
  br label %635

635:                                              ; preds = %630, %623
  br label %636

636:                                              ; preds = %635, %622
  br label %637

637:                                              ; preds = %636, %318, %275, %252, %159, %105, %93, %57
  %638 = load i64, ptr %6, align 8, !tbaa !9
  %639 = add i64 %638, 1
  store i64 %639, ptr %6, align 8, !tbaa !9
  br label %37, !llvm.loop !60

640:                                              ; preds = %37
  store i64 0, ptr %6, align 8, !tbaa !9
  br label %641

641:                                              ; preds = %664, %640
  %642 = load i64, ptr %6, align 8, !tbaa !9
  %643 = load i64, ptr %11, align 8, !tbaa !9
  %644 = udiv i64 %643, 1
  %645 = icmp ult i64 %642, %644
  br i1 %645, label %646, label %667

646:                                              ; preds = %641
  %647 = load ptr, ptr %10, align 8, !tbaa !5
  %648 = load i64, ptr %6, align 8, !tbaa !9
  %649 = getelementptr inbounds i8, ptr %647, i64 %648
  %650 = load i8, ptr %649, align 1, !tbaa !16
  %651 = call ptr @IScsiConfigGetAttemptByConfigIndex(i8 noundef zeroext %650)
  store ptr %651, ptr %8, align 8, !tbaa !5
  %652 = load ptr, ptr %8, align 8, !tbaa !5
  %653 = icmp eq ptr %652, null
  br i1 %653, label %654, label %655

654:                                              ; preds = %646
  br label %664

655:                                              ; preds = %646
  %656 = load ptr, ptr %8, align 8, !tbaa !5
  %657 = getelementptr inbounds %struct._ISCSI_ATTEMPT_CONFIG_NVDATA, ptr %656, i32 0, i32 0
  %658 = call ptr @RemoveEntryList(ptr noundef %657)
  %659 = load ptr, ptr @mPrivate, align 8, !tbaa !5
  %660 = getelementptr inbounds %struct.ISCSI_PRIVATE_DATA, ptr %659, i32 0, i32 14
  %661 = load ptr, ptr %8, align 8, !tbaa !5
  %662 = getelementptr inbounds %struct._ISCSI_ATTEMPT_CONFIG_NVDATA, ptr %661, i32 0, i32 0
  %663 = call ptr @InsertTailList(ptr noundef %660, ptr noundef %662)
  br label %664

664:                                              ; preds = %655, %654
  %665 = load i64, ptr %6, align 8, !tbaa !9
  %666 = add i64 %665, 1
  store i64 %666, ptr %6, align 8, !tbaa !9
  br label %641, !llvm.loop !62

667:                                              ; preds = %641
  call void @IScsiConfigUpdateAttempt()
  %668 = load ptr, ptr %10, align 8, !tbaa !5
  call void @FreePool(ptr noundef %668)
  %669 = load ptr, ptr @mPrivate, align 8, !tbaa !5
  %670 = getelementptr inbounds %struct.ISCSI_PRIVATE_DATA, ptr %669, i32 0, i32 7
  %671 = load i8, ptr %670, align 1, !tbaa !46
  %672 = icmp ne i8 %671, 0
  br i1 %672, label %686, label %673

673:                                              ; preds = %667
  %674 = load ptr, ptr @mPrivate, align 8, !tbaa !5
  %675 = getelementptr inbounds %struct.ISCSI_PRIVATE_DATA, ptr %674, i32 0, i32 10
  %676 = load i8, ptr %675, align 8, !tbaa !59
  %677 = zext i8 %676 to i32
  %678 = icmp eq i32 %677, 0
  br i1 %678, label %679, label %680

679:                                              ; preds = %673
  store i64 -9223372036854775794, ptr %2, align 8
  store i32 1, ptr %14, align 4
  br label %687

680:                                              ; preds = %673
  %681 = load ptr, ptr @mPrivate, align 8, !tbaa !5
  %682 = getelementptr inbounds %struct.ISCSI_PRIVATE_DATA, ptr %681, i32 0, i32 10
  %683 = load i8, ptr %682, align 8, !tbaa !59
  %684 = load ptr, ptr @mPrivate, align 8, !tbaa !5
  %685 = getelementptr inbounds %struct.ISCSI_PRIVATE_DATA, ptr %684, i32 0, i32 11
  store i8 %683, ptr %685, align 1, !tbaa !63
  br label %686

686:                                              ; preds = %680, %667
  store i64 0, ptr %2, align 8
  store i32 1, ptr %14, align 4
  br label %687

687:                                              ; preds = %686, %679, %34, %21
  call void @llvm.lifetime.end.p0(i64 128, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 128, 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
  call void @llvm.lifetime.end.p0(i64 8, ptr %9) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 192, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #3
  %688 = load i64, ptr %2, align 8
  ret i64 %688
}

declare ptr @IScsiConfigGetAttemptByConfigIndex(i8 noundef zeroext) #1

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

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

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

declare zeroext i16 @HiiSetString(ptr noundef, i16 noundef zeroext, ptr noundef, ptr noundef) #1

declare void @IScsiConfigUpdateAttempt() #1

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"long long", !7, i64 0}
!11 = !{!12, !10, i64 720}
!12 = !{!"", !7, i64 0, !13, i64 448, !7, i64 464, !7, i64 465, !7, i64 466, !7, i64 467, !7, i64 468, !7, i64 469, !7, i64 470, !7, i64 471, !7, i64 472, !7, i64 473, !7, i64 474, !7, i64 475, !13, i64 480, !7, i64 496, !10, i64 720, !6, i64 728}
!13 = !{!"_LIST_ENTRY", !6, i64 0, !6, i64 8}
!14 = !{!15, !6, i64 0}
!15 = !{!"_EFI_ISCSI_INITIATOR_NAME_PROTOCOL", !6, i64 0, !6, i64 8}
!16 = !{!7, !7, i64 0}
!17 = !{!18, !7, i64 268}
!18 = !{!"_ISCSI_ATTEMPT_CONFIG_NVDATA", !13, i64 0, !7, i64 16, !7, i64 17, !7, i64 18, !7, i64 19, !7, i64 20, !7, i64 21, !19, i64 22, !19, i64 24, !7, i64 26, !7, i64 122, !7, i64 218, !7, i64 234, !7, i64 250, !20, i64 266, !7, i64 566, !7, i64 567}
!19 = !{!"short", !7, i64 0}
!20 = !{!"_ISCSI_SESSION_CONFIG_NVDATA", !19, i64 0, !7, i64 2, !7, i64 3, !7, i64 4, !21, i64 20, !7, i64 24, !7, i64 40, !7, i64 41, !7, i64 42, !7, i64 266, !7, i64 282, !7, i64 283, !19, i64 291, !7, i64 293, !7, i64 294}
!21 = !{!"", !7, i64 0}
!22 = !{!18, !7, i64 269}
!23 = !{!18, !7, i64 21}
!24 = !{!12, !7, i64 467}
!25 = !{!18, !7, i64 306}
!26 = !{!18, !7, i64 307}
!27 = !{!18, !7, i64 18}
!28 = !{!29, !6, i64 8}
!29 = !{!"_ISCSI_DRIVER_DATA", !30, i64 0, !6, i64 8, !6, i64 16, !31, i64 24, !6, i64 32, !32, i64 40, !33, i64 104, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144}
!30 = !{!"int", !7, i64 0}
!31 = !{!"_ISCSI_PRIVATE_PROTOCOL", !30, i64 0}
!32 = !{!"_EFI_EXT_SCSI_PASS_THRU_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}
!33 = !{!"", !30, i64 0, !30, i64 4, !30, i64 8}
!34 = !{!29, !6, i64 16}
!35 = !{!18, !7, i64 17}
!36 = !{!37, !6, i64 88}
!37 = !{!"", !38, 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}
!38 = !{!"", !10, i64 0, !30, i64 8, !30, i64 12, !30, i64 16, !30, i64 20}
!39 = !{!18, !7, i64 20}
!40 = !{!12, !7, i64 465}
!41 = !{!42, !30, i64 16}
!42 = !{!"", !13, i64 0, !30, i64 16, !21, i64 20, !7, i64 52, !19, i64 54, !10, i64 56, !10, i64 64, !10, i64 72}
!43 = !{!42, !19, i64 54}
!44 = !{!42, !7, i64 52}
!45 = !{!18, !7, i64 16}
!46 = !{!12, !7, i64 469}
!47 = !{!18, !7, i64 19}
!48 = !{!42, !10, i64 56}
!49 = !{!42, !10, i64 64}
!50 = !{!42, !10, i64 72}
!51 = !{!52, !6, i64 56}
!52 = !{!"_ISCSI_FORM_CALLBACK_INFO", !30, i64 0, !6, i64 8, !53, i64 16, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64}
!53 = !{!"_EFI_HII_CONFIG_ACCESS_PROTOCOL", !6, i64 0, !6, i64 8, !6, i64 16}
!54 = !{!18, !19, i64 24}
!55 = !{!12, !7, i64 475}
!56 = !{!12, !7, i64 470}
!57 = !{!18, !7, i64 566}
!58 = !{!12, !7, i64 471}
!59 = !{!12, !7, i64 472}
!60 = distinct !{!60, !61}
!61 = !{!"llvm.loop.mustprogress"}
!62 = distinct !{!62, !61}
!63 = !{!12, !7, i64 473}


; 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.GUID = type { i32, i16, i16, [8 x i8] }
%struct._EFI_ISCSI_INITIATOR_NAME_PROTOCOL = type { ptr, ptr }

@.str.1 = external hidden unnamed_addr constant [133 x i8], align 1
@mPrivate = external local_unnamed_addr global ptr, align 8
@gRT = external local_unnamed_addr global ptr, align 8
@.str.4 = external hidden unnamed_addr constant [13 x i32], align 4
@gIScsiConfigGuid = external global %struct.GUID, align 4
@.str.5 = external hidden unnamed_addr constant [5 x i32], align 4
@gEfiIScsiInitiatorNameProtocolGuid = external global %struct.GUID, align 4
@gIScsiInitiatorName = external global %struct._EFI_ISCSI_INITIATOR_NAME_PROTOCOL, align 8
@.str.7 = external hidden unnamed_addr constant [24 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [67 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [9 x i32], align 4
@.str.10 = external hidden unnamed_addr constant [8 x i32], align 4
@.str.11 = external hidden unnamed_addr constant [17 x i32], align 4
@.str.12 = external hidden unnamed_addr constant [4 x i32], align 4
@.str.13 = external hidden unnamed_addr constant [4 x i32], align 4
@.str.14 = external hidden unnamed_addr constant [14 x i32], align 4
@.str.15 = external hidden unnamed_addr constant [72 x i32], align 4
@mCallbackInfo = external local_unnamed_addr global ptr, align 8
@.str.16 = external hidden unnamed_addr constant [46 x i8], align 1
@switch.table.IScsiGetConfigData = private unnamed_addr constant [3 x ptr] [ptr @.str.9, ptr @.str.10, ptr @.str.11], align 8
@switch.table.IScsiGetConfigData.1 = private unnamed_addr constant [3 x ptr] [ptr @.str.12, ptr @.str.13, ptr @.str.14], align 8

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

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

declare zeroext i8 @DebugAssertEnabled() local_unnamed_addr #1

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

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

declare i64 @UnicodeSPrint(ptr noundef, i64 noundef, ptr noundef, ...) local_unnamed_addr #1

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

declare ptr @RemoveEntryList(ptr noundef) local_unnamed_addr #1

declare void @FreePool(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local ptr @IScsiGetNicInfoByIndex(i8 noundef zeroext) local_unnamed_addr #2

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

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

; Function Attrs: nounwind uwtable
define dso_local range(i64 -9223372036854775808, 1) i64 @IScsiGetConfigData(ptr nocapture noundef readonly %0) local_unnamed_addr #2 {
  %2 = alloca [96 x i16], align 16
  %3 = alloca ptr, align 8
  %4 = alloca i64, align 8
  %5 = alloca [64 x i16], align 16
  %6 = alloca [64 x i16], align 16
  call void @llvm.lifetime.start.p0(i64 192, ptr nonnull %2) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %3) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %4) #3
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %5) #3
  call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %6) #3
  %7 = call ptr @IScsiGetVariableAndSize(ptr noundef nonnull @.str.4, ptr noundef nonnull @gIScsiConfigGuid, ptr noundef nonnull %4)
  %8 = icmp eq ptr %7, null
  %9 = load i64, ptr %4, align 8
  %10 = icmp eq i64 %9, 0
  %or.cond = select i1 %8, i1 true, i1 %10
  br i1 %or.cond, label %298, label %11

11:                                               ; preds = %1
  %12 = load ptr, ptr @mPrivate, align 8, !tbaa !5
  %13 = getelementptr inbounds i8, ptr %12, i64 720
  store i64 224, ptr %13, align 8, !tbaa !9
  %14 = load ptr, ptr @gIScsiInitiatorName, align 8, !tbaa !13
  %15 = getelementptr inbounds i8, ptr %12, i64 496
  %16 = call i64 %14(ptr noundef nonnull @gIScsiInitiatorName, ptr noundef nonnull %13, ptr noundef nonnull %15) #3
  %17 = icmp slt i64 %16, 0
  br i1 %17, label %298, label %.preheader109

.preheader109:                                    ; preds = %11
  %18 = load i64, ptr %4, align 8, !tbaa !15
  %.not113 = icmp eq i64 %18, 0
  br i1 %.not113, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.preheader109
  %19 = getelementptr inbounds i8, ptr %0, i64 8
  %20 = getelementptr inbounds i8, ptr %0, i64 16
  br label %22

.preheader:                                       ; preds = %271
  %21 = icmp eq i64 %273, 0
  br i1 %21, label %._crit_edge, label %.lr.ph112

22:                                               ; preds = %.lr.ph, %271
  %.076110 = phi i64 [ 0, %.lr.ph ], [ %272, %271 ]
  %23 = getelementptr inbounds i8, ptr %7, i64 %.076110
  %24 = load i8, ptr %23, align 1, !tbaa !16
  %25 = call ptr @IScsiConfigGetAttemptByConfigIndex(i8 noundef zeroext %24) #3
  %.not86 = icmp eq ptr %25, null
  br i1 %.not86, label %.critedge, label %26

26:                                               ; preds = %22
  %27 = getelementptr inbounds i8, ptr %25, i64 268
  %28 = load i8, ptr %27, align 1, !tbaa !17
  %29 = icmp eq i8 %28, 0
  br i1 %29, label %271, label %30

30:                                               ; preds = %26
  %31 = getelementptr inbounds i8, ptr %25, i64 269
  %32 = load i8, ptr %31, align 1, !tbaa !22
  %33 = icmp eq i8 %32, 2
  br i1 %33, label %34, label %74

34:                                               ; preds = %30
  %35 = getelementptr inbounds i8, ptr %25, i64 21
  %36 = load i8, ptr %35, align 1, !tbaa !23
  %.not97 = icmp eq i8 %36, 5
  br i1 %.not97, label %74, label %37

37:                                               ; preds = %34
  %38 = load ptr, ptr @mPrivate, align 8, !tbaa !5
  %39 = getelementptr inbounds i8, ptr %38, i64 467
  %40 = load i8, ptr %39, align 1, !tbaa !24
  %.not102 = icmp ne i8 %40, 0
  %41 = icmp eq i8 %36, 4
  %or.cond106 = and i1 %41, %.not102
  br i1 %or.cond106, label %271, label %42

42:                                               ; preds = %37
  %.not103 = icmp eq i8 %40, 0
  br i1 %.not103, label %43, label %53

43:                                               ; preds = %42
  %44 = icmp eq i8 %36, 3
  br i1 %44, label %271, label %45

45:                                               ; preds = %43
  store i8 3, ptr %35, align 1, !tbaa !23
  %46 = getelementptr inbounds i8, ptr %25, i64 306
  store i8 1, ptr %46, align 1, !tbaa !25
  %47 = getelementptr inbounds i8, ptr %25, i64 307
  store i8 1, ptr %47, align 1, !tbaa !26
  %48 = getelementptr inbounds i8, ptr %25, i64 18
  store i8 0, ptr %48, align 1, !tbaa !27
  %49 = load ptr, ptr %19, align 8, !tbaa !28
  %50 = load ptr, ptr %20, align 8, !tbaa !34
  %51 = call i64 @IScsiDoDhcp(ptr noundef %49, ptr noundef %50, ptr noundef nonnull %25) #3
  %52 = icmp slt i64 %51, 0
  br i1 %52, label %61, label %.sink.split

53:                                               ; preds = %42
  store i8 4, ptr %35, align 1, !tbaa !23
  %54 = getelementptr inbounds i8, ptr %25, i64 306
  store i8 1, ptr %54, align 1, !tbaa !25
  %55 = getelementptr inbounds i8, ptr %25, i64 307
  store i8 1, ptr %55, align 1, !tbaa !26
  %56 = getelementptr inbounds i8, ptr %25, i64 18
  store i8 0, ptr %56, align 1, !tbaa !27
  %57 = load ptr, ptr %19, align 8, !tbaa !28
  %58 = load ptr, ptr %20, align 8, !tbaa !34
  %59 = call i64 @IScsiDoDhcp6(ptr noundef %57, ptr noundef %58, ptr noundef nonnull %25) #3
  %60 = icmp slt i64 %59, 0
  br i1 %60, label %61, label %.sink.split

.sink.split:                                      ; preds = %53, %45
  %.sink = phi ptr [ %48, %45 ], [ %56, %53 ]
  store i8 1, ptr %.sink, align 1, !tbaa !27
  br label %61

61:                                               ; preds = %.sink.split, %53, %45
  %62 = getelementptr inbounds i8, ptr %25, i64 122
  %63 = call ptr @AsciiStrToUnicodeStr(ptr noundef nonnull %62, ptr noundef nonnull %2) #3
  %64 = load ptr, ptr @mPrivate, align 8, !tbaa !5
  %65 = getelementptr inbounds i8, ptr %25, i64 17
  %66 = load i8, ptr %65, align 1, !tbaa !35
  %67 = zext i8 %66 to i64
  %68 = call i64 (ptr, i64, ptr, ...) @UnicodeSPrint(ptr noundef %64, i64 noundef 223, ptr noundef nonnull @.str.5, ptr noundef nonnull %2, i64 noundef %67) #3
  %69 = load ptr, ptr @gRT, align 8, !tbaa !5
  %70 = getelementptr inbounds i8, ptr %69, i64 88
  %71 = load ptr, ptr %70, align 8, !tbaa !36
  %72 = load ptr, ptr @mPrivate, align 8, !tbaa !5
  %73 = call i64 %71(ptr noundef %72, ptr noundef nonnull @gEfiIScsiInitiatorNameProtocolGuid, i32 noundef 3, i64 noundef 856, ptr noundef nonnull %25) #3
  br label %271

74:                                               ; preds = %34, %30
  %75 = getelementptr inbounds i8, ptr %25, i64 306
  %76 = load i8, ptr %75, align 1, !tbaa !25
  %.not98 = icmp eq i8 %76, 0
  br i1 %.not98, label %271, label %77

77:                                               ; preds = %74
  %78 = getelementptr inbounds i8, ptr %25, i64 20
  %79 = load i8, ptr %78, align 1, !tbaa !39
  %.not99 = icmp eq i8 %79, 0
  br i1 %.not99, label %80, label %271

80:                                               ; preds = %77
  %81 = getelementptr inbounds i8, ptr %25, i64 18
  store i8 0, ptr %81, align 1, !tbaa !27
  %82 = load ptr, ptr @mPrivate, align 8, !tbaa !5
  %83 = getelementptr inbounds i8, ptr %82, i64 467
  %84 = load i8, ptr %83, align 1, !tbaa !24
  %.not100 = icmp eq i8 %84, 0
  br i1 %.not100, label %85, label %92

85:                                               ; preds = %80
  %86 = icmp eq i8 %32, 0
  br i1 %86, label %87, label %.thread107

87:                                               ; preds = %85
  %88 = load ptr, ptr %19, align 8, !tbaa !28
  %89 = load ptr, ptr %20, align 8, !tbaa !34
  %90 = call i64 @IScsiDoDhcp(ptr noundef %88, ptr noundef %89, ptr noundef nonnull %25) #3
  %91 = icmp slt i64 %90, 0
  br i1 %91, label %.thread107, label %.thread107.sink.split

92:                                               ; preds = %80
  %93 = icmp eq i8 %32, 1
  br i1 %93, label %94, label %.thread107

94:                                               ; preds = %92
  %95 = load ptr, ptr %19, align 8, !tbaa !28
  %96 = load ptr, ptr %20, align 8, !tbaa !34
  %97 = call i64 @IScsiDoDhcp6(ptr noundef %95, ptr noundef %96, ptr noundef nonnull %25) #3
  %98 = icmp slt i64 %97, 0
  br i1 %98, label %.thread107, label %.thread107.sink.split

.thread107.sink.split:                            ; preds = %94, %87
  store i8 1, ptr %81, align 1, !tbaa !27
  br label %.thread107

.thread107:                                       ; preds = %.thread107.sink.split, %85, %92, %94, %87
  %99 = getelementptr inbounds i8, ptr %25, i64 122
  %100 = call ptr @AsciiStrToUnicodeStr(ptr noundef nonnull %99, ptr noundef nonnull %2) #3
  %101 = load ptr, ptr @mPrivate, align 8, !tbaa !5
  %102 = getelementptr inbounds i8, ptr %25, i64 17
  %103 = load i8, ptr %102, align 1, !tbaa !35
  %104 = zext i8 %103 to i64
  %105 = call i64 (ptr, i64, ptr, ...) @UnicodeSPrint(ptr noundef %101, i64 noundef 223, ptr noundef nonnull @.str.5, ptr noundef nonnull %2, i64 noundef %104) #3
  %106 = load ptr, ptr @gRT, align 8, !tbaa !5
  %107 = getelementptr inbounds i8, ptr %106, i64 88
  %108 = load ptr, ptr %107, align 8, !tbaa !36
  %109 = load ptr, ptr @mPrivate, align 8, !tbaa !5
  %110 = call i64 %108(ptr noundef %109, ptr noundef nonnull @gEfiIScsiInitiatorNameProtocolGuid, i32 noundef 3, i64 noundef 856, ptr noundef nonnull %25) #3
  br label %271

.critedge:                                        ; preds = %22
  %111 = load ptr, ptr @mPrivate, align 8, !tbaa !5
  %112 = getelementptr inbounds i8, ptr %111, i64 465
  %113 = load i8, ptr %112, align 1, !tbaa !40
  %114 = call ptr @IScsiGetNicInfoByIndex(i8 noundef zeroext %113)
  %115 = call zeroext i8 @DebugAssertEnabled() #3
  %116 = icmp eq i8 %115, 0
  %117 = icmp ne ptr %114, null
  %or.cond3 = select i1 %116, i1 true, i1 %117
  br i1 %or.cond3, label %119, label %118

118:                                              ; preds = %.critedge
  call void @DebugAssert(ptr noundef nonnull @.str.1, i64 noundef 1166, ptr noundef nonnull @.str.7) #3
  br label %119

119:                                              ; preds = %118, %.critedge
  %120 = getelementptr inbounds i8, ptr %114, i64 20
  %121 = getelementptr inbounds i8, ptr %114, i64 16
  %122 = load i32, ptr %121, align 8, !tbaa !41
  %123 = getelementptr inbounds i8, ptr %114, i64 54
  %124 = load i16, ptr %123, align 2, !tbaa !43
  call void @IScsiMacAddrToStr(ptr noundef nonnull %120, i32 noundef %122, i16 noundef zeroext %124, ptr noundef nonnull %2)
  %125 = load ptr, ptr @mPrivate, align 8, !tbaa !5
  %126 = load i8, ptr %23, align 1, !tbaa !16
  %127 = zext i8 %126 to i64
  %128 = call i64 (ptr, i64, ptr, ...) @UnicodeSPrint(ptr noundef %125, i64 noundef 128, ptr noundef nonnull @.str.5, ptr noundef nonnull %2, i64 noundef %127) #3
  %129 = load ptr, ptr @mPrivate, align 8, !tbaa !5
  %130 = call i64 @GetVariable2(ptr noundef %129, ptr noundef nonnull @gEfiIScsiInitiatorNameProtocolGuid, ptr noundef nonnull %3, ptr noundef null) #3
  %131 = load ptr, ptr %3, align 8, !tbaa !5
  %132 = icmp eq ptr %131, null
  br i1 %132, label %271, label %133

133:                                              ; preds = %119
  %134 = call zeroext i8 @DebugAssertEnabled() #3
  %.not88 = icmp eq i8 %134, 0
  %.pre115 = load ptr, ptr %3, align 8, !tbaa !5
  br i1 %.not88, label %141, label %135

135:                                              ; preds = %133
  %136 = load i8, ptr %23, align 1, !tbaa !16
  %137 = getelementptr inbounds i8, ptr %.pre115, i64 17
  %138 = load i8, ptr %137, align 1, !tbaa !35
  %139 = icmp eq i8 %136, %138
  br i1 %139, label %141, label %140

140:                                              ; preds = %135
  call void @DebugAssert(ptr noundef nonnull @.str.1, i64 noundef 1187, ptr noundef nonnull @.str.8) #3
  %.pre = load ptr, ptr %3, align 8, !tbaa !5
  br label %141

141:                                              ; preds = %135, %140, %133
  %142 = phi ptr [ %.pre115, %135 ], [ %.pre, %140 ], [ %.pre115, %133 ]
  %143 = getelementptr inbounds i8, ptr %114, i64 52
  %144 = load i8, ptr %143, align 4, !tbaa !44
  %145 = getelementptr inbounds i8, ptr %142, i64 16
  store i8 %144, ptr %145, align 1, !tbaa !45
  %146 = getelementptr inbounds i8, ptr %142, i64 18
  store i8 0, ptr %146, align 1, !tbaa !27
  %147 = load ptr, ptr @mPrivate, align 8, !tbaa !5
  %148 = getelementptr inbounds i8, ptr %147, i64 469
  %149 = load i8, ptr %148, align 1, !tbaa !46
  %.not89 = icmp ne i8 %149, 0
  %150 = zext i1 %.not89 to i8
  %151 = getelementptr inbounds i8, ptr %142, i64 19
  store i8 %150, ptr %151, align 1, !tbaa !47
  %152 = getelementptr inbounds i8, ptr %142, i64 20
  store i8 0, ptr %152, align 1, !tbaa !39
  %153 = getelementptr inbounds i8, ptr %142, i64 269
  %154 = load i8, ptr %153, align 1, !tbaa !22
  %155 = icmp eq i8 %154, 2
  br i1 %155, label %156, label %163

156:                                              ; preds = %141
  %157 = getelementptr inbounds i8, ptr %142, i64 306
  store i8 1, ptr %157, align 1, !tbaa !25
  %158 = getelementptr inbounds i8, ptr %142, i64 307
  store i8 1, ptr %158, align 1, !tbaa !26
  %159 = getelementptr inbounds i8, ptr %147, i64 467
  %160 = load i8, ptr %159, align 1, !tbaa !24
  %.not90 = icmp eq i8 %160, 0
  %161 = select i1 %.not90, i8 3, i8 4
  %162 = getelementptr inbounds i8, ptr %142, i64 21
  store i8 %161, ptr %162, align 1, !tbaa !23
  br label %163

163:                                              ; preds = %156, %141
  %164 = getelementptr inbounds i8, ptr %142, i64 268
  %165 = load i8, ptr %164, align 1, !tbaa !17
  %.not91 = icmp eq i8 %165, 0
  br i1 %.not91, label %.sink.split124, label %166

166:                                              ; preds = %163
  %167 = getelementptr inbounds i8, ptr %142, i64 306
  %168 = load i8, ptr %167, align 1, !tbaa !25
  %.not92 = icmp eq i8 %168, 0
  br i1 %.not92, label %210, label %169

169:                                              ; preds = %166
  %170 = getelementptr inbounds i8, ptr %147, i64 467
  %171 = load i8, ptr %170, align 1, !tbaa !24
  %.not93 = icmp eq i8 %171, 0
  br i1 %.not93, label %172, label %183

172:                                              ; preds = %169
  %173 = icmp eq i8 %154, 0
  br i1 %173, label %178, label %174

174:                                              ; preds = %172
  %175 = getelementptr inbounds i8, ptr %142, i64 21
  %176 = load i8, ptr %175, align 1, !tbaa !23
  %177 = icmp eq i8 %176, 3
  br i1 %177, label %178, label %.thread108

178:                                              ; preds = %174, %172
  %179 = load ptr, ptr %19, align 8, !tbaa !28
  %180 = load ptr, ptr %20, align 8, !tbaa !34
  %181 = call i64 @IScsiDoDhcp(ptr noundef %179, ptr noundef %180, ptr noundef nonnull %142) #3
  %182 = icmp slt i64 %181, 0
  %.pre117 = load ptr, ptr %3, align 8, !tbaa !5
  br i1 %182, label %.thread108, label %.thread108.sink.split

183:                                              ; preds = %169
  %184 = icmp eq i8 %154, 1
  br i1 %184, label %189, label %185

185:                                              ; preds = %183
  %186 = getelementptr inbounds i8, ptr %142, i64 21
  %187 = load i8, ptr %186, align 1, !tbaa !23
  %188 = icmp eq i8 %187, 4
  br i1 %188, label %189, label %.thread108

189:                                              ; preds = %185, %183
  %190 = load ptr, ptr %19, align 8, !tbaa !28
  %191 = load ptr, ptr %20, align 8, !tbaa !34
  %192 = call i64 @IScsiDoDhcp6(ptr noundef %190, ptr noundef %191, ptr noundef nonnull %142) #3
  %193 = icmp slt i64 %192, 0
  %.pre116 = load ptr, ptr %3, align 8, !tbaa !5
  br i1 %193, label %.thread108, label %.thread108.sink.split

.thread108.sink.split:                            ; preds = %189, %178
  %.pre116.sink = phi ptr [ %.pre117, %178 ], [ %.pre116, %189 ]
  %194 = getelementptr inbounds i8, ptr %.pre116.sink, i64 18
  store i8 1, ptr %194, align 1, !tbaa !27
  br label %.thread108

.thread108:                                       ; preds = %.thread108.sink.split, %174, %185, %189, %178
  %195 = phi ptr [ %142, %174 ], [ %142, %185 ], [ %.pre116, %189 ], [ %.pre117, %178 ], [ %.pre116.sink, %.thread108.sink.split ]
  %196 = getelementptr inbounds i8, ptr %195, i64 122
  %197 = call ptr @AsciiStrToUnicodeStr(ptr noundef nonnull %196, ptr noundef nonnull %2) #3
  %198 = load ptr, ptr @mPrivate, align 8, !tbaa !5
  %199 = load ptr, ptr %3, align 8, !tbaa !5
  %200 = getelementptr inbounds i8, ptr %199, i64 17
  %201 = load i8, ptr %200, align 1, !tbaa !35
  %202 = zext i8 %201 to i64
  %203 = call i64 (ptr, i64, ptr, ...) @UnicodeSPrint(ptr noundef %198, i64 noundef 223, ptr noundef nonnull @.str.5, ptr noundef nonnull %2, i64 noundef %202) #3
  %204 = load ptr, ptr @gRT, align 8, !tbaa !5
  %205 = getelementptr inbounds i8, ptr %204, i64 88
  %206 = load ptr, ptr %205, align 8, !tbaa !36
  %207 = load ptr, ptr @mPrivate, align 8, !tbaa !5
  %208 = load ptr, ptr %3, align 8, !tbaa !5
  %209 = call i64 %206(ptr noundef %207, ptr noundef nonnull @gEfiIScsiInitiatorNameProtocolGuid, i32 noundef 3, i64 noundef 856, ptr noundef %208) #3
  %.pre118 = load ptr, ptr %3, align 8, !tbaa !5
  %.phi.trans.insert = getelementptr inbounds i8, ptr %.pre118, i64 268
  %.pre119 = load i8, ptr %.phi.trans.insert, align 1, !tbaa !17
  br label %210

210:                                              ; preds = %.thread108, %166
  %211 = phi i8 [ %.pre119, %.thread108 ], [ %165, %166 ]
  %212 = icmp ult i8 %211, 3
  br i1 %212, label %switch.lookup, label %215

switch.lookup:                                    ; preds = %210
  %213 = zext nneg i8 %211 to i64
  %switch.gep = getelementptr inbounds [3 x ptr], ptr @switch.table.IScsiGetConfigData, i64 0, i64 %213
  %switch.load = load ptr, ptr %switch.gep, align 8
  br label %.sink.split124

.sink.split124:                                   ; preds = %switch.lookup, %163
  %.str.10.sink = phi ptr [ @.str.9, %163 ], [ %switch.load, %switch.lookup ]
  %214 = call i64 (ptr, i64, ptr, ...) @UnicodeSPrint(ptr noundef nonnull %5, i64 noundef 64, ptr noundef nonnull %.str.10.sink) #3
  br label %215

215:                                              ; preds = %210, %.sink.split124
  %216 = load ptr, ptr %3, align 8, !tbaa !5
  %217 = getelementptr inbounds i8, ptr %216, i64 269
  %218 = load i8, ptr %217, align 1, !tbaa !22
  %219 = icmp ult i8 %218, 3
  br i1 %219, label %switch.lookup126, label %222

switch.lookup126:                                 ; preds = %215
  %220 = zext nneg i8 %218 to i64
  %switch.gep127 = getelementptr inbounds [3 x ptr], ptr @switch.table.IScsiGetConfigData.1, i64 0, i64 %220
  %switch.load128 = load ptr, ptr %switch.gep127, align 8
  %221 = call i64 (ptr, i64, ptr, ...) @UnicodeSPrint(ptr noundef nonnull %6, i64 noundef 64, ptr noundef nonnull %switch.load128) #3
  br label %222

222:                                              ; preds = %215, %switch.lookup126
  %223 = load ptr, ptr @mPrivate, align 8, !tbaa !5
  %224 = getelementptr inbounds i8, ptr %114, i64 56
  %225 = load i64, ptr %224, align 8, !tbaa !48
  %226 = getelementptr inbounds i8, ptr %114, i64 64
  %227 = load i64, ptr %226, align 8, !tbaa !49
  %228 = getelementptr inbounds i8, ptr %114, i64 72
  %229 = load i64, ptr %228, align 8, !tbaa !50
  %230 = call i64 (ptr, i64, ptr, ...) @UnicodeSPrint(ptr noundef %223, i64 noundef 223, ptr noundef nonnull @.str.15, ptr noundef nonnull %2, i64 noundef %225, i64 noundef %227, i64 noundef %229, ptr noundef nonnull %5, ptr noundef nonnull %6) #3
  %231 = load ptr, ptr @mCallbackInfo, align 8, !tbaa !5
  %232 = getelementptr inbounds i8, ptr %231, i64 56
  %233 = load ptr, ptr %232, align 8, !tbaa !51
  %234 = load ptr, ptr @mPrivate, align 8, !tbaa !5
  %235 = call zeroext i16 @HiiSetString(ptr noundef %233, i16 noundef zeroext 0, ptr noundef %234, ptr noundef null) #3
  %236 = load ptr, ptr %3, align 8, !tbaa !5
  %237 = getelementptr inbounds i8, ptr %236, i64 24
  store i16 %235, ptr %237, align 1, !tbaa !54
  %238 = call zeroext i8 @DebugAssertEnabled() #3
  %.not95 = icmp eq i8 %238, 0
  %.pre121 = load ptr, ptr %3, align 8, !tbaa !5
  br i1 %.not95, label %243, label %239

239:                                              ; preds = %222
  %240 = getelementptr inbounds i8, ptr %.pre121, i64 24
  %241 = load i16, ptr %240, align 1, !tbaa !54
  %.not96 = icmp eq i16 %241, 0
  br i1 %.not96, label %242, label %243

242:                                              ; preds = %239
  call void @DebugAssert(ptr noundef nonnull @.str.1, i64 noundef 1283, ptr noundef nonnull @.str.16) #3
  %.pre120 = load ptr, ptr %3, align 8, !tbaa !5
  br label %243

243:                                              ; preds = %239, %242, %222
  %244 = phi ptr [ %.pre121, %239 ], [ %.pre120, %242 ], [ %.pre121, %222 ]
  %245 = load ptr, ptr @mPrivate, align 8, !tbaa !5
  %246 = getelementptr inbounds i8, ptr %245, i64 480
  %247 = call ptr @InsertTailList(ptr noundef nonnull %246, ptr noundef %244) #3
  %248 = load ptr, ptr @mPrivate, align 8, !tbaa !5
  %249 = getelementptr inbounds i8, ptr %248, i64 475
  %250 = load i8, ptr %249, align 1, !tbaa !55
  %251 = add i8 %250, 1
  store i8 %251, ptr %249, align 1, !tbaa !55
  %252 = load ptr, ptr %3, align 8, !tbaa !5
  %253 = getelementptr inbounds i8, ptr %252, i64 268
  %254 = load i8, ptr %253, align 1, !tbaa !17
  switch i8 %254, label %271 [
    i8 2, label %255
    i8 1, label %267
  ]

255:                                              ; preds = %243
  %256 = getelementptr inbounds i8, ptr %248, i64 470
  %257 = load i8, ptr %256, align 2, !tbaa !56
  %258 = add i8 %257, 1
  store i8 %258, ptr %256, align 2, !tbaa !56
  %259 = getelementptr inbounds i8, ptr %248, i64 469
  store i8 1, ptr %259, align 1, !tbaa !46
  %260 = getelementptr inbounds i8, ptr %252, i64 566
  %261 = load i8, ptr %260, align 1, !tbaa !57
  %262 = icmp eq i8 %261, 2
  br i1 %262, label %263, label %271

263:                                              ; preds = %255
  %264 = getelementptr inbounds i8, ptr %248, i64 471
  %265 = load i8, ptr %264, align 1, !tbaa !58
  %266 = add i8 %265, 1
  store i8 %266, ptr %264, align 1, !tbaa !58
  br label %271

267:                                              ; preds = %243
  %268 = getelementptr inbounds i8, ptr %248, i64 472
  %269 = load i8, ptr %268, align 8, !tbaa !59
  %270 = add i8 %269, 1
  store i8 %270, ptr %268, align 8, !tbaa !59
  br label %271

271:                                              ; preds = %243, %37, %263, %255, %267, %119, %74, %77, %43, %26, %.thread107, %61
  %272 = add nuw i64 %.076110, 1
  %273 = load i64, ptr %4, align 8, !tbaa !15
  %274 = icmp ult i64 %272, %273
  br i1 %274, label %22, label %.preheader, !llvm.loop !60

.lr.ph112:                                        ; preds = %.preheader, %285
  %.1111 = phi i64 [ %286, %285 ], [ 0, %.preheader ]
  %275 = getelementptr inbounds i8, ptr %7, i64 %.1111
  %276 = load i8, ptr %275, align 1, !tbaa !16
  %277 = call ptr @IScsiConfigGetAttemptByConfigIndex(i8 noundef zeroext %276) #3
  store ptr %277, ptr %3, align 8, !tbaa !5
  %278 = icmp eq ptr %277, null
  br i1 %278, label %285, label %279

279:                                              ; preds = %.lr.ph112
  %280 = call ptr @RemoveEntryList(ptr noundef nonnull %277) #3
  %281 = load ptr, ptr @mPrivate, align 8, !tbaa !5
  %282 = getelementptr inbounds i8, ptr %281, i64 480
  %283 = load ptr, ptr %3, align 8, !tbaa !5
  %284 = call ptr @InsertTailList(ptr noundef nonnull %282, ptr noundef %283) #3
  br label %285

285:                                              ; preds = %.lr.ph112, %279
  %286 = add nuw i64 %.1111, 1
  %287 = load i64, ptr %4, align 8, !tbaa !15
  %288 = icmp ult i64 %286, %287
  br i1 %288, label %.lr.ph112, label %._crit_edge, !llvm.loop !62

._crit_edge:                                      ; preds = %285, %.preheader109, %.preheader
  call void @IScsiConfigUpdateAttempt() #3
  call void @FreePool(ptr noundef nonnull %7) #3
  %289 = load ptr, ptr @mPrivate, align 8, !tbaa !5
  %290 = getelementptr inbounds i8, ptr %289, i64 469
  %291 = load i8, ptr %290, align 1, !tbaa !46
  %.not = icmp eq i8 %291, 0
  br i1 %.not, label %292, label %298

292:                                              ; preds = %._crit_edge
  %293 = getelementptr inbounds i8, ptr %289, i64 472
  %294 = load i8, ptr %293, align 8, !tbaa !59
  %295 = icmp eq i8 %294, 0
  br i1 %295, label %298, label %296

296:                                              ; preds = %292
  %297 = getelementptr inbounds i8, ptr %289, i64 473
  store i8 %294, ptr %297, align 1, !tbaa !63
  br label %298

298:                                              ; preds = %._crit_edge, %296, %292, %11, %1
  %.0 = phi i64 [ -9223372036854775794, %1 ], [ %16, %11 ], [ -9223372036854775794, %292 ], [ 0, %296 ], [ 0, %._crit_edge ]
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %6) #3
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %5) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %4) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %3) #3
  call void @llvm.lifetime.end.p0(i64 192, ptr nonnull %2) #3
  ret i64 %.0
}

declare ptr @IScsiConfigGetAttemptByConfigIndex(i8 noundef zeroext) local_unnamed_addr #1

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

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

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

declare zeroext i16 @HiiSetString(ptr noundef, i16 noundef zeroext, ptr noundef, ptr noundef) local_unnamed_addr #1

declare void @IScsiConfigUpdateAttempt() local_unnamed_addr #1

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !12, i64 720}
!10 = !{!"", !7, i64 0, !11, i64 448, !7, i64 464, !7, i64 465, !7, i64 466, !7, i64 467, !7, i64 468, !7, i64 469, !7, i64 470, !7, i64 471, !7, i64 472, !7, i64 473, !7, i64 474, !7, i64 475, !11, i64 480, !7, i64 496, !12, i64 720, !6, i64 728}
!11 = !{!"_LIST_ENTRY", !6, i64 0, !6, i64 8}
!12 = !{!"long long", !7, i64 0}
!13 = !{!14, !6, i64 0}
!14 = !{!"_EFI_ISCSI_INITIATOR_NAME_PROTOCOL", !6, i64 0, !6, i64 8}
!15 = !{!12, !12, i64 0}
!16 = !{!7, !7, i64 0}
!17 = !{!18, !7, i64 268}
!18 = !{!"_ISCSI_ATTEMPT_CONFIG_NVDATA", !11, i64 0, !7, i64 16, !7, i64 17, !7, i64 18, !7, i64 19, !7, i64 20, !7, i64 21, !19, i64 22, !19, i64 24, !7, i64 26, !7, i64 122, !7, i64 218, !7, i64 234, !7, i64 250, !20, i64 266, !7, i64 566, !7, i64 567}
!19 = !{!"short", !7, i64 0}
!20 = !{!"_ISCSI_SESSION_CONFIG_NVDATA", !19, i64 0, !7, i64 2, !7, i64 3, !7, i64 4, !21, i64 20, !7, i64 24, !7, i64 40, !7, i64 41, !7, i64 42, !7, i64 266, !7, i64 282, !7, i64 283, !19, i64 291, !7, i64 293, !7, i64 294}
!21 = !{!"", !7, i64 0}
!22 = !{!18, !7, i64 269}
!23 = !{!18, !7, i64 21}
!24 = !{!10, !7, i64 467}
!25 = !{!18, !7, i64 306}
!26 = !{!18, !7, i64 307}
!27 = !{!18, !7, i64 18}
!28 = !{!29, !6, i64 8}
!29 = !{!"_ISCSI_DRIVER_DATA", !30, i64 0, !6, i64 8, !6, i64 16, !31, i64 24, !6, i64 32, !32, i64 40, !33, i64 104, !6, i64 120, !6, i64 128, !6, i64 136, !6, i64 144}
!30 = !{!"int", !7, i64 0}
!31 = !{!"_ISCSI_PRIVATE_PROTOCOL", !30, i64 0}
!32 = !{!"_EFI_EXT_SCSI_PASS_THRU_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}
!33 = !{!"", !30, i64 0, !30, i64 4, !30, i64 8}
!34 = !{!29, !6, i64 16}
!35 = !{!18, !7, i64 17}
!36 = !{!37, !6, i64 88}
!37 = !{!"", !38, 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}
!38 = !{!"", !12, i64 0, !30, i64 8, !30, i64 12, !30, i64 16, !30, i64 20}
!39 = !{!18, !7, i64 20}
!40 = !{!10, !7, i64 465}
!41 = !{!42, !30, i64 16}
!42 = !{!"", !11, i64 0, !30, i64 16, !21, i64 20, !7, i64 52, !19, i64 54, !12, i64 56, !12, i64 64, !12, i64 72}
!43 = !{!42, !19, i64 54}
!44 = !{!42, !7, i64 52}
!45 = !{!18, !7, i64 16}
!46 = !{!10, !7, i64 469}
!47 = !{!18, !7, i64 19}
!48 = !{!42, !12, i64 56}
!49 = !{!42, !12, i64 64}
!50 = !{!42, !12, i64 72}
!51 = !{!52, !6, i64 56}
!52 = !{!"_ISCSI_FORM_CALLBACK_INFO", !30, i64 0, !6, i64 8, !53, i64 16, !6, i64 40, !6, i64 48, !6, i64 56, !6, i64 64}
!53 = !{!"_EFI_HII_CONFIG_ACCESS_PROTOCOL", !6, i64 0, !6, i64 8, !6, i64 16}
!54 = !{!18, !19, i64 24}
!55 = !{!10, !7, i64 475}
!56 = !{!10, !7, i64 470}
!57 = !{!18, !7, i64 566}
!58 = !{!10, !7, i64 471}
!59 = !{!10, !7, i64 472}
!60 = distinct !{!60, !61}
!61 = !{!"llvm.loop.mustprogress"}
!62 = distinct !{!62, !61}
!63 = !{!10, !7, i64 473}


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