; LLVM IR from OpenMathLib/OpenBLAS :: lapack-netlib/LAPACKE/src (lapacke_dgeevx_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_dgeevx_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, ptr noundef %10, i32 noundef %11, ptr noundef %12, i32 noundef %13, ptr noundef %14, ptr noundef %15, ptr noundef %16, ptr noundef %17, ptr noundef %18, ptr noundef %19, ptr noundef %20, i32 noundef %21, ptr noundef %22) #0 {
  %24 = alloca i32, align 4
  %25 = alloca i32, align 4
  %26 = alloca i8, align 1
  %27 = alloca i8, align 1
  %28 = alloca i8, align 1
  %29 = alloca i8, align 1
  %30 = alloca i32, align 4
  %31 = alloca ptr, align 8
  %32 = alloca i32, align 4
  %33 = alloca ptr, align 8
  %34 = alloca ptr, align 8
  %35 = alloca ptr, align 8
  %36 = alloca i32, align 4
  %37 = alloca ptr, align 8
  %38 = alloca i32, align 4
  %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 ptr, align 8
  %45 = alloca ptr, align 8
  %46 = alloca i32, align 4
  %47 = alloca ptr, align 8
  %48 = alloca i32, align 4
  %49 = alloca i32, align 4
  %50 = alloca i32, align 4
  %51 = alloca i32, align 4
  %52 = alloca ptr, align 8
  %53 = alloca ptr, align 8
  %54 = alloca ptr, align 8
  %55 = alloca i32, align 4
  store i32 %0, ptr %25, align 4, !tbaa !5
  store i8 %1, ptr %26, align 1, !tbaa !9
  store i8 %2, ptr %27, align 1, !tbaa !9
  store i8 %3, ptr %28, align 1, !tbaa !9
  store i8 %4, ptr %29, align 1, !tbaa !9
  store i32 %5, ptr %30, align 4, !tbaa !5
  store ptr %6, ptr %31, align 8, !tbaa !10
  store i32 %7, ptr %32, align 4, !tbaa !5
  store ptr %8, ptr %33, align 8, !tbaa !10
  store ptr %9, ptr %34, align 8, !tbaa !10
  store ptr %10, ptr %35, align 8, !tbaa !10
  store i32 %11, ptr %36, align 4, !tbaa !5
  store ptr %12, ptr %37, align 8, !tbaa !10
  store i32 %13, ptr %38, align 4, !tbaa !5
  store ptr %14, ptr %39, align 8, !tbaa !10
  store ptr %15, ptr %40, align 8, !tbaa !10
  store ptr %16, ptr %41, align 8, !tbaa !10
  store ptr %17, ptr %42, align 8, !tbaa !10
  store ptr %18, ptr %43, align 8, !tbaa !10
  store ptr %19, ptr %44, align 8, !tbaa !10
  store ptr %20, ptr %45, align 8, !tbaa !10
  store i32 %21, ptr %46, align 4, !tbaa !5
  store ptr %22, ptr %47, align 8, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 4, ptr %48) #6
  store i32 0, ptr %48, align 4, !tbaa !5
  %56 = load i32, ptr %25, align 4, !tbaa !5
  %57 = icmp eq i32 %56, 102
  br i1 %57, label %58, label %78

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

74:                                               ; preds = %58
  %75 = load i32, ptr %48, align 4, !tbaa !5
  %76 = sub nsw i32 %75, 1
  store i32 %76, ptr %48, align 4, !tbaa !5
  br label %77

77:                                               ; preds = %74, %58
  br label %306

78:                                               ; preds = %23
  %79 = load i32, ptr %25, align 4, !tbaa !5
  %80 = icmp eq i32 %79, 101
  br i1 %80, label %81, label %303

81:                                               ; preds = %78
  call void @llvm.lifetime.start.p0(i64 4, ptr %49) #6
  %82 = load i32, ptr %30, align 4, !tbaa !5
  %83 = icmp sgt i32 1, %82
  br i1 %83, label %84, label %85

84:                                               ; preds = %81
  br label %87

85:                                               ; preds = %81
  %86 = load i32, ptr %30, align 4, !tbaa !5
  br label %87

