; LLVM IR from niuyishuai/PDCABB :: LAPACK_BLAS/LAPACK (chpgv)

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.complex = type { float, float }

@.str = external hidden unnamed_addr constant [2 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [9 x i8], align 1
@c__1 = external hidden global i64, align 8

; Function Attrs: nounwind uwtable
define dso_local i32 @chpgv_(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8, ptr noundef %9, ptr noundef %10, ptr noundef %11) #0 {
  %13 = alloca i32, align 4
  %14 = alloca ptr, align 8
  %15 = alloca ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca ptr, align 8
  %18 = alloca ptr, align 8
  %19 = alloca ptr, align 8
  %20 = alloca ptr, align 8
  %21 = alloca ptr, align 8
  %22 = alloca ptr, align 8
  %23 = alloca ptr, align 8
  %24 = alloca ptr, align 8
  %25 = alloca ptr, align 8
  %26 = alloca i64, align 8
  %27 = alloca i64, align 8
  %28 = alloca i64, align 8
  %29 = alloca i64, align 8
  %30 = alloca i64, align 8
  %31 = alloca [1 x i8], align 1
  %32 = alloca i64, align 8
  %33 = alloca i64, align 8
  %34 = alloca i32, align 4
  store ptr %0, ptr %14, align 8, !tbaa !5
  store ptr %1, ptr %15, align 8, !tbaa !5
  store ptr %2, ptr %16, align 8, !tbaa !5
  store ptr %3, ptr %17, align 8, !tbaa !5
  store ptr %4, ptr %18, align 8, !tbaa !5
  store ptr %5, ptr %19, align 8, !tbaa !5
  store ptr %6, ptr %20, align 8, !tbaa !5
  store ptr %7, ptr %21, align 8, !tbaa !5
  store ptr %8, ptr %22, align 8, !tbaa !5
  store ptr %9, ptr %23, align 8, !tbaa !5
  store ptr %10, ptr %24, align 8, !tbaa !5
  store ptr %11, ptr %25, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %26) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %27) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %28) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %29) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %30) #3
  call void @llvm.lifetime.start.p0(i64 1, ptr %31) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %32) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %33) #3
  %35 = load ptr, ptr %18, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.complex, ptr %35, i32 -1
  store ptr %36, ptr %18, align 8, !tbaa !5
  %37 = load ptr, ptr %19, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.complex, ptr %37, i32 -1
  store ptr %38, ptr %19, align 8, !tbaa !5
  %39 = load ptr, ptr %20, align 8, !tbaa !5
  %40 = getelementptr inbounds float, ptr %39, i32 -1
  store ptr %40, ptr %20, align 8, !tbaa !5
  %41 = load ptr, ptr %22, align 8, !tbaa !5
  %42 = load i64, ptr %41, align 8, !tbaa !9
  store i64 %42, ptr %26, align 8, !tbaa !9
  %43 = load i64, ptr %26, align 8, !tbaa !9
  %44 = add nsw i64 1, %43
  store i64 %44, ptr %27, align 8, !tbaa !9
  %45 = load i64, ptr %27, align 8, !tbaa !9
  %46 = load ptr, ptr %21, align 8, !tbaa !5
  %47 = sub i64 0, %45
  %48 = getelementptr inbounds %struct.complex, ptr %46, i64 %47
  store ptr %48, ptr %21, align 8, !tbaa !5
  %49 = load ptr, ptr %23, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.complex, ptr %49, i32 -1
  store ptr %50, ptr %23, align 8, !tbaa !5
  %51 = load ptr, ptr %24, align 8, !tbaa !5
  %52 = getelementptr inbounds float, ptr %51, i32 -1
  store ptr %52, ptr %24, align 8, !tbaa !5
  %53 = load ptr, ptr %15, align 8, !tbaa !5
  %54 = call i64 @lsame_(ptr noundef %53, ptr noundef @.str)
  store i64 %54, ptr %33, align 8, !tbaa !9
  %55 = load ptr, ptr %16, align 8, !tbaa !5
  %56 = call i64 @lsame_(ptr noundef %55, ptr noundef @.str.1)
  store i64 %56, ptr %32, align 8, !tbaa !9
  %57 = load ptr, ptr %25, align 8, !tbaa !5
  store i64 0, ptr %57, align 8, !tbaa !9
  %58 = load ptr, ptr %14, align 8, !tbaa !5
  %59 = load i64, ptr %58, align 8, !tbaa !9
  %60 = icmp slt i64 %59, 1
  br i1 %60, label %65, label %61

