; LLVM IR from holzschu/ios_system :: curl/curl/tests/libtest (stub_gssapi)

; 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.gss_ctx_id_t_desc_struct = type { i32, i32, i32, i32, [250 x i8] }
%struct.gss_buffer_desc_struct = type { i64, ptr }

@.str = external hidden unnamed_addr constant [20 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [10 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local i32 @gss_init_sec_context(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, i32 noundef %5, i32 noundef %6, ptr noundef %7, ptr noundef %8, ptr noundef %9, ptr noundef %10, ptr noundef %11, ptr noundef %12) #0 {
  %14 = alloca i32, align 4
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca i32, align 4
  %21 = alloca i32, align 4
  %22 = alloca ptr, align 8
  %23 = alloca ptr, align 8
  %24 = alloca ptr, align 8
  %25 = alloca ptr, align 8
  %26 = alloca ptr, align 8
  %27 = alloca ptr, align 8
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca ptr, align 8
  %31 = alloca ptr, align 8
  %32 = alloca ptr, align 8
  %33 = alloca i32, align 4
  store ptr %0, ptr %15, align 8, !tbaa !5
  store ptr %1, ptr %16, align 8, !tbaa !5
  store ptr %2, ptr %17, align 8, !tbaa !5
  store ptr %3, ptr %18, align 8, !tbaa !5
  store ptr %4, ptr %19, align 8, !tbaa !5
  store i32 %5, ptr %20, align 4, !tbaa !9
  store i32 %6, ptr %21, align 4, !tbaa !9
  store ptr %7, ptr %22, align 8, !tbaa !5
  store ptr %8, ptr %23, align 8, !tbaa !5
  store ptr %9, ptr %24, align 8, !tbaa !5
  store ptr %10, ptr %25, align 8, !tbaa !5
  store ptr %11, ptr %26, align 8, !tbaa !5
  store ptr %12, ptr %27, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %28) #7
  store i32 187, ptr %28, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %29) #7
  store i32 0, ptr %29, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #7
  store ptr null, ptr %30, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %31) #7
  store ptr null, ptr %31, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #7
  store ptr null, ptr %32, align 8, !tbaa !5
  %34 = load ptr, ptr %16, align 8, !tbaa !5
  %35 = load ptr, ptr %19, align 8, !tbaa !5
  %36 = load i32, ptr %21, align 4, !tbaa !9
  %37 = load ptr, ptr %22, align 8, !tbaa !5
  %38 = load ptr, ptr %24, align 8, !tbaa !5
  %39 = load ptr, ptr %15, align 8, !tbaa !5
  %40 = icmp ne ptr %39, null
  br i1 %40, label %42, label %41

41:                                               ; preds = %13
  store i32 -2147483648, ptr %14, align 4
  store i32 1, ptr %33, align 4
  br label %251

42:                                               ; preds = %13
  %43 = load ptr, ptr %15, align 8, !tbaa !5
  store i32 0, ptr %43, align 4, !tbaa !9
  %44 = load ptr, ptr %17, align 8, !tbaa !5
  %45 = icmp ne ptr %44, null
  br i1 %45, label %46, label %52

46:                                               ; preds = %42
  %47 = load ptr, ptr %18, align 8, !tbaa !5
  %48 = icmp ne ptr %47, null
  br i1 %48, label %49, label %52

49:                                               ; preds = %46
  %50 = load ptr, ptr %25, align 8, !tbaa !5
  %51 = icmp ne ptr %50, null
  br i1 %51, label %54, label %52

52:                                               ; preds = %49, %46, %42
  %53 = load ptr, ptr %15, align 8, !tbaa !5
  store i32 2, ptr %53, align 4, !tbaa !9
  store i32 -2147483648, ptr %14, align 4
  store i32 1, ptr %33, align 4
  br label %251

54:                                               ; preds = %49
  %55 = call ptr @getenv(ptr noundef @.str) #7
  store ptr %55, ptr %31, align 8, !tbaa !5
  %56 = load ptr, ptr %31, align 8, !tbaa !5
  %57 = icmp ne ptr %56, null
  br i1 %57, label %58, label %62

58:                                               ; preds = %54
  %59 = load ptr, ptr %31, align 8, !tbaa !5
  %60 = call i64 @strlen(ptr noundef %59) #8
  %61 = icmp uge i64 %60, 250
  br i1 %61, label %62, label %64

62:                                               ; preds = %58, %54
  %63 = load ptr, ptr %15, align 8, !tbaa !5
  store i32 3, ptr %63, align 4, !tbaa !9
  store i32 -2147483648, ptr %14, align 4
  store i32 1, ptr %33, align 4
  br label %251

