; LLVM IR from OpenMathLib/OpenBLAS :: lapack-netlib/LAPACKE/src (lapacke_cgeev_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 [19 x i8], align 1

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

40:                                               ; preds = %14
  %41 = load ptr, ptr %20, align 8, !tbaa !10
  %42 = load ptr, ptr %22, align 8, !tbaa !10
  %43 = load ptr, ptr %23, align 8, !tbaa !10
  %44 = load ptr, ptr %25, align 8, !tbaa !10
  %45 = load ptr, ptr %27, align 8, !tbaa !10
  %46 = load ptr, ptr %29, align 8, !tbaa !10
  call void @cgeev_(ptr noundef %17, ptr noundef %18, ptr noundef %19, ptr noundef %41, ptr noundef %21, ptr noundef %42, ptr noundef %43, ptr noundef %24, ptr noundef %44, ptr noundef %26, ptr noundef %45, ptr noundef %28, ptr noundef %46, ptr noundef %30, i64 noundef 1, i64 noundef 1)
  %47 = load i32, ptr %30, align 4, !tbaa !5
  %48 = icmp slt i32 %47, 0
  br i1 %48, label %49, label %52

49:                                               ; preds = %40
  %50 = load i32, ptr %30, align 4, !tbaa !5
  %51 = sub nsw i32 %50, 1
  store i32 %51, ptr %30, align 4, !tbaa !5
  br label %52

52:                                               ; preds = %49, %40
  br label %267

53:                                               ; preds = %14
  %54 = load i32, ptr %16, align 4, !tbaa !5
  %55 = icmp eq i32 %54, 101
  br i1 %55, label %56, label %264

56:                                               ; preds = %53
  call void @llvm.lifetime.start.p0(i64 4, ptr %31) #6
  %57 = load i32, ptr %19, align 4, !tbaa !5
  %58 = icmp sgt i32 1, %57
  br i1 %58, label %59, label %60

59:                                               ; preds = %56
  br label %62

60:                                               ; preds = %56
  %61 = load i32, ptr %19, align 4, !tbaa !5
  br label %62

62:                                               ; preds = %60, %59
  %63 = phi i32 [ 1, %59 ], [ %61, %60 ]
  store i32 %63, ptr %31, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %32) #6
  %64 = load i32, ptr %19, align 4, !tbaa !5
  %65 = icmp sgt i32 1, %64
  br i1 %65, label %66, label %67

66:                                               ; preds = %62
  br label %69

67:                                               ; preds = %62
  %68 = load i32, ptr %19, align 4, !tbaa !5
  br label %69

69:                                               ; preds = %67, %66
  %70 = phi i32 [ 1, %66 ], [ %68, %67 ]
  store i32 %70, ptr %32, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %33) #6
  %71 = load i32, ptr %19, align 4, !tbaa !5
  %72 = icmp sgt i32 1, %71
  br i1 %72, label %73, label %74

73:                                               ; preds = %69
  br label %76

74:                                               ; preds = %69
  %75 = load i32, ptr %19, align 4, !tbaa !5
  br label %76

76:                                               ; preds = %74, %73
  %77 = phi i32 [ 1, %73 ], [ %75, %74 ]
  store i32 %77, ptr %33, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %34) #6
  store ptr null, ptr %34, align 8, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 8, ptr %35) #6
  store ptr null, ptr %35, align 8, !tbaa !10
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #6
  store ptr null, ptr %36, align 8, !tbaa !10
  %78 = load i32, ptr %21, align 4, !tbaa !5
  %79 = load i32, ptr %19, align 4, !tbaa !5
  %80 = icmp slt i32 %78, %79
  br i1 %80, label %81, label %84

81:                                               ; preds = %76
  store i32 -6, ptr %30, align 4, !tbaa !5
  %82 = load i32, ptr %30, align 4, !tbaa !5
  call void @LAPACKE_xerbla(ptr noundef @.str, i32 noundef %82)
  %83 = load i32, ptr %30, align 4, !tbaa !5
  store i32 %83, ptr %15, align 4
  store i32 1, ptr %37, align 4
  br label %261

84:                                               ; preds = %76
  %85 = load i32, ptr %24, align 4, !tbaa !5
  %86 = icmp slt i32 %85, 1
  br i1 %86, label %95, label %87

