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

; 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.doublecomplex = type { double, double }

@.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 [7 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [6 x i8], align 1
@c__1 = external hidden global i64, align 8

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

55:                                               ; preds = %10
  %56 = load ptr, ptr %12, align 8, !tbaa !5
  %57 = call i64 @lsame_(ptr noundef %56, ptr noundef @.str.1)
  %58 = icmp ne i64 %57, 0
  br i1 %58, label %61, label %59

59:                                               ; preds = %55
  %60 = load ptr, ptr %21, align 8, !tbaa !5
  store i64 -1, ptr %60, align 8, !tbaa !9
  br label %92

61:                                               ; preds = %55, %10
  %62 = load ptr, ptr %13, align 8, !tbaa !5
  %63 = load i64, ptr %62, align 8, !tbaa !9
  %64 = icmp slt i64 %63, 0
  br i1 %64, label %65, label %67

65:                                               ; preds = %61
  %66 = load ptr, ptr %21, align 8, !tbaa !5
  store i64 -2, ptr %66, align 8, !tbaa !9
  br label %91

67:                                               ; preds = %61
  %68 = load ptr, ptr %14, align 8, !tbaa !5
  %69 = load i64, ptr %68, align 8, !tbaa !9
  %70 = icmp slt i64 %69, 0
  br i1 %70, label %71, label %73

71:                                               ; preds = %67
  %72 = load ptr, ptr %21, align 8, !tbaa !5
  store i64 -3, ptr %72, align 8, !tbaa !9
  br label %90

73:                                               ; preds = %67
  %74 = load ptr, ptr %16, align 8, !tbaa !5
  %75 = load i64, ptr %74, align 8, !tbaa !9
  %76 = load ptr, ptr %14, align 8, !tbaa !5
  %77 = load i64, ptr %76, align 8, !tbaa !9
  %78 = add nsw i64 %77, 1
  %79 = icmp slt i64 %75, %78
  br i1 %79, label %80, label %82

80:                                               ; preds = %73
  %81 = load ptr, ptr %21, align 8, !tbaa !5
  store i64 -5, ptr %81, align 8, !tbaa !9
  br label %89

82:                                               ; preds = %73
  %83 = load ptr, ptr %17, align 8, !tbaa !5
  %84 = load double, ptr %83, align 8, !tbaa !11
  %85 = fcmp olt double %84, 0.000000e+00
  br i1 %85, label %86, label %88

86:                                               ; preds = %82
  %87 = load ptr, ptr %21, align 8, !tbaa !5
  store i64 -6, ptr %87, align 8, !tbaa !9
  br label %88

88:                                               ; preds = %86, %82
  br label %89

89:                                               ; preds = %88, %80
  br label %90

90:                                               ; preds = %89, %71
  br label %91

91:                                               ; preds = %90, %65
  br label %92

92:                                               ; preds = %91, %59
  %93 = load ptr, ptr %21, align 8, !tbaa !5
  %94 = load i64, ptr %93, align 8, !tbaa !9
  %95 = icmp ne i64 %94, 0
  br i1 %95, label %96, label %101

96:                                               ; preds = %92
  %97 = load ptr, ptr %21, align 8, !tbaa !5
  %98 = load i64, ptr %97, align 8, !tbaa !9
  %99 = sub nsw i64 0, %98
  store i64 %99, ptr %24, align 8, !tbaa !9
  %100 = call i32 @xerbla_(ptr noundef @.str.2, ptr noundef %24)
  store i32 0, ptr %11, align 4
  store i32 1, ptr %37, align 4
  br label %255

101:                                              ; preds = %92
  %102 = load ptr, ptr %18, align 8, !tbaa !5
  store double 0.000000e+00, ptr %102, align 8, !tbaa !11
  %103 = load ptr, ptr %13, align 8, !tbaa !5
  %104 = load i64, ptr %103, align 8, !tbaa !9
  %105 = icmp eq i64 %104, 0
  br i1 %105, label %106, label %108

106:                                              ; preds = %101
  %107 = load ptr, ptr %18, align 8, !tbaa !5
  store double 1.000000e+00, ptr %107, align 8, !tbaa !11
  store i32 0, ptr %11, align 4
  store i32 1, ptr %37, align 4
  br label %255

108:                                              ; preds = %101
  %109 = load ptr, ptr %17, align 8, !tbaa !5
  %110 = load double, ptr %109, align 8, !tbaa !11
  %111 = fcmp oeq double %110, 0.000000e+00
  br i1 %111, label %112, label %113

112:                                              ; preds = %108
  store i32 0, ptr %11, align 4
  store i32 1, ptr %37, align 4
  br label %255

113:                                              ; preds = %108
  br label %114

114:                                              ; preds = %113
  %115 = call double @dlamch_(ptr noundef @.str.3)
  store double %115, ptr %36, align 8, !tbaa !11
  store i64 0, ptr %28, align 8, !tbaa !9
  %116 = getelementptr inbounds [1 x i8], ptr %35, i64 0, i64 0
  store i8 78, ptr %116, align 1, !tbaa !13
  br label %117

117:                                              ; preds = %242, %114
  %118 = load ptr, ptr %13, align 8, !tbaa !5
  %119 = load ptr, ptr %19, align 8, !tbaa !5
  %120 = load ptr, ptr %13, align 8, !tbaa !5
  %121 = load i64, ptr %120, align 8, !tbaa !9
  %122 = add nsw i64 %121, 1
  %123 = getelementptr inbounds %struct.doublecomplex, ptr %119, i64 %122
  %124 = load ptr, ptr %19, align 8, !tbaa !5
  %125 = getelementptr inbounds %struct.doublecomplex, ptr %124, i64 1
  %126 = getelementptr inbounds [3 x i64], ptr %30, i64 0, i64 0
  %127 = call i32 @zlacn2_(ptr noundef %118, ptr noundef %123, ptr noundef %125, ptr noundef %34, ptr noundef %28, ptr noundef %126)
  %128 = load i64, ptr %28, align 8, !tbaa !9
  %129 = icmp ne i64 %128, 0
  br i1 %129, label %130, label %243

130:                                              ; preds = %117
  %131 = load i64, ptr %31, align 8, !tbaa !9
  %132 = icmp ne i64 %131, 0
  br i1 %132, label %133, label %161

133:                                              ; preds = %130
  %134 = getelementptr inbounds [1 x i8], ptr %35, i64 0, i64 0
  %135 = load ptr, ptr %13, align 8, !tbaa !5
  %136 = load ptr, ptr %14, align 8, !tbaa !5
  %137 = load ptr, ptr %15, align 8, !tbaa !5
  %138 = load i64, ptr %23, align 8, !tbaa !9
  %139 = getelementptr inbounds %struct.doublecomplex, ptr %137, i64 %138
  %140 = load ptr, ptr %16, align 8, !tbaa !5
  %141 = load ptr, ptr %19, align 8, !tbaa !5
  %142 = getelementptr inbounds %struct.doublecomplex, ptr %141, i64 1
  %143 = load ptr, ptr %20, align 8, !tbaa !5
  %144 = getelementptr inbounds double, ptr %143, i64 1
  %145 = load ptr, ptr %21, align 8, !tbaa !5
  %146 = call i32 @zlatbs_(ptr noundef @.str.4, ptr noundef @.str.5, ptr noundef @.str.6, ptr noundef %134, ptr noundef %135, ptr noundef %136, ptr noundef %139, ptr noundef %140, ptr noundef %142, ptr noundef %32, ptr noundef %144, ptr noundef %145)
  %147 = getelementptr inbounds [1 x i8], ptr %35, i64 0, i64 0
  store i8 89, ptr %147, align 1, !tbaa !13
  %148 = getelementptr inbounds [1 x i8], ptr %35, i64 0, i64 0
  %149 = load ptr, ptr %13, align 8, !tbaa !5
  %150 = load ptr, ptr %14, align 8, !tbaa !5
  %151 = load ptr, ptr %15, align 8, !tbaa !5
  %152 = load i64, ptr %23, align 8, !tbaa !9
  %153 = getelementptr inbounds %struct.doublecomplex, ptr %151, i64 %152
  %154 = load ptr, ptr %16, align 8, !tbaa !5
  %155 = load ptr, ptr %19, align 8, !tbaa !5
  %156 = getelementptr inbounds %struct.doublecomplex, ptr %155, i64 1
  %157 = load ptr, ptr %20, align 8, !tbaa !5
  %158 = getelementptr inbounds double, ptr %157, i64 1
  %159 = load ptr, ptr %21, align 8, !tbaa !5
  %160 = call i32 @zlatbs_(ptr noundef @.str.4, ptr noundef @.str.7, ptr noundef @.str.6, ptr noundef %148, ptr noundef %149, ptr noundef %150, ptr noundef %153, ptr noundef %154, ptr noundef %156, ptr noundef %33, ptr noundef %158, ptr noundef %159)
  br label %189

161:                                              ; preds = %130
  %162 = getelementptr inbounds [1 x i8], ptr %35, i64 0, i64 0
  %163 = load ptr, ptr %13, align 8, !tbaa !5
  %164 = load ptr, ptr %14, align 8, !tbaa !5
  %165 = load ptr, ptr %15, align 8, !tbaa !5
  %166 = load i64, ptr %23, align 8, !tbaa !9
  %167 = getelementptr inbounds %struct.doublecomplex, ptr %165, i64 %166
  %168 = load ptr, ptr %16, align 8, !tbaa !5
  %169 = load ptr, ptr %19, align 8, !tbaa !5
  %170 = getelementptr inbounds %struct.doublecomplex, ptr %169, i64 1
  %171 = load ptr, ptr %20, align 8, !tbaa !5
  %172 = getelementptr inbounds double, ptr %171, i64 1
  %173 = load ptr, ptr %21, align 8, !tbaa !5
  %174 = call i32 @zlatbs_(ptr noundef @.str.8, ptr noundef @.str.7, ptr noundef @.str.6, ptr noundef %162, ptr noundef %163, ptr noundef %164, ptr noundef %167, ptr noundef %168, ptr noundef %170, ptr noundef %32, ptr noundef %172, ptr noundef %173)
  %175 = getelementptr inbounds [1 x i8], ptr %35, i64 0, i64 0
  store i8 89, ptr %175, align 1, !tbaa !13
  %176 = getelementptr inbounds [1 x i8], ptr %35, i64 0, i64 0
  %177 = load ptr, ptr %13, align 8, !tbaa !5
  %178 = load ptr, ptr %14, align 8, !tbaa !5
  %179 = load ptr, ptr %15, align 8, !tbaa !5
  %180 = load i64, ptr %23, align 8, !tbaa !9
  %181 = getelementptr inbounds %struct.doublecomplex, ptr %179, i64 %180
  %182 = load ptr, ptr %16, align 8, !tbaa !5
  %183 = load ptr, ptr %19, align 8, !tbaa !5
  %184 = getelementptr inbounds %struct.doublecomplex, ptr %183, i64 1
  %185 = load ptr, ptr %20, align 8, !tbaa !5
  %186 = getelementptr inbounds double, ptr %185, i64 1
  %187 = load ptr, ptr %21, align 8, !tbaa !5
  %188 = call i32 @zlatbs_(ptr noundef @.str.8, ptr noundef @.str.5, ptr noundef @.str.6, ptr noundef %176, ptr noundef %177, ptr noundef %178, ptr noundef %181, ptr noundef %182, ptr noundef %184, ptr noundef %33, ptr noundef %186, ptr noundef %187)
  br label %189

189:                                              ; preds = %161, %133
  %190 = load double, ptr %32, align 8, !tbaa !11
  %191 = load double, ptr %33, align 8, !tbaa !11
  %192 = fmul double %190, %191
  store double %192, ptr %29, align 8, !tbaa !11
  %193 = load double, ptr %29, align 8, !tbaa !11
  %194 = fcmp une double %193, 1.000000e+00
  br i1 %194, label %195, label %242

195:                                              ; preds = %189
  %196 = load ptr, ptr %13, align 8, !tbaa !5
  %197 = load ptr, ptr %19, align 8, !tbaa !5
  %198 = getelementptr inbounds %struct.doublecomplex, ptr %197, i64 1
  %199 = call i64 @f2c_izamax(ptr noundef %196, ptr noundef %198, ptr noundef @c__1)
  store i64 %199, ptr %27, align 8, !tbaa !9
  %200 = load i64, ptr %27, align 8, !tbaa !9
  store i64 %200, ptr %24, align 8, !tbaa !9
  %201 = load double, ptr %29, align 8, !tbaa !11
  %202 = load ptr, ptr %19, align 8, !tbaa !5
  %203 = load i64, ptr %24, align 8, !tbaa !9
  %204 = getelementptr inbounds %struct.doublecomplex, ptr %202, i64 %203
  %205 = getelementptr inbounds %struct.doublecomplex, ptr %204, i32 0, i32 0
  %206 = load double, ptr %205, align 8, !tbaa !14
  store double %206, ptr %25, align 8, !tbaa !11
  %207 = load double, ptr %25, align 8, !tbaa !11
  %208 = fcmp oge double %207, 0.000000e+00
  br i1 %208, label %209, label %211

209:                                              ; preds = %195
  %210 = load double, ptr %25, align 8, !tbaa !11
  br label %214

211:                                              ; preds = %195
  %212 = load double, ptr %25, align 8, !tbaa !11
  %213 = fneg double %212
  br label %214

214:                                              ; preds = %211, %209
  %215 = phi double [ %210, %209 ], [ %213, %211 ]
  %216 = load ptr, ptr %19, align 8, !tbaa !5
  %217 = load i64, ptr %27, align 8, !tbaa !9
  %218 = getelementptr inbounds %struct.doublecomplex, ptr %216, i64 %217
  %219 = call double @d_imag(ptr noundef %218)
  store double %219, ptr %26, align 8, !tbaa !11
  %220 = load double, ptr %26, align 8, !tbaa !11
  %221 = fcmp oge double %220, 0.000000e+00
  br i1 %221, label %222, label %224

222:                                              ; preds = %214
  %223 = load double, ptr %26, align 8, !tbaa !11
  br label %227

224:                                              ; preds = %214
  %225 = load double, ptr %26, align 8, !tbaa !11
  %226 = fneg double %225
  br label %227

227:                                              ; preds = %224, %222
  %228 = phi double [ %223, %222 ], [ %226, %224 ]
  %229 = fadd double %215, %228
  %230 = load double, ptr %36, align 8, !tbaa !11
  %231 = fmul double %229, %230
  %232 = fcmp olt double %201, %231
  br i1 %232, label %236, label %233

233:                                              ; preds = %227
  %234 = load double, ptr %29, align 8, !tbaa !11
  %235 = fcmp oeq double %234, 0.000000e+00
  br i1 %235, label %236, label %237

236:                                              ; preds = %233, %227
  br label %254

237:                                              ; preds = %233
  %238 = load ptr, ptr %13, align 8, !tbaa !5
  %239 = load ptr, ptr %19, align 8, !tbaa !5
  %240 = getelementptr inbounds %struct.doublecomplex, ptr %239, i64 1
  %241 = call i32 @zdrscl_(ptr noundef %238, ptr noundef %29, ptr noundef %240, ptr noundef @c__1)
  br label %242

242:                                              ; preds = %237, %189
  br label %117

243:                                              ; preds = %117
  %244 = load double, ptr %34, align 8, !tbaa !11
  %245 = fcmp une double %244, 0.000000e+00
  br i1 %245, label %246, label %253

246:                                              ; preds = %243
  %247 = load double, ptr %34, align 8, !tbaa !11
  %248 = fdiv double 1.000000e+00, %247
  %249 = load ptr, ptr %17, align 8, !tbaa !5
  %250 = load double, ptr %249, align 8, !tbaa !11
  %251 = fdiv double %248, %250
  %252 = load ptr, ptr %18, align 8, !tbaa !5
  store double %251, ptr %252, align 8, !tbaa !11
  br label %253

253:                                              ; preds = %246, %243
  br label %254

254:                                              ; preds = %253, %236
  store i32 0, ptr %11, align 4
  store i32 1, ptr %37, align 4
  br label %255

255:                                              ; preds = %254, %112, %106, %96
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %35) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #3
  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 8, ptr %31) #3
  call void @llvm.lifetime.end.p0(i64 24, 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
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #3
  %256 = load i32, ptr %11, 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 double @dlamch_(ptr noundef) #2

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

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

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

declare double @d_imag(ptr noundef) #2

declare i32 @zdrscl_(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 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!7, !7, i64 0}
!14 = !{!15, !12, i64 0}
!15 = !{!"", !12, i64 0, !12, i64 8}


; 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.doublecomplex = type { double, double }

@.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 [7 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [20 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [9 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [6 x i8], align 1
@c__1 = external hidden global i64, align 8

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @zpbcon_(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr nocapture noundef readonly %5, ptr nocapture noundef writeonly %6, ptr noundef %7, ptr noundef %8, ptr noundef %9) local_unnamed_addr #0 {
  %11 = alloca i64, align 8
  %12 = alloca i64, align 8
  %13 = alloca double, align 8
  %14 = alloca [3 x i64], align 16
  %15 = alloca double, align 8
  %16 = alloca double, align 8
  %17 = alloca double, align 8
  %18 = alloca [1 x i8], align 1
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #3
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %14) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %16) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %17) #3
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %18) #3
  %19 = getelementptr inbounds i8, ptr %7, i64 -16
  store i64 0, ptr %9, align 8, !tbaa !5
  %20 = tail call i64 @lsame_(ptr noundef %0, ptr noundef nonnull @.str) #3
  %.not = icmp eq i64 %20, 0
  br i1 %.not, label %21, label %23

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