64:                                               ; preds = %58
  %65 = load ptr, ptr %17, align 8, !tbaa !5
  %66 = load ptr, ptr %65, align 8, !tbaa !5
  store ptr %66, ptr %32, align 8, !tbaa !5
  %67 = load ptr, ptr %32, align 8, !tbaa !5
  %68 = icmp ne ptr %67, null
  br i1 %68, label %69, label %78

69:                                               ; preds = %64
  %70 = load ptr, ptr %32, align 8, !tbaa !5
  %71 = getelementptr inbounds %struct.gss_ctx_id_t_desc_struct, ptr %70, i32 0, i32 4
  %72 = getelementptr inbounds [250 x i8], ptr %71, i64 0, i64 0
  %73 = load ptr, ptr %31, align 8, !tbaa !5
  %74 = call i32 @strcmp(ptr noundef %72, ptr noundef %73) #8
  %75 = icmp ne i32 %74, 0
  br i1 %75, label %76, label %78

76:                                               ; preds = %69
  %77 = load ptr, ptr %15, align 8, !tbaa !5
  store i32 3, ptr %77, align 4, !tbaa !9
  store i32 -2147483648, ptr %14, align 4
  store i32 1, ptr %33, align 4
  br label %251

78:                                               ; preds = %69, %64
  %79 = load ptr, ptr %25, align 8, !tbaa !5
  %80 = getelementptr inbounds %struct.gss_buffer_desc_struct, ptr %79, i32 0, i32 0
  store i64 0, ptr %80, align 8, !tbaa !11
  %81 = load ptr, ptr %25, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.gss_buffer_desc_struct, ptr %81, i32 0, i32 1
  store ptr null, ptr %82, align 8, !tbaa !14
  %83 = load ptr, ptr %23, align 8, !tbaa !5
  %84 = icmp ne ptr %83, null
  br i1 %84, label %85, label %153

85:                                               ; preds = %78
  %86 = load ptr, ptr %23, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.gss_buffer_desc_struct, ptr %86, i32 0, i32 0
  %88 = load i64, ptr %87, align 8, !tbaa !11
  %89 = icmp ne i64 %88, 0
  br i1 %89, label %90, label %153

90:                                               ; preds = %85
  %91 = load ptr, ptr %32, align 8, !tbaa !5
  %92 = icmp ne ptr %91, null
  br i1 %92, label %95, label %93

93:                                               ; preds = %90
  %94 = load ptr, ptr %15, align 8, !tbaa !5
  store i32 4, ptr %94, align 4, !tbaa !9
  store i32 -2147483648, ptr %14, align 4
  store i32 1, ptr %33, align 4
  br label %251

95:                                               ; preds = %90
  %96 = load ptr, ptr %23, align 8, !tbaa !5
  %97 = getelementptr inbounds %struct.gss_buffer_desc_struct, ptr %96, i32 0, i32 1
  %98 = load ptr, ptr %97, align 8, !tbaa !14
  %99 = getelementptr inbounds i8, ptr %98, i64 0
  %100 = load i8, ptr %99, align 1, !tbaa !15
  %101 = sext i8 %100 to i32
  %102 = icmp eq i32 %101, 68
  br i1 %102, label %103, label %123

103:                                              ; preds = %95
  %104 = load ptr, ptr %32, align 8, !tbaa !5
  %105 = getelementptr inbounds %struct.gss_ctx_id_t_desc_struct, ptr %104, i32 0, i32 0
  %106 = load i32, ptr %105, align 4, !tbaa !16
  switch i32 %106, label %121 [
    i32 1, label %107
    i32 3, label %107
  ]

107:                                              ; preds = %103, %103
  %108 = load ptr, ptr %26, align 8, !tbaa !5
  %109 = icmp ne ptr %108, null
  br i1 %109, label %110, label %115

110:                                              ; preds = %107
  %111 = load ptr, ptr %32, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.gss_ctx_id_t_desc_struct, ptr %111, i32 0, i32 3
  %113 = load i32, ptr %112, align 4, !tbaa !18
  %114 = load ptr, ptr %26, align 8, !tbaa !5
  store i32 %113, ptr %114, align 4, !tbaa !9
  br label %115

115:                                              ; preds = %110, %107
  %116 = load ptr, ptr %27, align 8, !tbaa !5
  %117 = icmp ne ptr %116, null
  br i1 %117, label %118, label %120

118:                                              ; preds = %115
  %119 = load ptr, ptr %27, align 8, !tbaa !5
  store i32 -1, ptr %119, align 4, !tbaa !9
  br label %120