61:                                               ; preds = %12
  %62 = load ptr, ptr %14, align 8, !tbaa !5
  %63 = load i64, ptr %62, align 8, !tbaa !9
  %64 = icmp sgt i64 %63, 3
  br i1 %64, label %65, label %67

65:                                               ; preds = %61, %12
  %66 = load ptr, ptr %25, align 8, !tbaa !5
  store i64 -1, ptr %66, align 8, !tbaa !9
  br label %110

67:                                               ; preds = %61
  %68 = load i64, ptr %33, align 8, !tbaa !9
  %69 = icmp ne i64 %68, 0
  br i1 %69, label %76, label %70

70:                                               ; preds = %67
  %71 = load ptr, ptr %15, align 8, !tbaa !5
  %72 = call i64 @lsame_(ptr noundef %71, ptr noundef @.str.2)
  %73 = icmp ne i64 %72, 0
  br i1 %73, label %76, label %74

74:                                               ; preds = %70
  %75 = load ptr, ptr %25, align 8, !tbaa !5
  store i64 -2, ptr %75, align 8, !tbaa !9
  br label %109

76:                                               ; preds = %70, %67
  %77 = load i64, ptr %32, align 8, !tbaa !9
  %78 = icmp ne i64 %77, 0
  br i1 %78, label %85, label %79

79:                                               ; preds = %76
  %80 = load ptr, ptr %16, align 8, !tbaa !5
  %81 = call i64 @lsame_(ptr noundef %80, ptr noundef @.str.3)
  %82 = icmp ne i64 %81, 0
  br i1 %82, label %85, label %83

83:                                               ; preds = %79
  %84 = load ptr, ptr %25, align 8, !tbaa !5
  store i64 -3, ptr %84, align 8, !tbaa !9
  br label %108

85:                                               ; preds = %79, %76
  %86 = load ptr, ptr %17, align 8, !tbaa !5
  %87 = load i64, ptr %86, align 8, !tbaa !9
  %88 = icmp slt i64 %87, 0
  br i1 %88, label %89, label %91

89:                                               ; preds = %85
  %90 = load ptr, ptr %25, align 8, !tbaa !5
  store i64 -4, ptr %90, align 8, !tbaa !9
  br label %107

91:                                               ; preds = %85
  %92 = load ptr, ptr %22, align 8, !tbaa !5
  %93 = load i64, ptr %92, align 8, !tbaa !9
  %94 = icmp slt i64 %93, 1
  br i1 %94, label %104, label %95

95:                                               ; preds = %91
  %96 = load i64, ptr %33, align 8, !tbaa !9
  %97 = icmp ne i64 %96, 0
  br i1 %97, label %98, label %106

98:                                               ; preds = %95
  %99 = load ptr, ptr %22, align 8, !tbaa !5
  %100 = load i64, ptr %99, align 8, !tbaa !9
  %101 = load ptr, ptr %17, align 8, !tbaa !5
  %102 = load i64, ptr %101, align 8, !tbaa !9
  %103 = icmp slt i64 %100, %102
  br i1 %103, label %104, label %106

104:                                              ; preds = %98, %91
  %105 = load ptr, ptr %25, align 8, !tbaa !5
  store i64 -9, ptr %105, align 8, !tbaa !9
  br label %106

106:                                              ; preds = %104, %98, %95
  br label %107

107:                                              ; preds = %106, %89
  br label %108

108:                                              ; preds = %107, %83
  br label %109

109:                                              ; preds = %108, %74
  br label %110