23:                                               ; preds = %21, %10
  %24 = load i64, ptr %1, align 8, !tbaa !5
  %25 = icmp slt i64 %24, 0
  br i1 %25, label %.thread.sink.split, label %26

26:                                               ; preds = %23
  %27 = load i64, ptr %2, align 8, !tbaa !5
  %28 = icmp slt i64 %27, 0
  br i1 %28, label %.thread.sink.split, label %29

29:                                               ; preds = %26
  %30 = load i64, ptr %4, align 8, !tbaa !5
  %.not84 = icmp sgt i64 %30, %27
  br i1 %.not84, label %31, label %.thread.sink.split

31:                                               ; preds = %29
  %32 = load double, ptr %5, align 8, !tbaa !9
  %33 = fcmp olt double %32, 0.000000e+00
  br i1 %33, label %.thread.sink.split, label %34

34:                                               ; preds = %31
  %.pr = load i64, ptr %9, align 8, !tbaa !5
  %.not85 = icmp eq i64 %.pr, 0
  br i1 %.not85, label %38, label %.thread

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

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

38:                                               ; preds = %34
  store double 0.000000e+00, ptr %6, align 8, !tbaa !9
  %39 = icmp eq i64 %24, 0
  br i1 %39, label %40, label %41

40:                                               ; preds = %38
  store double 1.000000e+00, ptr %6, align 8, !tbaa !9
  br label %.loopexit

