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

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

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

50:                                               ; preds = %9
  %51 = load ptr, ptr %11, align 8, !tbaa !5
  %52 = call i64 @lsame_(ptr noundef %51, ptr noundef @.str.1)
  %53 = icmp ne i64 %52, 0
  br label %54

54:                                               ; preds = %50, %9
  %55 = phi i1 [ true, %9 ], [ %53, %50 ]
  %56 = zext i1 %55 to i32
  %57 = sext i32 %56 to i64
  store i64 %57, ptr %32, align 8, !tbaa !9
  %58 = load ptr, ptr %13, align 8, !tbaa !5
  %59 = call i64 @lsame_(ptr noundef %58, ptr noundef @.str.2)
  store i64 %59, ptr %35, align 8, !tbaa !9
  %60 = load i64, ptr %32, align 8, !tbaa !9
  %61 = icmp ne i64 %60, 0
  br i1 %61, label %68, label %62

62:                                               ; preds = %54
  %63 = load ptr, ptr %11, align 8, !tbaa !5
  %64 = call i64 @lsame_(ptr noundef %63, ptr noundef @.str.3)
  %65 = icmp ne i64 %64, 0
  br i1 %65, label %68, label %66

66:                                               ; preds = %62
  %67 = load ptr, ptr %19, align 8, !tbaa !5
  store i64 -1, ptr %67, align 8, !tbaa !9
  br label %95

68:                                               ; preds = %62, %54
  %69 = load i64, ptr %29, align 8, !tbaa !9
  %70 = icmp ne i64 %69, 0
  br i1 %70, label %77, label %71

71:                                               ; preds = %68
  %72 = load ptr, ptr %12, align 8, !tbaa !5
  %73 = call i64 @lsame_(ptr noundef %72, ptr noundef @.str.4)
  %74 = icmp ne i64 %73, 0
  br i1 %74, label %77, label %75

75:                                               ; preds = %71
  %76 = load ptr, ptr %19, align 8, !tbaa !5
  store i64 -2, ptr %76, align 8, !tbaa !9
  br label %94

77:                                               ; preds = %71, %68
  %78 = load i64, ptr %35, align 8, !tbaa !9
  %79 = icmp ne i64 %78, 0
  br i1 %79, label %86, label %80

80:                                               ; preds = %77
  %81 = load ptr, ptr %13, align 8, !tbaa !5
  %82 = call i64 @lsame_(ptr noundef %81, ptr noundef @.str)
  %83 = icmp ne i64 %82, 0
  br i1 %83, label %86, label %84

84:                                               ; preds = %80
  %85 = load ptr, ptr %19, align 8, !tbaa !5
  store i64 -3, ptr %85, align 8, !tbaa !9
  br label %93

86:                                               ; preds = %80, %77
  %87 = load ptr, ptr %14, align 8, !tbaa !5
  %88 = load i64, ptr %87, align 8, !tbaa !9
  %89 = icmp slt i64 %88, 0
  br i1 %89, label %90, label %92

90:                                               ; preds = %86
  %91 = load ptr, ptr %19, align 8, !tbaa !5
  store i64 -4, ptr %91, align 8, !tbaa !9
  br label %92

92:                                               ; preds = %90, %86
  br label %93

93:                                               ; preds = %92, %84
  br label %94

94:                                               ; preds = %93, %75
  br label %95

95:                                               ; preds = %94, %66
  %96 = load ptr, ptr %19, align 8, !tbaa !5
  %97 = load i64, ptr %96, align 8, !tbaa !9
  %98 = icmp ne i64 %97, 0
  br i1 %98, label %99, label %104

99:                                               ; preds = %95
  %100 = load ptr, ptr %19, align 8, !tbaa !5
  %101 = load i64, ptr %100, align 8, !tbaa !9
  %102 = sub nsw i64 0, %101
  store i64 %102, ptr %20, align 8, !tbaa !9
  %103 = call i32 @xerbla_(ptr noundef @.str.5, ptr noundef %20)
  store i32 0, ptr %10, align 4
  store i32 1, ptr %36, align 4
  br label %250

104:                                              ; preds = %95
  %105 = load ptr, ptr %14, align 8, !tbaa !5
  %106 = load i64, ptr %105, align 8, !tbaa !9
  %107 = icmp eq i64 %106, 0
  br i1 %107, label %108, label %110

108:                                              ; preds = %104
  %109 = load ptr, ptr %16, align 8, !tbaa !5
  store double 1.000000e+00, ptr %109, align 8, !tbaa !12
  store i32 0, ptr %10, align 4
  store i32 1, ptr %36, align 4
  br label %250

