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

; 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_LOGIN_RESPONSE = type { i8, i8, i8, i8, i8, [3 x i8], [6 x i8], i16, i32, i32, i32, i32, i32, i8, i8, [10 x i8] }
%struct._ISCSI_BASIC_HEADER = type { i8, i8, i16, i8, [3 x i8], [8 x i8], i32, [7 x i32] }
%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] }
%struct.NET_BUF = type { i32, i64, %struct._LIST_ENTRY, %union.NET_IP_HEAD, ptr, ptr, [64 x i8], ptr, i32, i32, [1 x %struct.NET_BLOCK_OP] }
%union.NET_IP_HEAD = type { ptr }
%struct.NET_BLOCK_OP = type { ptr, ptr, ptr, ptr, i32 }

; Function Attrs: nounwind uwtable
declare dso_local i64 @IScsiCheckSN(ptr noundef, i32 noundef) #0

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

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

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

declare void @NetbufQueFlush(ptr noundef) #2

; Function Attrs: nounwind uwtable
define dso_local i64 @IScsiProcessLoginRsp(ptr noundef %0, ptr noundef %1) #0 {
  %3 = alloca i64, align 8
  %4 = alloca ptr, align 8
  %5 = alloca ptr, align 8
  %6 = alloca i64, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca i8, align 1
  %10 = alloca i8, align 1
  %11 = alloca i8, align 1
  %12 = alloca i8, align 1
  %13 = alloca ptr, align 8
  %14 = alloca i32, align 4
  %15 = alloca i32, align 4
  store ptr %0, ptr %4, align 8, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !5
  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 1, ptr %9) #3
  call void @llvm.lifetime.start.p0(i64 1, ptr %10) #3
  call void @llvm.lifetime.start.p0(i64 1, ptr %11) #3
  call void @llvm.lifetime.start.p0(i64 1, ptr %12) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #3
  %16 = load ptr, ptr %4, align 8, !tbaa !5
  %17 = getelementptr inbounds %struct._ISCSI_CONNECTION, ptr %16, i32 0, i32 3
  %18 = load ptr, ptr %17, align 8, !tbaa !9
  store ptr %18, ptr %7, align 8, !tbaa !5
  %19 = load ptr, ptr %5, align 8, !tbaa !5
  %20 = call ptr @NetbufGetByte(ptr noundef %19, i32 noundef 0, ptr noundef null)
  store ptr %20, ptr %8, align 8, !tbaa !5
  %21 = load ptr, ptr %8, align 8, !tbaa !5
  %22 = icmp eq ptr %21, null
  br i1 %22, label %23, label %24

23:                                               ; preds = %2
  store i64 -9223372036854775784, ptr %3, align 8
  store i32 1, ptr %15, align 4
  br label %309

24:                                               ; preds = %2
  %25 = load ptr, ptr %8, align 8, !tbaa !5
  %26 = getelementptr inbounds %struct._ISCSI_LOGIN_RESPONSE, ptr %25, i32 0, i32 0
  %27 = load i8, ptr %26, align 4, !tbaa !20
  %28 = zext i8 %27 to i32
  %29 = and i32 %28, 63
  %30 = icmp eq i32 %29, 35
  br i1 %30, label %32, label %31

31:                                               ; preds = %24
  store i64 -9223372036854775784, ptr %3, align 8
  store i32 1, ptr %15, align 4
  br label %309

32:                                               ; preds = %24
  %33 = load ptr, ptr %8, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct._ISCSI_BASIC_HEADER, ptr %33, i32 0, i32 4
  %35 = getelementptr inbounds [3 x i8], ptr %34, i64 0, i64 0
  %36 = load i8, ptr %35, align 1, !tbaa !22
  %37 = zext i8 %36 to i32
  %38 = shl i32 %37, 16
  %39 = load ptr, ptr %8, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct._ISCSI_BASIC_HEADER, ptr %39, i32 0, i32 4
  %41 = getelementptr inbounds [3 x i8], ptr %40, i64 0, i64 1
  %42 = load i8, ptr %41, align 1, !tbaa !22
  %43 = zext i8 %42 to i32
  %44 = shl i32 %43, 8
  %45 = or i32 %38, %44
  %46 = load ptr, ptr %8, align 8, !tbaa !5
  %47 = getelementptr inbounds %struct._ISCSI_BASIC_HEADER, ptr %46, i32 0, i32 4
  %48 = getelementptr inbounds [3 x i8], ptr %47, i64 0, i64 2
  %49 = load i8, ptr %48, align 1, !tbaa !22
  %50 = zext i8 %49 to i32
  %51 = or i32 %45, %50
  store i32 %51, ptr %14, align 4, !tbaa !23
  %52 = load i32, ptr %14, align 4, !tbaa !23
  %53 = icmp ne i32 %52, 0
  br i1 %53, label %54, label %57

54:                                               ; preds = %32
  %55 = load ptr, ptr %5, align 8, !tbaa !5
  %56 = call ptr @NetbufGetByte(ptr noundef %55, i32 noundef 48, ptr noundef null)
  store ptr %56, ptr %13, align 8, !tbaa !5
  br label %58

57:                                               ; preds = %32
  store ptr null, ptr %13, align 8, !tbaa !5
  br label %58

58:                                               ; preds = %57, %54
  %59 = load ptr, ptr %8, align 8, !tbaa !5
  %60 = getelementptr inbounds %struct._ISCSI_LOGIN_RESPONSE, ptr %59, i32 0, i32 13
  %61 = load i8, ptr %60, align 4, !tbaa !24
  %62 = zext i8 %61 to i32
  switch i32 %62, label %77 [
    i32 0, label %78
    i32 1, label %63
  ]

