; LLVM IR from thalium/icebox :: third_party/virtualbox/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal (IScsiCheckOpParams)

; 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._ISCSI_CONNECTION = type { i32, %struct._LIST_ENTRY, ptr, ptr, i8, i8, i8, i8, i8, i8, i8, i16, i32, %struct.NET_BUF_QUEUE, %struct._TCP4_IO, i32, i32, i32 }
%struct._LIST_ENTRY = type { ptr, ptr }
%struct.NET_BUF_QUEUE = type { i32, i64, %struct._LIST_ENTRY, %struct._LIST_ENTRY, i32, i32 }
%struct._TCP4_IO = type { ptr, ptr, ptr, ptr, %struct.EFI_TCP4_CONNECTION_TOKEN, %struct.EFI_TCP4_IO_TOKEN, %struct.EFI_TCP4_IO_TOKEN, %struct.EFI_TCP4_CLOSE_TOKEN, i8, i8, i8, i8 }
%struct.EFI_TCP4_CONNECTION_TOKEN = type { %struct.EFI_TCP4_COMPLETION_TOKEN }
%struct.EFI_TCP4_COMPLETION_TOKEN = type { ptr, i64 }
%struct.EFI_TCP4_IO_TOKEN = type { %struct.EFI_TCP4_COMPLETION_TOKEN, %union.anon }
%union.anon = type { ptr }
%struct.EFI_TCP4_CLOSE_TOKEN = type { %struct.EFI_TCP4_COMPLETION_TOKEN, i8 }
%struct._ISCSI_SESSION = type { i32, %struct._ISCSI_SESSION_CONFIG_DATA, %struct._ISCSI_CHAP_AUTH_DATA, [224 x i8], i64, i8, [6 x i8], i16, i32, i32, i32, i32, i16, %struct._LIST_ENTRY, i32, %struct._LIST_ENTRY, i16, i32, i8, i8, i32, i32, i32, i32, i16, i8, i8, i8 }
%struct._ISCSI_SESSION_CONFIG_DATA = type { %struct.ISCSI_SESSION_CONFIG_NVDATA, %struct.EFI_IPv4_ADDRESS, %struct.EFI_IPv4_ADDRESS, %struct.EFI_IPv4_ADDRESS }
%struct.ISCSI_SESSION_CONFIG_NVDATA = type <{ i8, i8, %struct.EFI_IPv4_ADDRESS, %struct.EFI_IPv4_ADDRESS, %struct.EFI_IPv4_ADDRESS, i8, [224 x i8], %struct.EFI_IPv4_ADDRESS, i16, [8 x i8], [6 x i8] }>
%struct.EFI_IPv4_ADDRESS = type { [4 x i8] }
%struct._ISCSI_CHAP_AUTH_DATA = type { %struct._ISCSI_CHAP_AUTH_CONFIG_NVDATA, i32, [1024 x i8], i32, [16 x i8], i32, [1024 x i8], i32 }
%struct._ISCSI_CHAP_AUTH_CONFIG_NVDATA = type { i8, [127 x i8], [17 x i8], [127 x i8], [17 x i8] }

