; LLVM IR from OpenMathLib/OpenBLAS :: lapack-netlib/SRC (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 i32, align 4

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

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

53:                                               ; preds = %49, %9
  %54 = phi i1 [ true, %9 ], [ %52, %49 ]
  %55 = zext i1 %54 to i32
  store i32 %55, ptr %31, align 4, !tbaa !9
  %56 = load ptr, ptr %12, align 8, !tbaa !5
  %57 = call i32 @lsame_(ptr noundef %56, ptr noundef @.str.2)
  store i32 %57, ptr %34, align 4, !tbaa !9
  %58 = load i32, ptr %31, align 4, !tbaa !9
  %59 = icmp ne i32 %58, 0
  br i1 %59, label %66, label %60

60:                                               ; preds = %53
  %61 = load ptr, ptr %10, align 8, !tbaa !5
  %62 = call i32 @lsame_(ptr noundef %61, ptr noundef @.str.3)
  %63 = icmp ne i32 %62, 0
  br i1 %63, label %66, label %64

64:                                               ; preds = %60
  %65 = load ptr, ptr %18, align 8, !tbaa !5
  store i32 -1, ptr %65, align 4, !tbaa !9
  br label %93

66:                                               ; preds = %60, %53
  %67 = load i32, ptr %27, align 4, !tbaa !9
  %68 = icmp ne i32 %67, 0
  br i1 %68, label %75, label %69

69:                                               ; preds = %66
  %70 = load ptr, ptr %11, align 8, !tbaa !5
  %71 = call i32 @lsame_(ptr noundef %70, ptr noundef @.str.4)
  %72 = icmp ne i32 %71, 0
  br i1 %72, label %75, label %73

73:                                               ; preds = %69
  %74 = load ptr, ptr %18, align 8, !tbaa !5
  store i32 -2, ptr %74, align 4, !tbaa !9
  br label %92

75:                                               ; preds = %69, %66
  %76 = load i32, ptr %34, align 4, !tbaa !9
  %77 = icmp ne i32 %76, 0
  br i1 %77, label %84, label %78

78:                                               ; preds = %75
  %79 = load ptr, ptr %12, align 8, !tbaa !5
  %80 = call i32 @lsame_(ptr noundef %79, ptr noundef @.str)
  %81 = icmp ne i32 %80, 0
  br i1 %81, label %84, label %82

82:                                               ; preds = %78
  %83 = load ptr, ptr %18, align 8, !tbaa !5
  store i32 -3, ptr %83, align 4, !tbaa !9
  br label %91

84:                                               ; preds = %78, %75
  %85 = load ptr, ptr %13, align 8, !tbaa !5
  %86 = load i32, ptr %85, align 4, !tbaa !9
  %87 = icmp slt i32 %86, 0
  br i1 %87, label %88, label %90

88:                                               ; preds = %84
  %89 = load ptr, ptr %18, align 8, !tbaa !5
  store i32 -4, ptr %89, align 4, !tbaa !9
  br label %90

90:                                               ; preds = %88, %84
  br label %91

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

92:                                               ; preds = %91, %73
  br label %93

93:                                               ; preds = %92, %64
  %94 = load ptr, ptr %18, align 8, !tbaa !5
  %95 = load i32, ptr %94, align 4, !tbaa !9
  %96 = icmp ne i32 %95, 0
  br i1 %96, label %97, label %102

97:                                               ; preds = %93
  %98 = load ptr, ptr %18, align 8, !tbaa !5
  %99 = load i32, ptr %98, align 4, !tbaa !9
  %100 = sub nsw i32 0, %99
  store i32 %100, ptr %19, align 4, !tbaa !9
  %101 = call i32 @xerbla_(ptr noundef @.str.5, ptr noundef %19, i32 noundef 6)
  store i32 1, ptr %35, align 4
  br label %249

102:                                              ; preds = %93
  %103 = load ptr, ptr %13, align 8, !tbaa !5
  %104 = load i32, ptr %103, align 4, !tbaa !9
  %105 = icmp eq i32 %104, 0
  br i1 %105, label %106, label %108

106:                                              ; preds = %102
  %107 = load ptr, ptr %15, align 8, !tbaa !5
  store double 1.000000e+00, ptr %107, align 8, !tbaa !12
  store i32 1, ptr %35, align 4
  br label %249

108:                                              ; preds = %102
  %109 = load ptr, ptr %15, align 8, !tbaa !5
  store double 0.000000e+00, ptr %109, align 8, !tbaa !12
  %110 = call double @dlamch_(ptr noundef @.str.6)
  %111 = load ptr, ptr %13, align 8, !tbaa !5
  %112 = load i32, ptr %111, align 4, !tbaa !9
  %113 = icmp sge i32 1, %112
  br i1 %113, label %114, label %115

114:                                              ; preds = %108
  br label %118

115:                                              ; preds = %108
  %116 = load ptr, ptr %13, align 8, !tbaa !5
  %117 = load i32, ptr %116, align 4, !tbaa !9
  br label %118

118:                                              ; preds = %115, %114
  %119 = phi i32 [ 1, %114 ], [ %117, %115 ]
  %120 = sitofp i32 %119 to double
  %121 = fmul double %110, %120
  store double %121, ptr %33, align 8, !tbaa !12
  %122 = load ptr, ptr %10, align 8, !tbaa !5
  %123 = load ptr, ptr %11, align 8, !tbaa !5
  %124 = load ptr, ptr %12, align 8, !tbaa !5
  %125 = load ptr, ptr %13, align 8, !tbaa !5
  %126 = load ptr, ptr %14, align 8, !tbaa !5
  %127 = getelementptr inbounds %struct.doublecomplex, ptr %126, i64 1
  %128 = load ptr, ptr %17, align 8, !tbaa !5
  %129 = getelementptr inbounds double, ptr %128, i64 1
  %130 = call double @zlantp_(ptr noundef %122, ptr noundef %123, ptr noundef %124, ptr noundef %125, ptr noundef %127, ptr noundef %129)
  store double %130, ptr %26, align 8, !tbaa !12
  %131 = load double, ptr %26, align 8, !tbaa !12
  %132 = fcmp ogt double %131, 0.000000e+00
  br i1 %132, label %133, label %247

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

137:                                              ; preds = %133
  store i32 1, ptr %23, align 4, !tbaa !9
  br label %139

138:                                              ; preds = %133
  store i32 2, ptr %23, align 4, !tbaa !9
  br label %139

139:                                              ; preds = %138, %137
  store i32 0, ptr %22, align 4, !tbaa !9
  br label %140

140:                                              ; preds = %236, %139
  %141 = load ptr, ptr %13, align 8, !tbaa !5
  %142 = load ptr, ptr %16, align 8, !tbaa !5
  %143 = load ptr, ptr %13, align 8, !tbaa !5
  %144 = load i32, ptr %143, align 4, !tbaa !9
  %145 = add nsw i32 %144, 1
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds %struct.doublecomplex, ptr %142, i64 %146
  %148 = load ptr, ptr %16, align 8, !tbaa !5
  %149 = getelementptr inbounds %struct.doublecomplex, ptr %148, i64 1
  %150 = getelementptr inbounds [3 x i32], ptr %25, i64 0, i64 0
  call void @zlacn2_(ptr noundef %141, ptr noundef %147, ptr noundef %149, ptr noundef %30, ptr noundef %22, ptr noundef %150)
  %151 = load i32, ptr %22, align 4, !tbaa !9
  %152 = icmp ne i32 %151, 0
  br i1 %152, label %153, label %237

153:                                              ; preds = %140
  %154 = load i32, ptr %22, align 4, !tbaa !9
  %155 = load i32, ptr %23, align 4, !tbaa !9
  %156 = icmp eq i32 %154, %155
  br i1 %156, label %157, label %169

157:                                              ; preds = %153
  %158 = load ptr, ptr %11, align 8, !tbaa !5
  %159 = load ptr, ptr %12, align 8, !tbaa !5
  %160 = getelementptr inbounds [1 x i8], ptr %32, i64 0, i64 0
  %161 = load ptr, ptr %13, align 8, !tbaa !5
  %162 = load ptr, ptr %14, align 8, !tbaa !5
  %163 = getelementptr inbounds %struct.doublecomplex, ptr %162, i64 1
  %164 = load ptr, ptr %16, 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 double, ptr %166, i64 1
  %168 = load ptr, ptr %18, align 8, !tbaa !5
  call void @zlatps_(ptr noundef %158, ptr noundef @.str.7, ptr noundef %159, ptr noundef %160, ptr noundef %161, ptr noundef %163, ptr noundef %165, ptr noundef %24, ptr noundef %167, ptr noundef %168)
  br label %181

169:                                              ; preds = %153
  %170 = load ptr, ptr %11, align 8, !tbaa !5
  %171 = load ptr, ptr %12, align 8, !tbaa !5
  %172 = getelementptr inbounds [1 x i8], ptr %32, i64 0, i64 0
  %173 = load ptr, ptr %13, align 8, !tbaa !5
  %174 = load ptr, ptr %14, align 8, !tbaa !5
  %175 = getelementptr inbounds %struct.doublecomplex, ptr %174, i64 1
  %176 = load ptr, ptr %16, align 8, !tbaa !5
  %177 = getelementptr inbounds %struct.doublecomplex, ptr %176, i64 1
  %178 = load ptr, ptr %17, align 8, !tbaa !5
  %179 = getelementptr inbounds double, ptr %178, i64 1
  %180 = load ptr, ptr %18, align 8, !tbaa !5
  call void @zlatps_(ptr noundef %170, ptr noundef @.str.8, ptr noundef %171, ptr noundef %172, ptr noundef %173, ptr noundef %175, ptr noundef %177, ptr noundef %24, ptr noundef %179, ptr noundef %180)
  br label %181

181:                                              ; preds = %169, %157
  %182 = getelementptr inbounds [1 x i8], ptr %32, i64 0, i64 0
  store i8 89, ptr %182, align 1, !tbaa !11
  %183 = load double, ptr %24, align 8, !tbaa !12
  %184 = fcmp une double %183, 1.000000e+00
  br i1 %184, label %185, label %236

185:                                              ; preds = %181
  %186 = load ptr, ptr %13, align 8, !tbaa !5
  %187 = load ptr, ptr %16, align 8, !tbaa !5
  %188 = getelementptr inbounds %struct.doublecomplex, ptr %187, i64 1
  %189 = call i32 @izamax_(ptr noundef %186, ptr noundef %188, ptr noundef @c__1)
  store i32 %189, ptr %29, align 4, !tbaa !9
  %190 = load i32, ptr %29, align 4, !tbaa !9
  store i32 %190, ptr %19, align 4, !tbaa !9
  %191 = load ptr, ptr %16, align 8, !tbaa !5
  %192 = load i32, ptr %19, align 4, !tbaa !9
  %193 = sext i32 %192 to i64
  %194 = getelementptr inbounds %struct.doublecomplex, ptr %191, i64 %193
  %195 = getelementptr inbounds %struct.doublecomplex, ptr %194, i32 0, i32 0
  %196 = load double, ptr %195, align 8, !tbaa !14
  store double %196, ptr %20, align 8, !tbaa !12
  %197 = load double, ptr %20, align 8, !tbaa !12
  %198 = fcmp oge double %197, 0.000000e+00
  br i1 %198, label %199, label %201

199:                                              ; preds = %185
  %200 = load double, ptr %20, align 8, !tbaa !12
  br label %204

201:                                              ; preds = %185
  %202 = load double, ptr %20, align 8, !tbaa !12
  %203 = fneg double %202
  br label %204

204:                                              ; preds = %201, %199
  %205 = phi double [ %200, %199 ], [ %203, %201 ]
  %206 = load ptr, ptr %16, align 8, !tbaa !5
  %207 = load i32, ptr %29, align 4, !tbaa !9
  %208 = sext i32 %207 to i64
  %209 = getelementptr inbounds %struct.doublecomplex, ptr %206, i64 %208
  %210 = call { double, double } @Cd(ptr noundef %209)
  %211 = extractvalue { double, double } %210, 0
  %212 = extractvalue { double, double } %210, 1
  store double %212, ptr %21, align 8, !tbaa !12
  %213 = load double, ptr %21, align 8, !tbaa !12
  %214 = fcmp oge double %213, 0.000000e+00
  br i1 %214, label %215, label %217

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

217:                                              ; preds = %204
  %218 = load double, ptr %21, 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 %205, %221
  store double %222, ptr %28, align 8, !tbaa !12
  %223 = load double, ptr %24, align 8, !tbaa !12
  %224 = load double, ptr %28, align 8, !tbaa !12
  %225 = load double, ptr %33, 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 %24, 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 %248

232:                                              ; preds = %228
  %233 = load ptr, ptr %13, align 8, !tbaa !5
  %234 = load ptr, ptr %16, align 8, !tbaa !5
  %235 = getelementptr inbounds %struct.doublecomplex, ptr %234, i64 1
  call void @zdrscl_(ptr noundef %233, ptr noundef %24, ptr noundef %235, ptr noundef @c__1)
  br label %236

236:                                              ; preds = %232, %181
  br label %140

237:                                              ; preds = %140
  %238 = load double, ptr %30, align 8, !tbaa !12
  %239 = fcmp une double %238, 0.000000e+00
  br i1 %239, label %240, label %246

240:                                              ; preds = %237
  %241 = load double, ptr %26, align 8, !tbaa !12
  %242 = fdiv double 1.000000e+00, %241
  %243 = load double, ptr %30, align 8, !tbaa !12
  %244 = fdiv double %242, %243
  %245 = load ptr, ptr %15, align 8, !tbaa !5
  store double %244, ptr %245, align 8, !tbaa !12
  br label %246

246:                                              ; preds = %240, %237
  br label %247

247:                                              ; preds = %246, %118
  br label %248

248:                                              ; preds = %247, %231
  store i32 1, ptr %35, align 4
  br label %249

249:                                              ; preds = %248, %106, %97
  call void @llvm.lifetime.end.p0(i64 4, ptr %34) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %33) #4
  call void @llvm.lifetime.end.p0(i64 1, ptr %32) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %31) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %29) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %27) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr %25) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #4
  ret void
}

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

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