87:                                               ; preds = %85, %84
  %88 = phi i32 [ 1, %84 ], [ %86, %85 ]
  store i32 %88, ptr %49, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %50) #6
  %89 = load i32, ptr %30, align 4, !tbaa !5
  %90 = icmp sgt i32 1, %89
  br i1 %90, label %91, label %92

91:                                               ; preds = %87
  br label %94

92:                                               ; preds = %87
  %93 = load i32, ptr %30, align 4, !tbaa !5
  br label %94

94:                                               ; preds = %92, %91
  %95 = phi i32 [ 1, %91 ], [ %93, %92 ]
  store i32 %95, ptr %50, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %51) #6
  %96 = load i32, ptr %30, align 4, !tbaa !5
  %97 = icmp sgt i32 1, %96
  br i1 %97, label %98, label %99

98:                                               ; preds = %94
  br label %101

99:                                               ; preds = %94
  %100 = load i32, ptr %30, align 4, !tbaa !5
  br label %101

101:                                              ; preds = %99, %98
  %102 = phi i32 [ 1, %98 ], [ %100, %99 ]
  store i32 %102, ptr %51, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %52) #6
  store ptr null, ptr %52, align 8, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 8, ptr %53) #6
  store ptr null, ptr %53, align 8, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 8, ptr %54) #6
  store ptr null, ptr %54, align 8, !tbaa !10
  %103 = load i32, ptr %32, align 4, !tbaa !5
  %104 = load i32, ptr %30, align 4, !tbaa !5
  %105 = icmp slt i32 %103, %104
  br i1 %105, label %106, label %109

106:                                              ; preds = %101
  store i32 -8, ptr %48, align 4, !tbaa !5
  %107 = load i32, ptr %48, align 4, !tbaa !5
  call void @LAPACKE_xerbla(ptr noundef @.str, i32 noundef %107)
  %108 = load i32, ptr %48, align 4, !tbaa !5
  store i32 %108, ptr %24, align 4
  store i32 1, ptr %55, align 4
  br label %300

109:                                              ; preds = %101
  %110 = load i32, ptr %36, align 4, !tbaa !5
  %111 = icmp slt i32 %110, 1
  br i1 %111, label %120, label %112

112:                                              ; preds = %109
  %113 = load i8, ptr %27, align 1, !tbaa !9
  %114 = call i32 @LAPACKE_lsame(i8 noundef signext %113, i8 noundef signext 118) #7
  %115 = icmp ne i32 %114, 0
  br i1 %115, label %116, label %123

116:                                              ; preds = %112
  %117 = load i32, ptr %36, align 4, !tbaa !5
  %118 = load i32, ptr %30, align 4, !tbaa !5
  %119 = icmp slt i32 %117, %118
  br i1 %119, label %120, label %123

120:                                              ; preds = %116, %109
  store i32 -12, ptr %48, align 4, !tbaa !5
  %121 = load i32, ptr %48, align 4, !tbaa !5
  call void @LAPACKE_xerbla(ptr noundef @.str, i32 noundef %121)
  %122 = load i32, ptr %48, align 4, !tbaa !5
  store i32 %122, ptr %24, align 4
  store i32 1, ptr %55, align 4
  br label %300

123:                                              ; preds = %116, %112
  %124 = load i32, ptr %38, align 4, !tbaa !5
  %125 = icmp slt i32 %124, 1
  br i1 %125, label %134, label %126

126:                                              ; preds = %123
  %127 = load i8, ptr %28, align 1, !tbaa !9
  %128 = call i32 @LAPACKE_lsame(i8 noundef signext %127, i8 noundef signext 118) #7
  %129 = icmp ne i32 %128, 0
  br i1 %129, label %130, label %137

130:                                              ; preds = %126
  %131 = load i32, ptr %38, align 4, !tbaa !5
  %132 = load i32, ptr %30, align 4, !tbaa !5
  %133 = icmp slt i32 %131, %132
  br i1 %133, label %134, label %137

134:                                              ; preds = %130, %123
  store i32 -14, ptr %48, align 4, !tbaa !5
  %135 = load i32, ptr %48, align 4, !tbaa !5
  call void @LAPACKE_xerbla(ptr noundef @.str, i32 noundef %135)
  %136 = load i32, ptr %48, align 4, !tbaa !5
  store i32 %136, ptr %24, align 4
  store i32 1, ptr %55, align 4
  br label %300