110:                                              ; preds = %104
  %111 = load ptr, ptr %16, align 8, !tbaa !5
  store double 0.000000e+00, ptr %111, align 8, !tbaa !12
  %112 = call double @dlamch_(ptr noundef @.str.6)
  %113 = load ptr, ptr %14, align 8, !tbaa !5
  %114 = load i64, ptr %113, align 8, !tbaa !9
  %115 = icmp sge i64 1, %114
  br i1 %115, label %116, label %117

116:                                              ; preds = %110
  br label %120

117:                                              ; preds = %110
  %118 = load ptr, ptr %14, align 8, !tbaa !5
  %119 = load i64, ptr %118, align 8, !tbaa !9
  br label %120

120:                                              ; preds = %117, %116
  %121 = phi i64 [ 1, %116 ], [ %119, %117 ]
  %122 = sitofp i64 %121 to double
  %123 = fmul double %112, %122
  store double %123, ptr %34, align 8, !tbaa !12
  %124 = load ptr, ptr %11, align 8, !tbaa !5
  %125 = load ptr, ptr %12, align 8, !tbaa !5
  %126 = load ptr, ptr %13, align 8, !tbaa !5
  %127 = load ptr, ptr %14, align 8, !tbaa !5
  %128 = load ptr, ptr %15, align 8, !tbaa !5
  %129 = getelementptr inbounds %struct.doublecomplex, ptr %128, i64 1
  %130 = load ptr, ptr %18, align 8, !tbaa !5
  %131 = getelementptr inbounds double, ptr %130, i64 1
  %132 = call double @zlantp_(ptr noundef %124, ptr noundef %125, ptr noundef %126, ptr noundef %127, ptr noundef %129, ptr noundef %131)
  store double %132, ptr %28, align 8, !tbaa !12
  %133 = load double, ptr %28, align 8, !tbaa !12
  %134 = fcmp ogt double %133, 0.000000e+00
  br i1 %134, label %135, label %248

135:                                              ; preds = %120
  store double 0.000000e+00, ptr %31, align 8, !tbaa !12
  %136 = getelementptr inbounds [1 x i8], ptr %33, i64 0, i64 0
  store i8 78, ptr %136, align 1, !tbaa !11
  %137 = load i64, ptr %32, align 8, !tbaa !9
  %138 = icmp ne i64 %137, 0
  br i1 %138, label %139, label %140

139:                                              ; preds = %135
  store i64 1, ptr %25, align 8, !tbaa !9
  br label %141

140:                                              ; preds = %135
  store i64 2, ptr %25, align 8, !tbaa !9
  br label %141

141:                                              ; preds = %140, %139
  store i64 0, ptr %24, align 8, !tbaa !9
  br label %142

142:                                              ; preds = %237, %141
  %143 = load ptr, ptr %14, align 8, !tbaa !5
  %144 = load ptr, ptr %17, align 8, !tbaa !5
  %145 = load ptr, ptr %14, align 8, !tbaa !5
  %146 = load i64, ptr %145, align 8, !tbaa !9
  %147 = add nsw i64 %146, 1
  %148 = getelementptr inbounds %struct.doublecomplex, ptr %144, i64 %147
  %149 = load ptr, ptr %17, align 8, !tbaa !5
  %150 = getelementptr inbounds %struct.doublecomplex, ptr %149, i64 1
  %151 = getelementptr inbounds [3 x i64], ptr %27, i64 0, i64 0
  %152 = call i32 @zlacn2_(ptr noundef %143, ptr noundef %148, ptr noundef %150, ptr noundef %31, ptr noundef %24, ptr noundef %151)
  %153 = load i64, ptr %24, align 8, !tbaa !9
  %154 = icmp ne i64 %153, 0
  br i1 %154, label %155, label %238

155:                                              ; preds = %142
  %156 = load i64, ptr %24, align 8, !tbaa !9
  %157 = load i64, ptr %25, align 8, !tbaa !9
  %158 = icmp eq i64 %156, %157
  br i1 %158, label %159, label %172

159:                                              ; preds = %155
  %160 = load ptr, ptr %12, align 8, !tbaa !5
  %161 = load ptr, ptr %13, align 8, !tbaa !5
  %162 = getelementptr inbounds [1 x i8], ptr %33, i64 0, i64 0
  %163 = load ptr, ptr %14, align 8, !tbaa !5
  %164 = load ptr, ptr %15, align 8, !tbaa !5
  %165 = getelementptr inbounds %struct.doublecomplex, ptr %164, i64 1
  %166 = load ptr, ptr %17, align 8, !tbaa !5
  %167 = getelementptr inbounds %struct.doublecomplex, ptr %166, i64 1
  %168 = load ptr, ptr %18, align 8, !tbaa !5
  %169 = getelementptr inbounds double, ptr %168, i64 1
  %170 = load ptr, ptr %19, align 8, !tbaa !5
  %171 = call i32 @zlatps_(ptr noundef %160, ptr noundef @.str.7, ptr noundef %161, ptr noundef %162, ptr noundef %163, ptr noundef %165, ptr noundef %167, ptr noundef %26, ptr noundef %169, ptr noundef %170)
  br label %185