120:                                              ; preds = %118, %115
  store i32 0, ptr %14, align 4
  store i32 1, ptr %33, align 4
  br label %251

121:                                              ; preds = %103
  %122 = load ptr, ptr %15, align 8, !tbaa !5
  store i32 5, ptr %122, align 4, !tbaa !9
  store i32 -2147483648, ptr %14, align 4
  store i32 1, ptr %33, align 4
  br label %251

123:                                              ; preds = %95
  %124 = load ptr, ptr %23, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.gss_buffer_desc_struct, ptr %124, i32 0, i32 1
  %126 = load ptr, ptr %125, align 8, !tbaa !14
  %127 = getelementptr inbounds i8, ptr %126, i64 0
  %128 = load i8, ptr %127, align 1, !tbaa !15
  %129 = sext i8 %128 to i32
  %130 = icmp ne i32 %129, 67
  br i1 %130, label %131, label %133

131:                                              ; preds = %123
  %132 = load ptr, ptr %15, align 8, !tbaa !5
  store i32 5, ptr %132, align 4, !tbaa !9
  store i32 -2147483648, ptr %14, align 4
  store i32 1, ptr %33, align 4
  br label %251

133:                                              ; preds = %123
  %134 = load ptr, ptr %32, align 8, !tbaa !5
  %135 = getelementptr inbounds %struct.gss_ctx_id_t_desc_struct, ptr %134, i32 0, i32 0
  %136 = load i32, ptr %135, align 4, !tbaa !16
  switch i32 %136, label %150 [
    i32 1, label %137
    i32 2, label %147
  ]

137:                                              ; preds = %133
  %138 = load ptr, ptr %32, align 8, !tbaa !5
  %139 = getelementptr inbounds %struct.gss_ctx_id_t_desc_struct, ptr %138, i32 0, i32 2
  %140 = load i32, ptr %139, align 4, !tbaa !19
  %141 = icmp ne i32 %140, 0
  br i1 %141, label %142, label %145

142:                                              ; preds = %137
  %143 = load ptr, ptr %32, align 8, !tbaa !5
  %144 = getelementptr inbounds %struct.gss_ctx_id_t_desc_struct, ptr %143, i32 0, i32 0
  store i32 2, ptr %144, align 4, !tbaa !16
  br label %152

145:                                              ; preds = %137
  %146 = load ptr, ptr %15, align 8, !tbaa !5
  store i32 5, ptr %146, align 4, !tbaa !9
  store i32 -2147483648, ptr %14, align 4
  store i32 1, ptr %33, align 4
  br label %251

147:                                              ; preds = %133
  %148 = load ptr, ptr %32, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.gss_ctx_id_t_desc_struct, ptr %148, i32 0, i32 0
  store i32 3, ptr %149, align 4, !tbaa !16
  br label %152

150:                                              ; preds = %133
  %151 = load ptr, ptr %15, align 8, !tbaa !5
  store i32 5, ptr %151, align 4, !tbaa !9
  store i32 -2147483648, ptr %14, align 4
  store i32 1, ptr %33, align 4
  br label %251

152:                                              ; preds = %147, %142
  br label %207

153:                                              ; preds = %85, %78
  %154 = load ptr, ptr %32, align 8, !tbaa !5
  %155 = icmp ne ptr %154, null
  br i1 %155, label %156, label %158

156:                                              ; preds = %153
  %157 = load ptr, ptr %15, align 8, !tbaa !5
  store i32 4, ptr %157, align 4, !tbaa !9
  store i32 -2147483648, ptr %14, align 4
  store i32 1, ptr %33, align 4
  br label %251

158:                                              ; preds = %153
  %159 = call noalias ptr @calloc(i64 noundef 268, i64 noundef 1) #9
  store ptr %159, ptr %32, align 8, !tbaa !5
  %160 = load ptr, ptr %32, align 8, !tbaa !5
  %161 = icmp ne ptr %160, null
  br i1 %161, label %164, label %162

162:                                              ; preds = %158
  %163 = load ptr, ptr %15, align 8, !tbaa !5
  store i32 1, ptr %163, align 4, !tbaa !9
  store i32 -2147483648, ptr %14, align 4
  store i32 1, ptr %33, align 4
  br label %251

164:                                              ; preds = %158
  %165 = load ptr, ptr %31, align 8, !tbaa !5
  %166 = call ptr @strstr(ptr noundef %165, ptr noundef @.str.1) #8
  %167 = icmp ne ptr %166, null
  br i1 %167, label %168, label %171

