; LLVM IR from OpenMathLib/OpenBLAS :: lapack-netlib/LAPACKE/src (lapacke_cgeevx_work)

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

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

; Function Attrs: nounwind uwtable
define dso_local i32 @LAPACKE_cgeevx_work(i32 noundef %0, i8 noundef signext %1, i8 noundef signext %2, i8 noundef signext %3, i8 noundef signext %4, i32 noundef %5, ptr noundef %6, i32 noundef %7, ptr noundef %8, ptr noundef %9, i32 noundef %10, ptr noundef %11, i32 noundef %12, ptr noundef %13, ptr noundef %14, ptr noundef %15, ptr noundef %16, ptr noundef %17, ptr noundef %18, ptr noundef %19, i32 noundef %20, ptr noundef %21) #0 {
  %23 = alloca i32, align 4
  %24 = alloca i32, align 4
  %25 = alloca i8, align 1
  %26 = alloca i8, align 1
  %27 = alloca i8, align 1
  %28 = alloca i8, align 1
  %29 = alloca i32, align 4
  %30 = alloca ptr, align 8
  %31 = alloca i32, align 4
  %32 = alloca ptr, align 8
  %33 = alloca ptr, align 8
  %34 = alloca i32, align 4
  %35 = alloca ptr, align 8
  %36 = alloca i32, align 4
  %37 = alloca ptr, align 8
  %38 = alloca ptr, align 8
  %39 = alloca ptr, align 8
  %40 = alloca ptr, align 8
  %41 = alloca ptr, align 8
  %42 = alloca ptr, align 8
  %43 = alloca ptr, align 8
  %44 = alloca i32, align 4
  %45 = alloca ptr, align 8
  %46 = alloca i32, align 4
  %47 = alloca i32, align 4
  %48 = alloca i32, align 4
  %49 = alloca i32, align 4
  %50 = alloca ptr, align 8
  %51 = alloca ptr, align 8
  %52 = alloca ptr, align 8
  %53 = alloca i32, align 4
  store i32 %0, ptr %24, align 4, !tbaa !5
  store i8 %1, ptr %25, align 1, !tbaa !9
  store i8 %2, ptr %26, align 1, !tbaa !9
  store i8 %3, ptr %27, align 1, !tbaa !9
  store i8 %4, ptr %28, align 1, !tbaa !9
  store i32 %5, ptr %29, align 4, !tbaa !5
  store ptr %6, ptr %30, align 8, !tbaa !10
  store i32 %7, ptr %31, align 4, !tbaa !5
  store ptr %8, ptr %32, align 8, !tbaa !10
  store ptr %9, ptr %33, align 8, !tbaa !10
  store i32 %10, ptr %34, align 4, !tbaa !5
  store ptr %11, ptr %35, align 8, !tbaa !10
  store i32 %12, ptr %36, align 4, !tbaa !5
  store ptr %13, ptr %37, align 8, !tbaa !10
  store ptr %14, ptr %38, align 8, !tbaa !10
  store ptr %15, ptr %39, align 8, !tbaa !10
  store ptr %16, ptr %40, align 8, !tbaa !10
  store ptr %17, ptr %41, align 8, !tbaa !10
  store ptr %18, ptr %42, align 8, !tbaa !10
  store ptr %19, ptr %43, align 8, !tbaa !10
  store i32 %20, ptr %44, align 4, !tbaa !5
  store ptr %21, ptr %45, align 8, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 4, ptr %46) #6
  store i32 0, ptr %46, align 4, !tbaa !5
  %54 = load i32, ptr %24, align 4, !tbaa !5
  %55 = icmp eq i32 %54, 102
  br i1 %55, label %56, label %75

56:                                               ; preds = %22
  %57 = load ptr, ptr %30, align 8, !tbaa !10
  %58 = load ptr, ptr %32, align 8, !tbaa !10
  %59 = load ptr, ptr %33, align 8, !tbaa !10
  %60 = load ptr, ptr %35, align 8, !tbaa !10
  %61 = load ptr, ptr %37, align 8, !tbaa !10
  %62 = load ptr, ptr %38, align 8, !tbaa !10
  %63 = load ptr, ptr %39, align 8, !tbaa !10
  %64 = load ptr, ptr %40, align 8, !tbaa !10
  %65 = load ptr, ptr %41, align 8, !tbaa !10
  %66 = load ptr, ptr %42, align 8, !tbaa !10
  %67 = load ptr, ptr %43, align 8, !tbaa !10
  %68 = load ptr, ptr %45, align 8, !tbaa !10
  call void @cgeevx_(ptr noundef %25, ptr noundef %26, ptr noundef %27, ptr noundef %28, ptr noundef %29, ptr noundef %57, ptr noundef %31, ptr noundef %58, ptr noundef %59, ptr noundef %34, ptr noundef %60, ptr noundef %36, ptr noundef %61, ptr noundef %62, ptr noundef %63, ptr noundef %64, ptr noundef %65, ptr noundef %66, ptr noundef %67, ptr noundef %44, ptr noundef %68, ptr noundef %46, i64 noundef 1, i64 noundef 1, i64 noundef 1, i64 noundef 1)
  %69 = load i32, ptr %46, align 4, !tbaa !5
  %70 = icmp slt i32 %69, 0
  br i1 %70, label %71, label %74