41:                                               ; preds = %38
  %42 = load double, ptr %5, align 8, !tbaa !9
  %43 = fcmp oeq double %42, 0.000000e+00
  br i1 %43, label %.loopexit, label %44

44:                                               ; preds = %41
  %45 = tail call double @dlamch_(ptr noundef nonnull @.str.3) #3
  store i64 0, ptr %12, align 8, !tbaa !5
  store i8 78, ptr %18, align 1, !tbaa !11
  %46 = load i64, ptr %1, align 8, !tbaa !5
  %47 = getelementptr %struct.doublecomplex, ptr %7, i64 %46
  %48 = call i32 @zlacn2_(ptr noundef nonnull %1, ptr noundef %47, ptr noundef %7, ptr noundef nonnull %17, ptr noundef nonnull %12, ptr noundef nonnull %14) #3
  %49 = load i64, ptr %12, align 8, !tbaa !5
  %.not8688 = icmp eq i64 %49, 0
  br i1 %.not8688, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %44, %80
  br i1 %.not, label %53, label %50

50:                                               ; preds = %.lr.ph
  %51 = call i32 @zlatbs_(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.6, ptr noundef nonnull %18, ptr noundef nonnull %1, ptr noundef nonnull %2, ptr noundef %3, ptr noundef nonnull %4, ptr noundef %7, ptr noundef nonnull %15, ptr noundef %8, ptr noundef nonnull %9) #3
  store i8 89, ptr %18, align 1, !tbaa !11
  %52 = call i32 @zlatbs_(ptr noundef nonnull @.str.4, ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.6, ptr noundef nonnull %18, ptr noundef nonnull %1, ptr noundef nonnull %2, ptr noundef %3, ptr noundef nonnull %4, ptr noundef %7, ptr noundef nonnull %16, ptr noundef %8, ptr noundef nonnull %9) #3
  br label %56