168:                                              ; preds = %164
  %169 = load ptr, ptr %32, align 8, !tbaa !5
  %170 = getelementptr inbounds %struct.gss_ctx_id_t_desc_struct, ptr %169, i32 0, i32 1
  store i32 1, ptr %170, align 4, !tbaa !20
  br label %171

171:                                              ; preds = %168, %164
  %172 = load ptr, ptr %31, align 8, !tbaa !5
  %173 = call ptr @strstr(ptr noundef %172, ptr noundef @.str.2) #8
  %174 = icmp ne ptr %173, null
  br i1 %174, label %175, label %178

175:                                              ; preds = %171
  %176 = load ptr, ptr %32, align 8, !tbaa !5
  %177 = getelementptr inbounds %struct.gss_ctx_id_t_desc_struct, ptr %176, i32 0, i32 2
  store i32 1, ptr %177, align 4, !tbaa !19
  br label %178

178:                                              ; preds = %175, %171
  %179 = load ptr, ptr %32, align 8, !tbaa !5
  %180 = getelementptr inbounds %struct.gss_ctx_id_t_desc_struct, ptr %179, i32 0, i32 1
  %181 = load i32, ptr %180, align 4, !tbaa !20
  %182 = icmp ne i32 %181, 0
  br i1 %182, label %183, label %186

183:                                              ; preds = %178
  %184 = load ptr, ptr %32, align 8, !tbaa !5
  %185 = getelementptr inbounds %struct.gss_ctx_id_t_desc_struct, ptr %184, i32 0, i32 0
  store i32 1, ptr %185, align 4, !tbaa !16
  br label %198

186:                                              ; preds = %178
  %187 = load ptr, ptr %32, align 8, !tbaa !5
  %188 = getelementptr inbounds %struct.gss_ctx_id_t_desc_struct, ptr %187, i32 0, i32 2
  %189 = load i32, ptr %188, align 4, !tbaa !19
  %190 = icmp ne i32 %189, 0
  br i1 %190, label %191, label %194

191:                                              ; preds = %186
  %192 = load ptr, ptr %32, align 8, !tbaa !5
  %193 = getelementptr inbounds %struct.gss_ctx_id_t_desc_struct, ptr %192, i32 0, i32 0
  store i32 2, ptr %193, align 4, !tbaa !16
  br label %197

194:                                              ; preds = %186
  %195 = load ptr, ptr %32, align 8, !tbaa !5
  call void @free(ptr noundef %195) #7
  %196 = load ptr, ptr %15, align 8, !tbaa !5
  store i32 6, ptr %196, align 4, !tbaa !9
  store i32 -2147483648, ptr %14, align 4
  store i32 1, ptr %33, align 4
  br label %251

197:                                              ; preds = %191
  br label %198

198:                                              ; preds = %197, %183
  %199 = load ptr, ptr %32, align 8, !tbaa !5
  %200 = getelementptr inbounds %struct.gss_ctx_id_t_desc_struct, ptr %199, i32 0, i32 4
  %201 = getelementptr inbounds [250 x i8], ptr %200, i64 0, i64 0
  %202 = load ptr, ptr %31, align 8, !tbaa !5
  %203 = call ptr @strcpy(ptr noundef %201, ptr noundef %202) #7
  %204 = load i32, ptr %20, align 4, !tbaa !9
  %205 = load ptr, ptr %32, align 8, !tbaa !5
  %206 = getelementptr inbounds %struct.gss_ctx_id_t_desc_struct, ptr %205, i32 0, i32 3
  store i32 %204, ptr %206, align 4, !tbaa !18
  br label %207

207:                                              ; preds = %198, %152
  %208 = load i32, ptr %28, align 4, !tbaa !9
  %209 = sext i32 %208 to i64
  %210 = call noalias ptr @malloc(i64 noundef %209) #10
  store ptr %210, ptr %30, align 8, !tbaa !5
  %211 = load ptr, ptr %30, align 8, !tbaa !5
  %212 = icmp ne ptr %211, null
  br i1 %212, label %216, label %213

213:                                              ; preds = %207
  %214 = load ptr, ptr %32, align 8, !tbaa !5
  call void @free(ptr noundef %214) #7
  %215 = load ptr, ptr %15, align 8, !tbaa !5
  store i32 1, ptr %215, align 4, !tbaa !9
  store i32 -2147483648, ptr %14, align 4
  store i32 1, ptr %33, align 4
  br label %251