137:                                              ; preds = %130, %126
  %138 = load i32, ptr %46, align 4, !tbaa !5
  %139 = icmp eq i32 %138, -1
  br i1 %139, label %140, label %163

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

156:                                              ; preds = %140
  %157 = load i32, ptr %48, align 4, !tbaa !5
  %158 = sub nsw i32 %157, 1
  br label %161

159:                                              ; preds = %140
  %160 = load i32, ptr %48, align 4, !tbaa !5
  br label %161

161:                                              ; preds = %159, %156
  %162 = phi i32 [ %158, %156 ], [ %160, %159 ]
  store i32 %162, ptr %24, align 4
  store i32 1, ptr %55, align 4
  br label %300

163:                                              ; preds = %137
  %164 = load i32, ptr %49, align 4, !tbaa !5
  %165 = sext i32 %164 to i64
  %166 = mul i64 8, %165
  %167 = load i32, ptr %30, align 4, !tbaa !5
  %168 = icmp sgt i32 1, %167
  br i1 %168, label %169, label %170

169:                                              ; preds = %163
  br label %172

170:                                              ; preds = %163
  %171 = load i32, ptr %30, align 4, !tbaa !5
  br label %172

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

179:                                              ; preds = %172
  store i32 -1011, ptr %48, align 4, !tbaa !5
  br label %294

180:                                              ; preds = %172
  %181 = load i8, ptr %27, align 1, !tbaa !9
  %182 = call i32 @LAPACKE_lsame(i8 noundef signext %181, i8 noundef signext 118) #7
  %183 = icmp ne i32 %182, 0
  br i1 %183, label %184, label %202

184:                                              ; preds = %180
  %185 = load i32, ptr %50, align 4, !tbaa !5
  %186 = sext i32 %185 to i64
  %187 = mul i64 8, %186
  %188 = load i32, ptr %30, align 4, !tbaa !5
  %189 = icmp sgt i32 1, %188
  br i1 %189, label %190, label %191

190:                                              ; preds = %184
  br label %193

191:                                              ; preds = %184
  %192 = load i32, ptr %30, align 4, !tbaa !5
  br label %193

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

200:                                              ; preds = %193
  store i32 -1011, ptr %48, align 4, !tbaa !5
  br label %292

201:                                              ; preds = %193
  br label %202

202:                                              ; preds = %201, %180
  %203 = load i8, ptr %28, align 1, !tbaa !9
  %204 = call i32 @LAPACKE_lsame(i8 noundef signext %203, i8 noundef signext 118) #7
  %205 = icmp ne i32 %204, 0
  br i1 %205, label %206, label %224

206:                                              ; preds = %202
  %207 = load i32, ptr %51, align 4, !tbaa !5
  %208 = sext i32 %207 to i64
  %209 = mul i64 8, %208
  %210 = load i32, ptr %30, align 4, !tbaa !5
  %211 = icmp sgt i32 1, %210
  br i1 %211, label %212, label %213

212:                                              ; preds = %206
  br label %215

213:                                              ; preds = %206
  %214 = load i32, ptr %30, align 4, !tbaa !5
  br label %215

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

222:                                              ; preds = %215
  store i32 -1011, ptr %48, align 4, !tbaa !5
  br label %285

223:                                              ; preds = %215
  br label %224