declare i32 @xerbla_(ptr noundef, ptr noundef, i32 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 void @zlacn2_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

declare void @zlatps_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden { double, double } @Cd(ptr noundef) #3

declare void @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 = { inlinehint 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 #4 = { 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 = !{!"int", !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 i32, align 4

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

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

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

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

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

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

31:                                               ; preds = %30
  %32 = tail call i32 @lsame_(ptr noundef %2, ptr noundef nonnull @.str) #4
  %.not79 = icmp eq i32 %32, 0
  br i1 %.not79, label %.thread83.sink.split, label %33

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

36:                                               ; preds = %33
  %.pr = load i32, ptr %8, align 4, !tbaa !5
  %.not80 = icmp eq i32 %.pr, 0
  br i1 %.not80, label %40, label %.thread83

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

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

40:                                               ; preds = %36
  %41 = icmp eq i32 %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) #4
  %45 = load i32, ptr %3, align 4, !tbaa !5
  %46 = icmp slt i32 %45, 2
  %47 = uitofp nneg i32 %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) #4
  %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 i32 0, ptr %11, align 4, !tbaa !5
  %53 = load i32, ptr %3, align 4, !tbaa !5
  %54 = sext i32 %53 to i64
  %gep86 = getelementptr %struct.doublecomplex, ptr %6, i64 %54
  call void @zlacn2_(ptr noundef nonnull %3, ptr noundef %gep86, ptr noundef %6, ptr noundef nonnull %14, ptr noundef nonnull %11, ptr noundef nonnull %13) #4
  %55 = load i32, ptr %11, align 4, !tbaa !5
  %.not8187 = icmp eq i32 %55, 0
  br i1 %.not8187, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %52, %79
  %56 = phi i32 [ %82, %79 ], [ %55, %52 ]
  %57 = icmp eq i32 %56, %.
  %.str.7..str.8 = select i1 %57, ptr @.str.7, ptr @.str.8
  call void @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) #4
  store i8 89, ptr %15, align 1, !tbaa !9
  %58 = load double, ptr %12, align 8, !tbaa !10
  %59 = fcmp une double %58, 1.000000e+00
  br i1 %59, label %60, label %79