53:                                               ; preds = %.lr.ph
  %54 = call i32 @zlatbs_(ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.7, ptr noundef nonnull @.str.6, ptr noundef nonnull %18, ptr noundef nonnull %1, ptr noundef nonnull %2, ptr noundef %3, ptr noundef nonnull %4, ptr noundef %7, ptr noundef nonnull %15, ptr noundef %8, ptr noundef nonnull %9) #3
  store i8 89, ptr %18, align 1, !tbaa !11
  %55 = call i32 @zlatbs_(ptr noundef nonnull @.str.8, ptr noundef nonnull @.str.5, ptr noundef nonnull @.str.6, ptr noundef nonnull %18, ptr noundef nonnull %1, ptr noundef nonnull %2, ptr noundef %3, ptr noundef nonnull %4, ptr noundef %7, ptr noundef nonnull %16, ptr noundef %8, ptr noundef nonnull %9) #3
  br label %56

56:                                               ; preds = %53, %50
  %57 = load double, ptr %15, align 8, !tbaa !9
  %58 = load double, ptr %16, align 8, !tbaa !9
  %59 = fmul double %57, %58
  store double %59, ptr %13, align 8, !tbaa !9
  %60 = fcmp une double %59, 1.000000e+00
  br i1 %60, label %61, label %80