110:                                              ; preds = %109, %65
  %111 = load ptr, ptr %25, align 8, !tbaa !5
  %112 = load i64, ptr %111, align 8, !tbaa !9
  %113 = icmp ne i64 %112, 0
  br i1 %113, label %114, label %119

114:                                              ; preds = %110
  %115 = load ptr, ptr %25, align 8, !tbaa !5
  %116 = load i64, ptr %115, align 8, !tbaa !9
  %117 = sub nsw i64 0, %116
  store i64 %117, ptr %28, align 8, !tbaa !9
  %118 = call i32 @xerbla_(ptr noundef @.str.4, ptr noundef %28)
  store i32 0, ptr %13, align 4
  store i32 1, ptr %34, align 4
  br label %255

119:                                              ; preds = %110
  %120 = load ptr, ptr %17, align 8, !tbaa !5
  %121 = load i64, ptr %120, align 8, !tbaa !9
  %122 = icmp eq i64 %121, 0
  br i1 %122, label %123, label %124

123:                                              ; preds = %119
  store i32 0, ptr %13, align 4
  store i32 1, ptr %34, align 4
  br label %255

124:                                              ; preds = %119
  %125 = load ptr, ptr %16, align 8, !tbaa !5
  %126 = load ptr, ptr %17, align 8, !tbaa !5
  %127 = load ptr, ptr %19, align 8, !tbaa !5
  %128 = getelementptr inbounds %struct.complex, ptr %127, i64 1
  %129 = load ptr, ptr %25, align 8, !tbaa !5
  %130 = call i32 @cpptrf_(ptr noundef %125, ptr noundef %126, ptr noundef %128, ptr noundef %129)
  %131 = load ptr, ptr %25, align 8, !tbaa !5
  %132 = load i64, ptr %131, align 8, !tbaa !9
  %133 = icmp ne i64 %132, 0
  br i1 %133, label %134, label %141

134:                                              ; preds = %124
  %135 = load ptr, ptr %17, align 8, !tbaa !5
  %136 = load i64, ptr %135, align 8, !tbaa !9
  %137 = load ptr, ptr %25, align 8, !tbaa !5
  %138 = load i64, ptr %137, align 8, !tbaa !9
  %139 = add nsw i64 %136, %138
  %140 = load ptr, ptr %25, align 8, !tbaa !5
  store i64 %139, ptr %140, align 8, !tbaa !9
  store i32 0, ptr %13, align 4
  store i32 1, ptr %34, align 4
  br label %255

141:                                              ; preds = %124
  %142 = load ptr, ptr %14, align 8, !tbaa !5
  %143 = load ptr, ptr %16, align 8, !tbaa !5
  %144 = load ptr, ptr %17, align 8, !tbaa !5
  %145 = load ptr, ptr %18, align 8, !tbaa !5
  %146 = getelementptr inbounds %struct.complex, ptr %145, i64 1
  %147 = load ptr, ptr %19, align 8, !tbaa !5
  %148 = getelementptr inbounds %struct.complex, ptr %147, i64 1
  %149 = load ptr, ptr %25, align 8, !tbaa !5
  %150 = call i32 @chpgst_(ptr noundef %142, ptr noundef %143, ptr noundef %144, ptr noundef %146, ptr noundef %148, ptr noundef %149)
  %151 = load ptr, ptr %15, align 8, !tbaa !5
  %152 = load ptr, ptr %16, align 8, !tbaa !5
  %153 = load ptr, ptr %17, align 8, !tbaa !5
  %154 = load ptr, ptr %18, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct.complex, ptr %154, i64 1
  %156 = load ptr, ptr %20, align 8, !tbaa !5
  %157 = getelementptr inbounds float, ptr %156, i64 1
  %158 = load ptr, ptr %21, align 8, !tbaa !5
  %159 = load i64, ptr %27, align 8, !tbaa !9
  %160 = getelementptr inbounds %struct.complex, ptr %158, i64 %159
  %161 = load ptr, ptr %22, align 8, !tbaa !5
  %162 = load ptr, ptr %23, align 8, !tbaa !5
  %163 = getelementptr inbounds %struct.complex, ptr %162, i64 1
  %164 = load ptr, ptr %24, align 8, !tbaa !5
  %165 = getelementptr inbounds float, ptr %164, i64 1
  %166 = load ptr, ptr %25, align 8, !tbaa !5
  %167 = call i32 @chpev_(ptr noundef %151, ptr noundef %152, ptr noundef %153, ptr noundef %155, ptr noundef %157, ptr noundef %160, ptr noundef %161, ptr noundef %163, ptr noundef %165, ptr noundef %166)
  %168 = load i64, ptr %33, align 8, !tbaa !9
  %169 = icmp ne i64 %168, 0
  br i1 %169, label %170, label %254