87:                                               ; preds = %84
  %88 = load i8, ptr %17, align 1, !tbaa !9
  %89 = call i32 @LAPACKE_lsame(i8 noundef signext %88, i8 noundef signext 118) #7
  %90 = icmp ne i32 %89, 0
  br i1 %90, label %91, label %98

91:                                               ; preds = %87
  %92 = load i32, ptr %24, align 4, !tbaa !5
  %93 = load i32, ptr %19, align 4, !tbaa !5
  %94 = icmp slt i32 %92, %93
  br i1 %94, label %95, label %98

95:                                               ; preds = %91, %84
  store i32 -9, ptr %30, align 4, !tbaa !5
  %96 = load i32, ptr %30, align 4, !tbaa !5
  call void @LAPACKE_xerbla(ptr noundef @.str, i32 noundef %96)
  %97 = load i32, ptr %30, align 4, !tbaa !5
  store i32 %97, ptr %15, align 4
  store i32 1, ptr %37, align 4
  br label %261

98:                                               ; preds = %91, %87
  %99 = load i32, ptr %26, align 4, !tbaa !5
  %100 = icmp slt i32 %99, 1
  br i1 %100, label %109, label %101

101:                                              ; preds = %98
  %102 = load i8, ptr %18, align 1, !tbaa !9
  %103 = call i32 @LAPACKE_lsame(i8 noundef signext %102, i8 noundef signext 118) #7
  %104 = icmp ne i32 %103, 0
  br i1 %104, label %105, label %112

105:                                              ; preds = %101
  %106 = load i32, ptr %26, align 4, !tbaa !5
  %107 = load i32, ptr %19, align 4, !tbaa !5
  %108 = icmp slt i32 %106, %107
  br i1 %108, label %109, label %112

109:                                              ; preds = %105, %98
  store i32 -11, ptr %30, align 4, !tbaa !5
  %110 = load i32, ptr %30, align 4, !tbaa !5
  call void @LAPACKE_xerbla(ptr noundef @.str, i32 noundef %110)
  %111 = load i32, ptr %30, align 4, !tbaa !5
  store i32 %111, ptr %15, align 4
  store i32 1, ptr %37, align 4
  br label %261

112:                                              ; preds = %105, %101
  %113 = load i32, ptr %28, align 4, !tbaa !5
  %114 = icmp eq i32 %113, -1
  br i1 %114, label %115, label %131

115:                                              ; preds = %112
  %116 = load ptr, ptr %20, align 8, !tbaa !10
  %117 = load ptr, ptr %22, align 8, !tbaa !10
  %118 = load ptr, ptr %23, align 8, !tbaa !10
  %119 = load ptr, ptr %25, align 8, !tbaa !10
  %120 = load ptr, ptr %27, align 8, !tbaa !10
  %121 = load ptr, ptr %29, align 8, !tbaa !10
  call void @cgeev_(ptr noundef %17, ptr noundef %18, ptr noundef %19, ptr noundef %116, ptr noundef %31, ptr noundef %117, ptr noundef %118, ptr noundef %32, ptr noundef %119, ptr noundef %33, ptr noundef %120, ptr noundef %28, ptr noundef %121, ptr noundef %30, i64 noundef 1, i64 noundef 1)
  %122 = load i32, ptr %30, align 4, !tbaa !5
  %123 = icmp slt i32 %122, 0
  br i1 %123, label %124, label %127

124:                                              ; preds = %115
  %125 = load i32, ptr %30, align 4, !tbaa !5
  %126 = sub nsw i32 %125, 1
  br label %129

127:                                              ; preds = %115
  %128 = load i32, ptr %30, align 4, !tbaa !5
  br label %129

129:                                              ; preds = %127, %124
  %130 = phi i32 [ %126, %124 ], [ %128, %127 ]
  store i32 %130, ptr %15, align 4
  store i32 1, ptr %37, align 4
  br label %261

131:                                              ; preds = %112
  %132 = load i32, ptr %31, align 4, !tbaa !5
  %133 = sext i32 %132 to i64
  %134 = mul i64 8, %133
  %135 = load i32, ptr %19, align 4, !tbaa !5
  %136 = icmp sgt i32 1, %135
  br i1 %136, label %137, label %138