63:                                               ; preds = %58
  %64 = load ptr, ptr %13, align 8, !tbaa !5
  %65 = icmp eq ptr %64, null
  br i1 %65, label %66, label %67

66:                                               ; preds = %63
  store i64 -9223372036854775784, ptr %3, align 8
  store i32 1, ptr %15, align 4
  br label %309

67:                                               ; preds = %63
  %68 = load ptr, ptr %7, align 8, !tbaa !5
  %69 = load ptr, ptr %13, align 8, !tbaa !5
  %70 = load i32, ptr %14, align 4, !tbaa !23
  %71 = call i64 @IScsiUpdateTargetAddress(ptr noundef %68, ptr noundef %69, i32 noundef %70)
  store i64 %71, ptr %6, align 8, !tbaa !25
  %72 = load i64, ptr %6, align 8, !tbaa !25
  %73 = icmp slt i64 %72, 0
  br i1 %73, label %74, label %76

74:                                               ; preds = %67
  %75 = load i64, ptr %6, align 8, !tbaa !25
  store i64 %75, ptr %3, align 8
  store i32 1, ptr %15, align 4
  br label %309

76:                                               ; preds = %67
  store i64 -9223372036854775795, ptr %3, align 8
  store i32 1, ptr %15, align 4
  br label %309

77:                                               ; preds = %58
  store i64 -9223372036854775784, ptr %3, align 8
  store i32 1, ptr %15, align 4
  br label %309

78:                                               ; preds = %58
  %79 = load ptr, ptr %8, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct._ISCSI_BASIC_HEADER, ptr %79, i32 0, i32 1
  %81 = load i8, ptr %80, align 1, !tbaa !26
  %82 = zext i8 %81 to i32
  %83 = and i32 %82, 128
  %84 = icmp eq i32 %83, 128
  %85 = zext i1 %84 to i32
  %86 = trunc i32 %85 to i8
  store i8 %86, ptr %9, align 1, !tbaa !22
  %87 = load ptr, ptr %8, align 8, !tbaa !5
  %88 = getelementptr inbounds %struct._ISCSI_BASIC_HEADER, ptr %87, i32 0, i32 1
  %89 = load i8, ptr %88, align 1, !tbaa !26
  %90 = zext i8 %89 to i32
  %91 = and i32 %90, 64
  %92 = icmp eq i32 %91, 64
  %93 = zext i1 %92 to i32
  %94 = trunc i32 %93 to i8
  store i8 %94, ptr %10, align 1, !tbaa !22
  %95 = load ptr, ptr %8, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct._ISCSI_LOGIN_RESPONSE, ptr %95, i32 0, i32 1
  %97 = load i8, ptr %96, align 1, !tbaa !28
  %98 = zext i8 %97 to i32
  %99 = ashr i32 %98, 2
  %100 = and i32 %99, 3
  %101 = trunc i32 %100 to i8
  store i8 %101, ptr %11, align 1, !tbaa !22
  %102 = load ptr, ptr %8, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct._ISCSI_LOGIN_RESPONSE, ptr %102, i32 0, i32 1
  %104 = load i8, ptr %103, align 1, !tbaa !28
  %105 = zext i8 %104 to i32
  %106 = and i32 %105, 3
  %107 = trunc i32 %106 to i8
  store i8 %107, ptr %12, align 1, !tbaa !22
  %108 = load ptr, ptr %8, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct._ISCSI_LOGIN_RESPONSE, ptr %108, i32 0, i32 8
  %110 = load i32, ptr %109, align 4, !tbaa !29
  %111 = call i32 @SwapBytes32(i32 noundef %110)
  %112 = load ptr, ptr %8, align 8, !tbaa !5
  %113 = getelementptr inbounds %struct._ISCSI_LOGIN_RESPONSE, ptr %112, i32 0, i32 8
  store i32 %111, ptr %113, align 4, !tbaa !29
  %114 = load i8, ptr %9, align 1, !tbaa !22
  %115 = zext i8 %114 to i32
  %116 = icmp ne i32 %115, 0
  br i1 %116, label %117, label %121

117:                                              ; preds = %78
  %118 = load i8, ptr %10, align 1, !tbaa !22
  %119 = zext i8 %118 to i32
  %120 = icmp ne i32 %119, 0
  br i1 %120, label %167, label %121

121:                                              ; preds = %117, %78
  %122 = load i8, ptr %11, align 1, !tbaa !22
  %123 = zext i8 %122 to i32
  %124 = load ptr, ptr %4, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct._ISCSI_CONNECTION, ptr %124, i32 0, i32 5
  %126 = load i8, ptr %125, align 1, !tbaa !30
  %127 = zext i8 %126 to i32
  %128 = icmp ne i32 %123, %127
  br i1 %128, label %167, label %129

129:                                              ; preds = %121
  %130 = load ptr, ptr %4, align 8, !tbaa !5
  %131 = getelementptr inbounds %struct._ISCSI_CONNECTION, ptr %130, i32 0, i32 10
  %132 = load i8, ptr %131, align 2, !tbaa !31
  %133 = icmp ne i8 %132, 0
  br i1 %133, label %138, label %134

134:                                              ; preds = %129
  %135 = load i8, ptr %9, align 1, !tbaa !22
  %136 = zext i8 %135 to i32
  %137 = icmp ne i32 %136, 0
  br i1 %137, label %167, label %138

138:                                              ; preds = %134, %129
  %139 = load i8, ptr %9, align 1, !tbaa !22
  %140 = zext i8 %139 to i32
  %141 = icmp ne i32 %140, 0
  br i1 %141, label %142, label %150