170:                                              ; preds = %141
  %171 = load ptr, ptr %17, align 8, !tbaa !5
  %172 = load i64, ptr %171, align 8, !tbaa !9
  store i64 %172, ptr %30, align 8, !tbaa !9
  %173 = load ptr, ptr %25, align 8, !tbaa !5
  %174 = load i64, ptr %173, align 8, !tbaa !9
  %175 = icmp sgt i64 %174, 0
  br i1 %175, label %176, label %180

176:                                              ; preds = %170
  %177 = load ptr, ptr %25, align 8, !tbaa !5
  %178 = load i64, ptr %177, align 8, !tbaa !9
  %179 = sub nsw i64 %178, 1
  store i64 %179, ptr %30, align 8, !tbaa !9
  br label %180

180:                                              ; preds = %176, %170
  %181 = load ptr, ptr %14, align 8, !tbaa !5
  %182 = load i64, ptr %181, align 8, !tbaa !9
  %183 = icmp eq i64 %182, 1
  br i1 %183, label %188, label %184

184:                                              ; preds = %180
  %185 = load ptr, ptr %14, align 8, !tbaa !5
  %186 = load i64, ptr %185, align 8, !tbaa !9
  %187 = icmp eq i64 %186, 2
  br i1 %187, label %188, label %218

188:                                              ; preds = %184, %180
  %189 = load i64, ptr %32, align 8, !tbaa !9
  %190 = icmp ne i64 %189, 0
  br i1 %190, label %191, label %193

191:                                              ; preds = %188
  %192 = getelementptr inbounds [1 x i8], ptr %31, i64 0, i64 0
  store i8 78, ptr %192, align 1, !tbaa !11
  br label %195

193:                                              ; preds = %188
  %194 = getelementptr inbounds [1 x i8], ptr %31, i64 0, i64 0
  store i8 67, ptr %194, align 1, !tbaa !11
  br label %195

195:                                              ; preds = %193, %191
  %196 = load i64, ptr %30, align 8, !tbaa !9
  store i64 %196, ptr %28, align 8, !tbaa !9
  store i64 1, ptr %29, align 8, !tbaa !9
  br label %197

197:                                              ; preds = %214, %195
  %198 = load i64, ptr %29, align 8, !tbaa !9
  %199 = load i64, ptr %28, align 8, !tbaa !9
  %200 = icmp sle i64 %198, %199
  br i1 %200, label %201, label %217

201:                                              ; preds = %197
  %202 = load ptr, ptr %16, align 8, !tbaa !5
  %203 = getelementptr inbounds [1 x i8], ptr %31, i64 0, i64 0
  %204 = load ptr, ptr %17, align 8, !tbaa !5
  %205 = load ptr, ptr %19, align 8, !tbaa !5
  %206 = getelementptr inbounds %struct.complex, ptr %205, i64 1
  %207 = load ptr, ptr %21, align 8, !tbaa !5
  %208 = load i64, ptr %29, align 8, !tbaa !9
  %209 = load i64, ptr %26, align 8, !tbaa !9
  %210 = mul nsw i64 %208, %209
  %211 = add nsw i64 %210, 1
  %212 = getelementptr inbounds %struct.complex, ptr %207, i64 %211
  %213 = call i32 @f2c_ctpsv(ptr noundef %202, ptr noundef %203, ptr noundef @.str.5, ptr noundef %204, ptr noundef %206, ptr noundef %212, ptr noundef @c__1)
  br label %214