@.str = external hidden unnamed_addr constant [154 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [21 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 ptr @AllocatePool(i64 noundef) #1

declare void @FreePool(ptr noundef) #1

declare zeroext i8 @DebugAssertEnabled() #1

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

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

12:                                               ; preds = %1
  %13 = call zeroext i8 @DebugAssertEnabled()
  %14 = icmp ne i8 %13, 0
  br i1 %14, label %15, label %23

15:                                               ; preds = %12
  %16 = load ptr, ptr %3, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct._ISCSI_CONNECTION, ptr %16, i32 0, i32 13
  %18 = getelementptr inbounds %struct.NET_BUF_QUEUE, ptr %17, i32 0, i32 5
  %19 = load i32, ptr %18, align 4, !tbaa !9
  %20 = icmp ne i32 %19, 0
  br i1 %20, label %22, label %21

21:                                               ; preds = %15
  call void @DebugAssert(ptr noundef @.str, i64 noundef 1154, ptr noundef @.str.6)
  br label %22

22:                                               ; preds = %21, %15
  br label %23

23:                                               ; preds = %22, %12
  br label %24

24:                                               ; preds = %23
  br label %25

25:                                               ; preds = %24
  %26 = load ptr, ptr %3, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct._ISCSI_CONNECTION, ptr %26, i32 0, i32 3
  %28 = load ptr, ptr %27, align 8, !tbaa !20
  store ptr %28, ptr %8, align 8, !tbaa !5
  %29 = load ptr, ptr %3, align 8, !tbaa !5
  %30 = getelementptr inbounds %struct._ISCSI_CONNECTION, ptr %29, i32 0, i32 13
  %31 = getelementptr inbounds %struct.NET_BUF_QUEUE, ptr %30, i32 0, i32 4
  %32 = load i32, ptr %31, align 8, !tbaa !21
  store i32 %32, ptr %7, align 4, !tbaa !22
  %33 = load i32, ptr %7, align 4, !tbaa !22
  %34 = zext i32 %33 to i64
  %35 = call ptr @AllocatePool(i64 noundef %34)
  store ptr %35, ptr %6, align 8, !tbaa !5
  %36 = load ptr, ptr %6, align 8, !tbaa !5
  %37 = icmp eq ptr %36, null
  br i1 %37, label %38, label %39

38:                                               ; preds = %25
  store i64 -9223372036854775799, ptr %2, align 8
  store i32 1, ptr %11, align 4
  br label %440

39:                                               ; preds = %25
  %40 = load ptr, ptr %3, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct._ISCSI_CONNECTION, ptr %40, i32 0, i32 13
  %42 = load i32, ptr %7, align 4, !tbaa !22
  %43 = load ptr, ptr %6, align 8, !tbaa !5
  %44 = call i32 @NetbufQueCopy(ptr noundef %41, i32 noundef 0, i32 noundef %42, ptr noundef %43)
  store i64 -9223372036854775784, ptr %4, align 8, !tbaa !23
  %45 = load ptr, ptr %6, align 8, !tbaa !5
  %46 = load i32, ptr %7, align 4, !tbaa !22
  %47 = call ptr @IScsiBuildKeyValueList(ptr noundef %45, i32 noundef %46)
  store ptr %47, ptr %5, align 8, !tbaa !5
  %48 = load ptr, ptr %5, align 8, !tbaa !5
  %49 = icmp eq ptr %48, null
  br i1 %49, label %50, label %53

50:                                               ; preds = %39
  %51 = load ptr, ptr %6, align 8, !tbaa !5
  call void @FreePool(ptr noundef %51)
  %52 = load i64, ptr %4, align 8, !tbaa !23
  store i64 %52, ptr %2, align 8
  store i32 1, ptr %11, align 4
  br label %440

53:                                               ; preds = %39
  %54 = load ptr, ptr %5, align 8, !tbaa !5
  %55 = call ptr @IScsiGetValueByKeyFromList(ptr noundef %54, ptr noundef @.str.7)
  store ptr %55, ptr %9, align 8, !tbaa !5
  %56 = load ptr, ptr %9, align 8, !tbaa !5
  %57 = icmp eq ptr %56, null
  br i1 %57, label %58, label %59

58:                                               ; preds = %53
  br label %436

59:                                               ; preds = %53
  %60 = load ptr, ptr %9, align 8, !tbaa !5
  %61 = call i64 @AsciiStrCmp(ptr noundef %60, ptr noundef @.str.8)
  %62 = icmp eq i64 %61, 0
  br i1 %62, label %63, label %70

63:                                               ; preds = %59
  %64 = load ptr, ptr %3, align 8, !tbaa !5
  %65 = getelementptr inbounds %struct._ISCSI_CONNECTION, ptr %64, i32 0, i32 16
  %66 = load i32, ptr %65, align 4, !tbaa !24
  %67 = icmp ne i32 %66, 1
  br i1 %67, label %68, label %69

68:                                               ; preds = %63
  br label %436

69:                                               ; preds = %63
  br label %79

70:                                               ; preds = %59
  %71 = load ptr, ptr %9, align 8, !tbaa !5
  %72 = call i64 @AsciiStrCmp(ptr noundef %71, ptr noundef @.str.9)
  %73 = icmp eq i64 %72, 0
  br i1 %73, label %74, label %77

74:                                               ; preds = %70
  %75 = load ptr, ptr %3, align 8, !tbaa !5
  %76 = getelementptr inbounds %struct._ISCSI_CONNECTION, ptr %75, i32 0, i32 16
  store i32 0, ptr %76, align 4, !tbaa !24
  br label %78

77:                                               ; preds = %70
  br label %436

78:                                               ; preds = %74
  br label %79

79:                                               ; preds = %78, %69
  %80 = load ptr, ptr %5, align 8, !tbaa !5
  %81 = call ptr @IScsiGetValueByKeyFromList(ptr noundef %80, ptr noundef @.str.10)
  store ptr %81, ptr %9, align 8, !tbaa !5
  %82 = load ptr, ptr %9, align 8, !tbaa !5
  %83 = icmp eq ptr %82, null
  br i1 %83, label %84, label %85

84:                                               ; preds = %79
  br label %436

85:                                               ; preds = %79
  %86 = load ptr, ptr %9, align 8, !tbaa !5
  %87 = call i64 @AsciiStrCmp(ptr noundef %86, ptr noundef @.str.8)
  %88 = icmp eq i64 %87, 0
  br i1 %88, label %89, label %96

89:                                               ; preds = %85
  %90 = load ptr, ptr %3, align 8, !tbaa !5
  %91 = getelementptr inbounds %struct._ISCSI_CONNECTION, ptr %90, i32 0, i32 17
  %92 = load i32, ptr %91, align 8, !tbaa !25
  %93 = icmp ne i32 %92, 1
  br i1 %93, label %94, label %95

94:                                               ; preds = %89
  br label %436

95:                                               ; preds = %89
  br label %105

96:                                               ; preds = %85
  %97 = load ptr, ptr %9, align 8, !tbaa !5
  %98 = call i64 @AsciiStrCmp(ptr noundef %97, ptr noundef @.str.9)
  %99 = icmp eq i64 %98, 0
  br i1 %99, label %100, label %103

100:                                              ; preds = %96
  %101 = load ptr, ptr %3, align 8, !tbaa !5
  %102 = getelementptr inbounds %struct._ISCSI_CONNECTION, ptr %101, i32 0, i32 17
  store i32 0, ptr %102, align 8, !tbaa !25
  br label %104

103:                                              ; preds = %96
  br label %436

104:                                              ; preds = %100
  br label %105

105:                                              ; preds = %104, %95
  %106 = load ptr, ptr %5, align 8, !tbaa !5
  %107 = call ptr @IScsiGetValueByKeyFromList(ptr noundef %106, ptr noundef @.str.11)
  store ptr %107, ptr %9, align 8, !tbaa !5
  %108 = load ptr, ptr %9, align 8, !tbaa !5
  %109 = icmp eq ptr %108, null
  br i1 %109, label %110, label %111

110:                                              ; preds = %105
  br label %436

111:                                              ; preds = %105
  %112 = load ptr, ptr %9, align 8, !tbaa !5
  %113 = call i64 @AsciiStrDecimalToUintn(ptr noundef %112)
  store i64 %113, ptr %10, align 8, !tbaa !23
  %114 = load i64, ptr %10, align 8, !tbaa !23
  %115 = icmp ugt i64 %114, 2
  br i1 %115, label %116, label %117

116:                                              ; preds = %111
  br label %436

117:                                              ; preds = %111
  %118 = load ptr, ptr %8, align 8, !tbaa !5
  %119 = getelementptr inbounds %struct._ISCSI_SESSION, ptr %118, i32 0, i32 27
  %120 = load i8, ptr %119, align 8, !tbaa !26
  %121 = zext i8 %120 to i64
  %122 = load i64, ptr %10, align 8, !tbaa !23
  %123 = icmp ult i64 %121, %122
  br i1 %123, label %124, label %129

124:                                              ; preds = %117
  %125 = load ptr, ptr %8, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct._ISCSI_SESSION, ptr %125, i32 0, i32 27
  %127 = load i8, ptr %126, align 8, !tbaa !26
  %128 = zext i8 %127 to i64
  br label %131

129:                                              ; preds = %117
  %130 = load i64, ptr %10, align 8, !tbaa !23
  br label %131

131:                                              ; preds = %129, %124
  %132 = phi i64 [ %128, %124 ], [ %130, %129 ]
  %133 = trunc i64 %132 to i8
  %134 = load ptr, ptr %8, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct._ISCSI_SESSION, ptr %134, i32 0, i32 27
  store i8 %133, ptr %135, align 8, !tbaa !26
  %136 = load ptr, ptr %5, align 8, !tbaa !5
  %137 = call ptr @IScsiGetValueByKeyFromList(ptr noundef %136, ptr noundef @.str.12)
  store ptr %137, ptr %9, align 8, !tbaa !5
  %138 = load ptr, ptr %9, align 8, !tbaa !5
  %139 = icmp eq ptr %138, null
  br i1 %139, label %140, label %141

140:                                              ; preds = %131
  br label %436

141:                                              ; preds = %131
  %142 = load ptr, ptr %8, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct._ISCSI_SESSION, ptr %142, i32 0, i32 18
  %144 = load i8, ptr %143, align 8, !tbaa !33
  %145 = zext i8 %144 to i32
  %146 = icmp ne i32 %145, 0
  br i1 %146, label %151, label %147

147:                                              ; preds = %141
  %148 = load ptr, ptr %9, align 8, !tbaa !5
  %149 = call i64 @AsciiStrCmp(ptr noundef %148, ptr noundef @.str.13)
  %150 = icmp eq i64 %149, 0
  br label %151

151:                                              ; preds = %147, %141
  %152 = phi i1 [ true, %141 ], [ %150, %147 ]
  %153 = zext i1 %152 to i32
  %154 = trunc i32 %153 to i8
  %155 = load ptr, ptr %8, align 8, !tbaa !5
  %156 = getelementptr inbounds %struct._ISCSI_SESSION, ptr %155, i32 0, i32 18
  store i8 %154, ptr %156, align 8, !tbaa !33
  %157 = load ptr, ptr %5, align 8, !tbaa !5
  %158 = call ptr @IScsiGetValueByKeyFromList(ptr noundef %157, ptr noundef @.str.14)
  store ptr %158, ptr %9, align 8, !tbaa !5
  %159 = load ptr, ptr %9, align 8, !tbaa !5
  %160 = icmp eq ptr %159, null
  br i1 %160, label %161, label %162

161:                                              ; preds = %151
  br label %436

162:                                              ; preds = %151
  %163 = load ptr, ptr %8, align 8, !tbaa !5
  %164 = getelementptr inbounds %struct._ISCSI_SESSION, ptr %163, i32 0, i32 19
  %165 = load i8, ptr %164, align 1, !tbaa !34
  %166 = zext i8 %165 to i32
  %167 = icmp ne i32 %166, 0
  br i1 %167, label %168, label %172

168:                                              ; preds = %162
  %169 = load ptr, ptr %9, align 8, !tbaa !5
  %170 = call i64 @AsciiStrCmp(ptr noundef %169, ptr noundef @.str.13)
  %171 = icmp eq i64 %170, 0
  br label %172

172:                                              ; preds = %168, %162
  %173 = phi i1 [ false, %162 ], [ %171, %168 ]
  %174 = zext i1 %173 to i32
  %175 = trunc i32 %174 to i8
  %176 = load ptr, ptr %8, align 8, !tbaa !5
  %177 = getelementptr inbounds %struct._ISCSI_SESSION, ptr %176, i32 0, i32 19
  store i8 %175, ptr %177, align 1, !tbaa !34
  %178 = load ptr, ptr %5, align 8, !tbaa !5
  %179 = call ptr @IScsiGetValueByKeyFromList(ptr noundef %178, ptr noundef @.str.15)
  store ptr %179, ptr %9, align 8, !tbaa !5
  %180 = load ptr, ptr %9, align 8, !tbaa !5
  %181 = icmp ne ptr %180, null
  br i1 %181, label %182, label %188

182:                                              ; preds = %172
  %183 = load ptr, ptr %9, align 8, !tbaa !5
  %184 = call i64 @AsciiStrDecimalToUintn(ptr noundef %183)
  %185 = trunc i64 %184 to i32
  %186 = load ptr, ptr %3, align 8, !tbaa !5
  %187 = getelementptr inbounds %struct._ISCSI_CONNECTION, ptr %186, i32 0, i32 15
  store i32 %185, ptr %187, align 8, !tbaa !35
  br label %188

188:                                              ; preds = %182, %172
  %189 = load ptr, ptr %5, align 8, !tbaa !5
  %190 = call ptr @IScsiGetValueByKeyFromList(ptr noundef %189, ptr noundef @.str.16)
  store ptr %190, ptr %9, align 8, !tbaa !5
  %191 = load ptr, ptr %9, align 8, !tbaa !5
  %192 = icmp eq ptr %191, null
  br i1 %192, label %193, label %194

193:                                              ; preds = %188
  br label %436

194:                                              ; preds = %188
  %195 = load ptr, ptr %9, align 8, !tbaa !5
  %196 = call i64 @AsciiStrDecimalToUintn(ptr noundef %195)
  store i64 %196, ptr %10, align 8, !tbaa !23
  %197 = load ptr, ptr %8, align 8, !tbaa !5
  %198 = getelementptr inbounds %struct._ISCSI_SESSION, ptr %197, i32 0, i32 20
  %199 = load i32, ptr %198, align 4, !tbaa !36
  %200 = zext i32 %199 to i64
  %201 = load i64, ptr %10, align 8, !tbaa !23
  %202 = icmp ult i64 %200, %201
  br i1 %202, label %203, label %208

203:                                              ; preds = %194
  %204 = load ptr, ptr %8, align 8, !tbaa !5
  %205 = getelementptr inbounds %struct._ISCSI_SESSION, ptr %204, i32 0, i32 20
  %206 = load i32, ptr %205, align 4, !tbaa !36
  %207 = zext i32 %206 to i64
  br label %210

208:                                              ; preds = %194
  %209 = load i64, ptr %10, align 8, !tbaa !23
  br label %210

210:                                              ; preds = %208, %203
  %211 = phi i64 [ %207, %203 ], [ %209, %208 ]
  %212 = trunc i64 %211 to i32
  %213 = load ptr, ptr %8, align 8, !tbaa !5
  %214 = getelementptr inbounds %struct._ISCSI_SESSION, ptr %213, i32 0, i32 20
  store i32 %212, ptr %214, align 4, !tbaa !36
  %215 = load ptr, ptr %5, align 8, !tbaa !5
  %216 = call ptr @IScsiGetValueByKeyFromList(ptr noundef %215, ptr noundef @.str.17)
  store ptr %216, ptr %9, align 8, !tbaa !5
  %217 = load ptr, ptr %9, align 8, !tbaa !5
  %218 = icmp eq ptr %217, null
  br i1 %218, label %219, label %220

219:                                              ; preds = %210
  br label %436

220:                                              ; preds = %210
  %221 = load ptr, ptr %9, align 8, !tbaa !5
  %222 = call i64 @AsciiStrDecimalToUintn(ptr noundef %221)
  store i64 %222, ptr %10, align 8, !tbaa !23
  %223 = load ptr, ptr %8, align 8, !tbaa !5
  %224 = getelementptr inbounds %struct._ISCSI_SESSION, ptr %223, i32 0, i32 21
  %225 = load i32, ptr %224, align 8, !tbaa !37
  %226 = zext i32 %225 to i64
  %227 = load i64, ptr %10, align 8, !tbaa !23
  %228 = icmp ult i64 %226, %227
  br i1 %228, label %229, label %234

229:                                              ; preds = %220
  %230 = load ptr, ptr %8, align 8, !tbaa !5
  %231 = getelementptr inbounds %struct._ISCSI_SESSION, ptr %230, i32 0, i32 21
  %232 = load i32, ptr %231, align 8, !tbaa !37
  %233 = zext i32 %232 to i64
  br label %236

234:                                              ; preds = %220
  %235 = load i64, ptr %10, align 8, !tbaa !23
  br label %236

236:                                              ; preds = %234, %229
  %237 = phi i64 [ %233, %229 ], [ %235, %234 ]
  %238 = trunc i64 %237 to i32
  %239 = load ptr, ptr %8, align 8, !tbaa !5
  %240 = getelementptr inbounds %struct._ISCSI_SESSION, ptr %239, i32 0, i32 21
  store i32 %238, ptr %240, align 8, !tbaa !37
  %241 = load ptr, ptr %5, align 8, !tbaa !5
  %242 = call ptr @IScsiGetValueByKeyFromList(ptr noundef %241, ptr noundef @.str.18)
  store ptr %242, ptr %9, align 8, !tbaa !5
  %243 = load ptr, ptr %9, align 8, !tbaa !5
  %244 = icmp eq ptr %243, null
  br i1 %244, label %245, label %246

245:                                              ; preds = %236
  br label %436

246:                                              ; preds = %236
  %247 = load ptr, ptr %9, align 8, !tbaa !5
  %248 = call i64 @AsciiStrDecimalToUintn(ptr noundef %247)
  store i64 %248, ptr %10, align 8, !tbaa !23
  %249 = load i64, ptr %10, align 8, !tbaa !23
  %250 = icmp eq i64 %249, 0
  br i1 %250, label %254, label %251

251:                                              ; preds = %246
  %252 = load i64, ptr %10, align 8, !tbaa !23
  %253 = icmp ugt i64 %252, 65535
  br i1 %253, label %254, label %255

254:                                              ; preds = %251, %246
  br label %436

255:                                              ; preds = %251
  %256 = load ptr, ptr %8, align 8, !tbaa !5
  %257 = getelementptr inbounds %struct._ISCSI_SESSION, ptr %256, i32 0, i32 17
  %258 = load i32, ptr %257, align 4, !tbaa !38
  %259 = zext i32 %258 to i64
  %260 = load i64, ptr %10, align 8, !tbaa !23
  %261 = icmp ult i64 %259, %260
  br i1 %261, label %262, label %267

262:                                              ; preds = %255
  %263 = load ptr, ptr %8, align 8, !tbaa !5
  %264 = getelementptr inbounds %struct._ISCSI_SESSION, ptr %263, i32 0, i32 17
  %265 = load i32, ptr %264, align 4, !tbaa !38
  %266 = zext i32 %265 to i64
  br label %269

267:                                              ; preds = %255
  %268 = load i64, ptr %10, align 8, !tbaa !23
  br label %269

269:                                              ; preds = %267, %262
  %270 = phi i64 [ %266, %262 ], [ %268, %267 ]
  %271 = trunc i64 %270 to i32
  %272 = load ptr, ptr %8, align 8, !tbaa !5
  %273 = getelementptr inbounds %struct._ISCSI_SESSION, ptr %272, i32 0, i32 17
  store i32 %271, ptr %273, align 4, !tbaa !38
  %274 = load ptr, ptr %5, align 8, !tbaa !5
  %275 = call ptr @IScsiGetValueByKeyFromList(ptr noundef %274, ptr noundef @.str.19)
  store ptr %275, ptr %9, align 8, !tbaa !5
  %276 = load ptr, ptr %9, align 8, !tbaa !5
  %277 = icmp eq ptr %276, null
  br i1 %277, label %278, label %279

278:                                              ; preds = %269
  br label %436

279:                                              ; preds = %269
  %280 = load ptr, ptr %8, align 8, !tbaa !5
  %281 = getelementptr inbounds %struct._ISCSI_SESSION, ptr %280, i32 0, i32 25
  %282 = load i8, ptr %281, align 2, !tbaa !39
  %283 = zext i8 %282 to i32
  %284 = icmp ne i32 %283, 0
  br i1 %284, label %289, label %285

285:                                              ; preds = %279
  %286 = load ptr, ptr %9, align 8, !tbaa !5
  %287 = call i64 @AsciiStrCmp(ptr noundef %286, ptr noundef @.str.13)
  %288 = icmp eq i64 %287, 0
  br label %289

289:                                              ; preds = %285, %279
  %290 = phi i1 [ true, %279 ], [ %288, %285 ]
  %291 = zext i1 %290 to i32
  %292 = trunc i32 %291 to i8
  %293 = load ptr, ptr %8, align 8, !tbaa !5
  %294 = getelementptr inbounds %struct._ISCSI_SESSION, ptr %293, i32 0, i32 25
  store i8 %292, ptr %294, align 2, !tbaa !39
  %295 = load ptr, ptr %5, align 8, !tbaa !5
  %296 = call ptr @IScsiGetValueByKeyFromList(ptr noundef %295, ptr noundef @.str.20)
  store ptr %296, ptr %9, align 8, !tbaa !5
  %297 = load ptr, ptr %9, align 8, !tbaa !5
  %298 = icmp eq ptr %297, null
  br i1 %298, label %299, label %300

299:                                              ; preds = %289
  br label %436

300:                                              ; preds = %289
  %301 = load ptr, ptr %8, align 8, !tbaa !5
  %302 = getelementptr inbounds %struct._ISCSI_SESSION, ptr %301, i32 0, i32 26
  %303 = load i8, ptr %302, align 1, !tbaa !40
  %304 = zext i8 %303 to i32
  %305 = icmp ne i32 %304, 0
  br i1 %305, label %310, label %306

306:                                              ; preds = %300
  %307 = load ptr, ptr %9, align 8, !tbaa !5
  %308 = call i64 @AsciiStrCmp(ptr noundef %307, ptr noundef @.str.13)
  %309 = icmp eq i64 %308, 0
  br label %310

310:                                              ; preds = %306, %300
  %311 = phi i1 [ true, %300 ], [ %309, %306 ]
  %312 = zext i1 %311 to i32
  %313 = trunc i32 %312 to i8
  %314 = load ptr, ptr %8, align 8, !tbaa !5
  %315 = getelementptr inbounds %struct._ISCSI_SESSION, ptr %314, i32 0, i32 26
  store i8 %313, ptr %315, align 1, !tbaa !40
  %316 = load ptr, ptr %5, align 8, !tbaa !5
  %317 = call ptr @IScsiGetValueByKeyFromList(ptr noundef %316, ptr noundef @.str.21)
  store ptr %317, ptr %9, align 8, !tbaa !5
  %318 = load ptr, ptr %9, align 8, !tbaa !5
  %319 = icmp eq ptr %318, null
  br i1 %319, label %320, label %321

320:                                              ; preds = %310
  br label %436

321:                                              ; preds = %310
  %322 = load ptr, ptr %9, align 8, !tbaa !5
  %323 = call i64 @AsciiStrDecimalToUintn(ptr noundef %322)
  store i64 %323, ptr %10, align 8, !tbaa !23
  %324 = load i64, ptr %10, align 8, !tbaa !23
  %325 = icmp eq i64 %324, 0
  br i1 %325, label %326, label %329

326:                                              ; preds = %321
  %327 = load ptr, ptr %8, align 8, !tbaa !5
  %328 = getelementptr inbounds %struct._ISCSI_SESSION, ptr %327, i32 0, i32 22
  store i32 0, ptr %328, align 4, !tbaa !41
  br label %353

329:                                              ; preds = %321
  %330 = load i64, ptr %10, align 8, !tbaa !23
  %331 = icmp ugt i64 %330, 3600
  br i1 %331, label %332, label %333

332:                                              ; preds = %329
  br label %436

333:                                              ; preds = %329
  %334 = load ptr, ptr %8, align 8, !tbaa !5
  %335 = getelementptr inbounds %struct._ISCSI_SESSION, ptr %334, i32 0, i32 22
  %336 = load i32, ptr %335, align 4, !tbaa !41
  %337 = zext i32 %336 to i64
  %338 = load i64, ptr %10, align 8, !tbaa !23
  %339 = icmp ugt i64 %337, %338
  br i1 %339, label %340, label %345

340:                                              ; preds = %333
  %341 = load ptr, ptr %8, align 8, !tbaa !5
  %342 = getelementptr inbounds %struct._ISCSI_SESSION, ptr %341, i32 0, i32 22
  %343 = load i32, ptr %342, align 4, !tbaa !41
  %344 = zext i32 %343 to i64
  br label %347

345:                                              ; preds = %333
  %346 = load i64, ptr %10, align 8, !tbaa !23
  br label %347

347:                                              ; preds = %345, %340
  %348 = phi i64 [ %344, %340 ], [ %346, %345 ]
  %349 = trunc i64 %348 to i32
  %350 = load ptr, ptr %8, align 8, !tbaa !5
  %351 = getelementptr inbounds %struct._ISCSI_SESSION, ptr %350, i32 0, i32 22
  store i32 %349, ptr %351, align 4, !tbaa !41
  br label %352

352:                                              ; preds = %347
  br label %353

353:                                              ; preds = %352, %326
  %354 = load ptr, ptr %5, align 8, !tbaa !5
  %355 = call ptr @IScsiGetValueByKeyFromList(ptr noundef %354, ptr noundef @.str.22)
  store ptr %355, ptr %9, align 8, !tbaa !5
  %356 = load ptr, ptr %9, align 8, !tbaa !5
  %357 = icmp eq ptr %356, null
  br i1 %357, label %358, label %359

358:                                              ; preds = %353
  br label %436

359:                                              ; preds = %353
  %360 = load ptr, ptr %9, align 8, !tbaa !5
  %361 = call i64 @AsciiStrDecimalToUintn(ptr noundef %360)
  store i64 %361, ptr %10, align 8, !tbaa !23
  %362 = load i64, ptr %10, align 8, !tbaa !23
  %363 = icmp eq i64 %362, 0
  br i1 %363, label %364, label %367

364:                                              ; preds = %359
  %365 = load ptr, ptr %8, align 8, !tbaa !5
  %366 = getelementptr inbounds %struct._ISCSI_SESSION, ptr %365, i32 0, i32 23
  store i32 0, ptr %366, align 8, !tbaa !42
  br label %391

367:                                              ; preds = %359
  %368 = load i64, ptr %10, align 8, !tbaa !23
  %369 = icmp ugt i64 %368, 3600
  br i1 %369, label %370, label %371

370:                                              ; preds = %367
  br label %436

371:                                              ; preds = %367
  %372 = load ptr, ptr %8, align 8, !tbaa !5
  %373 = getelementptr inbounds %struct._ISCSI_SESSION, ptr %372, i32 0, i32 23
  %374 = load i32, ptr %373, align 8, !tbaa !42
  %375 = zext i32 %374 to i64
  %376 = load i64, ptr %10, align 8, !tbaa !23
  %377 = icmp ult i64 %375, %376
  br i1 %377, label %378, label %383

378:                                              ; preds = %371
  %379 = load ptr, ptr %8, align 8, !tbaa !5
  %380 = getelementptr inbounds %struct._ISCSI_SESSION, ptr %379, i32 0, i32 23
  %381 = load i32, ptr %380, align 8, !tbaa !42
  %382 = zext i32 %381 to i64
  br label %385

383:                                              ; preds = %371
  %384 = load i64, ptr %10, align 8, !tbaa !23
  br label %385

385:                                              ; preds = %383, %378
  %386 = phi i64 [ %382, %378 ], [ %384, %383 ]
  %387 = trunc i64 %386 to i32
  %388 = load ptr, ptr %8, align 8, !tbaa !5
  %389 = getelementptr inbounds %struct._ISCSI_SESSION, ptr %388, i32 0, i32 23
  store i32 %387, ptr %389, align 8, !tbaa !42
  br label %390

390:                                              ; preds = %385
  br label %391

391:                                              ; preds = %390, %364
  %392 = load ptr, ptr %5, align 8, !tbaa !5
  %393 = call ptr @IScsiGetValueByKeyFromList(ptr noundef %392, ptr noundef @.str.23)
  store ptr %393, ptr %9, align 8, !tbaa !5
  %394 = load ptr, ptr %9, align 8, !tbaa !5
  %395 = icmp eq ptr %394, null
  br i1 %395, label %396, label %397

396:                                              ; preds = %391
  br label %436

397:                                              ; preds = %391
  %398 = load ptr, ptr %9, align 8, !tbaa !5
  %399 = call i64 @AsciiStrDecimalToUintn(ptr noundef %398)
  store i64 %399, ptr %10, align 8, !tbaa !23
  %400 = load i64, ptr %10, align 8, !tbaa !23
  %401 = icmp eq i64 %400, 0
  br i1 %401, label %405, label %402

402:                                              ; preds = %397
  %403 = load i64, ptr %10, align 8, !tbaa !23
  %404 = icmp ugt i64 %403, 65535
  br i1 %404, label %405, label %406

405:                                              ; preds = %402, %397
  br label %436

406:                                              ; preds = %402
  %407 = load ptr, ptr %8, align 8, !tbaa !5
  %408 = getelementptr inbounds %struct._ISCSI_SESSION, ptr %407, i32 0, i32 24
  %409 = load i16, ptr %408, align 4, !tbaa !43
  %410 = zext i16 %409 to i64
  %411 = load i64, ptr %10, align 8, !tbaa !23
  %412 = icmp ult i64 %410, %411
  br i1 %412, label %413, label %418

413:                                              ; preds = %406
  %414 = load ptr, ptr %8, align 8, !tbaa !5
  %415 = getelementptr inbounds %struct._ISCSI_SESSION, ptr %414, i32 0, i32 24
  %416 = load i16, ptr %415, align 4, !tbaa !43
  %417 = zext i16 %416 to i64
  br label %420

418:                                              ; preds = %406
  %419 = load i64, ptr %10, align 8, !tbaa !23
  br label %420

420:                                              ; preds = %418, %413
  %421 = phi i64 [ %417, %413 ], [ %419, %418 ]
  %422 = trunc i64 %421 to i16
  %423 = load ptr, ptr %8, align 8, !tbaa !5
  %424 = getelementptr inbounds %struct._ISCSI_SESSION, ptr %423, i32 0, i32 24
  store i16 %422, ptr %424, align 4, !tbaa !43
  %425 = load ptr, ptr %5, align 8, !tbaa !5
  %426 = call ptr @IScsiGetValueByKeyFromList(ptr noundef %425, ptr noundef @.str.24)
  %427 = load ptr, ptr %5, align 8, !tbaa !5
  %428 = call ptr @IScsiGetValueByKeyFromList(ptr noundef %427, ptr noundef @.str.25)
  %429 = load ptr, ptr %5, align 8, !tbaa !5
  %430 = call ptr @IScsiGetValueByKeyFromList(ptr noundef %429, ptr noundef @.str.26)
  %431 = load ptr, ptr %5, align 8, !tbaa !5
  %432 = call zeroext i8 @IsListEmpty(ptr noundef %431)
  %433 = icmp ne i8 %432, 0
  br i1 %433, label %434, label %435

434:                                              ; preds = %420
  store i64 0, ptr %4, align 8, !tbaa !23
  br label %435

435:                                              ; preds = %434, %420
  br label %436

436:                                              ; preds = %435, %405, %396, %370, %358, %332, %320, %299, %278, %254, %245, %219, %193, %161, %140, %116, %110, %103, %94, %84, %77, %68, %58
  %437 = load ptr, ptr %5, align 8, !tbaa !5
  call void @IScsiFreeKeyValueList(ptr noundef %437)
  %438 = load ptr, ptr %6, align 8, !tbaa !5
  call void @FreePool(ptr noundef %438)
  %439 = load i64, ptr %4, align 8, !tbaa !23
  store i64 %439, ptr %2, align 8
  store i32 1, ptr %11, align 4
  br label %440

440:                                              ; preds = %436, %50, %38
  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 4, ptr %7) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %6) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %5) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %4) #3
  %441 = load i64, ptr %2, align 8
  ret i64 %441
}

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

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