71:                                               ; preds = %56
  %72 = load i32, ptr %46, align 4, !tbaa !5
  %73 = sub nsw i32 %72, 1
  store i32 %73, ptr %46, align 4, !tbaa !5
  br label %74

74:                                               ; preds = %71, %56
  br label %301

75:                                               ; preds = %22
  %76 = load i32, ptr %24, align 4, !tbaa !5
  %77 = icmp eq i32 %76, 101
  br i1 %77, label %78, label %298

78:                                               ; preds = %75
  call void @llvm.lifetime.start.p0(i64 4, ptr %47) #6
  %79 = load i32, ptr %29, align 4, !tbaa !5
  %80 = icmp sgt i32 1, %79
  br i1 %80, label %81, label %82

81:                                               ; preds = %78
  br label %84

82:                                               ; preds = %78
  %83 = load i32, ptr %29, align 4, !tbaa !5
  br label %84

84:                                               ; preds = %82, %81
  %85 = phi i32 [ 1, %81 ], [ %83, %82 ]
  store i32 %85, ptr %47, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %48) #6
  %86 = load i32, ptr %29, align 4, !tbaa !5
  %87 = icmp sgt i32 1, %86
  br i1 %87, label %88, label %89

88:                                               ; preds = %84
  br label %91

89:                                               ; preds = %84
  %90 = load i32, ptr %29, align 4, !tbaa !5
  br label %91

91:                                               ; preds = %89, %88
  %92 = phi i32 [ 1, %88 ], [ %90, %89 ]
  store i32 %92, ptr %48, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %49) #6
  %93 = load i32, ptr %29, align 4, !tbaa !5
  %94 = icmp sgt i32 1, %93
  br i1 %94, label %95, label %96

95:                                               ; preds = %91
  br label %98

96:                                               ; preds = %91
  %97 = load i32, ptr %29, align 4, !tbaa !5
  br label %98

98:                                               ; preds = %96, %95
  %99 = phi i32 [ 1, %95 ], [ %97, %96 ]
  store i32 %99, ptr %49, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %50) #6
  store ptr null, ptr %50, align 8, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 8, ptr %51) #6
  store ptr null, ptr %51, align 8, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 8, ptr %52) #6
  store ptr null, ptr %52, align 8, !tbaa !10
  %100 = load i32, ptr %31, align 4, !tbaa !5
  %101 = load i32, ptr %29, align 4, !tbaa !5
  %102 = icmp slt i32 %100, %101
  br i1 %102, label %103, label %106

103:                                              ; preds = %98
  store i32 -8, ptr %46, align 4, !tbaa !5
  %104 = load i32, ptr %46, align 4, !tbaa !5
  call void @LAPACKE_xerbla(ptr noundef @.str, i32 noundef %104)
  %105 = load i32, ptr %46, align 4, !tbaa !5
  store i32 %105, ptr %23, align 4
  store i32 1, ptr %53, align 4
  br label %295

106:                                              ; preds = %98
  %107 = load i32, ptr %34, align 4, !tbaa !5
  %108 = icmp slt i32 %107, 1
  br i1 %108, label %117, label %109

109:                                              ; preds = %106
  %110 = load i8, ptr %26, align 1, !tbaa !9
  %111 = call i32 @LAPACKE_lsame(i8 noundef signext %110, i8 noundef signext 118) #7
  %112 = icmp ne i32 %111, 0
  br i1 %112, label %113, label %120

113:                                              ; preds = %109
  %114 = load i32, ptr %34, align 4, !tbaa !5
  %115 = load i32, ptr %29, align 4, !tbaa !5
  %116 = icmp slt i32 %114, %115
  br i1 %116, label %117, label %120

117:                                              ; preds = %113, %106
  store i32 -11, ptr %46, align 4, !tbaa !5
  %118 = load i32, ptr %46, align 4, !tbaa !5
  call void @LAPACKE_xerbla(ptr noundef @.str, i32 noundef %118)
  %119 = load i32, ptr %46, align 4, !tbaa !5
  store i32 %119, ptr %23, align 4
  store i32 1, ptr %53, align 4
  br label %295

120:                                              ; preds = %113, %109
  %121 = load i32, ptr %36, align 4, !tbaa !5
  %122 = icmp slt i32 %121, 1
  br i1 %122, label %131, label %123