172:                                              ; preds = %155
  %173 = load ptr, ptr %12, align 8, !tbaa !5
  %174 = load ptr, ptr %13, align 8, !tbaa !5
  %175 = getelementptr inbounds [1 x i8], ptr %33, i64 0, i64 0
  %176 = load ptr, ptr %14, align 8, !tbaa !5
  %177 = load ptr, ptr %15, align 8, !tbaa !5
  %178 = getelementptr inbounds %struct.doublecomplex, ptr %177, i64 1
  %179 = load ptr, ptr %17, align 8, !tbaa !5
  %180 = getelementptr inbounds %struct.doublecomplex, ptr %179, i64 1
  %181 = load ptr, ptr %18, align 8, !tbaa !5
  %182 = getelementptr inbounds double, ptr %181, i64 1
  %183 = load ptr, ptr %19, align 8, !tbaa !5
  %184 = call i32 @zlatps_(ptr noundef %173, ptr noundef @.str.8, ptr noundef %174, ptr noundef %175, ptr noundef %176, ptr noundef %178, ptr noundef %180, ptr noundef %26, ptr noundef %182, ptr noundef %183)
  br label %185

185:                                              ; preds = %172, %159
  %186 = getelementptr inbounds [1 x i8], ptr %33, i64 0, i64 0
  store i8 89, ptr %186, align 1, !tbaa !11
  %187 = load double, ptr %26, align 8, !tbaa !12
  %188 = fcmp une double %187, 1.000000e+00
  br i1 %188, label %189, label %237

189:                                              ; preds = %185
  %190 = load ptr, ptr %14, align 8, !tbaa !5
  %191 = load ptr, ptr %17, align 8, !tbaa !5
  %192 = getelementptr inbounds %struct.doublecomplex, ptr %191, i64 1
  %193 = call i64 @f2c_izamax(ptr noundef %190, ptr noundef %192, ptr noundef @c__1)
  store i64 %193, ptr %23, align 8, !tbaa !9
  %194 = load i64, ptr %23, align 8, !tbaa !9
  store i64 %194, ptr %20, align 8, !tbaa !9
  %195 = load ptr, ptr %17, align 8, !tbaa !5
  %196 = load i64, ptr %20, align 8, !tbaa !9
  %197 = getelementptr inbounds %struct.doublecomplex, ptr %195, i64 %196
  %198 = getelementptr inbounds %struct.doublecomplex, ptr %197, i32 0, i32 0
  %199 = load double, ptr %198, align 8, !tbaa !14
  store double %199, ptr %21, align 8, !tbaa !12
  %200 = load double, ptr %21, align 8, !tbaa !12
  %201 = fcmp oge double %200, 0.000000e+00
  br i1 %201, label %202, label %204

202:                                              ; preds = %189
  %203 = load double, ptr %21, align 8, !tbaa !12
  br label %207

204:                                              ; preds = %189
  %205 = load double, ptr %21, align 8, !tbaa !12
  %206 = fneg double %205
  br label %207

207:                                              ; preds = %204, %202
  %208 = phi double [ %203, %202 ], [ %206, %204 ]
  %209 = load ptr, ptr %17, align 8, !tbaa !5
  %210 = load i64, ptr %23, align 8, !tbaa !9
  %211 = getelementptr inbounds %struct.doublecomplex, ptr %209, i64 %210
  %212 = call double @d_imag(ptr noundef %211)
  store double %212, ptr %22, align 8, !tbaa !12
  %213 = load double, ptr %22, align 8, !tbaa !12
  %214 = fcmp oge double %213, 0.000000e+00
  br i1 %214, label %215, label %217

215:                                              ; preds = %207
  %216 = load double, ptr %22, align 8, !tbaa !12
  br label %220

217:                                              ; preds = %207
  %218 = load double, ptr %22, align 8, !tbaa !12
  %219 = fneg double %218
  br label %220