61:                                               ; preds = %56
  %62 = call i64 @f2c_izamax(ptr noundef nonnull %1, ptr noundef %7, ptr noundef nonnull @c__1) #3
  %63 = load double, ptr %13, align 8, !tbaa !9
  %64 = getelementptr inbounds %struct.doublecomplex, ptr %19, i64 %62
  %65 = load double, ptr %64, align 8, !tbaa !12
  %66 = call double @d_imag(ptr noundef nonnull %64) #3
  %67 = insertelement <2 x double> poison, double %65, i64 0
  %68 = insertelement <2 x double> %67, double %66, i64 1
  %69 = fcmp oge <2 x double> %68, zeroinitializer
  %70 = fneg <2 x double> %68
  %71 = select <2 x i1> %69, <2 x double> %68, <2 x double> %70
  %shift = shufflevector <2 x double> %71, <2 x double> poison, <2 x i32> <i32 1, i32 poison>
  %72 = fadd <2 x double> %71, %shift
  %73 = extractelement <2 x double> %72, i64 0
  %74 = fmul double %45, %73
  %75 = fcmp olt double %63, %74
  %76 = load double, ptr %13, align 8
  %77 = fcmp oeq double %76, 0.000000e+00
  %or.cond = select i1 %75, i1 true, i1 %77
  br i1 %or.cond, label %.loopexit, label %78