214:                                              ; preds = %201
  %215 = load i64, ptr %29, align 8, !tbaa !9
  %216 = add nsw i64 %215, 1
  store i64 %216, ptr %29, align 8, !tbaa !9
  br label %197, !llvm.loop !12

217:                                              ; preds = %197
  br label %253

218:                                              ; preds = %184
  %219 = load ptr, ptr %14, align 8, !tbaa !5
  %220 = load i64, ptr %219, align 8, !tbaa !9
  %221 = icmp eq i64 %220, 3
  br i1 %221, label %222, label %252

222:                                              ; preds = %218
  %223 = load i64, ptr %32, align 8, !tbaa !9
  %224 = icmp ne i64 %223, 0
  br i1 %224, label %225, label %227

225:                                              ; preds = %222
  %226 = getelementptr inbounds [1 x i8], ptr %31, i64 0, i64 0
  store i8 67, ptr %226, align 1, !tbaa !11
  br label %229

227:                                              ; preds = %222
  %228 = getelementptr inbounds [1 x i8], ptr %31, i64 0, i64 0
  store i8 78, ptr %228, align 1, !tbaa !11
  br label %229

229:                                              ; preds = %227, %225
  %230 = load i64, ptr %30, align 8, !tbaa !9
  store i64 %230, ptr %28, align 8, !tbaa !9
  store i64 1, ptr %29, align 8, !tbaa !9
  br label %231

231:                                              ; preds = %248, %229
  %232 = load i64, ptr %29, align 8, !tbaa !9
  %233 = load i64, ptr %28, align 8, !tbaa !9
  %234 = icmp sle i64 %232, %233
  br i1 %234, label %235, label %251

235:                                              ; preds = %231
  %236 = load ptr, ptr %16, align 8, !tbaa !5
  %237 = getelementptr inbounds [1 x i8], ptr %31, i64 0, i64 0
  %238 = load ptr, ptr %17, align 8, !tbaa !5
  %239 = load ptr, ptr %19, align 8, !tbaa !5
  %240 = getelementptr inbounds %struct.complex, ptr %239, i64 1
  %241 = load ptr, ptr %21, align 8, !tbaa !5
  %242 = load i64, ptr %29, align 8, !tbaa !9
  %243 = load i64, ptr %26, align 8, !tbaa !9
  %244 = mul nsw i64 %242, %243
  %245 = add nsw i64 %244, 1
  %246 = getelementptr inbounds %struct.complex, ptr %241, i64 %245
  %247 = call i32 @f2c_ctpmv(ptr noundef %236, ptr noundef %237, ptr noundef @.str.5, ptr noundef %238, ptr noundef %240, ptr noundef %246, ptr noundef @c__1)
  br label %248

248:                                              ; preds = %235
  %249 = load i64, ptr %29, align 8, !tbaa !9
  %250 = add nsw i64 %249, 1
  store i64 %250, ptr %29, align 8, !tbaa !9
  br label %231, !llvm.loop !14

251:                                              ; preds = %231
  br label %252

252:                                              ; preds = %251, %218
  br label %253

253:                                              ; preds = %252, %217
  br label %254

254:                                              ; preds = %253, %141
  store i32 0, ptr %13, align 4
  store i32 1, ptr %34, align 4
  br label %255

255:                                              ; preds = %254, %134, %123, %114
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %31) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #3
  %256 = load i32, ptr %13, align 4
  ret i32 %256
}

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

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

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

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

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

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

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

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

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

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

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


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

%struct.complex = type { float, float }