142:                                              ; preds = %138
  %143 = load i8, ptr %12, align 1, !tbaa !22
  %144 = zext i8 %143 to i32
  %145 = load ptr, ptr %4, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct._ISCSI_CONNECTION, ptr %145, i32 0, i32 6
  %147 = load i8, ptr %146, align 2, !tbaa !32
  %148 = zext i8 %147 to i32
  %149 = icmp ne i32 %144, %148
  br i1 %149, label %167, label %150

150:                                              ; preds = %142, %138
  %151 = load ptr, ptr %7, align 8, !tbaa !5
  %152 = getelementptr inbounds %struct._ISCSI_SESSION, ptr %151, i32 0, i32 6
  %153 = getelementptr inbounds [6 x i8], ptr %152, i64 0, i64 0
  %154 = load ptr, ptr %8, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct._ISCSI_LOGIN_RESPONSE, ptr %154, i32 0, i32 6
  %156 = getelementptr inbounds [6 x i8], ptr %155, i64 0, i64 0
  %157 = call i64 @CompareMem(ptr noundef %153, ptr noundef %156, i64 noundef 6)
  %158 = icmp ne i64 %157, 0
  br i1 %158, label %167, label %159

159:                                              ; preds = %150
  %160 = load ptr, ptr %8, align 8, !tbaa !5
  %161 = getelementptr inbounds %struct._ISCSI_LOGIN_RESPONSE, ptr %160, i32 0, i32 8
  %162 = load i32, ptr %161, align 4, !tbaa !29
  %163 = load ptr, ptr %7, align 8, !tbaa !5
  %164 = getelementptr inbounds %struct._ISCSI_SESSION, ptr %163, i32 0, i32 11
  %165 = load i32, ptr %164, align 8, !tbaa !33
  %166 = icmp ne i32 %162, %165
  br i1 %166, label %167, label %168

167:                                              ; preds = %159, %150, %142, %134, %121, %117
  store i64 -9223372036854775784, ptr %3, align 8
  store i32 1, ptr %15, align 4
  br label %309

168:                                              ; preds = %159
  %169 = load ptr, ptr %8, align 8, !tbaa !5
  %170 = getelementptr inbounds %struct._ISCSI_LOGIN_RESPONSE, ptr %169, i32 0, i32 10
  %171 = load i32, ptr %170, align 4, !tbaa !40
  %172 = call i32 @SwapBytes32(i32 noundef %171)
  %173 = load ptr, ptr %8, align 8, !tbaa !5
  %174 = getelementptr inbounds %struct._ISCSI_LOGIN_RESPONSE, ptr %173, i32 0, i32 10
  store i32 %172, ptr %174, align 4, !tbaa !40
  %175 = load ptr, ptr %8, align 8, !tbaa !5
  %176 = getelementptr inbounds %struct._ISCSI_LOGIN_RESPONSE, ptr %175, i32 0, i32 11
  %177 = load i32, ptr %176, align 4, !tbaa !41
  %178 = call i32 @SwapBytes32(i32 noundef %177)
  %179 = load ptr, ptr %8, align 8, !tbaa !5
  %180 = getelementptr inbounds %struct._ISCSI_LOGIN_RESPONSE, ptr %179, i32 0, i32 11
  store i32 %178, ptr %180, align 4, !tbaa !41
  %181 = load ptr, ptr %8, align 8, !tbaa !5
  %182 = getelementptr inbounds %struct._ISCSI_LOGIN_RESPONSE, ptr %181, i32 0, i32 12
  %183 = load i32, ptr %182, align 4, !tbaa !42
  %184 = call i32 @SwapBytes32(i32 noundef %183)
  %185 = load ptr, ptr %8, align 8, !tbaa !5
  %186 = getelementptr inbounds %struct._ISCSI_LOGIN_RESPONSE, ptr %185, i32 0, i32 12
  store i32 %184, ptr %186, align 4, !tbaa !42
  %187 = load ptr, ptr %4, align 8, !tbaa !5
  %188 = getelementptr inbounds %struct._ISCSI_CONNECTION, ptr %187, i32 0, i32 5
  %189 = load i8, ptr %188, align 1, !tbaa !30
  %190 = zext i8 %189 to i32
  %191 = icmp eq i32 %190, 0
  br i1 %191, label %192, label %230

192:                                              ; preds = %168
  %193 = load ptr, ptr %4, align 8, !tbaa !5
  %194 = getelementptr inbounds %struct._ISCSI_CONNECTION, ptr %193, i32 0, i32 7
  %195 = load i8, ptr %194, align 1, !tbaa !43
  %196 = zext i8 %195 to i32
  %197 = icmp eq i32 %196, 0
  br i1 %197, label %198, label %230

198:                                              ; preds = %192
  %199 = load ptr, ptr %7, align 8, !tbaa !5
  %200 = getelementptr inbounds %struct._ISCSI_SESSION, ptr %199, i32 0, i32 5
  %201 = load i8, ptr %200, align 8, !tbaa !44
  %202 = zext i8 %201 to i32
  %203 = icmp eq i32 %202, 0
  br i1 %203, label %204, label %213

204:                                              ; preds = %198
  %205 = load ptr, ptr %7, align 8, !tbaa !5
  %206 = getelementptr inbounds %struct._ISCSI_SESSION, ptr %205, i32 0, i32 8
  %207 = load i32, ptr %206, align 4, !tbaa !45
  %208 = load ptr, ptr %8, align 8, !tbaa !5
  %209 = getelementptr inbounds %struct._ISCSI_LOGIN_RESPONSE, ptr %208, i32 0, i32 11
  %210 = load i32, ptr %209, align 4, !tbaa !41
  %211 = icmp ne i32 %207, %210
  br i1 %211, label %212, label %213