60:                                               ; preds = %.lr.ph
  %61 = call i32 @izamax_(ptr noundef nonnull %3, ptr noundef %6, ptr noundef nonnull @c__1) #4
  %62 = sext i32 %61 to i64
  %63 = getelementptr inbounds %struct.doublecomplex, ptr %16, i64 %62
  %64 = load double, ptr %63, align 8, !tbaa !12
  %65 = call { double, double } @Cd(ptr noundef nonnull %63)
  %66 = extractvalue { double, double } %65, 1
  %67 = insertelement <2 x double> poison, double %64, 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 = %60
  call void @zdrscl_(ptr noundef nonnull %3, ptr noundef nonnull %12, ptr noundef nonnull %6, ptr noundef nonnull @c__1) #4
  br label %79

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

._crit_edge:                                      ; preds = %79, %52
  %83 = load double, ptr %14, align 8, !tbaa !10
  %84 = fcmp une double %83, 0.000000e+00
  br i1 %84, label %85, label %.loopexit

85:                                               ; preds = %._crit_edge
  %86 = fdiv double 1.000000e+00, %50
  %87 = fdiv double %86, %83
  store double %87, ptr %5, align 8, !tbaa !10
  br label %.loopexit

.loopexit:                                        ; preds = %60, %._crit_edge, %85, %43, %42, %.thread83
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %14) #4
  call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %11) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #4
  ret void
}

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

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

declare i32 @xerbla_(ptr noundef, ptr noundef, i32 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 void @zlacn2_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare void @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 i32 @izamax_(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden { double, double } @Cd(ptr noundef) local_unnamed_addr #3

declare void @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 = { inlinehint 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 #4 = { 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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!7, !7, i64 0}
!10 = !{!11, !11, i64 0}
!11 = !{!"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,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass,VectorCombinePass