123:                                              ; preds = %120
  %124 = load i8, ptr %27, align 1, !tbaa !9
  %125 = call i32 @LAPACKE_lsame(i8 noundef signext %124, i8 noundef signext 118) #7
  %126 = icmp ne i32 %125, 0
  br i1 %126, label %127, label %134

127:                                              ; preds = %123
  %128 = load i32, ptr %36, align 4, !tbaa !5
  %129 = load i32, ptr %29, align 4, !tbaa !5
  %130 = icmp slt i32 %128, %129
  br i1 %130, label %131, label %134

131:                                              ; preds = %127, %120
  store i32 -13, ptr %46, align 4, !tbaa !5
  %132 = load i32, ptr %46, align 4, !tbaa !5
  call void @LAPACKE_xerbla(ptr noundef @.str, i32 noundef %132)
  %133 = load i32, ptr %46, align 4, !tbaa !5
  store i32 %133, ptr %23, align 4
  store i32 1, ptr %53, align 4
  br label %295

134:                                              ; preds = %127, %123
  %135 = load i32, ptr %44, align 4, !tbaa !5
  %136 = icmp eq i32 %135, -1
  br i1 %136, label %137, label %159

137:                                              ; preds = %134
  %138 = load ptr, ptr %30, align 8, !tbaa !10
  %139 = load ptr, ptr %32, align 8, !tbaa !10
  %140 = load ptr, ptr %33, align 8, !tbaa !10
  %141 = load ptr, ptr %35, align 8, !tbaa !10
  %142 = load ptr, ptr %37, align 8, !tbaa !10
  %143 = load ptr, ptr %38, align 8, !tbaa !10
  %144 = load ptr, ptr %39, align 8, !tbaa !10
  %145 = load ptr, ptr %40, align 8, !tbaa !10
  %146 = load ptr, ptr %41, align 8, !tbaa !10
  %147 = load ptr, ptr %42, align 8, !tbaa !10
  %148 = load ptr, ptr %43, align 8, !tbaa !10
  %149 = load ptr, ptr %45, align 8, !tbaa !10
  call void @cgeevx_(ptr noundef %25, ptr noundef %26, ptr noundef %27, ptr noundef %28, ptr noundef %29, ptr noundef %138, ptr noundef %47, ptr noundef %139, ptr noundef %140, ptr noundef %48, ptr noundef %141, ptr noundef %49, ptr noundef %142, ptr noundef %143, ptr noundef %144, ptr noundef %145, ptr noundef %146, ptr noundef %147, ptr noundef %148, ptr noundef %44, ptr noundef %149, ptr noundef %46, i64 noundef 1, i64 noundef 1, i64 noundef 1, i64 noundef 1)
  %150 = load i32, ptr %46, align 4, !tbaa !5
  %151 = icmp slt i32 %150, 0
  br i1 %151, label %152, label %155

152:                                              ; preds = %137
  %153 = load i32, ptr %46, align 4, !tbaa !5
  %154 = sub nsw i32 %153, 1
  br label %157

155:                                              ; preds = %137
  %156 = load i32, ptr %46, align 4, !tbaa !5
  br label %157

157:                                              ; preds = %155, %152
  %158 = phi i32 [ %154, %152 ], [ %156, %155 ]
  store i32 %158, ptr %23, align 4
  store i32 1, ptr %53, align 4
  br label %295

159:                                              ; preds = %134
  %160 = load i32, ptr %47, align 4, !tbaa !5
  %161 = sext i32 %160 to i64
  %162 = mul i64 8, %161
  %163 = load i32, ptr %29, align 4, !tbaa !5
  %164 = icmp sgt i32 1, %163
  br i1 %164, label %165, label %166

165:                                              ; preds = %159
  br label %168

166:                                              ; preds = %159
  %167 = load i32, ptr %29, align 4, !tbaa !5
  br label %168

168:                                              ; preds = %166, %165
  %169 = phi i32 [ 1, %165 ], [ %167, %166 ]
  %170 = sext i32 %169 to i64
  %171 = mul i64 %162, %170
  %172 = call noalias ptr @malloc(i64 noundef %171) #8
  store ptr %172, ptr %50, align 8, !tbaa !10
  %173 = load ptr, ptr %50, align 8, !tbaa !10
  %174 = icmp eq ptr %173, null
  br i1 %174, label %175, label %176

175:                                              ; preds = %168
  store i32 -1011, ptr %46, align 4, !tbaa !5
  br label %289

176:                                              ; preds = %168
  %177 = load i8, ptr %26, align 1, !tbaa !9
  %178 = call i32 @LAPACKE_lsame(i8 noundef signext %177, i8 noundef signext 118) #7
  %179 = icmp ne i32 %178, 0
  br i1 %179, label %180, label %198

180:                                              ; preds = %176
  %181 = load i32, ptr %48, align 4, !tbaa !5
  %182 = sext i32 %181 to i64
  %183 = mul i64 8, %182
  %184 = load i32, ptr %29, align 4, !tbaa !5
  %185 = icmp sgt i32 1, %184
  br i1 %185, label %186, label %187