137:                                              ; preds = %131
  br label %140

138:                                              ; preds = %131
  %139 = load i32, ptr %19, align 4, !tbaa !5
  br label %140

140:                                              ; preds = %138, %137
  %141 = phi i32 [ 1, %137 ], [ %139, %138 ]
  %142 = sext i32 %141 to i64
  %143 = mul i64 %134, %142
  %144 = call noalias ptr @malloc(i64 noundef %143) #8
  store ptr %144, ptr %34, align 8, !tbaa !10
  %145 = load ptr, ptr %34, align 8, !tbaa !10
  %146 = icmp eq ptr %145, null
  br i1 %146, label %147, label %148

147:                                              ; preds = %140
  store i32 -1011, ptr %30, align 4, !tbaa !5
  br label %255

148:                                              ; preds = %140
  %149 = load i8, ptr %17, align 1, !tbaa !9
  %150 = call i32 @LAPACKE_lsame(i8 noundef signext %149, i8 noundef signext 118) #7
  %151 = icmp ne i32 %150, 0
  br i1 %151, label %152, label %170

152:                                              ; preds = %148
  %153 = load i32, ptr %32, align 4, !tbaa !5
  %154 = sext i32 %153 to i64
  %155 = mul i64 8, %154
  %156 = load i32, ptr %19, align 4, !tbaa !5
  %157 = icmp sgt i32 1, %156
  br i1 %157, label %158, label %159

158:                                              ; preds = %152
  br label %161

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

161:                                              ; preds = %159, %158
  %162 = phi i32 [ 1, %158 ], [ %160, %159 ]
  %163 = sext i32 %162 to i64
  %164 = mul i64 %155, %163
  %165 = call noalias ptr @malloc(i64 noundef %164) #8
  store ptr %165, ptr %35, align 8, !tbaa !10
  %166 = load ptr, ptr %35, align 8, !tbaa !10
  %167 = icmp eq ptr %166, null
  br i1 %167, label %168, label %169

168:                                              ; preds = %161
  store i32 -1011, ptr %30, align 4, !tbaa !5
  br label %253

169:                                              ; preds = %161
  br label %170

170:                                              ; preds = %169, %148
  %171 = load i8, ptr %18, align 1, !tbaa !9
  %172 = call i32 @LAPACKE_lsame(i8 noundef signext %171, i8 noundef signext 118) #7
  %173 = icmp ne i32 %172, 0
  br i1 %173, label %174, label %192

174:                                              ; preds = %170
  %175 = load i32, ptr %33, align 4, !tbaa !5
  %176 = sext i32 %175 to i64
  %177 = mul i64 8, %176
  %178 = load i32, ptr %19, align 4, !tbaa !5
  %179 = icmp sgt i32 1, %178
  br i1 %179, label %180, label %181

180:                                              ; preds = %174
  br label %183

181:                                              ; preds = %174
  %182 = load i32, ptr %19, align 4, !tbaa !5
  br label %183

183:                                              ; preds = %181, %180
  %184 = phi i32 [ 1, %180 ], [ %182, %181 ]
  %185 = sext i32 %184 to i64
  %186 = mul i64 %177, %185
  %187 = call noalias ptr @malloc(i64 noundef %186) #8
  store ptr %187, ptr %36, align 8, !tbaa !10
  %188 = load ptr, ptr %36, align 8, !tbaa !10
  %189 = icmp eq ptr %188, null
  br i1 %189, label %190, label %191

190:                                              ; preds = %183
  store i32 -1011, ptr %30, align 4, !tbaa !5
  br label %246

191:                                              ; preds = %183
  br label %192