224:                                              ; preds = %223, %202
  %225 = load i32, ptr %25, align 4, !tbaa !5
  %226 = load i32, ptr %30, align 4, !tbaa !5
  %227 = load i32, ptr %30, align 4, !tbaa !5
  %228 = load ptr, ptr %31, align 8, !tbaa !10
  %229 = load i32, ptr %32, align 4, !tbaa !5
  %230 = load ptr, ptr %52, align 8, !tbaa !10
  %231 = load i32, ptr %49, align 4, !tbaa !5
  call void @LAPACKE_dge_trans(i32 noundef %225, i32 noundef %226, i32 noundef %227, ptr noundef %228, i32 noundef %229, ptr noundef %230, i32 noundef %231)
  %232 = load ptr, ptr %52, align 8, !tbaa !10
  %233 = load ptr, ptr %33, align 8, !tbaa !10
  %234 = load ptr, ptr %34, align 8, !tbaa !10
  %235 = load ptr, ptr %53, align 8, !tbaa !10
  %236 = load ptr, ptr %54, align 8, !tbaa !10
  %237 = load ptr, ptr %39, align 8, !tbaa !10
  %238 = load ptr, ptr %40, align 8, !tbaa !10
  %239 = load ptr, ptr %41, align 8, !tbaa !10
  %240 = load ptr, ptr %42, align 8, !tbaa !10
  %241 = load ptr, ptr %43, align 8, !tbaa !10
  %242 = load ptr, ptr %44, align 8, !tbaa !10
  %243 = load ptr, ptr %45, align 8, !tbaa !10
  %244 = load ptr, ptr %47, align 8, !tbaa !10
  call void @dgeevx_(ptr noundef %26, ptr noundef %27, ptr noundef %28, ptr noundef %29, ptr noundef %30, ptr noundef %232, ptr noundef %49, ptr noundef %233, ptr noundef %234, ptr noundef %235, ptr noundef %50, ptr noundef %236, ptr noundef %51, ptr noundef %237, ptr noundef %238, ptr noundef %239, ptr noundef %240, ptr noundef %241, ptr noundef %242, ptr noundef %243, ptr noundef %46, ptr noundef %244, ptr noundef %48, i64 noundef 1, i64 noundef 1, i64 noundef 1, i64 noundef 1)
  %245 = load i32, ptr %48, align 4, !tbaa !5
  %246 = icmp slt i32 %245, 0
  br i1 %246, label %247, label %250

247:                                              ; preds = %224
  %248 = load i32, ptr %48, align 4, !tbaa !5
  %249 = sub nsw i32 %248, 1
  store i32 %249, ptr %48, align 4, !tbaa !5
  br label %250

250:                                              ; preds = %247, %224
  %251 = load i32, ptr %30, align 4, !tbaa !5
  %252 = load i32, ptr %30, align 4, !tbaa !5
  %253 = load ptr, ptr %52, align 8, !tbaa !10
  %254 = load i32, ptr %49, align 4, !tbaa !5
  %255 = load ptr, ptr %31, align 8, !tbaa !10
  %256 = load i32, ptr %32, align 4, !tbaa !5
  call void @LAPACKE_dge_trans(i32 noundef 102, i32 noundef %251, i32 noundef %252, ptr noundef %253, i32 noundef %254, ptr noundef %255, i32 noundef %256)
  %257 = load i8, ptr %27, align 1, !tbaa !9
  %258 = call i32 @LAPACKE_lsame(i8 noundef signext %257, i8 noundef signext 118) #7
  %259 = icmp ne i32 %258, 0
  br i1 %259, label %260, label %267

260:                                              ; preds = %250
  %261 = load i32, ptr %30, align 4, !tbaa !5
  %262 = load i32, ptr %30, align 4, !tbaa !5
  %263 = load ptr, ptr %53, align 8, !tbaa !10
  %264 = load i32, ptr %50, align 4, !tbaa !5
  %265 = load ptr, ptr %35, align 8, !tbaa !10
  %266 = load i32, ptr %36, align 4, !tbaa !5
  call void @LAPACKE_dge_trans(i32 noundef 102, i32 noundef %261, i32 noundef %262, ptr noundef %263, i32 noundef %264, ptr noundef %265, i32 noundef %266)
  br label %267

267:                                              ; preds = %260, %250
  %268 = load i8, ptr %28, align 1, !tbaa !9
  %269 = call i32 @LAPACKE_lsame(i8 noundef signext %268, i8 noundef signext 118) #7
  %270 = icmp ne i32 %269, 0
  br i1 %270, label %271, label %278

271:                                              ; preds = %267
  %272 = load i32, ptr %30, align 4, !tbaa !5
  %273 = load i32, ptr %30, align 4, !tbaa !5
  %274 = load ptr, ptr %54, align 8, !tbaa !10
  %275 = load i32, ptr %51, align 4, !tbaa !5
  %276 = load ptr, ptr %37, align 8, !tbaa !10
  %277 = load i32, ptr %38, align 4, !tbaa !5
  call void @LAPACKE_dge_trans(i32 noundef 102, i32 noundef %272, i32 noundef %273, ptr noundef %274, i32 noundef %275, ptr noundef %276, i32 noundef %277)
  br label %278

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