216:                                              ; preds = %207
  %217 = load ptr, ptr %30, align 8, !tbaa !5
  %218 = load i32, ptr %28, align 4, !tbaa !9
  %219 = sext i32 %218 to i64
  %220 = load ptr, ptr %31, align 8, !tbaa !5
  %221 = load ptr, ptr %18, align 8, !tbaa !5
  %222 = load ptr, ptr %32, align 8, !tbaa !5
  %223 = getelementptr inbounds %struct.gss_ctx_id_t_desc_struct, ptr %222, i32 0, i32 0
  %224 = load i32, ptr %223, align 4, !tbaa !16
  %225 = call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef %217, i64 noundef %219, ptr noundef @.str.3, ptr noundef %220, ptr noundef %221, i32 noundef %224) #7
  store i32 %225, ptr %29, align 4, !tbaa !9
  %226 = load i32, ptr %29, align 4, !tbaa !9
  %227 = load i32, ptr %28, align 4, !tbaa !9
  %228 = icmp sge i32 %226, %227
  br i1 %228, label %229, label %233

229:                                              ; preds = %216
  %230 = load ptr, ptr %30, align 8, !tbaa !5
  call void @free(ptr noundef %230) #7
  %231 = load ptr, ptr %32, align 8, !tbaa !5
  call void @free(ptr noundef %231) #7
  %232 = load ptr, ptr %15, align 8, !tbaa !5
  store i32 1, ptr %232, align 4, !tbaa !9
  store i32 -2147483648, ptr %14, align 4
  store i32 1, ptr %33, align 4
  br label %251

233:                                              ; preds = %216
  %234 = load ptr, ptr %30, align 8, !tbaa !5
  %235 = load i32, ptr %29, align 4, !tbaa !9
  %236 = sext i32 %235 to i64
  %237 = getelementptr inbounds i8, ptr %234, i64 %236
  %238 = load i32, ptr %28, align 4, !tbaa !9
  %239 = load i32, ptr %29, align 4, !tbaa !9
  %240 = sub nsw i32 %238, %239
  %241 = sext i32 %240 to i64
  call void @llvm.memset.p0.i64(ptr align 1 %237, i8 65, i64 %241, i1 false)
  %242 = load ptr, ptr %32, align 8, !tbaa !5
  %243 = load ptr, ptr %17, align 8, !tbaa !5
  store ptr %242, ptr %243, align 8, !tbaa !5
  %244 = load ptr, ptr %30, align 8, !tbaa !5
  %245 = load ptr, ptr %25, align 8, !tbaa !5
  %246 = getelementptr inbounds %struct.gss_buffer_desc_struct, ptr %245, i32 0, i32 1
  store ptr %244, ptr %246, align 8, !tbaa !14
  %247 = load i32, ptr %28, align 4, !tbaa !9
  %248 = sext i32 %247 to i64
  %249 = load ptr, ptr %25, align 8, !tbaa !5
  %250 = getelementptr inbounds %struct.gss_buffer_desc_struct, ptr %249, i32 0, i32 0
  store i64 %248, ptr %250, align 8, !tbaa !11
  store i32 1, ptr %14, align 4
  store i32 1, ptr %33, align 4
  br label %251

251:                                              ; preds = %233, %229, %213, %194, %162, %156, %150, %145, %131, %121, %120, %93, %76, %62, %52, %41
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %31) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr %28) #7
  %252 = load i32, ptr %14, align 4
  ret i32 %252
}

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

; Function Attrs: nounwind
declare ptr @getenv(ptr noundef) #2

; Function Attrs: nounwind willreturn memory(read)
declare i64 @strlen(ptr noundef) #3

; Function Attrs: nounwind willreturn memory(read)
declare i32 @strcmp(ptr noundef, ptr noundef) #3

; Function Attrs: nounwind allocsize(0,1)
declare noalias ptr @calloc(i64 noundef, i64 noundef) #4

; Function Attrs: nounwind willreturn memory(read)
declare ptr @strstr(ptr noundef, ptr noundef) #3

; Function Attrs: nounwind
declare void @free(ptr noundef) #2

; Function Attrs: nounwind
declare ptr @strcpy(ptr noundef, ptr noundef) #2

; Function Attrs: nounwind allocsize(0)
declare noalias ptr @malloc(i64 noundef) #5