220:                                              ; preds = %217, %215
  %221 = phi double [ %216, %215 ], [ %219, %217 ]
  %222 = fadd double %208, %221
  store double %222, ptr %30, align 8, !tbaa !12
  %223 = load double, ptr %26, align 8, !tbaa !12
  %224 = load double, ptr %30, align 8, !tbaa !12
  %225 = load double, ptr %34, align 8, !tbaa !12
  %226 = fmul double %224, %225
  %227 = fcmp olt double %223, %226
  br i1 %227, label %231, label %228

228:                                              ; preds = %220
  %229 = load double, ptr %26, align 8, !tbaa !12
  %230 = fcmp oeq double %229, 0.000000e+00
  br i1 %230, label %231, label %232

231:                                              ; preds = %228, %220
  br label %249

232:                                              ; preds = %228
  %233 = load ptr, ptr %14, align 8, !tbaa !5
  %234 = load ptr, ptr %17, align 8, !tbaa !5
  %235 = getelementptr inbounds %struct.doublecomplex, ptr %234, i64 1
  %236 = call i32 @zdrscl_(ptr noundef %233, ptr noundef %26, ptr noundef %235, ptr noundef @c__1)
  br label %237

237:                                              ; preds = %232, %185
  br label %142

238:                                              ; preds = %142
  %239 = load double, ptr %31, align 8, !tbaa !12
  %240 = fcmp une double %239, 0.000000e+00
  br i1 %240, label %241, label %247

241:                                              ; preds = %238
  %242 = load double, ptr %28, align 8, !tbaa !12
  %243 = fdiv double 1.000000e+00, %242
  %244 = load double, ptr %31, align 8, !tbaa !12
  %245 = fdiv double %243, %244
  %246 = load ptr, ptr %16, align 8, !tbaa !5
  store double %245, ptr %246, align 8, !tbaa !12
  br label %247

247:                                              ; preds = %241, %238
  br label %248

248:                                              ; preds = %247, %120
  br label %249

249:                                              ; preds = %248, %231
  store i32 0, ptr %10, align 4
  store i32 1, ptr %36, align 4
  br label %250

250:                                              ; preds = %249, %108, %99
  call void @llvm.lifetime.end.p0(i64 8, ptr %35) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %34) #3
  call void @llvm.lifetime.end.p0(i64 1, 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 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 24, 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
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #3
  %251 = load i32, ptr %10, align 4
  ret i32 %251
}

; 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 double @zlantp_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

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