282:                                              ; preds = %278
  %283 = load ptr, ptr %54, align 8, !tbaa !10
  call void @free(ptr noundef %283) #6
  br label %284

284:                                              ; preds = %282, %278
  br label %285

285:                                              ; preds = %284, %222
  %286 = load i8, ptr %27, align 1, !tbaa !9
  %287 = call i32 @LAPACKE_lsame(i8 noundef signext %286, i8 noundef signext 118) #7
  %288 = icmp ne i32 %287, 0
  br i1 %288, label %289, label %291

289:                                              ; preds = %285
  %290 = load ptr, ptr %53, align 8, !tbaa !10
  call void @free(ptr noundef %290) #6
  br label %291

291:                                              ; preds = %289, %285
  br label %292

292:                                              ; preds = %291, %200
  %293 = load ptr, ptr %52, align 8, !tbaa !10
  call void @free(ptr noundef %293) #6
  br label %294

294:                                              ; preds = %292, %179
  %295 = load i32, ptr %48, align 4, !tbaa !5
  %296 = icmp eq i32 %295, -1011
  br i1 %296, label %297, label %299

297:                                              ; preds = %294
  %298 = load i32, ptr %48, align 4, !tbaa !5
  call void @LAPACKE_xerbla(ptr noundef @.str, i32 noundef %298)
  br label %299

299:                                              ; preds = %297, %294
  store i32 0, ptr %55, align 4
  br label %300

300:                                              ; preds = %299, %161, %134, %120, %106
  call void @llvm.lifetime.end.p0(i64 8, ptr %54) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %53) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %52) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %51) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %50) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %49) #6
  %301 = load i32, ptr %55, align 4
  switch i32 %301, label %308 [
    i32 0, label %302
  ]

302:                                              ; preds = %300
  br label %305

303:                                              ; preds = %78
  store i32 -1, ptr %48, align 4, !tbaa !5
  %304 = load i32, ptr %48, align 4, !tbaa !5
  call void @LAPACKE_xerbla(ptr noundef @.str, i32 noundef %304)
  br label %305

305:                                              ; preds = %303, %302
  br label %306

306:                                              ; preds = %305, %77
  %307 = load i32, ptr %48, align 4, !tbaa !5
  store i32 %307, ptr %24, align 4
  store i32 1, ptr %55, align 4
  br label %308

308:                                              ; preds = %306, %300
  call void @llvm.lifetime.end.p0(i64 4, ptr %48) #6
  %309 = load i32, ptr %24, align 4
  ret i32 %309
}

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

declare void @dgeevx_(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, 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_dge_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_dgeevx_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, ptr noundef %10, i32 noundef %11, ptr noundef %12, i32 noundef %13, ptr noundef %14, ptr noundef %15, ptr noundef %16, ptr noundef %17, ptr noundef %18, ptr noundef %19, ptr noundef %20, i32 noundef %21, ptr noundef %22) local_unnamed_addr #0 {
  %24 = alloca i8, align 1
  %25 = alloca i8, align 1
  %26 = alloca i8, align 1
  %27 = alloca i8, align 1
  %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
  %36 = alloca i32, align 4
  store i8 %1, ptr %24, align 1, !tbaa !5
  store i8 %2, ptr %25, align 1, !tbaa !5
  store i8 %3, ptr %26, align 1, !tbaa !5
  store i8 %4, ptr %27, align 1, !tbaa !5
  store i32 %5, ptr %28, align 4, !tbaa !8
  store i32 %7, ptr %29, align 4, !tbaa !8
  store i32 %11, ptr %30, align 4, !tbaa !8
  store i32 %13, ptr %31, align 4, !tbaa !8
  store i32 %21, ptr %32, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %33) #7
  store i32 0, ptr %33, align 4, !tbaa !8
  switch i32 %0, label %103 [
    i32 102, label %37
    i32 101, label %39
  ]