212:                                              ; preds = %204
  store i64 -9223372036854775784, ptr %3, align 8
  store i32 1, ptr %15, align 4
  br label %309

213:                                              ; preds = %204, %198
  %214 = load ptr, ptr %8, align 8, !tbaa !5
  %215 = getelementptr inbounds %struct._ISCSI_LOGIN_RESPONSE, ptr %214, i32 0, i32 10
  %216 = load i32, ptr %215, align 4, !tbaa !40
  %217 = add i32 %216, 1
  %218 = load ptr, ptr %4, align 8, !tbaa !5
  %219 = getelementptr inbounds %struct._ISCSI_CONNECTION, ptr %218, i32 0, i32 12
  store i32 %217, ptr %219, align 4, !tbaa !46
  %220 = load ptr, ptr %8, align 8, !tbaa !5
  %221 = getelementptr inbounds %struct._ISCSI_LOGIN_RESPONSE, ptr %220, i32 0, i32 12
  %222 = load i32, ptr %221, align 4, !tbaa !42
  %223 = load ptr, ptr %7, align 8, !tbaa !5
  %224 = getelementptr inbounds %struct._ISCSI_SESSION, ptr %223, i32 0, i32 10
  store i32 %222, ptr %224, align 4, !tbaa !47
  %225 = load ptr, ptr %8, align 8, !tbaa !5
  %226 = getelementptr inbounds %struct._ISCSI_LOGIN_RESPONSE, ptr %225, i32 0, i32 11
  %227 = load i32, ptr %226, align 4, !tbaa !41
  %228 = load ptr, ptr %7, align 8, !tbaa !5
  %229 = getelementptr inbounds %struct._ISCSI_SESSION, ptr %228, i32 0, i32 9
  store i32 %227, ptr %229, align 8, !tbaa !48
  br label %250

230:                                              ; preds = %192, %168
  %231 = load ptr, ptr %4, align 8, !tbaa !5
  %232 = getelementptr inbounds %struct._ISCSI_CONNECTION, ptr %231, i32 0, i32 12
  %233 = load ptr, ptr %8, align 8, !tbaa !5
  %234 = getelementptr inbounds %struct._ISCSI_LOGIN_RESPONSE, ptr %233, i32 0, i32 10
  %235 = load i32, ptr %234, align 4, !tbaa !40
  %236 = call i64 @IScsiCheckSN(ptr noundef %232, i32 noundef %235)
  store i64 %236, ptr %6, align 8, !tbaa !25
  %237 = load i64, ptr %6, align 8, !tbaa !25
  %238 = icmp slt i64 %237, 0
  br i1 %238, label %247, label %239

239:                                              ; preds = %230
  %240 = load ptr, ptr %7, align 8, !tbaa !5
  %241 = load ptr, ptr %8, align 8, !tbaa !5
  %242 = getelementptr inbounds %struct._ISCSI_LOGIN_RESPONSE, ptr %241, i32 0, i32 12
  %243 = load i32, ptr %242, align 4, !tbaa !42
  %244 = load ptr, ptr %8, align 8, !tbaa !5
  %245 = getelementptr inbounds %struct._ISCSI_LOGIN_RESPONSE, ptr %244, i32 0, i32 11
  %246 = load i32, ptr %245, align 4, !tbaa !41
  call void @IScsiUpdateCmdSN(ptr noundef %240, i32 noundef %243, i32 noundef %246)
  br label %249

247:                                              ; preds = %230
  %248 = load i64, ptr %6, align 8, !tbaa !25
  store i64 %248, ptr %3, align 8
  store i32 1, ptr %15, align 4
  br label %309

249:                                              ; preds = %239
  br label %250

250:                                              ; preds = %249, %213
  %251 = load ptr, ptr %5, align 8, !tbaa !5
  %252 = call i32 @NetbufTrim(ptr noundef %251, i32 noundef 48, i8 noundef zeroext 1)
  %253 = load ptr, ptr %5, align 8, !tbaa !5
  %254 = getelementptr inbounds %struct.NET_BUF, ptr %253, i32 0, i32 1
  %255 = load i64, ptr %254, align 8, !tbaa !49
  %256 = add nsw i64 %255, 1
  store i64 %256, ptr %254, align 8, !tbaa !49
  %257 = load ptr, ptr %4, align 8, !tbaa !5
  %258 = getelementptr inbounds %struct._ISCSI_CONNECTION, ptr %257, i32 0, i32 13
  %259 = load ptr, ptr %5, align 8, !tbaa !5
  call void @NetbufQueAppend(ptr noundef %258, ptr noundef %259)
  %260 = load i8, ptr %10, align 1, !tbaa !22
  %261 = load ptr, ptr %4, align 8, !tbaa !5
  %262 = getelementptr inbounds %struct._ISCSI_CONNECTION, ptr %261, i32 0, i32 9
  store i8 %260, ptr %262, align 1, !tbaa !51
  %263 = load i8, ptr %10, align 1, !tbaa !22
  %264 = icmp ne i8 %263, 0
  br i1 %264, label %265, label %266

265:                                              ; preds = %250
  store i64 0, ptr %3, align 8
  store i32 1, ptr %15, align 4
  br label %309

266:                                              ; preds = %250
  %267 = load i8, ptr %11, align 1, !tbaa !22
  %268 = zext i8 %267 to i32
  switch i32 %268, label %275 [
    i32 0, label %269
    i32 1, label %272
  ]

269:                                              ; preds = %266
  %270 = load ptr, ptr %4, align 8, !tbaa !5
  %271 = call i64 @IScsiCHAPOnRspReceived(ptr noundef %270)
  store i64 %271, ptr %6, align 8, !tbaa !25
  br label %276