78:                                               ; preds = %61
  %79 = call i32 @zdrscl_(ptr noundef nonnull %1, ptr noundef nonnull %13, ptr noundef nonnull %7, ptr noundef nonnull @c__1) #3
  br label %80

80:                                               ; preds = %78, %56
  %81 = load i64, ptr %1, align 8, !tbaa !5
  %82 = getelementptr %struct.doublecomplex, ptr %7, i64 %81
  %83 = call i32 @zlacn2_(ptr noundef nonnull %1, ptr noundef %82, ptr noundef %7, ptr noundef nonnull %17, ptr noundef nonnull %12, ptr noundef nonnull %14) #3
  %84 = load i64, ptr %12, align 8, !tbaa !5
  %.not86 = icmp eq i64 %84, 0
  br i1 %.not86, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %80, %44
  %85 = load double, ptr %17, align 8, !tbaa !9
  %86 = fcmp une double %85, 0.000000e+00
  br i1 %86, label %87, label %.loopexit

87:                                               ; preds = %._crit_edge
  %88 = fdiv double 1.000000e+00, %85
  %89 = load double, ptr %5, align 8, !tbaa !9
  %90 = fdiv double %88, %89
  store double %90, ptr %6, align 8, !tbaa !9
  br label %.loopexit

.loopexit:                                        ; preds = %61, %87, %._crit_edge, %41, %40, %.thread
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %18) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %17) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %16) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %14) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #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 double @dlamch_(ptr noundef) local_unnamed_addr #2

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

declare i32 @zlatbs_(ptr noundef, ptr noundef, 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 i64 @f2c_izamax(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare double @d_imag(ptr noundef) local_unnamed_addr #2

declare i32 @zdrscl_(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 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!7, !7, i64 0}
!12 = !{!13, !10, i64 0}
!13 = !{!"", !10, i64 0, !10, i64 8}


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