@.str = external hidden unnamed_addr constant [2 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [9 x i8], align 1
@c__1 = external hidden global i64, align 8

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @chpgv_(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %5, ptr noundef %6, ptr noundef %7, ptr noundef %8, ptr noundef %9, ptr noundef %10, ptr noundef %11) local_unnamed_addr #0 {
  %13 = alloca i64, align 8
  %14 = alloca [1 x i8], align 1
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #3
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %14) #3
  %15 = load i64, ptr %8, align 8, !tbaa !5
  %16 = xor i64 %15, -1
  %17 = getelementptr inbounds %struct.complex, ptr %7, i64 %16
  %18 = tail call i64 @lsame_(ptr noundef %1, ptr noundef nonnull @.str) #3
  %19 = tail call i64 @lsame_(ptr noundef %2, ptr noundef nonnull @.str.1) #3
  store i64 0, ptr %11, align 8, !tbaa !5
  %20 = load i64, ptr %0, align 8, !tbaa !5
  %21 = add i64 %20, -4
  %or.cond = icmp ult i64 %21, -3
  br i1 %or.cond, label %.thread.sink.split, label %22

22:                                               ; preds = %12
  %.not = icmp ne i64 %18, 0
  br i1 %.not, label %25, label %23

23:                                               ; preds = %22
  %24 = tail call i64 @lsame_(ptr noundef %1, ptr noundef nonnull @.str.2) #3
  %.not91 = icmp eq i64 %24, 0
  br i1 %.not91, label %.thread.sink.split, label %25

25:                                               ; preds = %23, %22
  %.not92 = icmp eq i64 %19, 0
  br i1 %.not92, label %26, label %28

26:                                               ; preds = %25
  %27 = tail call i64 @lsame_(ptr noundef %2, ptr noundef nonnull @.str.3) #3
  %.not93 = icmp eq i64 %27, 0
  br i1 %.not93, label %.thread.sink.split, label %28

28:                                               ; preds = %26, %25
  %29 = load i64, ptr %3, align 8, !tbaa !5
  %30 = icmp slt i64 %29, 0
  br i1 %30, label %.thread.sink.split, label %31

31:                                               ; preds = %28
  %32 = load i64, ptr %8, align 8, !tbaa !5
  %33 = icmp slt i64 %32, 1
  %34 = icmp ult i64 %32, %29
  %or.cond102 = and i1 %.not, %34
  %or.cond105 = or i1 %33, %or.cond102
  br i1 %or.cond105, label %.thread.sink.split, label %35

35:                                               ; preds = %31
  %.pr = load i64, ptr %11, align 8, !tbaa !5
  %.not94 = icmp eq i64 %.pr, 0
  br i1 %.not94, label %39, label %.thread

.thread.sink.split:                               ; preds = %31, %28, %26, %23, %12
  %.sink = phi i64 [ -1, %12 ], [ -2, %23 ], [ -3, %26 ], [ -4, %28 ], [ -9, %31 ]
  store i64 %.sink, ptr %11, align 8, !tbaa !5
  br label %.thread

.thread:                                          ; preds = %.thread.sink.split, %35
  %36 = phi i64 [ %.pr, %35 ], [ %.sink, %.thread.sink.split ]
  %37 = sub nsw i64 0, %36
  store i64 %37, ptr %13, align 8, !tbaa !5
  %38 = call i32 @xerbla_(ptr noundef nonnull @.str.4, ptr noundef nonnull %13) #3
  br label %.loopexit

39:                                               ; preds = %35
  %40 = icmp eq i64 %29, 0
  br i1 %40, label %.loopexit, label %41

41:                                               ; preds = %39
  %42 = tail call i32 @cpptrf_(ptr noundef %2, ptr noundef nonnull %3, ptr noundef %5, ptr noundef nonnull %11) #3
  %43 = load i64, ptr %11, align 8, !tbaa !5
  %.not95 = icmp eq i64 %43, 0
  br i1 %.not95, label %47, label %44

44:                                               ; preds = %41
  %45 = load i64, ptr %3, align 8, !tbaa !5
  %46 = add nsw i64 %45, %43
  store i64 %46, ptr %11, align 8, !tbaa !5
  br label %.loopexit