272:                                              ; preds = %266
  %273 = load ptr, ptr %4, align 8, !tbaa !5
  %274 = call i64 @IScsiCheckOpParams(ptr noundef %273)
  store i64 %274, ptr %6, align 8, !tbaa !25
  br label %276

275:                                              ; preds = %266
  store i64 -9223372036854775784, ptr %6, align 8, !tbaa !25
  br label %276

276:                                              ; preds = %275, %272, %269
  %277 = load i8, ptr %9, align 1, !tbaa !22
  %278 = zext i8 %277 to i32
  %279 = icmp ne i32 %278, 0
  br i1 %279, label %280, label %305

280:                                              ; preds = %276
  %281 = load i64, ptr %6, align 8, !tbaa !25
  %282 = icmp eq i64 %281, 0
  br i1 %282, label %283, label %305

283:                                              ; preds = %280
  %284 = load ptr, ptr %4, align 8, !tbaa !5
  %285 = getelementptr inbounds %struct._ISCSI_CONNECTION, ptr %284, i32 0, i32 6
  %286 = load i8, ptr %285, align 2, !tbaa !32
  %287 = load ptr, ptr %4, align 8, !tbaa !5
  %288 = getelementptr inbounds %struct._ISCSI_CONNECTION, ptr %287, i32 0, i32 5
  store i8 %286, ptr %288, align 1, !tbaa !30
  %289 = load ptr, ptr %4, align 8, !tbaa !5
  %290 = getelementptr inbounds %struct._ISCSI_CONNECTION, ptr %289, i32 0, i32 5
  %291 = load i8, ptr %290, align 1, !tbaa !30
  %292 = zext i8 %291 to i32
  %293 = icmp eq i32 %292, 1
  br i1 %293, label %294, label %297

294:                                              ; preds = %283
  %295 = load ptr, ptr %4, align 8, !tbaa !5
  %296 = getelementptr inbounds %struct._ISCSI_CONNECTION, ptr %295, i32 0, i32 6
  store i8 3, ptr %296, align 2, !tbaa !32
  br label %304

297:                                              ; preds = %283
  %298 = load ptr, ptr %8, align 8, !tbaa !5
  %299 = getelementptr inbounds %struct._ISCSI_LOGIN_RESPONSE, ptr %298, i32 0, i32 7
  %300 = load i16, ptr %299, align 2, !tbaa !52
  %301 = call zeroext i16 @SwapBytes16(i16 noundef zeroext %300)
  %302 = load ptr, ptr %7, align 8, !tbaa !5
  %303 = getelementptr inbounds %struct._ISCSI_SESSION, ptr %302, i32 0, i32 7
  store i16 %301, ptr %303, align 8, !tbaa !53
  br label %304

304:                                              ; preds = %297, %294
  br label %305

305:                                              ; preds = %304, %280, %276
  %306 = load ptr, ptr %4, align 8, !tbaa !5
  %307 = getelementptr inbounds %struct._ISCSI_CONNECTION, ptr %306, i32 0, i32 13
  call void @NetbufQueFlush(ptr noundef %307)
  %308 = load i64, ptr %6, align 8, !tbaa !25
  store i64 %308, ptr %3, align 8
  store i32 1, ptr %15, align 4
  br label %309

309:                                              ; preds = %305, %265, %247, %212, %167, %77, %76, %74, %66, %31, %23
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %12) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %11) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %10) #3
  call void @llvm.lifetime.end.p0(i64 1, 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
  %310 = load i64, ptr %3, align 8
  ret i64 %310
}

declare ptr @NetbufGetByte(ptr noundef, i32 noundef, ptr noundef) #2

declare zeroext i16 @SwapBytes16(i16 noundef zeroext) #2

declare i32 @SwapBytes32(i32 noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local i64 @IScsiUpdateTargetAddress(ptr noundef, ptr noundef, i32 noundef) #0

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

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

declare void @NetbufQueAppend(ptr noundef, ptr noundef) #2

declare i64 @IScsiCHAPOnRspReceived(ptr noundef) #2

; Function Attrs: nounwind uwtable
declare dso_local i64 @IScsiCheckOpParams(ptr noundef) #0

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !6, i64 32}
!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 = !{!21, !7, i64 0}
!21 = !{!"_ISCSI_LOGIN_RESPONSE", !7, i64 0, !7, i64 1, !7, i64 2, !7, i64 3, !7, i64 4, !7, i64 5, !7, i64 8, !13, i64 14, !11, i64 16, !11, i64 20, !11, i64 24, !11, i64 28, !11, i64 32, !7, i64 36, !7, i64 37, !7, i64 38}
!22 = !{!7, !7, i64 0}
!23 = !{!11, !11, i64 0}
!24 = !{!21, !7, i64 36}
!25 = !{!15, !15, i64 0}
!26 = !{!27, !7, i64 1}
!27 = !{!"_ISCSI_BASIC_HEADER", !7, i64 0, !7, i64 1, !13, i64 2, !7, i64 4, !7, i64 5, !7, i64 8, !11, i64 16, !7, i64 20}
!28 = !{!21, !7, i64 1}
!29 = !{!21, !11, i64 16}
!30 = !{!10, !7, i64 41}
!31 = !{!10, !7, i64 46}
!32 = !{!10, !7, i64 42}
!33 = !{!34, !11, i64 2904}
!34 = !{!"_ISCSI_SESSION", !11, i64 0, !35, i64 4, !38, 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}
!35 = !{!"_ISCSI_SESSION_CONFIG_DATA", !36, i64 0, !37, i64 259, !37, i64 263, !37, i64 267}
!36 = !{!"", !7, i64 0, !7, i64 1, !37, i64 2, !37, i64 6, !37, i64 10, !7, i64 14, !7, i64 15, !37, i64 239, !13, i64 243, !7, i64 245, !7, i64 253}
!37 = !{!"", !7, i64 0}
!38 = !{!"_ISCSI_CHAP_AUTH_DATA", !39, i64 0, !11, i64 292, !7, i64 296, !11, i64 1320, !7, i64 1324, !11, i64 1340, !7, i64 1344, !11, i64 2368}
!39 = !{!"_ISCSI_CHAP_AUTH_CONFIG_NVDATA", !7, i64 0, !7, i64 1, !7, i64 128, !7, i64 145, !7, i64 272}
!40 = !{!21, !11, i64 24}
!41 = !{!21, !11, i64 28}
!42 = !{!21, !11, i64 32}
!43 = !{!10, !7, i64 43}
!44 = !{!34, !7, i64 2880}
!45 = !{!34, !11, i64 2892}
!46 = !{!10, !11, i64 52}
!47 = !{!34, !11, i64 2900}
!48 = !{!34, !11, i64 2896}
!49 = !{!50, !15, i64 8}
!50 = !{!"", !11, i64 0, !15, i64 8, !12, i64 16, !7, i64 32, !6, i64 40, !6, i64 48, !7, i64 56, !6, i64 120, !11, i64 128, !11, i64 132, !7, i64 136}
!51 = !{!10, !7, i64 45}
!52 = !{!21, !13, i64 14}
!53 = !{!34, !13, i64 2888}