186:                                              ; preds = %180
  br label %189

187:                                              ; preds = %180
  %188 = load i32, ptr %29, align 4, !tbaa !5
  br label %189

189:                                              ; preds = %187, %186
  %190 = phi i32 [ 1, %186 ], [ %188, %187 ]
  %191 = sext i32 %190 to i64
  %192 = mul i64 %183, %191
  %193 = call noalias ptr @malloc(i64 noundef %192) #8
  store ptr %193, ptr %51, align 8, !tbaa !10
  %194 = load ptr, ptr %51, align 8, !tbaa !10
  %195 = icmp eq ptr %194, null
  br i1 %195, label %196, label %197

196:                                              ; preds = %189
  store i32 -1011, ptr %46, align 4, !tbaa !5
  br label %287

197:                                              ; preds = %189
  br label %198

198:                                              ; preds = %197, %176
  %199 = load i8, ptr %27, align 1, !tbaa !9
  %200 = call i32 @LAPACKE_lsame(i8 noundef signext %199, i8 noundef signext 118) #7
  %201 = icmp ne i32 %200, 0
  br i1 %201, label %202, label %220

202:                                              ; preds = %198
  %203 = load i32, ptr %49, align 4, !tbaa !5
  %204 = sext i32 %203 to i64
  %205 = mul i64 8, %204
  %206 = load i32, ptr %29, align 4, !tbaa !5
  %207 = icmp sgt i32 1, %206
  br i1 %207, label %208, label %209

208:                                              ; preds = %202
  br label %211

209:                                              ; preds = %202
  %210 = load i32, ptr %29, align 4, !tbaa !5
  br label %211

211:                                              ; preds = %209, %208
  %212 = phi i32 [ 1, %208 ], [ %210, %209 ]
  %213 = sext i32 %212 to i64
  %214 = mul i64 %205, %213
  %215 = call noalias ptr @malloc(i64 noundef %214) #8
  store ptr %215, ptr %52, align 8, !tbaa !10
  %216 = load ptr, ptr %52, align 8, !tbaa !10
  %217 = icmp eq ptr %216, null
  br i1 %217, label %218, label %219

218:                                              ; preds = %211
  store i32 -1011, ptr %46, align 4, !tbaa !5
  br label %280

219:                                              ; preds = %211
  br label %220

220:                                              ; preds = %219, %198
  %221 = load i32, ptr %24, align 4, !tbaa !5
  %222 = load i32, ptr %29, align 4, !tbaa !5
  %223 = load i32, ptr %29, align 4, !tbaa !5
  %224 = load ptr, ptr %30, align 8, !tbaa !10
  %225 = load i32, ptr %31, align 4, !tbaa !5
  %226 = load ptr, ptr %50, align 8, !tbaa !10
  %227 = load i32, ptr %47, align 4, !tbaa !5
  call void @LAPACKE_cge_trans(i32 noundef %221, i32 noundef %222, i32 noundef %223, ptr noundef %224, i32 noundef %225, ptr noundef %226, i32 noundef %227)
  %228 = load ptr, ptr %50, align 8, !tbaa !10
  %229 = load ptr, ptr %32, align 8, !tbaa !10
  %230 = load ptr, ptr %51, align 8, !tbaa !10
  %231 = load ptr, ptr %52, align 8, !tbaa !10
  %232 = load ptr, ptr %37, align 8, !tbaa !10
  %233 = load ptr, ptr %38, align 8, !tbaa !10
  %234 = load ptr, ptr %39, align 8, !tbaa !10
  %235 = load ptr, ptr %40, align 8, !tbaa !10
  %236 = load ptr, ptr %41, align 8, !tbaa !10
  %237 = load ptr, ptr %42, align 8, !tbaa !10
  %238 = load ptr, ptr %43, align 8, !tbaa !10
  %239 = load ptr, ptr %45, align 8, !tbaa !10
  call void @cgeevx_(ptr noundef %25, ptr noundef %26, ptr noundef %27, ptr noundef %28, ptr noundef %29, ptr noundef %228, ptr noundef %47, ptr noundef %229, ptr noundef %230, ptr noundef %48, ptr noundef %231, ptr noundef %49, ptr noundef %232, ptr noundef %233, ptr noundef %234, ptr noundef %235, ptr noundef %236, ptr noundef %237, ptr noundef %238, ptr noundef %44, ptr noundef %239, ptr noundef %46, i64 noundef 1, i64 noundef 1, i64 noundef 1, i64 noundef 1)
  %240 = load i32, ptr %46, align 4, !tbaa !5
  %241 = icmp slt i32 %240, 0
  br i1 %241, label %242, label %245

242:                                              ; preds = %220
  %243 = load i32, ptr %46, align 4, !tbaa !5
  %244 = sub nsw i32 %243, 1
  store i32 %244, ptr %46, align 4, !tbaa !5
  br label %245