192:                                              ; preds = %191, %170
  %193 = load i32, ptr %16, align 4, !tbaa !5
  %194 = load i32, ptr %19, align 4, !tbaa !5
  %195 = load i32, ptr %19, align 4, !tbaa !5
  %196 = load ptr, ptr %20, align 8, !tbaa !10
  %197 = load i32, ptr %21, align 4, !tbaa !5
  %198 = load ptr, ptr %34, align 8, !tbaa !10
  %199 = load i32, ptr %31, align 4, !tbaa !5
  call void @LAPACKE_cge_trans(i32 noundef %193, i32 noundef %194, i32 noundef %195, ptr noundef %196, i32 noundef %197, ptr noundef %198, i32 noundef %199)
  %200 = load ptr, ptr %34, align 8, !tbaa !10
  %201 = load ptr, ptr %22, align 8, !tbaa !10
  %202 = load ptr, ptr %35, align 8, !tbaa !10
  %203 = load ptr, ptr %36, align 8, !tbaa !10
  %204 = load ptr, ptr %27, align 8, !tbaa !10
  %205 = load ptr, ptr %29, align 8, !tbaa !10
  call void @cgeev_(ptr noundef %17, ptr noundef %18, ptr noundef %19, ptr noundef %200, ptr noundef %31, ptr noundef %201, ptr noundef %202, ptr noundef %32, ptr noundef %203, ptr noundef %33, ptr noundef %204, ptr noundef %28, ptr noundef %205, ptr noundef %30, i64 noundef 1, i64 noundef 1)
  %206 = load i32, ptr %30, align 4, !tbaa !5
  %207 = icmp slt i32 %206, 0
  br i1 %207, label %208, label %211

208:                                              ; preds = %192
  %209 = load i32, ptr %30, align 4, !tbaa !5
  %210 = sub nsw i32 %209, 1
  store i32 %210, ptr %30, align 4, !tbaa !5
  br label %211

211:                                              ; preds = %208, %192
  %212 = load i32, ptr %19, align 4, !tbaa !5
  %213 = load i32, ptr %19, align 4, !tbaa !5
  %214 = load ptr, ptr %34, align 8, !tbaa !10
  %215 = load i32, ptr %31, align 4, !tbaa !5
  %216 = load ptr, ptr %20, align 8, !tbaa !10
  %217 = load i32, ptr %21, align 4, !tbaa !5
  call void @LAPACKE_cge_trans(i32 noundef 102, i32 noundef %212, i32 noundef %213, ptr noundef %214, i32 noundef %215, ptr noundef %216, i32 noundef %217)
  %218 = load i8, ptr %17, align 1, !tbaa !9
  %219 = call i32 @LAPACKE_lsame(i8 noundef signext %218, i8 noundef signext 118) #7
  %220 = icmp ne i32 %219, 0
  br i1 %220, label %221, label %228

221:                                              ; preds = %211
  %222 = load i32, ptr %19, align 4, !tbaa !5
  %223 = load i32, ptr %19, align 4, !tbaa !5
  %224 = load ptr, ptr %35, align 8, !tbaa !10
  %225 = load i32, ptr %32, align 4, !tbaa !5
  %226 = load ptr, ptr %23, align 8, !tbaa !10
  %227 = load i32, ptr %24, align 4, !tbaa !5
  call void @LAPACKE_cge_trans(i32 noundef 102, i32 noundef %222, i32 noundef %223, ptr noundef %224, i32 noundef %225, ptr noundef %226, i32 noundef %227)
  br label %228

228:                                              ; preds = %221, %211
  %229 = load i8, ptr %18, align 1, !tbaa !9
  %230 = call i32 @LAPACKE_lsame(i8 noundef signext %229, i8 noundef signext 118) #7
  %231 = icmp ne i32 %230, 0
  br i1 %231, label %232, label %239

232:                                              ; preds = %228
  %233 = load i32, ptr %19, align 4, !tbaa !5
  %234 = load i32, ptr %19, align 4, !tbaa !5
  %235 = load ptr, ptr %36, align 8, !tbaa !10
  %236 = load i32, ptr %33, align 4, !tbaa !5
  %237 = load ptr, ptr %25, align 8, !tbaa !10
  %238 = load i32, ptr %26, align 4, !tbaa !5
  call void @LAPACKE_cge_trans(i32 noundef 102, i32 noundef %233, i32 noundef %234, ptr noundef %235, i32 noundef %236, ptr noundef %237, i32 noundef %238)
  br label %239

239:                                              ; preds = %232, %228
  %240 = load i8, ptr %18, align 1, !tbaa !9
  %241 = call i32 @LAPACKE_lsame(i8 noundef signext %240, i8 noundef signext 118) #7
  %242 = icmp ne i32 %241, 0
  br i1 %242, label %243, label %245