; 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"

; Function Attrs: nounwind uwtable
declare dso_local i64 @IScsiCheckSN(ptr noundef, i32 noundef) local_unnamed_addr #0

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

declare void @NetbufQueFlush(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
define dso_local i64 @IScsiProcessLoginRsp(ptr noundef %0, ptr noundef %1) local_unnamed_addr #0 {
  %3 = getelementptr inbounds i8, ptr %0, i64 32
  %4 = load ptr, ptr %3, align 8, !tbaa !5
  %5 = tail call ptr @NetbufGetByte(ptr noundef %1, i32 noundef 0, ptr noundef null) #2
  %6 = icmp eq ptr %5, null
  br i1 %6, label %127, label %7

7:                                                ; preds = %2
  %8 = load i8, ptr %5, align 4, !tbaa !19
  %9 = and i8 %8, 63
  %10 = icmp eq i8 %9, 35
  br i1 %10, label %11, label %127

11:                                               ; preds = %7
  %12 = getelementptr inbounds i8, ptr %5, i64 5
  %13 = load i8, ptr %12, align 1, !tbaa !21
  %14 = zext i8 %13 to i32
  %15 = shl nuw nsw i32 %14, 16
  %16 = getelementptr inbounds i8, ptr %5, i64 6
  %17 = load i8, ptr %16, align 1, !tbaa !21
  %18 = zext i8 %17 to i32
  %19 = shl nuw nsw i32 %18, 8
  %20 = or disjoint i32 %19, %15
  %21 = getelementptr inbounds i8, ptr %5, i64 7
  %22 = load i8, ptr %21, align 1, !tbaa !21
  %23 = zext i8 %22 to i32
  %24 = or disjoint i32 %20, %23
  %.not = icmp eq i32 %24, 0
  br i1 %.not, label %27, label %25

25:                                               ; preds = %11
  %26 = tail call ptr @NetbufGetByte(ptr noundef %1, i32 noundef 48, ptr noundef null) #2
  br label %27

27:                                               ; preds = %11, %25
  %.086 = phi ptr [ %26, %25 ], [ null, %11 ]
  %28 = getelementptr inbounds i8, ptr %5, i64 36
  %29 = load i8, ptr %28, align 4, !tbaa !22
  switch i8 %29, label %127 [
    i8 0, label %35
    i8 1, label %30
  ]

30:                                               ; preds = %27
  %31 = icmp eq ptr %.086, null
  br i1 %31, label %127, label %32

32:                                               ; preds = %30
  %33 = tail call i64 @IScsiUpdateTargetAddress(ptr noundef %4, ptr noundef nonnull %.086, i32 noundef %24)
  %34 = icmp slt i64 %33, 0
  %. = select i1 %34, i64 %33, i64 -9223372036854775795
  br label %127

35:                                               ; preds = %27
  %36 = getelementptr inbounds i8, ptr %5, i64 1
  %37 = load i8, ptr %36, align 1, !tbaa !21
  %38 = lshr i8 %37, 6
  %.lobit92 = and i8 %38, 1
  %39 = and i8 %37, 3
  %40 = getelementptr inbounds i8, ptr %5, i64 16
  %41 = load i32, ptr %40, align 4, !tbaa !23
  %42 = tail call i32 @SwapBytes32(i32 noundef %41) #2
  store i32 %42, ptr %40, align 4, !tbaa !23
  %43 = icmp slt i8 %37, 0
  %44 = icmp ne i8 %.lobit92, 0
  %or.cond = select i1 %43, i1 %44, i1 false
  br i1 %or.cond, label %127, label %45

45:                                               ; preds = %35
  %46 = lshr i8 %37, 2
  %47 = and i8 %46, 3
  %48 = getelementptr inbounds i8, ptr %0, i64 41
  %49 = load i8, ptr %48, align 1, !tbaa !24
  %.not93 = icmp eq i8 %47, %49
  br i1 %.not93, label %50, label %127

50:                                               ; preds = %45
  %51 = getelementptr inbounds i8, ptr %0, i64 46
  %52 = load i8, ptr %51, align 2, !tbaa !25
  %53 = icmp eq i8 %52, 0
  %or.cond5 = and i1 %43, %53
  br i1 %or.cond5, label %127, label %54

54:                                               ; preds = %50
  br i1 %43, label %55, label %58

55:                                               ; preds = %54
  %56 = getelementptr inbounds i8, ptr %0, i64 42
  %57 = load i8, ptr %56, align 2, !tbaa !26
  %.not94 = icmp eq i8 %39, %57
  br i1 %.not94, label %58, label %127

58:                                               ; preds = %55, %54
  %59 = getelementptr inbounds i8, ptr %4, i64 2881
  %60 = getelementptr inbounds i8, ptr %5, i64 8
  %61 = tail call i64 @CompareMem(ptr noundef nonnull %59, ptr noundef nonnull %60, i64 noundef 6) #2
  %.not95 = icmp eq i64 %61, 0
  br i1 %.not95, label %62, label %127

62:                                               ; preds = %58
  %63 = load i32, ptr %40, align 4, !tbaa !23
  %64 = getelementptr inbounds i8, ptr %4, i64 2904
  %65 = load i32, ptr %64, align 8, !tbaa !27
  %.not96 = icmp eq i32 %63, %65
  br i1 %.not96, label %66, label %127

66:                                               ; preds = %62
  %67 = getelementptr inbounds i8, ptr %5, i64 24
  %68 = load i32, ptr %67, align 4, !tbaa !34
  %69 = tail call i32 @SwapBytes32(i32 noundef %68) #2
  store i32 %69, ptr %67, align 4, !tbaa !34
  %70 = getelementptr inbounds i8, ptr %5, i64 28
  %71 = load i32, ptr %70, align 4, !tbaa !35
  %72 = tail call i32 @SwapBytes32(i32 noundef %71) #2
  store i32 %72, ptr %70, align 4, !tbaa !35
  %73 = getelementptr inbounds i8, ptr %5, i64 32
  %74 = load i32, ptr %73, align 4, !tbaa !36
  %75 = tail call i32 @SwapBytes32(i32 noundef %74) #2
  store i32 %75, ptr %73, align 4, !tbaa !36
  %76 = load i8, ptr %48, align 1, !tbaa !24
  %77 = icmp eq i8 %76, 0
  br i1 %77, label %78, label %95

78:                                               ; preds = %66
  %79 = getelementptr inbounds i8, ptr %0, i64 43
  %80 = load i8, ptr %79, align 1, !tbaa !37
  %81 = icmp eq i8 %80, 0
  br i1 %81, label %82, label %95

82:                                               ; preds = %78
  %83 = getelementptr inbounds i8, ptr %4, i64 2880
  %84 = load i8, ptr %83, align 8, !tbaa !38
  %85 = icmp eq i8 %84, 0
  %.pre = load i32, ptr %70, align 4, !tbaa !35
  br i1 %85, label %86, label %89

86:                                               ; preds = %82
  %87 = getelementptr inbounds i8, ptr %4, i64 2892
  %88 = load i32, ptr %87, align 4, !tbaa !39
  %.not97 = icmp eq i32 %88, %.pre
  br i1 %.not97, label %89, label %127

89:                                               ; preds = %86, %82
  %90 = load i32, ptr %67, align 4, !tbaa !34
  %91 = add i32 %90, 1
  %92 = getelementptr inbounds i8, ptr %0, i64 52
  store i32 %91, ptr %92, align 4, !tbaa !40
  %93 = getelementptr inbounds i8, ptr %4, i64 2900
  store i32 %75, ptr %93, align 4, !tbaa !41
  %94 = getelementptr inbounds i8, ptr %4, i64 2896
  store i32 %.pre, ptr %94, align 8, !tbaa !42
  br label %103

95:                                               ; preds = %78, %66
  %96 = getelementptr inbounds i8, ptr %0, i64 52
  %97 = load i32, ptr %67, align 4, !tbaa !34
  %98 = tail call i64 @IScsiCheckSN(ptr noundef nonnull %96, i32 noundef %97)
  %99 = icmp slt i64 %98, 0
  br i1 %99, label %127, label %100

100:                                              ; preds = %95
  %101 = load i32, ptr %73, align 4, !tbaa !36
  %102 = load i32, ptr %70, align 4, !tbaa !35
  tail call void @IScsiUpdateCmdSN(ptr noundef nonnull %4, i32 noundef %101, i32 noundef %102)
  br label %103

103:                                              ; preds = %100, %89
  %104 = tail call i32 @NetbufTrim(ptr noundef %1, i32 noundef 48, i8 noundef zeroext 1) #2
  %105 = getelementptr inbounds i8, ptr %1, i64 8
  %106 = load i64, ptr %105, align 8, !tbaa !43
  %107 = add nsw i64 %106, 1
  store i64 %107, ptr %105, align 8, !tbaa !43
  %108 = getelementptr inbounds i8, ptr %0, i64 56
  tail call void @NetbufQueAppend(ptr noundef nonnull %108, ptr noundef %1) #2
  %109 = getelementptr inbounds i8, ptr %0, i64 45
  store i8 %.lobit92, ptr %109, align 1, !tbaa !45
  %.not98 = icmp eq i8 %.lobit92, 0
  br i1 %.not98, label %110, label %127

110:                                              ; preds = %103
  switch i8 %47, label %.thread [
    i8 0, label %111
    i8 1, label %113
  ]

111:                                              ; preds = %110
  %112 = tail call i64 @IScsiCHAPOnRspReceived(ptr noundef nonnull %0) #2
  br label %115

113:                                              ; preds = %110
  %114 = tail call i64 @IScsiCheckOpParams(ptr noundef nonnull %0)
  br label %115

115:                                              ; preds = %113, %111
  %.087 = phi i64 [ %114, %113 ], [ %112, %111 ]
  %116 = icmp eq i64 %.087, 0
  %or.cond7 = select i1 %43, i1 %116, i1 false
  br i1 %or.cond7, label %117, label %.thread

117:                                              ; preds = %115
  %118 = getelementptr inbounds i8, ptr %0, i64 42
  %119 = load i8, ptr %118, align 2, !tbaa !26
  store i8 %119, ptr %48, align 1, !tbaa !24
  %120 = icmp eq i8 %119, 1
  br i1 %120, label %121, label %122

121:                                              ; preds = %117
  store i8 3, ptr %118, align 2, !tbaa !26
  br label %.thread

122:                                              ; preds = %117
  %123 = getelementptr inbounds i8, ptr %5, i64 14
  %124 = load i16, ptr %123, align 2, !tbaa !46
  %125 = tail call zeroext i16 @SwapBytes16(i16 noundef zeroext %124) #2
  %126 = getelementptr inbounds i8, ptr %4, i64 2888
  store i16 %125, ptr %126, align 8, !tbaa !47
  br label %.thread

.thread:                                          ; preds = %110, %121, %122, %115
  %.087101 = phi i64 [ 0, %121 ], [ 0, %122 ], [ %.087, %115 ], [ -9223372036854775784, %110 ]
  tail call void @NetbufQueFlush(ptr noundef nonnull %108) #2
  br label %127

127:                                              ; preds = %103, %95, %86, %45, %55, %58, %62, %35, %50, %27, %32, %30, %7, %2, %.thread
  %.0 = phi i64 [ %.087101, %.thread ], [ -9223372036854775784, %2 ], [ -9223372036854775784, %7 ], [ -9223372036854775784, %30 ], [ %., %32 ], [ -9223372036854775784, %27 ], [ -9223372036854775784, %50 ], [ -9223372036854775784, %35 ], [ -9223372036854775784, %62 ], [ -9223372036854775784, %58 ], [ -9223372036854775784, %55 ], [ -9223372036854775784, %45 ], [ -9223372036854775784, %86 ], [ %98, %95 ], [ 0, %103 ]
  ret i64 %.0
}