245:                                              ; preds = %242, %220
  %246 = load i32, ptr %29, align 4, !tbaa !5
  %247 = load i32, ptr %29, align 4, !tbaa !5
  %248 = load ptr, ptr %50, align 8, !tbaa !10
  %249 = load i32, ptr %47, align 4, !tbaa !5
  %250 = load ptr, ptr %30, align 8, !tbaa !10
  %251 = load i32, ptr %31, align 4, !tbaa !5
  call void @LAPACKE_cge_trans(i32 noundef 102, i32 noundef %246, i32 noundef %247, ptr noundef %248, i32 noundef %249, ptr noundef %250, i32 noundef %251)
  %252 = load i8, ptr %26, align 1, !tbaa !9
  %253 = call i32 @LAPACKE_lsame(i8 noundef signext %252, i8 noundef signext 118) #7
  %254 = icmp ne i32 %253, 0
  br i1 %254, label %255, label %262

255:                                              ; preds = %245
  %256 = load i32, ptr %29, align 4, !tbaa !5
  %257 = load i32, ptr %29, align 4, !tbaa !5
  %258 = load ptr, ptr %51, align 8, !tbaa !10
  %259 = load i32, ptr %48, align 4, !tbaa !5
  %260 = load ptr, ptr %33, align 8, !tbaa !10
  %261 = load i32, ptr %34, align 4, !tbaa !5
  call void @LAPACKE_cge_trans(i32 noundef 102, i32 noundef %256, i32 noundef %257, ptr noundef %258, i32 noundef %259, ptr noundef %260, i32 noundef %261)
  br label %262

262:                                              ; preds = %255, %245
  %263 = load i8, ptr %27, align 1, !tbaa !9
  %264 = call i32 @LAPACKE_lsame(i8 noundef signext %263, i8 noundef signext 118) #7
  %265 = icmp ne i32 %264, 0
  br i1 %265, label %266, label %273

266:                                              ; preds = %262
  %267 = load i32, ptr %29, align 4, !tbaa !5
  %268 = load i32, ptr %29, align 4, !tbaa !5
  %269 = load ptr, ptr %52, align 8, !tbaa !10
  %270 = load i32, ptr %49, align 4, !tbaa !5
  %271 = load ptr, ptr %35, align 8, !tbaa !10
  %272 = load i32, ptr %36, align 4, !tbaa !5
  call void @LAPACKE_cge_trans(i32 noundef 102, i32 noundef %267, i32 noundef %268, ptr noundef %269, i32 noundef %270, ptr noundef %271, i32 noundef %272)
  br label %273

273:                                              ; preds = %266, %262
  %274 = load i8, ptr %27, align 1, !tbaa !9
  %275 = call i32 @LAPACKE_lsame(i8 noundef signext %274, i8 noundef signext 118) #7
  %276 = icmp ne i32 %275, 0
  br i1 %276, label %277, label %279

277:                                              ; preds = %273
  %278 = load ptr, ptr %52, align 8, !tbaa !10
  call void @free(ptr noundef %278) #6
  br label %279

279:                                              ; preds = %277, %273
  br label %280

280:                                              ; preds = %279, %218
  %281 = load i8, ptr %26, align 1, !tbaa !9
  %282 = call i32 @LAPACKE_lsame(i8 noundef signext %281, i8 noundef signext 118) #7
  %283 = icmp ne i32 %282, 0
  br i1 %283, label %284, label %286

284:                                              ; preds = %280
  %285 = load ptr, ptr %51, align 8, !tbaa !10
  call void @free(ptr noundef %285) #6
  br label %286

286:                                              ; preds = %284, %280
  br label %287

287:                                              ; preds = %286, %196
  %288 = load ptr, ptr %50, align 8, !tbaa !10
  call void @free(ptr noundef %288) #6
  br label %289

289:                                              ; preds = %287, %175
  %290 = load i32, ptr %46, align 4, !tbaa !5
  %291 = icmp eq i32 %290, -1011
  br i1 %291, label %292, label %294

292:                                              ; preds = %289
  %293 = load i32, ptr %46, align 4, !tbaa !5
  call void @LAPACKE_xerbla(ptr noundef @.str, i32 noundef %293)
  br label %294

294:                                              ; preds = %292, %289
  store i32 0, ptr %53, align 4
  br label %295

295:                                              ; preds = %294, %157, %131, %117, %103
  call void @llvm.lifetime.end.p0(i64 8, ptr %52) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %51) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %50) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %49) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %48) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %47) #6
  %296 = load i32, ptr %53, align 4
  switch i32 %296, label %303 [
    i32 0, label %297
  ]

297:                                              ; preds = %295
  br label %300

298:                                              ; preds = %75
  store i32 -1, ptr %46, align 4, !tbaa !5
  %299 = load i32, ptr %46, align 4, !tbaa !5
  call void @LAPACKE_xerbla(ptr noundef @.str, i32 noundef %299)
  br label %300