243:                                              ; preds = %239
  %244 = load ptr, ptr %36, align 8, !tbaa !10
  call void @free(ptr noundef %244) #6
  br label %245

245:                                              ; preds = %243, %239
  br label %246

246:                                              ; preds = %245, %190
  %247 = load i8, ptr %17, align 1, !tbaa !9
  %248 = call i32 @LAPACKE_lsame(i8 noundef signext %247, i8 noundef signext 118) #7
  %249 = icmp ne i32 %248, 0
  br i1 %249, label %250, label %252

250:                                              ; preds = %246
  %251 = load ptr, ptr %35, align 8, !tbaa !10
  call void @free(ptr noundef %251) #6
  br label %252

252:                                              ; preds = %250, %246
  br label %253

253:                                              ; preds = %252, %168
  %254 = load ptr, ptr %34, align 8, !tbaa !10
  call void @free(ptr noundef %254) #6
  br label %255

255:                                              ; preds = %253, %147
  %256 = load i32, ptr %30, align 4, !tbaa !5
  %257 = icmp eq i32 %256, -1011
  br i1 %257, label %258, label %260

258:                                              ; preds = %255
  %259 = load i32, ptr %30, align 4, !tbaa !5
  call void @LAPACKE_xerbla(ptr noundef @.str, i32 noundef %259)
  br label %260

260:                                              ; preds = %258, %255
  store i32 0, ptr %37, align 4
  br label %261

261:                                              ; preds = %260, %129, %109, %95, %81
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %33) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %32) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #6
  %262 = load i32, ptr %37, align 4
  switch i32 %262, label %269 [
    i32 0, label %263
  ]

263:                                              ; preds = %261
  br label %266

264:                                              ; preds = %53
  store i32 -1, ptr %30, align 4, !tbaa !5
  %265 = load i32, ptr %30, align 4, !tbaa !5
  call void @LAPACKE_xerbla(ptr noundef @.str, i32 noundef %265)
  br label %266

266:                                              ; preds = %264, %263
  br label %267

267:                                              ; preds = %266, %52
  %268 = load i32, ptr %30, align 4, !tbaa !5
  store i32 %268, ptr %15, align 4
  store i32 1, ptr %37, align 4
  br label %269

269:                                              ; preds = %267, %261
  call void @llvm.lifetime.end.p0(i64 4, ptr %30) #6
  %270 = load i32, ptr %15, align 4
  ret i32 %270
}

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

declare void @cgeev_(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) #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 [19 x i8], align 1

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

26:                                               ; preds = %14
  call void @cgeev_(ptr noundef nonnull %15, ptr noundef nonnull %16, ptr noundef nonnull %17, ptr noundef %4, ptr noundef nonnull %18, ptr noundef %6, ptr noundef %7, ptr noundef nonnull %19, ptr noundef %9, ptr noundef nonnull %20, ptr noundef %11, ptr noundef nonnull %21, ptr noundef %13, ptr noundef nonnull %22, i64 noundef 1, i64 noundef 1) #7
  %27 = load i32, ptr %22, align 4, !tbaa !8
  %.lobit68 = ashr i32 %27, 31
  %spec.select = add nsw i32 %27, %.lobit68
  br label %93

28:                                               ; preds = %14
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %23) #7
  %29 = tail call i32 @llvm.smax.i32(i32 %3, i32 1)
  store i32 %29, ptr %23, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %24) #7
  store i32 %29, ptr %24, align 4, !tbaa !8
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %25) #7
  store i32 %29, ptr %25, align 4, !tbaa !8
  %30 = icmp slt i32 %5, %3
  br i1 %30, label %31, label %32

31:                                               ; preds = %28
  tail call void @LAPACKE_xerbla(ptr noundef nonnull @.str, i32 noundef -6) #7
  br label %.thread60

32:                                               ; preds = %28
  %33 = icmp slt i32 %8, 1
  br i1 %33, label %37, label %34