declare i64 @AsciiStrDecimalToUintn(ptr noundef) #1

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

declare i32 @NetbufQueCopy(ptr noundef, i32 noundef, i32 noundef, ptr noundef) #1

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

declare zeroext i8 @IsListEmpty(ptr noundef) #1

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !11, i64 108}
!10 = !{!"_ISCSI_CONNECTION", !11, i64 0, !12, i64 8, !6, i64 24, !6, i64 32, !7, i64 40, !7, i64 41, !7, i64 42, !7, i64 43, !7, i64 44, !7, i64 45, !7, i64 46, !13, i64 48, !11, i64 52, !14, i64 56, !16, i64 112, !11, i64 240, !11, i64 244, !11, i64 248}
!11 = !{!"int", !7, i64 0}
!12 = !{!"_LIST_ENTRY", !6, i64 0, !6, i64 8}
!13 = !{!"short", !7, i64 0}
!14 = !{!"", !11, i64 0, !15, i64 8, !12, i64 16, !12, i64 32, !11, i64 48, !11, i64 52}
!15 = !{!"long long", !7, i64 0}
!16 = !{!"_TCP4_IO", !6, i64 0, !6, i64 8, !6, i64 16, !6, i64 24, !17, i64 32, !19, i64 48, !19, i64 72, !19, i64 96, !7, i64 120, !7, i64 121, !7, i64 122, !7, i64 123}
!17 = !{!"", !18, i64 0}
!18 = !{!"", !6, i64 0, !15, i64 8}
!19 = !{!"", !18, i64 0, !7, i64 16}
!20 = !{!10, !6, i64 32}
!21 = !{!10, !11, i64 104}
!22 = !{!11, !11, i64 0}
!23 = !{!15, !15, i64 0}
!24 = !{!10, !11, i64 244}
!25 = !{!10, !11, i64 248}
!26 = !{!27, !7, i64 2984}
!27 = !{!"_ISCSI_SESSION", !11, i64 0, !28, i64 4, !31, i64 276, !7, i64 2648, !15, i64 2872, !7, i64 2880, !7, i64 2881, !13, i64 2888, !11, i64 2892, !11, i64 2896, !11, i64 2900, !11, i64 2904, !13, i64 2908, !12, i64 2912, !11, i64 2928, !12, i64 2936, !13, i64 2952, !11, i64 2956, !7, i64 2960, !7, i64 2961, !11, i64 2964, !11, i64 2968, !11, i64 2972, !11, i64 2976, !13, i64 2980, !7, i64 2982, !7, i64 2983, !7, i64 2984}
!28 = !{!"_ISCSI_SESSION_CONFIG_DATA", !29, i64 0, !30, i64 259, !30, i64 263, !30, i64 267}
!29 = !{!"", !7, i64 0, !7, i64 1, !30, i64 2, !30, i64 6, !30, i64 10, !7, i64 14, !7, i64 15, !30, i64 239, !13, i64 243, !7, i64 245, !7, i64 253}
!30 = !{!"", !7, i64 0}
!31 = !{!"_ISCSI_CHAP_AUTH_DATA", !32, i64 0, !11, i64 292, !7, i64 296, !11, i64 1320, !7, i64 1324, !11, i64 1340, !7, i64 1344, !11, i64 2368}
!32 = !{!"_ISCSI_CHAP_AUTH_CONFIG_NVDATA", !7, i64 0, !7, i64 1, !7, i64 128, !7, i64 145, !7, i64 272}
!33 = !{!27, !7, i64 2960}
!34 = !{!27, !7, i64 2961}
!35 = !{!10, !11, i64 240}
!36 = !{!27, !11, i64 2964}
!37 = !{!27, !11, i64 2968}
!38 = !{!27, !11, i64 2956}
!39 = !{!27, !7, i64 2982}
!40 = !{!27, !7, i64 2983}
!41 = !{!27, !11, i64 2972}
!42 = !{!27, !11, i64 2976}
!43 = !{!27, !13, i64 2980}