; Function Attrs: nounwind
declare i32 @snprintf(ptr noundef, i64 noundef, ptr noundef, ...) #2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #6

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

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 = { nounwind "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 willreturn memory(read) "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 #4 = { nounwind allocsize(0,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 #5 = { nounwind allocsize(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 #6 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #7 = { nounwind }
attributes #8 = { nounwind willreturn memory(read) }
attributes #9 = { nounwind allocsize(0,1) }
attributes #10 = { nounwind allocsize(0) }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"any pointer", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !13, i64 0}
!12 = !{!"gss_buffer_desc_struct", !13, i64 0, !6, i64 8}
!13 = !{!"long", !7, i64 0}
!14 = !{!12, !6, i64 8}
!15 = !{!7, !7, i64 0}
!16 = !{!17, !10, i64 0}
!17 = !{!"gss_ctx_id_t_desc_struct", !10, i64 0, !10, i64 4, !10, i64 8, !10, i64 12, !7, i64 16}
!18 = !{!17, !10, i64 12}
!19 = !{!17, !10, i64 8}
!20 = !{!17, !10, i64 4}


; 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 [20 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [10 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local range(i32 0, -2147483647) i32 @gss_init_sec_context(ptr noundef writeonly %0, ptr nocapture noundef readnone %1, ptr noundef %2, ptr noundef %3, ptr nocapture noundef readnone %4, i32 noundef %5, i32 noundef %6, ptr nocapture noundef readnone %7, ptr noundef readonly %8, ptr nocapture noundef readnone %9, ptr noundef writeonly %10, ptr noundef writeonly %11, ptr noundef writeonly %12) local_unnamed_addr #0 {
  %.not = icmp eq ptr %0, null
  br i1 %.not, label %89, label %14

14:                                               ; preds = %13
  store i32 0, ptr %0, align 4, !tbaa !5
  %15 = icmp ne ptr %2, null
  %16 = icmp ne ptr %3, null
  %or.cond = and i1 %15, %16
  %17 = icmp ne ptr %10, null
  %or.cond3 = and i1 %or.cond, %17
  br i1 %or.cond3, label %19, label %18

18:                                               ; preds = %14
  store i32 2, ptr %0, align 4, !tbaa !5
  br label %89

19:                                               ; preds = %14
  %20 = tail call ptr @getenv(ptr noundef nonnull @.str) #9
  %.not100 = icmp eq ptr %20, null
  br i1 %.not100, label %24, label %21

21:                                               ; preds = %19
  %22 = tail call i64 @strlen(ptr noundef nonnull dereferenceable(1) %20) #10
  %23 = icmp ugt i64 %22, 249
  br i1 %23, label %24, label %25

24:                                               ; preds = %21, %19
  store i32 3, ptr %0, align 4, !tbaa !5
  br label %89

25:                                               ; preds = %21
  %26 = load ptr, ptr %2, align 8, !tbaa !9
  %.not101 = icmp eq ptr %26, null
  br i1 %.not101, label %31, label %27

27:                                               ; preds = %25
  %28 = getelementptr inbounds i8, ptr %26, i64 16
  %29 = tail call i32 @strcmp(ptr noundef nonnull dereferenceable(1) %28, ptr noundef nonnull dereferenceable(1) %20) #10
  %.not102 = icmp eq i32 %29, 0
  br i1 %.not102, label %31, label %30

30:                                               ; preds = %27
  store i32 3, ptr %0, align 4, !tbaa !5
  br label %89

31:                                               ; preds = %27, %25
  %32 = getelementptr inbounds i8, ptr %10, i64 8
  %.not103 = icmp eq ptr %8, null
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %10, i8 0, i64 16, i1 false)
  br i1 %.not103, label %60, label %33

33:                                               ; preds = %31
  %34 = load i64, ptr %8, align 8, !tbaa !11
  %.not104 = icmp eq i64 %34, 0
  br i1 %.not104, label %60, label %35

35:                                               ; preds = %33
  br i1 %.not101, label %36, label %37

36:                                               ; preds = %35
  store i32 4, ptr %0, align 4, !tbaa !5
  br label %89

37:                                               ; preds = %35
  %38 = getelementptr inbounds i8, ptr %8, i64 8
  %39 = load ptr, ptr %38, align 8, !tbaa !14
  %40 = load i8, ptr %39, align 1, !tbaa !15
  switch i8 %40, label %50 [
    i8 68, label %41
    i8 67, label %51
  ]

41:                                               ; preds = %37
  %42 = load i32, ptr %26, align 4, !tbaa !16
  switch i32 %42, label %49 [
    i32 1, label %43
    i32 3, label %43
  ]

43:                                               ; preds = %41, %41
  %.not113 = icmp eq ptr %11, null
  br i1 %.not113, label %47, label %44

44:                                               ; preds = %43
  %45 = getelementptr inbounds i8, ptr %26, i64 12
  %46 = load i32, ptr %45, align 4, !tbaa !18
  store i32 %46, ptr %11, align 4, !tbaa !5
  br label %47

47:                                               ; preds = %44, %43
  %.not114 = icmp eq ptr %12, null
  br i1 %.not114, label %89, label %48

48:                                               ; preds = %47
  store i32 -1, ptr %12, align 4, !tbaa !5
  br label %89

49:                                               ; preds = %41
  store i32 5, ptr %0, align 4, !tbaa !5
  br label %89

50:                                               ; preds = %37
  store i32 5, ptr %0, align 4, !tbaa !5
  br label %89

51:                                               ; preds = %37
  %52 = load i32, ptr %26, align 4, !tbaa !16
  switch i32 %52, label %59 [
    i32 1, label %53
    i32 2, label %58
  ]

53:                                               ; preds = %51
  %54 = getelementptr inbounds i8, ptr %26, i64 8
  %55 = load i32, ptr %54, align 4, !tbaa !19
  %.not111 = icmp eq i32 %55, 0
  br i1 %.not111, label %57, label %56

56:                                               ; preds = %53
  store i32 2, ptr %26, align 4, !tbaa !16
  br label %76

57:                                               ; preds = %53
  store i32 5, ptr %0, align 4, !tbaa !5
  br label %89

58:                                               ; preds = %51
  store i32 3, ptr %26, align 4, !tbaa !16
  br label %76

59:                                               ; preds = %51
  store i32 5, ptr %0, align 4, !tbaa !5
  br label %89

60:                                               ; preds = %33, %31
  br i1 %.not101, label %62, label %61

61:                                               ; preds = %60
  store i32 4, ptr %0, align 4, !tbaa !5
  br label %89

62:                                               ; preds = %60
  %63 = tail call noalias dereferenceable_or_null(268) ptr @calloc(i64 noundef 268, i64 noundef 1) #11
  %.not105 = icmp eq ptr %63, null
  br i1 %.not105, label %64, label %65

64:                                               ; preds = %62
  store i32 1, ptr %0, align 4, !tbaa !5
  br label %89

65:                                               ; preds = %62
  %66 = tail call ptr @strstr(ptr noundef nonnull dereferenceable(1) %20, ptr noundef nonnull dereferenceable(1) @.str.1) #10
  %.not106 = icmp eq ptr %66, null
  br i1 %.not106, label %67, label %.thread116

67:                                               ; preds = %65
  %68 = tail call ptr @strstr(ptr noundef nonnull dereferenceable(1) %20, ptr noundef nonnull dereferenceable(1) @.str.2) #10
  %.not107 = icmp eq ptr %68, null
  br i1 %.not107, label %71, label %.thread118.sink.split

.thread116:                                       ; preds = %65
  %69 = getelementptr inbounds i8, ptr %63, i64 4
  store i32 1, ptr %69, align 4, !tbaa !20
  %70 = tail call ptr @strstr(ptr noundef nonnull dereferenceable(1) %20, ptr noundef nonnull dereferenceable(1) @.str.2) #10
  %.not107117 = icmp eq ptr %70, null
  br i1 %.not107117, label %.thread118, label %.thread118.sink.split

71:                                               ; preds = %67
  tail call void @free(ptr noundef nonnull %63) #9
  store i32 6, ptr %0, align 4, !tbaa !5
  br label %89

.thread118.sink.split:                            ; preds = %67, %.thread116
  %storemerge.ph = phi i32 [ 1, %.thread116 ], [ 2, %67 ]
  %72 = getelementptr inbounds i8, ptr %63, i64 8
  store i32 1, ptr %72, align 4, !tbaa !19
  br label %.thread118

.thread118:                                       ; preds = %.thread118.sink.split, %.thread116
  %storemerge = phi i32 [ 1, %.thread116 ], [ %storemerge.ph, %.thread118.sink.split ]
  store i32 %storemerge, ptr %63, align 4, !tbaa !16
  %73 = getelementptr inbounds i8, ptr %63, i64 16
  %74 = tail call ptr @strcpy(ptr noundef nonnull dereferenceable(1) %73, ptr noundef nonnull dereferenceable(1) %20) #9
  %75 = getelementptr inbounds i8, ptr %63, i64 12
  store i32 %5, ptr %75, align 4, !tbaa !18
  br label %76

76:                                               ; preds = %56, %58, %.thread118
  %77 = phi i32 [ 3, %58 ], [ 2, %56 ], [ %storemerge, %.thread118 ]
  %.0 = phi ptr [ %26, %58 ], [ %26, %56 ], [ %63, %.thread118 ]
  %78 = tail call noalias dereferenceable_or_null(187) ptr @malloc(i64 noundef 187) #12
  %.not112 = icmp eq ptr %78, null
  br i1 %.not112, label %79, label %80

79:                                               ; preds = %76
  tail call void @free(ptr noundef nonnull %.0) #9
  store i32 1, ptr %0, align 4, !tbaa !5
  br label %89

80:                                               ; preds = %76
  %81 = tail call i32 (ptr, i64, ptr, ...) @snprintf(ptr noundef nonnull dereferenceable(1) %78, i64 noundef 187, ptr noundef nonnull @.str.3, ptr noundef nonnull %20, ptr noundef nonnull %3, i32 noundef %77) #9
  %82 = icmp sgt i32 %81, 186
  br i1 %82, label %83, label %84

83:                                               ; preds = %80
  tail call void @free(ptr noundef nonnull %78) #9
  tail call void @free(ptr noundef nonnull %.0) #9
  store i32 1, ptr %0, align 4, !tbaa !5
  br label %89

84:                                               ; preds = %80
  %85 = sext i32 %81 to i64
  %86 = getelementptr inbounds i8, ptr %78, i64 %85
  %87 = sub nsw i32 187, %81
  %88 = zext nneg i32 %87 to i64
  tail call void @llvm.memset.p0.i64(ptr nonnull align 1 %86, i8 65, i64 %88, i1 false)
  store ptr %.0, ptr %2, align 8, !tbaa !9
  store ptr %78, ptr %32, align 8, !tbaa !14
  store i64 187, ptr %10, align 8, !tbaa !11
  br label %89

89:                                               ; preds = %47, %48, %13, %84, %83, %79, %71, %64, %61, %59, %57, %50, %49, %36, %30, %24, %18
  %.086 = phi i32 [ -2147483648, %24 ], [ -2147483648, %30 ], [ -2147483648, %49 ], [ -2147483648, %50 ], [ -2147483648, %59 ], [ -2147483648, %83 ], [ 1, %84 ], [ -2147483648, %79 ], [ -2147483648, %57 ], [ -2147483648, %36 ], [ -2147483648, %61 ], [ -2147483648, %71 ], [ -2147483648, %64 ], [ -2147483648, %18 ], [ -2147483648, %13 ], [ 0, %48 ], [ 0, %47 ]
  ret i32 %.086
}

; Function Attrs: nofree nounwind memory(read)
declare noundef ptr @getenv(ptr nocapture noundef) local_unnamed_addr #1

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i64 @strlen(ptr nocapture noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare i32 @strcmp(ptr nocapture noundef, ptr nocapture noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @calloc(i64 noundef, i64 noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: read)
declare ptr @strstr(ptr noundef, ptr nocapture noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite)
declare void @free(ptr allocptr nocapture noundef) local_unnamed_addr #4

; Function Attrs: mustprogress nofree nounwind willreturn memory(argmem: readwrite)
declare ptr @strcpy(ptr noalias noundef returned writeonly, ptr noalias nocapture noundef readonly) local_unnamed_addr #5

; Function Attrs: mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite)
declare noalias noundef ptr @malloc(i64 noundef) local_unnamed_addr #6

; Function Attrs: nofree nounwind
declare noundef i32 @snprintf(ptr noalias nocapture noundef writeonly, i64 noundef, ptr nocapture noundef readonly, ...) local_unnamed_addr #7

; Function Attrs: mustprogress nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #8

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 = { nofree nounwind memory(read) "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 = { mustprogress nofree nounwind willreturn memory(argmem: read) "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 = { mustprogress nofree nounwind willreturn allockind("alloc,zeroed") allocsize(0,1) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 #4 = { mustprogress nounwind willreturn allockind("free") memory(argmem: readwrite, inaccessiblemem: readwrite) "alloc-family"="malloc" "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 #5 = { mustprogress nofree nounwind willreturn memory(argmem: readwrite) "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 #6 = { mustprogress nofree nounwind willreturn allockind("alloc,uninitialized") allocsize(0) memory(inaccessiblemem: readwrite) "alloc-family"="malloc" "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 #7 = { nofree nounwind "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 #8 = { mustprogress nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #9 = { nounwind }
attributes #10 = { nounwind willreturn memory(read) }
attributes #11 = { nounwind allocsize(0,1) }
attributes #12 = { nounwind allocsize(0) }

!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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !13, i64 0}
!12 = !{!"gss_buffer_desc_struct", !13, i64 0, !10, i64 8}
!13 = !{!"long", !7, i64 0}
!14 = !{!12, !10, i64 8}
!15 = !{!7, !7, i64 0}
!16 = !{!17, !6, i64 0}
!17 = !{!"gss_ctx_id_t_desc_struct", !6, i64 0, !6, i64 4, !6, i64 8, !6, i64 12, !7, i64 16}
!18 = !{!17, !6, i64 12}
!19 = !{!17, !6, i64 8}
!20 = !{!17, !6, i64 4}


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