300:                                              ; preds = %298, %297
  br label %301

301:                                              ; preds = %300, %74
  %302 = load i32, ptr %46, align 4, !tbaa !5
  store i32 %302, ptr %23, align 4
  store i32 1, ptr %53, align 4
  br label %303

303:                                              ; preds = %301, %295
  call void @llvm.lifetime.end.p0(i64 4, ptr %46) #6
  %304 = load i32, ptr %23, align 4
  ret i32 %304
}

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

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

declare void @LAPACKE_xerbla(ptr noundef, i32 noundef) #2

; Function Attrs: nounwind willreturn memory(none)
declare i32 @LAPACKE_lsame(i8 noundef signext, i8 noundef signext) #3

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

declare void @LAPACKE_cge_trans(i32 noundef, i32 noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef) #2

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

; 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 = { "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(none) "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) "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 "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 = { nounwind }
attributes #7 = { nounwind willreturn memory(none) }
attributes #8 = { 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 = !{!7, !7, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"any pointer", !7, i64 0}


; 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

; Function Attrs: nounwind uwtable
define dso_local i32 @LAPACKE_cgeevx_work(i32 noundef %0, i8 noundef signext %1, i8 noundef signext %2, i8 noundef signext %3, i8 noundef signext %4, i32 noundef %5, ptr noundef %6, i32 noundef %7, ptr noundef %8, ptr noundef %9, i32 noundef %10, ptr noundef %11, i32 noundef %12, ptr noundef %13, ptr noundef %14, ptr noundef %15, ptr noundef %16, ptr noundef %17, ptr noundef %18, ptr noundef %19, i32 noundef %20, ptr noundef %21) local_unnamed_addr #0 {
  %23 = alloca i8, align 1
  %24 = alloca i8, align 1
  %25 = alloca i8, align 1
  %26 = alloca i8, align 1
  %27 = alloca i32, align 4
  %28 = alloca i32, align 4
  %29 = alloca i32, align 4
  %30 = alloca i32, align 4
  %31 = alloca i32, align 4
  %32 = alloca i32, align 4
  %33 = alloca i32, align 4
  %34 = alloca i32, align 4
  %35 = alloca i32, align 4
  store i8 %1, ptr %23, align 1, !tbaa !5
  store i8 %2, ptr %24, align 1, !tbaa !5
  store i8 %3, ptr %25, align 1, !tbaa !5
  store i8 %4, ptr %26, align 1, !tbaa !5
  store i32 %5, ptr %27, align 4, !tbaa !8
  store i32 %7, ptr %28, align 4, !tbaa !8
  store i32 %10, ptr %29, align 4, !tbaa !8
  store i32 %12, ptr %30, align 4, !tbaa !8
  store i32 %20, ptr %31, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %32) #7
  store i32 0, ptr %32, align 4, !tbaa !8
  switch i32 %0, label %102 [
    i32 102, label %36
    i32 101, label %38
  ]

36:                                               ; preds = %22
  call void @cgeevx_(ptr noundef nonnull %23, ptr noundef nonnull %24, ptr noundef nonnull %25, ptr noundef nonnull %26, ptr noundef nonnull %27, ptr noundef %6, ptr noundef nonnull %28, ptr noundef %8, ptr noundef %9, ptr noundef nonnull %29, ptr noundef %11, ptr noundef nonnull %30, ptr noundef %13, ptr noundef %14, ptr noundef %15, ptr noundef %16, ptr noundef %17, ptr noundef %18, ptr noundef %19, ptr noundef nonnull %31, ptr noundef %21, ptr noundef nonnull %32, i64 noundef 1, i64 noundef 1, i64 noundef 1, i64 noundef 1) #7
  %37 = load i32, ptr %32, align 4, !tbaa !8
  %.lobit86 = ashr i32 %37, 31
  %spec.select = add nsw i32 %37, %.lobit86
  br label %103

38:                                               ; preds = %22
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %33) #7
  %39 = tail call i32 @llvm.smax.i32(i32 %5, i32 1)
  store i32 %39, ptr %33, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %34) #7
  store i32 %39, ptr %34, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %35) #7
  store i32 %39, ptr %35, align 4, !tbaa !8
  %40 = icmp slt i32 %7, %5
  br i1 %40, label %41, label %42

41:                                               ; preds = %38
  tail call void @LAPACKE_xerbla(ptr noundef nonnull @.str, i32 noundef -8) #7
  br label %.thread78

42:                                               ; preds = %38
  %43 = icmp slt i32 %10, 1
  br i1 %43, label %47, label %44

44:                                               ; preds = %42
  %45 = tail call i32 @LAPACKE_lsame(i8 noundef signext %2, i8 noundef signext 118) #8
  %.not = icmp ne i32 %45, 0
  %46 = icmp slt i32 %10, %5
  %or.cond = and i1 %46, %.not
  br i1 %or.cond, label %47, label %48