34:                                               ; preds = %32
  %35 = tail call i32 @LAPACKE_lsame(i8 noundef signext %1, i8 noundef signext 118) #8
  %.not = icmp ne i32 %35, 0
  %36 = icmp slt i32 %8, %3
  %or.cond = and i1 %36, %.not
  br i1 %or.cond, label %37, label %38

37:                                               ; preds = %34, %32
  tail call void @LAPACKE_xerbla(ptr noundef nonnull @.str, i32 noundef -9) #7
  br label %.thread60

38:                                               ; preds = %34
  %39 = icmp slt i32 %10, 1
  br i1 %39, label %43, label %40

40:                                               ; preds = %38
  %41 = tail call i32 @LAPACKE_lsame(i8 noundef signext %2, i8 noundef signext 118) #8
  %.not49 = icmp ne i32 %41, 0
  %42 = icmp slt i32 %10, %3
  %or.cond57 = and i1 %42, %.not49
  br i1 %or.cond57, label %43, label %44

43:                                               ; preds = %40, %38
  tail call void @LAPACKE_xerbla(ptr noundef nonnull @.str, i32 noundef -11) #7
  br label %.thread60

44:                                               ; preds = %40
  %45 = icmp eq i32 %12, -1
  br i1 %45, label %46, label %49

46:                                               ; preds = %44
  call void @cgeev_(ptr noundef nonnull %15, ptr noundef nonnull %16, ptr noundef nonnull %17, ptr noundef %4, ptr noundef nonnull %23, ptr noundef %6, ptr noundef %7, ptr noundef nonnull %24, ptr noundef %9, ptr noundef nonnull %25, ptr noundef %11, ptr noundef nonnull %21, ptr noundef %13, ptr noundef nonnull %22, i64 noundef 1, i64 noundef 1) #7
  %47 = load i32, ptr %22, align 4
  %.lobit = ashr i32 %47, 31
  %48 = add nsw i32 %.lobit, %47
  br label %.thread60

49:                                               ; preds = %44
  %50 = zext nneg i32 %29 to i64
  %51 = shl nuw nsw i64 %50, 3
  %52 = mul i64 %51, %50
  %53 = tail call noalias ptr @malloc(i64 noundef %52) #9
  %54 = icmp eq ptr %53, null
  br i1 %54, label %.thread, label %55

.thread:                                          ; preds = %49
  store i32 -1011, ptr %22, align 4, !tbaa !8
  br label %90

55:                                               ; preds = %49
  %.not50 = icmp eq i32 %35, 0
  br i1 %.not50, label %59, label %56

56:                                               ; preds = %55
  %57 = tail call noalias ptr @malloc(i64 noundef %52) #9
  %58 = icmp eq ptr %57, null
  br i1 %58, label %.thread58, label %59

.thread58:                                        ; preds = %56
  store i32 -1011, ptr %22, align 4, !tbaa !8
  tail call void @free(ptr noundef nonnull %53) #7
  br label %90

59:                                               ; preds = %56, %55
  %.037 = phi ptr [ %57, %56 ], [ null, %55 ]
  %.not51 = icmp eq i32 %41, 0
  br i1 %.not51, label %64, label %60

60:                                               ; preds = %59
  %61 = tail call noalias ptr @malloc(i64 noundef %52) #9
  %62 = icmp eq ptr %61, null
  br i1 %62, label %63, label %64

63:                                               ; preds = %60
  store i32 -1011, ptr %22, align 4, !tbaa !8
  br label %.thread66

64:                                               ; preds = %60, %59
  %.036 = phi ptr [ %61, %60 ], [ null, %59 ]
  tail call void @LAPACKE_cge_trans(i32 noundef 101, i32 noundef %3, i32 noundef %3, ptr noundef %4, i32 noundef %5, ptr noundef nonnull %53, i32 noundef %29) #7
  call void @cgeev_(ptr noundef nonnull %15, ptr noundef nonnull %16, ptr noundef nonnull %17, ptr noundef nonnull %53, ptr noundef nonnull %23, ptr noundef %6, ptr noundef %.037, ptr noundef nonnull %24, ptr noundef %.036, ptr noundef nonnull %25, ptr noundef %11, ptr noundef nonnull %21, ptr noundef %13, ptr noundef nonnull %22, i64 noundef 1, i64 noundef 1) #7
  %65 = load i32, ptr %22, align 4, !tbaa !8
  %66 = icmp slt i32 %65, 0
  br i1 %66, label %67, label %69