; 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 [154 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.10 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.11 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.12 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.13 = external hidden unnamed_addr constant [4 x i8], align 1
@.str.14 = external hidden unnamed_addr constant [14 x i8], align 1
@.str.15 = external hidden unnamed_addr constant [25 x i8], align 1
@.str.16 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.17 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.18 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.19 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.20 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.21 = external hidden unnamed_addr constant [17 x i8], align 1
@.str.22 = external hidden unnamed_addr constant [19 x i8], align 1
@.str.23 = external hidden unnamed_addr constant [18 x i8], align 1
@.str.24 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.25 = external hidden unnamed_addr constant [12 x i8], align 1
@.str.26 = external hidden unnamed_addr constant [21 x i8], align 1

declare ptr @AllocatePool(i64 noundef) local_unnamed_addr #0

declare void @FreePool(ptr noundef) local_unnamed_addr #0

declare zeroext i8 @DebugAssertEnabled() local_unnamed_addr #0

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

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

3:                                                ; preds = %1
  %4 = getelementptr inbounds i8, ptr %0, i64 108
  %5 = load i32, ptr %4, align 4, !tbaa !5
  %.not157 = icmp eq i32 %5, 0
  br i1 %.not157, label %6, label %7

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

7:                                                ; preds = %3, %6, %1
  %8 = getelementptr inbounds i8, ptr %0, i64 32
  %9 = load ptr, ptr %8, align 8, !tbaa !19
  %10 = getelementptr inbounds i8, ptr %0, i64 104
  %11 = load i32, ptr %10, align 8, !tbaa !20
  %12 = zext i32 %11 to i64
  %13 = tail call ptr @AllocatePool(i64 noundef %12) #3
  %14 = icmp eq ptr %13, null
  br i1 %14, label %188, label %15

15:                                               ; preds = %7
  %16 = getelementptr inbounds i8, ptr %0, i64 56
  %17 = tail call i32 @NetbufQueCopy(ptr noundef nonnull %16, i32 noundef 0, i32 noundef %11, ptr noundef nonnull %13) #3
  %18 = tail call ptr @IScsiBuildKeyValueList(ptr noundef nonnull %13, i32 noundef %11)
  %19 = icmp eq ptr %18, null
  br i1 %19, label %.sink.split, label %20

20:                                               ; preds = %15
  %21 = tail call ptr @IScsiGetValueByKeyFromList(ptr noundef nonnull %18, ptr noundef nonnull @.str.7)
  %22 = icmp eq ptr %21, null
  br i1 %22, label %187, label %23

23:                                               ; preds = %20
  %24 = tail call i64 @AsciiStrCmp(ptr noundef nonnull %21, ptr noundef nonnull @.str.8) #3
  %25 = icmp eq i64 %24, 0
  br i1 %25, label %26, label %29

26:                                               ; preds = %23
  %27 = getelementptr inbounds i8, ptr %0, i64 244
  %28 = load i32, ptr %27, align 4, !tbaa !21
  %.not158 = icmp eq i32 %28, 1
  br i1 %.not158, label %34, label %187

29:                                               ; preds = %23
  %30 = tail call i64 @AsciiStrCmp(ptr noundef nonnull %21, ptr noundef nonnull @.str.9) #3
  %31 = icmp eq i64 %30, 0
  br i1 %31, label %32, label %187

32:                                               ; preds = %29
  %33 = getelementptr inbounds i8, ptr %0, i64 244
  store i32 0, ptr %33, align 4, !tbaa !21
  br label %34

34:                                               ; preds = %26, %32
  %35 = tail call ptr @IScsiGetValueByKeyFromList(ptr noundef nonnull %18, ptr noundef nonnull @.str.10)
  %36 = icmp eq ptr %35, null
  br i1 %36, label %187, label %37

37:                                               ; preds = %34
  %38 = tail call i64 @AsciiStrCmp(ptr noundef nonnull %35, ptr noundef nonnull @.str.8) #3
  %39 = icmp eq i64 %38, 0
  br i1 %39, label %40, label %43

40:                                               ; preds = %37
  %41 = getelementptr inbounds i8, ptr %0, i64 248
  %42 = load i32, ptr %41, align 8, !tbaa !22
  %.not159 = icmp eq i32 %42, 1
  br i1 %.not159, label %48, label %187

43:                                               ; preds = %37
  %44 = tail call i64 @AsciiStrCmp(ptr noundef nonnull %35, ptr noundef nonnull @.str.9) #3
  %45 = icmp eq i64 %44, 0
  br i1 %45, label %46, label %187

46:                                               ; preds = %43
  %47 = getelementptr inbounds i8, ptr %0, i64 248
  store i32 0, ptr %47, align 8, !tbaa !22
  br label %48

48:                                               ; preds = %40, %46
  %49 = tail call ptr @IScsiGetValueByKeyFromList(ptr noundef nonnull %18, ptr noundef nonnull @.str.11)
  %50 = icmp eq ptr %49, null
  br i1 %50, label %187, label %51

51:                                               ; preds = %48
  %52 = tail call i64 @AsciiStrDecimalToUintn(ptr noundef nonnull %49) #3
  %53 = icmp ugt i64 %52, 2
  br i1 %53, label %187, label %54

54:                                               ; preds = %51
  %55 = getelementptr inbounds i8, ptr %9, i64 2984
  %56 = load i8, ptr %55, align 8, !tbaa !23
  %57 = zext i8 %56 to i64
  %. = tail call i64 @llvm.umin.i64(i64 %52, i64 %57)
  %58 = trunc nuw nsw i64 %. to i8
  store i8 %58, ptr %55, align 8, !tbaa !23
  %59 = tail call ptr @IScsiGetValueByKeyFromList(ptr noundef nonnull %18, ptr noundef nonnull @.str.12)
  %60 = icmp eq ptr %59, null
  br i1 %60, label %187, label %61

61:                                               ; preds = %54
  %62 = getelementptr inbounds i8, ptr %9, i64 2960
  %63 = load i8, ptr %62, align 8, !tbaa !30
  %.not160 = icmp eq i8 %63, 0
  br i1 %.not160, label %64, label %68

64:                                               ; preds = %61
  %65 = tail call i64 @AsciiStrCmp(ptr noundef nonnull %59, ptr noundef nonnull @.str.13) #3
  %66 = icmp eq i64 %65, 0
  %67 = zext i1 %66 to i8
  br label %68

68:                                               ; preds = %64, %61
  %69 = phi i8 [ 1, %61 ], [ %67, %64 ]
  store i8 %69, ptr %62, align 8, !tbaa !30
  %70 = tail call ptr @IScsiGetValueByKeyFromList(ptr noundef nonnull %18, ptr noundef nonnull @.str.14)
  %71 = icmp eq ptr %70, null
  br i1 %71, label %187, label %72

72:                                               ; preds = %68
  %73 = getelementptr inbounds i8, ptr %9, i64 2961
  %74 = load i8, ptr %73, align 1, !tbaa !31
  %.not161 = icmp eq i8 %74, 0
  br i1 %.not161, label %79, label %75

75:                                               ; preds = %72
  %76 = tail call i64 @AsciiStrCmp(ptr noundef nonnull %70, ptr noundef nonnull @.str.13) #3
  %77 = icmp eq i64 %76, 0
  %78 = zext i1 %77 to i8
  br label %79

79:                                               ; preds = %75, %72
  %80 = phi i8 [ 0, %72 ], [ %78, %75 ]
  store i8 %80, ptr %73, align 1, !tbaa !31
  %81 = tail call ptr @IScsiGetValueByKeyFromList(ptr noundef nonnull %18, ptr noundef nonnull @.str.15)
  %.not162 = icmp eq ptr %81, null
  br i1 %.not162, label %86, label %82

82:                                               ; preds = %79
  %83 = tail call i64 @AsciiStrDecimalToUintn(ptr noundef nonnull %81) #3
  %84 = trunc i64 %83 to i32
  %85 = getelementptr inbounds i8, ptr %0, i64 240
  store i32 %84, ptr %85, align 8, !tbaa !32
  br label %86

86:                                               ; preds = %82, %79
  %87 = tail call ptr @IScsiGetValueByKeyFromList(ptr noundef nonnull %18, ptr noundef nonnull @.str.16)
  %88 = icmp eq ptr %87, null
  br i1 %88, label %187, label %89

89:                                               ; preds = %86
  %90 = tail call i64 @AsciiStrDecimalToUintn(ptr noundef nonnull %87) #3
  %91 = getelementptr inbounds i8, ptr %9, i64 2964
  %92 = load i32, ptr %91, align 4, !tbaa !33
  %93 = zext i32 %92 to i64
  %.166 = tail call i64 @llvm.umin.i64(i64 %90, i64 %93)
  %94 = trunc nuw i64 %.166 to i32
  store i32 %94, ptr %91, align 4, !tbaa !33
  %95 = tail call ptr @IScsiGetValueByKeyFromList(ptr noundef nonnull %18, ptr noundef nonnull @.str.17)
  %96 = icmp eq ptr %95, null
  br i1 %96, label %187, label %97

97:                                               ; preds = %89
  %98 = tail call i64 @AsciiStrDecimalToUintn(ptr noundef nonnull %95) #3
  %99 = getelementptr inbounds i8, ptr %9, i64 2968
  %100 = load i32, ptr %99, align 8, !tbaa !34
  %101 = zext i32 %100 to i64
  %.167 = tail call i64 @llvm.umin.i64(i64 %98, i64 %101)
  %102 = trunc nuw i64 %.167 to i32
  store i32 %102, ptr %99, align 8, !tbaa !34
  %103 = tail call ptr @IScsiGetValueByKeyFromList(ptr noundef nonnull %18, ptr noundef nonnull @.str.18)
  %104 = icmp eq ptr %103, null
  br i1 %104, label %187, label %105

105:                                              ; preds = %97
  %106 = tail call i64 @AsciiStrDecimalToUintn(ptr noundef nonnull %103) #3
  %107 = add i64 %106, -65536
  %or.cond = icmp ult i64 %107, -65535
  br i1 %or.cond, label %187, label %108

108:                                              ; preds = %105
  %109 = getelementptr inbounds i8, ptr %9, i64 2956
  %110 = load i32, ptr %109, align 4, !tbaa !35
  %111 = zext i32 %110 to i64
  %112 = icmp ugt i64 %106, %111
  %113 = trunc nuw nsw i64 %106 to i32
  %114 = select i1 %112, i32 %110, i32 %113
  store i32 %114, ptr %109, align 4, !tbaa !35
  %115 = tail call ptr @IScsiGetValueByKeyFromList(ptr noundef nonnull %18, ptr noundef nonnull @.str.19)
  %116 = icmp eq ptr %115, null
  br i1 %116, label %187, label %117

117:                                              ; preds = %108
  %118 = getelementptr inbounds i8, ptr %9, i64 2982
  %119 = load i8, ptr %118, align 2, !tbaa !36
  %.not163 = icmp eq i8 %119, 0
  br i1 %.not163, label %120, label %124

120:                                              ; preds = %117
  %121 = tail call i64 @AsciiStrCmp(ptr noundef nonnull %115, ptr noundef nonnull @.str.13) #3
  %122 = icmp eq i64 %121, 0
  %123 = zext i1 %122 to i8
  br label %124

124:                                              ; preds = %120, %117
  %125 = phi i8 [ 1, %117 ], [ %123, %120 ]
  store i8 %125, ptr %118, align 2, !tbaa !36
  %126 = tail call ptr @IScsiGetValueByKeyFromList(ptr noundef nonnull %18, ptr noundef nonnull @.str.20)
  %127 = icmp eq ptr %126, null
  br i1 %127, label %187, label %128

128:                                              ; preds = %124
  %129 = getelementptr inbounds i8, ptr %9, i64 2983
  %130 = load i8, ptr %129, align 1, !tbaa !37
  %.not164 = icmp eq i8 %130, 0
  br i1 %.not164, label %131, label %135

131:                                              ; preds = %128
  %132 = tail call i64 @AsciiStrCmp(ptr noundef nonnull %126, ptr noundef nonnull @.str.13) #3
  %133 = icmp eq i64 %132, 0
  %134 = zext i1 %133 to i8
  br label %135

135:                                              ; preds = %131, %128
  %136 = phi i8 [ 1, %128 ], [ %134, %131 ]
  store i8 %136, ptr %129, align 1, !tbaa !37
  %137 = tail call ptr @IScsiGetValueByKeyFromList(ptr noundef nonnull %18, ptr noundef nonnull @.str.21)
  %138 = icmp eq ptr %137, null
  br i1 %138, label %187, label %139

139:                                              ; preds = %135
  %140 = tail call i64 @AsciiStrDecimalToUintn(ptr noundef nonnull %137) #3
  %141 = icmp eq i64 %140, 0
  br i1 %141, label %142, label %144

142:                                              ; preds = %139
  %143 = getelementptr inbounds i8, ptr %9, i64 2972
  store i32 0, ptr %143, align 4, !tbaa !38
  br label %153

144:                                              ; preds = %139
  %145 = icmp ugt i64 %140, 3600
  br i1 %145, label %187, label %146

146:                                              ; preds = %144
  %147 = getelementptr inbounds i8, ptr %9, i64 2972
  %148 = load i32, ptr %147, align 4, !tbaa !38
  %149 = zext i32 %148 to i64
  %150 = icmp ult i64 %140, %149
  %151 = trunc nuw i64 %140 to i32
  %152 = select i1 %150, i32 %148, i32 %151
  store i32 %152, ptr %147, align 4, !tbaa !38
  br label %153

153:                                              ; preds = %146, %142
  %154 = tail call ptr @IScsiGetValueByKeyFromList(ptr noundef nonnull %18, ptr noundef nonnull @.str.22)
  %155 = icmp eq ptr %154, null
  br i1 %155, label %187, label %156

156:                                              ; preds = %153
  %157 = tail call i64 @AsciiStrDecimalToUintn(ptr noundef nonnull %154) #3
  %158 = icmp eq i64 %157, 0
  br i1 %158, label %159, label %161

159:                                              ; preds = %156
  %160 = getelementptr inbounds i8, ptr %9, i64 2976
  store i32 0, ptr %160, align 8, !tbaa !39
  br label %170

161:                                              ; preds = %156
  %162 = icmp ugt i64 %157, 3600
  br i1 %162, label %187, label %163

163:                                              ; preds = %161
  %164 = getelementptr inbounds i8, ptr %9, i64 2976
  %165 = load i32, ptr %164, align 8, !tbaa !39
  %166 = zext i32 %165 to i64
  %167 = icmp ugt i64 %157, %166
  %168 = trunc nuw nsw i64 %157 to i32
  %169 = select i1 %167, i32 %165, i32 %168
  store i32 %169, ptr %164, align 8, !tbaa !39
  br label %170

170:                                              ; preds = %163, %159
  %171 = tail call ptr @IScsiGetValueByKeyFromList(ptr noundef nonnull %18, ptr noundef nonnull @.str.23)
  %172 = icmp eq ptr %171, null
  br i1 %172, label %187, label %173

173:                                              ; preds = %170
  %174 = tail call i64 @AsciiStrDecimalToUintn(ptr noundef nonnull %171) #3
  %175 = add i64 %174, -65536
  %or.cond3 = icmp ult i64 %175, -65535
  br i1 %or.cond3, label %187, label %176

176:                                              ; preds = %173
  %177 = getelementptr inbounds i8, ptr %9, i64 2980
  %178 = load i16, ptr %177, align 4, !tbaa !40
  %179 = zext i16 %178 to i64
  %180 = icmp ugt i64 %174, %179
  %181 = trunc nuw i64 %174 to i16
  %182 = select i1 %180, i16 %178, i16 %181
  store i16 %182, ptr %177, align 4, !tbaa !40
  %183 = tail call ptr @IScsiGetValueByKeyFromList(ptr noundef nonnull %18, ptr noundef nonnull @.str.24)
  %184 = tail call ptr @IScsiGetValueByKeyFromList(ptr noundef nonnull %18, ptr noundef nonnull @.str.25)
  %185 = tail call ptr @IScsiGetValueByKeyFromList(ptr noundef nonnull %18, ptr noundef nonnull @.str.26)
  %186 = tail call zeroext i8 @IsListEmpty(ptr noundef nonnull %18) #3
  %.not165 = icmp eq i8 %186, 0
  %spec.select = select i1 %.not165, i64 -9223372036854775784, i64 0
  br label %187

187:                                              ; preds = %176, %173, %170, %161, %153, %144, %135, %124, %108, %105, %97, %89, %86, %68, %54, %51, %48, %43, %40, %34, %29, %26, %20
  %.0126 = phi i64 [ -9223372036854775784, %20 ], [ -9223372036854775784, %26 ], [ -9223372036854775784, %34 ], [ -9223372036854775784, %40 ], [ -9223372036854775784, %48 ], [ -9223372036854775784, %51 ], [ -9223372036854775784, %54 ], [ -9223372036854775784, %68 ], [ -9223372036854775784, %86 ], [ -9223372036854775784, %89 ], [ -9223372036854775784, %97 ], [ -9223372036854775784, %105 ], [ -9223372036854775784, %108 ], [ -9223372036854775784, %124 ], [ -9223372036854775784, %135 ], [ -9223372036854775784, %153 ], [ -9223372036854775784, %170 ], [ -9223372036854775784, %173 ], [ -9223372036854775784, %161 ], [ -9223372036854775784, %144 ], [ -9223372036854775784, %43 ], [ -9223372036854775784, %29 ], [ %spec.select, %176 ]
  tail call void @IScsiFreeKeyValueList(ptr noundef nonnull %18)
  br label %.sink.split

.sink.split:                                      ; preds = %15, %187
  %.0.ph = phi i64 [ %.0126, %187 ], [ -9223372036854775784, %15 ]
  tail call void @FreePool(ptr noundef nonnull %13) #3
  br label %188

188:                                              ; preds = %.sink.split, %7
  %.0 = phi i64 [ -9223372036854775799, %7 ], [ %.0.ph, %.sink.split ]
  ret i64 %.0
}

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

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