37:                                               ; preds = %23
  call void @dgeevx_(ptr noundef nonnull %24, ptr noundef nonnull %25, ptr noundef nonnull %26, ptr noundef nonnull %27, ptr noundef nonnull %28, ptr noundef %6, ptr noundef nonnull %29, ptr noundef %8, ptr noundef %9, ptr noundef %10, ptr noundef nonnull %30, ptr noundef %12, ptr noundef nonnull %31, ptr noundef %14, ptr noundef %15, ptr noundef %16, ptr noundef %17, ptr noundef %18, ptr noundef %19, ptr noundef %20, ptr noundef nonnull %32, ptr noundef %22, ptr noundef nonnull %33, i64 noundef 1, i64 noundef 1, i64 noundef 1, i64 noundef 1) #7
  %38 = load i32, ptr %33, align 4, !tbaa !8
  %.lobit89 = ashr i32 %38, 31
  %spec.select = add nsw i32 %38, %.lobit89
  br label %104

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

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

43:                                               ; preds = %39
  %44 = icmp slt i32 %11, 1
  br i1 %44, label %48, label %45

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

48:                                               ; preds = %45, %43
  tail call void @LAPACKE_xerbla(ptr noundef nonnull @.str, i32 noundef -12) #7
  br label %.thread81

49:                                               ; preds = %45
  %50 = icmp slt i32 %13, 1
  br i1 %50, label %54, label %51

51:                                               ; preds = %49
  %52 = tail call i32 @LAPACKE_lsame(i8 noundef signext %3, i8 noundef signext 118) #8
  %.not70 = icmp ne i32 %52, 0
  %53 = icmp slt i32 %13, %5
  %or.cond78 = and i1 %53, %.not70
  br i1 %or.cond78, label %54, label %55

54:                                               ; preds = %51, %49
  tail call void @LAPACKE_xerbla(ptr noundef nonnull @.str, i32 noundef -14) #7
  br label %.thread81

55:                                               ; preds = %51
  %56 = icmp eq i32 %21, -1
  br i1 %56, label %57, label %60

57:                                               ; preds = %55
  call void @dgeevx_(ptr noundef nonnull %24, ptr noundef nonnull %25, ptr noundef nonnull %26, ptr noundef nonnull %27, ptr noundef nonnull %28, ptr noundef %6, ptr noundef nonnull %34, ptr noundef %8, ptr noundef %9, ptr noundef %10, ptr noundef nonnull %35, ptr noundef %12, ptr noundef nonnull %36, ptr noundef %14, ptr noundef %15, ptr noundef %16, ptr noundef %17, ptr noundef %18, ptr noundef %19, ptr noundef %20, ptr noundef nonnull %32, ptr noundef %22, ptr noundef nonnull %33, i64 noundef 1, i64 noundef 1, i64 noundef 1, i64 noundef 1) #7
  %58 = load i32, ptr %33, align 4
  %.lobit = ashr i32 %58, 31
  %59 = add nsw i32 %.lobit, %58
  br label %.thread81

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

.thread:                                          ; preds = %60
  store i32 -1011, ptr %33, align 4, !tbaa !8
  br label %101

66:                                               ; preds = %60
  %.not71 = icmp eq i32 %46, 0
  br i1 %.not71, label %70, label %67

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

.thread79:                                        ; preds = %67
  store i32 -1011, ptr %33, align 4, !tbaa !8
  tail call void @free(ptr noundef nonnull %64) #7
  br label %101

70:                                               ; preds = %67, %66
  %.058 = phi ptr [ %68, %67 ], [ null, %66 ]
  %.not72 = icmp eq i32 %52, 0
  br i1 %.not72, label %75, label %71

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

74:                                               ; preds = %71
  store i32 -1011, ptr %33, align 4, !tbaa !8
  br label %.thread87

75:                                               ; preds = %71, %70
  %.057 = phi ptr [ %72, %71 ], [ null, %70 ]
  tail call void @LAPACKE_dge_trans(i32 noundef 101, i32 noundef %5, i32 noundef %5, ptr noundef %6, i32 noundef %7, ptr noundef nonnull %64, i32 noundef %40) #7
  call void @dgeevx_(ptr noundef nonnull %24, ptr noundef nonnull %25, ptr noundef nonnull %26, ptr noundef nonnull %27, ptr noundef nonnull %28, ptr noundef nonnull %64, ptr noundef nonnull %34, ptr noundef %8, ptr noundef %9, ptr noundef %.058, ptr noundef nonnull %35, ptr noundef %.057, ptr noundef nonnull %36, ptr noundef %14, ptr noundef %15, ptr noundef %16, ptr noundef %17, ptr noundef %18, ptr noundef %19, ptr noundef %20, ptr noundef nonnull %32, ptr noundef %22, ptr noundef nonnull %33, i64 noundef 1, i64 noundef 1, i64 noundef 1, i64 noundef 1) #7
  %76 = load i32, ptr %33, align 4, !tbaa !8
  %77 = icmp slt i32 %76, 0
  br i1 %77, label %78, label %80