47:                                               ; preds = %44, %42
  tail call void @LAPACKE_xerbla(ptr noundef nonnull @.str, i32 noundef -11) #7
  br label %.thread78

48:                                               ; preds = %44
  %49 = icmp slt i32 %12, 1
  br i1 %49, label %53, label %50

50:                                               ; preds = %48
  %51 = tail call i32 @LAPACKE_lsame(i8 noundef signext %3, i8 noundef signext 118) #8
  %.not67 = icmp ne i32 %51, 0
  %52 = icmp slt i32 %12, %5
  %or.cond75 = and i1 %52, %.not67
  br i1 %or.cond75, label %53, label %54

53:                                               ; preds = %50, %48
  tail call void @LAPACKE_xerbla(ptr noundef nonnull @.str, i32 noundef -13) #7
  br label %.thread78

54:                                               ; preds = %50
  %55 = icmp eq i32 %20, -1
  br i1 %55, label %56, label %59

56:                                               ; preds = %54
  call void @cgeevx_(ptr noundef nonnull %23, ptr noundef nonnull %24, ptr noundef nonnull %25, ptr noundef nonnull %26, ptr noundef nonnull %27, ptr noundef %6, ptr noundef nonnull %33, ptr noundef %8, ptr noundef %9, ptr noundef nonnull %34, ptr noundef %11, ptr noundef nonnull %35, ptr noundef %13, ptr noundef %14, ptr noundef %15, ptr noundef %16, ptr noundef %17, ptr noundef %18, ptr noundef %19, ptr noundef nonnull %31, ptr noundef %21, ptr noundef nonnull %32, i64 noundef 1, i64 noundef 1, i64 noundef 1, i64 noundef 1) #7
  %57 = load i32, ptr %32, align 4
  %.lobit = ashr i32 %57, 31
  %58 = add nsw i32 %.lobit, %57
  br label %.thread78

59:                                               ; preds = %54
  %60 = zext nneg i32 %39 to i64
  %61 = shl nuw nsw i64 %60, 3
  %62 = mul i64 %61, %60
  %63 = tail call noalias ptr @malloc(i64 noundef %62) #9
  %64 = icmp eq ptr %63, null
  br i1 %64, label %.thread, label %65

.thread:                                          ; preds = %59
  store i32 -1011, ptr %32, align 4, !tbaa !8
  br label %100

65:                                               ; preds = %59
  %.not68 = icmp eq i32 %45, 0
  br i1 %.not68, label %69, label %66

66:                                               ; preds = %65
  %67 = tail call noalias ptr @malloc(i64 noundef %62) #9
  %68 = icmp eq ptr %67, null
  br i1 %68, label %.thread76, label %69

.thread76:                                        ; preds = %66
  store i32 -1011, ptr %32, align 4, !tbaa !8
  tail call void @free(ptr noundef nonnull %63) #7
  br label %100

69:                                               ; preds = %66, %65
  %.055 = phi ptr [ %67, %66 ], [ null, %65 ]
  %.not69 = icmp eq i32 %51, 0
  br i1 %.not69, label %74, label %70

70:                                               ; preds = %69
  %71 = tail call noalias ptr @malloc(i64 noundef %62) #9
  %72 = icmp eq ptr %71, null
  br i1 %72, label %73, label %74

73:                                               ; preds = %70
  store i32 -1011, ptr %32, align 4, !tbaa !8
  br label %.thread84

74:                                               ; preds = %70, %69
  %.054 = phi ptr [ %71, %70 ], [ null, %69 ]
  tail call void @LAPACKE_cge_trans(i32 noundef 101, i32 noundef %5, i32 noundef %5, ptr noundef %6, i32 noundef %7, ptr noundef nonnull %63, i32 noundef %39) #7
  call void @cgeevx_(ptr noundef nonnull %23, ptr noundef nonnull %24, ptr noundef nonnull %25, ptr noundef nonnull %26, ptr noundef nonnull %27, ptr noundef nonnull %63, ptr noundef nonnull %33, ptr noundef %8, ptr noundef %.055, ptr noundef nonnull %34, ptr noundef %.054, ptr noundef nonnull %35, ptr noundef %13, ptr noundef %14, ptr noundef %15, ptr noundef %16, ptr noundef %17, ptr noundef %18, ptr noundef %19, ptr noundef nonnull %31, ptr noundef %21, ptr noundef nonnull %32, i64 noundef 1, i64 noundef 1, i64 noundef 1, i64 noundef 1) #7
  %75 = load i32, ptr %32, align 4, !tbaa !8
  %76 = icmp slt i32 %75, 0
  br i1 %76, label %77, label %79

77:                                               ; preds = %74
  %78 = add nsw i32 %75, -1
  store i32 %78, ptr %32, align 4, !tbaa !8
  br label %79