declare i32 @zlatps_(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 = !{!7, !7, i64 0}
!12 = !{!13, !13, i64 0}
!13 = !{!"double", !7, i64 0}
!14 = !{!15, !13, i64 0}
!15 = !{!"", !13, i64 0, !13, 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 [2 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [7 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [13 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [20 x i8], align 1
@c__1 = external hidden global i64, align 8

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

.thread:                                          ; preds = %9
  %20 = tail call i64 @lsame_(ptr noundef %2, ptr noundef nonnull @.str.2) #3
  br label %26

21:                                               ; preds = %9
  %22 = tail call i64 @lsame_(ptr noundef nonnull %0, ptr noundef nonnull @.str.1) #3
  %.not86 = icmp eq i64 %22, 0
  %23 = tail call i64 @lsame_(ptr noundef %2, ptr noundef nonnull @.str.2) #3
  br i1 %.not86, label %24, label %26

24:                                               ; preds = %21
  %25 = tail call i64 @lsame_(ptr noundef nonnull %0, ptr noundef nonnull @.str.3) #3
  %.not = icmp eq i64 %25, 0
  br i1 %.not, label %.thread84.sink.split, label %26

26:                                               ; preds = %.thread, %24, %21
  %27 = phi i64 [ %20, %.thread ], [ %23, %24 ], [ %23, %21 ]
  %. = phi i64 [ 1, %.thread ], [ 2, %24 ], [ 1, %21 ]
  %.not77 = icmp eq i64 %17, 0
  br i1 %.not77, label %28, label %30

28:                                               ; preds = %26
  %29 = tail call i64 @lsame_(ptr noundef %1, ptr noundef nonnull @.str.4) #3
  %.not78 = icmp eq i64 %29, 0
  br i1 %.not78, label %.thread84.sink.split, label %30

30:                                               ; preds = %28, %26
  %.not79 = icmp eq i64 %27, 0
  br i1 %.not79, label %31, label %33

31:                                               ; preds = %30
  %32 = tail call i64 @lsame_(ptr noundef %2, ptr noundef nonnull @.str) #3
  %.not80 = icmp eq i64 %32, 0
  br i1 %.not80, label %.thread84.sink.split, label %33

33:                                               ; preds = %31, %30
  %34 = load i64, ptr %3, align 8, !tbaa !5
  %35 = icmp slt i64 %34, 0
  br i1 %35, label %.thread84.sink.split, label %36

36:                                               ; preds = %33
  %.pr = load i64, ptr %8, align 8, !tbaa !5
  %.not81 = icmp eq i64 %.pr, 0
  br i1 %.not81, label %40, label %.thread84

.thread84.sink.split:                             ; preds = %33, %31, %28, %24
  %.sink = phi i64 [ -1, %24 ], [ -2, %28 ], [ -3, %31 ], [ -4, %33 ]
  store i64 %.sink, ptr %8, align 8, !tbaa !5
  br label %.thread84

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

40:                                               ; preds = %36
  %41 = icmp eq i64 %34, 0
  br i1 %41, label %42, label %43

42:                                               ; preds = %40
  store double 1.000000e+00, ptr %5, align 8, !tbaa !10
  br label %.loopexit

43:                                               ; preds = %40
  store double 0.000000e+00, ptr %5, align 8, !tbaa !10
  %44 = tail call double @dlamch_(ptr noundef nonnull @.str.6) #3
  %45 = load i64, ptr %3, align 8, !tbaa !5
  %46 = icmp slt i64 %45, 2
  %47 = uitofp nneg i64 %45 to double
  %48 = select i1 %46, double 1.000000e+00, double %47
  %49 = fmul double %44, %48
  %50 = tail call double @zlantp_(ptr noundef nonnull %0, ptr noundef %1, ptr noundef %2, ptr noundef nonnull %3, ptr noundef %4, ptr noundef %7) #3
  %51 = fcmp ogt double %50, 0.000000e+00
  br i1 %51, label %52, label %.loopexit

52:                                               ; preds = %43
  store double 0.000000e+00, ptr %14, align 8, !tbaa !10
  store i8 78, ptr %15, align 1, !tbaa !9
  store i64 0, ptr %11, align 8, !tbaa !5
  %53 = load i64, ptr %3, align 8, !tbaa !5
  %54 = getelementptr %struct.doublecomplex, ptr %6, i64 %53
  %55 = call i32 @zlacn2_(ptr noundef nonnull %3, ptr noundef %54, ptr noundef %6, ptr noundef nonnull %14, ptr noundef nonnull %11, ptr noundef nonnull %13) #3
  %56 = load i64, ptr %11, align 8, !tbaa !5
  %.not8287 = icmp eq i64 %56, 0
  br i1 %.not8287, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %52, %80
  %57 = phi i64 [ %84, %80 ], [ %56, %52 ]
  %58 = icmp eq i64 %57, %.
  %.str.7..str.8 = select i1 %58, ptr @.str.7, ptr @.str.8
  %59 = call i32 @zlatps_(ptr noundef %1, ptr noundef nonnull %.str.7..str.8, ptr noundef %2, ptr noundef nonnull %15, ptr noundef nonnull %3, ptr noundef %4, ptr noundef %6, ptr noundef nonnull %12, ptr noundef %7, ptr noundef nonnull %8) #3
  store i8 89, ptr %15, align 1, !tbaa !9
  %60 = load double, ptr %12, align 8, !tbaa !10
  %61 = fcmp une double %60, 1.000000e+00
  br i1 %61, label %62, label %80

62:                                               ; preds = %.lr.ph
  %63 = call i64 @f2c_izamax(ptr noundef nonnull %3, ptr noundef %6, ptr noundef nonnull @c__1) #3
  %64 = getelementptr inbounds %struct.doublecomplex, ptr %16, i64 %63
  %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 = load double, ptr %12, align 8
  %75 = fmul double %49, %73
  %76 = fcmp olt double %74, %75
  %77 = fcmp oeq double %74, 0.000000e+00
  %or.cond = or i1 %77, %76
  br i1 %or.cond, label %.loopexit, label %78

78:                                               ; preds = %62
  %79 = call i32 @zdrscl_(ptr noundef nonnull %3, ptr noundef nonnull %12, ptr noundef nonnull %6, ptr noundef nonnull @c__1) #3
  br label %80

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

._crit_edge:                                      ; preds = %80, %52
  %85 = load double, ptr %14, align 8, !tbaa !10
  %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, %50
  %89 = fdiv double %88, %85
  store double %89, ptr %5, align 8, !tbaa !10
  br label %.loopexit

.loopexit:                                        ; preds = %62, %._crit_edge, %87, %43, %42, %.thread84
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %15) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #3
  call void @llvm.lifetime.end.p0(i64 24, 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
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #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 double @zlantp_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, 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 @zlatps_(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 = !{!7, !7, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"double", !7, i64 0}
!12 = !{!13, !11, i64 0}
!13 = !{!"", !11, i64 0, !11, i64 8}


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