declare ptr @NetbufGetByte(ptr noundef, i32 noundef, ptr noundef) local_unnamed_addr #1

declare zeroext i16 @SwapBytes16(i16 noundef zeroext) local_unnamed_addr #1

declare i32 @SwapBytes32(i32 noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local i64 @IScsiUpdateTargetAddress(ptr noundef, ptr noundef, i32 noundef) local_unnamed_addr #0

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

declare i32 @NetbufTrim(ptr noundef, i32 noundef, i8 noundef zeroext) local_unnamed_addr #1

declare void @NetbufQueAppend(ptr noundef, ptr noundef) local_unnamed_addr #1

declare i64 @IScsiCHAPOnRspReceived(ptr noundef) local_unnamed_addr #1

; Function Attrs: nounwind uwtable
declare dso_local i64 @IScsiCheckOpParams(ptr noundef) local_unnamed_addr #0

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #2 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !11, i64 32}
!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 = !{!20, !8, i64 0}
!20 = !{!"_ISCSI_LOGIN_RESPONSE", !8, i64 0, !8, i64 1, !8, i64 2, !8, i64 3, !8, i64 4, !8, i64 5, !8, i64 8, !12, i64 14, !7, i64 16, !7, i64 20, !7, i64 24, !7, i64 28, !7, i64 32, !8, i64 36, !8, i64 37, !8, i64 38}
!21 = !{!8, !8, i64 0}
!22 = !{!20, !8, i64 36}
!23 = !{!20, !7, i64 16}
!24 = !{!6, !8, i64 41}
!25 = !{!6, !8, i64 46}
!26 = !{!6, !8, i64 42}
!27 = !{!28, !7, i64 2904}
!28 = !{!"_ISCSI_SESSION", !7, i64 0, !29, i64 4, !32, 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}
!29 = !{!"_ISCSI_SESSION_CONFIG_DATA", !30, i64 0, !31, i64 259, !31, i64 263, !31, i64 267}
!30 = !{!"", !8, i64 0, !8, i64 1, !31, i64 2, !31, i64 6, !31, i64 10, !8, i64 14, !8, i64 15, !31, i64 239, !12, i64 243, !8, i64 245, !8, i64 253}
!31 = !{!"", !8, i64 0}
!32 = !{!"_ISCSI_CHAP_AUTH_DATA", !33, i64 0, !7, i64 292, !8, i64 296, !7, i64 1320, !8, i64 1324, !7, i64 1340, !8, i64 1344, !7, i64 2368}
!33 = !{!"_ISCSI_CHAP_AUTH_CONFIG_NVDATA", !8, i64 0, !8, i64 1, !8, i64 128, !8, i64 145, !8, i64 272}
!34 = !{!20, !7, i64 24}
!35 = !{!20, !7, i64 28}
!36 = !{!20, !7, i64 32}
!37 = !{!6, !8, i64 43}
!38 = !{!28, !8, i64 2880}
!39 = !{!28, !7, i64 2892}
!40 = !{!6, !7, i64 52}
!41 = !{!28, !7, i64 2900}
!42 = !{!28, !7, i64 2896}
!43 = !{!44, !14, i64 8}
!44 = !{!"", !7, i64 0, !14, i64 8, !10, i64 16, !8, i64 32, !11, i64 40, !11, i64 48, !8, i64 56, !11, i64 120, !7, i64 128, !7, i64 132, !8, i64 136}
!45 = !{!6, !8, i64 45}
!46 = !{!20, !12, i64 14}
!47 = !{!28, !12, i64 2888}


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