79:                                               ; preds = %77, %74
  %80 = load i32, ptr %27, align 4, !tbaa !8
  %81 = load i32, ptr %33, align 4, !tbaa !8
  call void @LAPACKE_cge_trans(i32 noundef 102, i32 noundef %80, i32 noundef %80, ptr noundef nonnull %63, i32 noundef %81, ptr noundef %6, i32 noundef %7) #7
  %82 = load i8, ptr %24, align 1, !tbaa !5
  %83 = call i32 @LAPACKE_lsame(i8 noundef signext %82, i8 noundef signext 118) #8
  %.not70 = icmp eq i32 %83, 0
  br i1 %.not70, label %87, label %84

84:                                               ; preds = %79
  %85 = load i32, ptr %27, align 4, !tbaa !8
  %86 = load i32, ptr %34, align 4, !tbaa !8
  call void @LAPACKE_cge_trans(i32 noundef 102, i32 noundef %85, i32 noundef %85, ptr noundef %.055, i32 noundef %86, ptr noundef %9, i32 noundef %10) #7
  br label %87

87:                                               ; preds = %84, %79
  %88 = load i8, ptr %25, align 1, !tbaa !5
  %89 = call i32 @LAPACKE_lsame(i8 noundef signext %88, i8 noundef signext 118) #8
  %.not71 = icmp eq i32 %89, 0
  br i1 %.not71, label %.thread84, label %90

90:                                               ; preds = %87
  %91 = load i32, ptr %27, align 4, !tbaa !8
  %92 = load i32, ptr %35, align 4, !tbaa !8
  call void @LAPACKE_cge_trans(i32 noundef 102, i32 noundef %91, i32 noundef %91, ptr noundef %.054, i32 noundef %92, ptr noundef %11, i32 noundef %12) #7
  %.pre = load i8, ptr %25, align 1, !tbaa !5
  %.pre83 = call i32 @LAPACKE_lsame(i8 noundef signext %.pre, i8 noundef signext 118) #8
  %93 = icmp eq i32 %.pre83, 0
  br i1 %93, label %.thread84, label %94

94:                                               ; preds = %90
  call void @free(ptr noundef %.054) #7
  br label %.thread84

.thread84:                                        ; preds = %87, %90, %94, %73
  %95 = load i8, ptr %24, align 1, !tbaa !5
  %96 = call i32 @LAPACKE_lsame(i8 noundef signext %95, i8 noundef signext 118) #8
  %.not73 = icmp eq i32 %96, 0
  br i1 %.not73, label %98, label %97

97:                                               ; preds = %.thread84
  call void @free(ptr noundef %.055) #7
  br label %98

98:                                               ; preds = %97, %.thread84
  %.pr.pr = load i32, ptr %32, align 4, !tbaa !8
  call void @free(ptr noundef nonnull %63) #7
  %99 = icmp eq i32 %.pr.pr, -1011
  br i1 %99, label %100, label %101

100:                                              ; preds = %.thread76, %.thread, %98
  call void @LAPACKE_xerbla(ptr noundef nonnull @.str, i32 noundef -1011) #7
  %.pre81.pre = load i32, ptr %32, align 4, !tbaa !8
  br label %101

.thread78:                                        ; preds = %41, %47, %53, %56
  %.056.ph = phi i32 [ %58, %56 ], [ -13, %53 ], [ -11, %47 ], [ -8, %41 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %35) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %34) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %33) #7
  br label %103

101:                                              ; preds = %98, %100
  %.pre81 = phi i32 [ %.pr.pr, %98 ], [ %.pre81.pre, %100 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %35) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %34) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %33) #7
  br label %103

102:                                              ; preds = %22
  tail call void @LAPACKE_xerbla(ptr noundef nonnull @.str, i32 noundef -1) #7
  br label %103

103:                                              ; preds = %36, %102, %101, %.thread78
  %.1 = phi i32 [ %.056.ph, %.thread78 ], [ %.pre81, %101 ], [ -1, %102 ], [ %spec.select, %36 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %32) #7
  ret i32 %.1
}

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

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

declare void @LAPACKE_xerbla(ptr noundef, i32 noundef) local_unnamed_addr #2

; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none)
declare i32 @LAPACKE_lsame(i8 noundef signext, i8 noundef signext) local_unnamed_addr #3

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

declare void @LAPACKE_cge_trans(i32 noundef, i32 noundef, i32 noundef, ptr noundef, i32 noundef, ptr noundef, i32 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 #5

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.smax.i32(i32, i32) #6

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { mustprogress nofree nosync nounwind willreturn memory(none) "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 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 #5 = { 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 #6 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #7 = { nounwind }
attributes #8 = { nounwind willreturn memory(none) }
attributes #9 = { 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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C/C++ TBAA"}
!8 = !{!9, !9, i64 0}
!9 = !{!"int", !6, i64 0}


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