declare i64 @AsciiStrDecimalToUintn(ptr noundef) local_unnamed_addr #0

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

declare i32 @NetbufQueCopy(ptr noundef, i32 noundef, i32 noundef, ptr noundef) local_unnamed_addr #0

declare i64 @AsciiStrCmp(ptr noundef, ptr noundef) local_unnamed_addr #0

declare zeroext i8 @IsListEmpty(ptr noundef) local_unnamed_addr #0

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.umin.i64(i64, i64) #2

attributes #0 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 108}
!6 = !{!"_ISCSI_CONNECTION", !7, i64 0, !10, i64 8, !11, i64 24, !11, i64 32, !8, i64 40, !8, i64 41, !8, i64 42, !8, i64 43, !8, i64 44, !8, i64 45, !8, i64 46, !12, i64 48, !7, i64 52, !13, i64 56, !15, i64 112, !7, i64 240, !7, i64 244, !7, i64 248}
!7 = !{!"int", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C/C++ TBAA"}
!10 = !{!"_LIST_ENTRY", !11, i64 0, !11, i64 8}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{!"short", !8, i64 0}
!13 = !{!"", !7, i64 0, !14, i64 8, !10, i64 16, !10, i64 32, !7, i64 48, !7, i64 52}
!14 = !{!"long long", !8, i64 0}
!15 = !{!"_TCP4_IO", !11, i64 0, !11, i64 8, !11, i64 16, !11, i64 24, !16, i64 32, !18, i64 48, !18, i64 72, !18, i64 96, !8, i64 120, !8, i64 121, !8, i64 122, !8, i64 123}
!16 = !{!"", !17, i64 0}
!17 = !{!"", !11, i64 0, !14, i64 8}
!18 = !{!"", !17, i64 0, !8, i64 16}
!19 = !{!6, !11, i64 32}
!20 = !{!6, !7, i64 104}
!21 = !{!6, !7, i64 244}
!22 = !{!6, !7, i64 248}
!23 = !{!24, !8, i64 2984}
!24 = !{!"_ISCSI_SESSION", !7, i64 0, !25, i64 4, !28, i64 276, !8, i64 2648, !14, i64 2872, !8, i64 2880, !8, i64 2881, !12, i64 2888, !7, i64 2892, !7, i64 2896, !7, i64 2900, !7, i64 2904, !12, i64 2908, !10, i64 2912, !7, i64 2928, !10, i64 2936, !12, i64 2952, !7, i64 2956, !8, i64 2960, !8, i64 2961, !7, i64 2964, !7, i64 2968, !7, i64 2972, !7, i64 2976, !12, i64 2980, !8, i64 2982, !8, i64 2983, !8, i64 2984}
!25 = !{!"_ISCSI_SESSION_CONFIG_DATA", !26, i64 0, !27, i64 259, !27, i64 263, !27, i64 267}
!26 = !{!"", !8, i64 0, !8, i64 1, !27, i64 2, !27, i64 6, !27, i64 10, !8, i64 14, !8, i64 15, !27, i64 239, !12, i64 243, !8, i64 245, !8, i64 253}
!27 = !{!"", !8, i64 0}
!28 = !{!"_ISCSI_CHAP_AUTH_DATA", !29, i64 0, !7, i64 292, !8, i64 296, !7, i64 1320, !8, i64 1324, !7, i64 1340, !8, i64 1344, !7, i64 2368}
!29 = !{!"_ISCSI_CHAP_AUTH_CONFIG_NVDATA", !8, i64 0, !8, i64 1, !8, i64 128, !8, i64 145, !8, i64 272}
!30 = !{!24, !8, i64 2960}
!31 = !{!24, !8, i64 2961}
!32 = !{!6, !7, i64 240}
!33 = !{!24, !7, i64 2964}
!34 = !{!24, !7, i64 2968}
!35 = !{!24, !7, i64 2956}
!36 = !{!24, !8, i64 2982}
!37 = !{!24, !8, i64 2983}
!38 = !{!24, !7, i64 2972}
!39 = !{!24, !7, i64 2976}
!40 = !{!24, !12, i64 2980}


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