67:                                               ; preds = %64
  %68 = add nsw i32 %65, -1
  store i32 %68, ptr %22, align 4, !tbaa !8
  br label %69

69:                                               ; preds = %67, %64
  %70 = load i32, ptr %17, align 4, !tbaa !8
  %71 = load i32, ptr %23, align 4, !tbaa !8
  call void @LAPACKE_cge_trans(i32 noundef 102, i32 noundef %70, i32 noundef %70, ptr noundef nonnull %53, i32 noundef %71, ptr noundef %4, i32 noundef %5) #7
  %72 = load i8, ptr %15, align 1, !tbaa !5
  %73 = call i32 @LAPACKE_lsame(i8 noundef signext %72, i8 noundef signext 118) #8
  %.not52 = icmp eq i32 %73, 0
  br i1 %.not52, label %77, label %74

74:                                               ; preds = %69
  %75 = load i32, ptr %17, align 4, !tbaa !8
  %76 = load i32, ptr %24, align 4, !tbaa !8
  call void @LAPACKE_cge_trans(i32 noundef 102, i32 noundef %75, i32 noundef %75, ptr noundef %.037, i32 noundef %76, ptr noundef %7, i32 noundef %8) #7
  br label %77

77:                                               ; preds = %74, %69
  %78 = load i8, ptr %16, align 1, !tbaa !5
  %79 = call i32 @LAPACKE_lsame(i8 noundef signext %78, i8 noundef signext 118) #8
  %.not53 = icmp eq i32 %79, 0
  br i1 %.not53, label %.thread66, label %80

80:                                               ; preds = %77
  %81 = load i32, ptr %17, align 4, !tbaa !8
  %82 = load i32, ptr %25, align 4, !tbaa !8
  call void @LAPACKE_cge_trans(i32 noundef 102, i32 noundef %81, i32 noundef %81, ptr noundef %.036, i32 noundef %82, ptr noundef %9, i32 noundef %10) #7
  %.pre = load i8, ptr %16, align 1, !tbaa !5
  %.pre65 = call i32 @LAPACKE_lsame(i8 noundef signext %.pre, i8 noundef signext 118) #8
  %83 = icmp eq i32 %.pre65, 0
  br i1 %83, label %.thread66, label %84

84:                                               ; preds = %80
  call void @free(ptr noundef %.036) #7
  br label %.thread66

.thread66:                                        ; preds = %77, %80, %84, %63
  %85 = load i8, ptr %15, align 1, !tbaa !5
  %86 = call i32 @LAPACKE_lsame(i8 noundef signext %85, i8 noundef signext 118) #8
  %.not55 = icmp eq i32 %86, 0
  br i1 %.not55, label %88, label %87

87:                                               ; preds = %.thread66
  call void @free(ptr noundef %.037) #7
  br label %88

88:                                               ; preds = %87, %.thread66
  %.pr.pr = load i32, ptr %22, align 4, !tbaa !8
  call void @free(ptr noundef nonnull %53) #7
  %89 = icmp eq i32 %.pr.pr, -1011
  br i1 %89, label %90, label %91

90:                                               ; preds = %.thread58, %.thread, %88
  call void @LAPACKE_xerbla(ptr noundef nonnull @.str, i32 noundef -1011) #7
  %.pre63.pre = load i32, ptr %22, align 4, !tbaa !8
  br label %91

.thread60:                                        ; preds = %31, %37, %43, %46
  %.038.ph = phi i32 [ %48, %46 ], [ -11, %43 ], [ -9, %37 ], [ -6, %31 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %25) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %24) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %23) #7
  br label %93

91:                                               ; preds = %88, %90
  %.pre63 = phi i32 [ %.pr.pr, %88 ], [ %.pre63.pre, %90 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %25) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %24) #7
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %23) #7
  br label %93

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

93:                                               ; preds = %26, %92, %91, %.thread60
  %.1 = phi i32 [ %.038.ph, %.thread60 ], [ %.pre63, %91 ], [ -1, %92 ], [ %spec.select, %26 ]
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %22) #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 @cgeev_(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) 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