78:                                               ; preds = %75
  %79 = add nsw i32 %76, -1
  store i32 %79, ptr %33, align 4, !tbaa !8
  br label %80

80:                                               ; preds = %78, %75
  %81 = load i32, ptr %28, align 4, !tbaa !8
  %82 = load i32, ptr %34, align 4, !tbaa !8
  call void @LAPACKE_dge_trans(i32 noundef 102, i32 noundef %81, i32 noundef %81, ptr noundef nonnull %64, i32 noundef %82, ptr noundef %6, i32 noundef %7) #7
  %83 = load i8, ptr %25, align 1, !tbaa !5
  %84 = call i32 @LAPACKE_lsame(i8 noundef signext %83, i8 noundef signext 118) #8
  %.not73 = icmp eq i32 %84, 0
  br i1 %.not73, label %88, label %85

85:                                               ; preds = %80
  %86 = load i32, ptr %28, align 4, !tbaa !8
  %87 = load i32, ptr %35, align 4, !tbaa !8
  call void @LAPACKE_dge_trans(i32 noundef 102, i32 noundef %86, i32 noundef %86, ptr noundef %.058, i32 noundef %87, ptr noundef %10, i32 noundef %11) #7
  br label %88

88:                                               ; preds = %85, %80
  %89 = load i8, ptr %26, align 1, !tbaa !5
  %90 = call i32 @LAPACKE_lsame(i8 noundef signext %89, i8 noundef signext 118) #8
  %.not74 = icmp eq i32 %90, 0
  br i1 %.not74, label %.thread87, label %91

91:                                               ; preds = %88
  %92 = load i32, ptr %28, align 4, !tbaa !8
  %93 = load i32, ptr %36, align 4, !tbaa !8
  call void @LAPACKE_dge_trans(i32 noundef 102, i32 noundef %92, i32 noundef %92, ptr noundef %.057, i32 noundef %93, ptr noundef %12, i32 noundef %13) #7
  %.pre = load i8, ptr %26, align 1, !tbaa !5
  %.pre86 = call i32 @LAPACKE_lsame(i8 noundef signext %.pre, i8 noundef signext 118) #8
  %94 = icmp eq i32 %.pre86, 0
  br i1 %94, label %.thread87, label %95

95:                                               ; preds = %91
  call void @free(ptr noundef %.057) #7
  br label %.thread87

.thread87:                                        ; preds = %88, %91, %95, %74
  %96 = load i8, ptr %25, align 1, !tbaa !5
  %97 = call i32 @LAPACKE_lsame(i8 noundef signext %96, i8 noundef signext 118) #8
  %.not76 = icmp eq i32 %97, 0
  br i1 %.not76, label %99, label %98

98:                                               ; preds = %.thread87
  call void @free(ptr noundef %.058) #7
  br label %99

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

101:                                              ; preds = %.thread79, %.thread, %99
  call void @LAPACKE_xerbla(ptr noundef nonnull @.str, i32 noundef -1011) #7
  %.pre84.pre = load i32, ptr %33, align 4, !tbaa !8
  br label %102

.thread81:                                        ; preds = %42, %48, %54, %57
  %.059.ph = phi i32 [ %59, %57 ], [ -14, %54 ], [ -12, %48 ], [ -8, %42 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %36) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %35) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %34) #7
  br label %104

102:                                              ; preds = %99, %101
  %.pre84 = phi i32 [ %.pr.pr, %99 ], [ %.pre84.pre, %101 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %36) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %35) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %34) #7
  br label %104

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

104:                                              ; preds = %37, %103, %102, %.thread81
  %.1 = phi i32 [ %.059.ph, %.thread81 ], [ %.pre84, %102 ], [ -1, %103 ], [ %spec.select, %37 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %33) #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 @dgeevx_(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, 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_dge_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