47:                                               ; preds = %41
  %48 = tail call i32 @chpgst_(ptr noundef nonnull %0, ptr noundef %2, ptr noundef nonnull %3, ptr noundef %4, ptr noundef %5, ptr noundef nonnull %11) #3
  %49 = tail call i32 @chpev_(ptr noundef %1, ptr noundef %2, ptr noundef nonnull %3, ptr noundef %4, ptr noundef %6, ptr noundef %7, ptr noundef nonnull %8, ptr noundef %9, ptr noundef %10, ptr noundef nonnull %11) #3
  %.not96 = icmp eq i64 %18, 0
  br i1 %.not96, label %.loopexit, label %50

50:                                               ; preds = %47
  %51 = load i64, ptr %3, align 8, !tbaa !5
  %52 = load i64, ptr %11, align 8, !tbaa !5
  %53 = icmp sgt i64 %52, 0
  %54 = add nsw i64 %52, -1
  %spec.select = select i1 %53, i64 %54, i64 %51
  %55 = load i64, ptr %0, align 8, !tbaa !5
  switch i64 %55, label %.loopexit [
    i64 1, label %56
    i64 2, label %56
    i64 3, label %60
  ]

56:                                               ; preds = %50, %50
  %. = select i1 %.not92, i8 67, i8 78
  store i8 %., ptr %14, align 1, !tbaa !9
  %invariant.gep109 = getelementptr i8, ptr %17, i64 8
  %.not101111 = icmp slt i64 %spec.select, 1
  br i1 %.not101111, label %.loopexit, label %.lr.ph113

.lr.ph113:                                        ; preds = %56, %.lr.ph113
  %.084112 = phi i64 [ %59, %.lr.ph113 ], [ 1, %56 ]
  %57 = mul nsw i64 %.084112, %15
  %gep110 = getelementptr %struct.complex, ptr %invariant.gep109, i64 %57
  %58 = call i32 @f2c_ctpsv(ptr noundef %2, ptr noundef nonnull %14, ptr noundef nonnull @.str.5, ptr noundef nonnull %3, ptr noundef %5, ptr noundef %gep110, ptr noundef nonnull @c__1) #3
  %59 = add nuw nsw i64 %.084112, 1
  %.not101.not = icmp slt i64 %.084112, %spec.select
  br i1 %.not101.not, label %.lr.ph113, label %.loopexit, !llvm.loop !10

60:                                               ; preds = %50
  %.103 = select i1 %.not92, i8 78, i8 67
  store i8 %.103, ptr %14, align 1, !tbaa !9
  %invariant.gep = getelementptr i8, ptr %17, i64 8
  %.not98107 = icmp slt i64 %spec.select, 1
  br i1 %.not98107, label %.loopexit, label %.lr.ph

.lr.ph:                                           ; preds = %60, %.lr.ph
  %.1108 = phi i64 [ %63, %.lr.ph ], [ 1, %60 ]
  %61 = mul nsw i64 %.1108, %15
  %gep = getelementptr %struct.complex, ptr %invariant.gep, i64 %61
  %62 = call i32 @f2c_ctpmv(ptr noundef %2, ptr noundef nonnull %14, ptr noundef nonnull @.str.5, ptr noundef nonnull %3, ptr noundef %5, ptr noundef %gep, ptr noundef nonnull @c__1) #3
  %63 = add nuw nsw i64 %.1108, 1
  %.not98.not = icmp slt i64 %.1108, %spec.select
  br i1 %.not98.not, label %.lr.ph, label %.loopexit, !llvm.loop !12

.loopexit:                                        ; preds = %.lr.ph, %.lr.ph113, %60, %56, %47, %50, %39, %44, %.thread
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %14) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #3
  ret i32 0
}

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

declare i64 @lsame_(ptr noundef, ptr noundef) local_unnamed_addr #2

declare i32 @xerbla_(ptr noundef, ptr noundef) local_unnamed_addr #2

declare i32 @cpptrf_(ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare i32 @chpgst_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare i32 @chpev_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare i32 @f2c_ctpsv(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare i32 @f2c_ctpmv(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress 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 = { 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 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = distinct !{!10, !11}
!11 = !{!"llvm.loop.mustprogress"}
!12 = distinct !{!12, !11}


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SROAPass,SimplifyCFGPass,TailCallElimPass