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

; 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 @ztrcon_(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 i64, align 8
  %30 = alloca double, align 8
  %31 = alloca [3 x i64], align 16
  %32 = alloca double, align 8
  %33 = alloca i64, align 8
  %34 = alloca double, align 8
  %35 = alloca double, align 8
  %36 = alloca i64, align 8
  %37 = alloca [1 x i8], align 1
  %38 = alloca double, align 8
  %39 = alloca i64, align 8
  %40 = 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 8, ptr %30) #3
  call void @llvm.lifetime.start.p0(i64 24, 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 8, ptr %35) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %36) #3
  call void @llvm.lifetime.start.p0(i64 1, ptr %37) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %38) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %39) #3
  %41 = load ptr, ptr %17, align 8, !tbaa !5
  %42 = load i64, ptr %41, align 8, !tbaa !9
  store i64 %42, ptr %22, align 8, !tbaa !9
  %43 = load i64, ptr %22, align 8, !tbaa !9
  %44 = add nsw i64 1, %43
  store i64 %44, ptr %23, align 8, !tbaa !9
  %45 = load i64, ptr %23, align 8, !tbaa !9
  %46 = load ptr, ptr %16, align 8, !tbaa !5
  %47 = sub i64 0, %45
  %48 = getelementptr inbounds %struct.doublecomplex, ptr %46, i64 %47
  store ptr %48, ptr %16, align 8, !tbaa !5
  %49 = load ptr, ptr %19, align 8, !tbaa !5
  %50 = getelementptr inbounds %struct.doublecomplex, ptr %49, i32 -1
  store ptr %50, ptr %19, align 8, !tbaa !5
  %51 = load ptr, ptr %20, align 8, !tbaa !5
  %52 = getelementptr inbounds double, ptr %51, i32 -1
  store ptr %52, ptr %20, align 8, !tbaa !5
  %53 = load ptr, ptr %21, align 8, !tbaa !5
  store i64 0, ptr %53, align 8, !tbaa !9
  %54 = load ptr, ptr %13, align 8, !tbaa !5
  %55 = call i64 @lsame_(ptr noundef %54, ptr noundef @.str)
  store i64 %55, ptr %33, align 8, !tbaa !9
  %56 = load ptr, ptr %12, align 8, !tbaa !5
  %57 = load i8, ptr %56, align 1, !tbaa !11
  %58 = zext i8 %57 to i32
  %59 = icmp eq i32 %58, 49
  br i1 %59, label %64, label %60

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

64:                                               ; preds = %60, %10
  %65 = phi i1 [ true, %10 ], [ %63, %60 ]
  %66 = zext i1 %65 to i32
  %67 = sext i32 %66 to i64
  store i64 %67, ptr %36, align 8, !tbaa !9
  %68 = load ptr, ptr %14, align 8, !tbaa !5
  %69 = call i64 @lsame_(ptr noundef %68, ptr noundef @.str.2)
  store i64 %69, ptr %39, align 8, !tbaa !9
  %70 = load i64, ptr %36, align 8, !tbaa !9
  %71 = icmp ne i64 %70, 0
  br i1 %71, label %78, label %72

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

76:                                               ; preds = %72
  %77 = load ptr, ptr %21, align 8, !tbaa !5
  store i64 -1, ptr %77, align 8, !tbaa !9
  br label %121

78:                                               ; preds = %72, %64
  %79 = load i64, ptr %33, align 8, !tbaa !9
  %80 = icmp ne i64 %79, 0
  br i1 %80, label %87, label %81

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

85:                                               ; preds = %81
  %86 = load ptr, ptr %21, align 8, !tbaa !5
  store i64 -2, ptr %86, align 8, !tbaa !9
  br label %120

87:                                               ; preds = %81, %78
  %88 = load i64, ptr %39, align 8, !tbaa !9
  %89 = icmp ne i64 %88, 0
  br i1 %89, label %96, label %90

90:                                               ; preds = %87
  %91 = load ptr, ptr %14, align 8, !tbaa !5
  %92 = call i64 @lsame_(ptr noundef %91, ptr noundef @.str)
  %93 = icmp ne i64 %92, 0
  br i1 %93, label %96, label %94

94:                                               ; preds = %90
  %95 = load ptr, ptr %21, align 8, !tbaa !5
  store i64 -3, ptr %95, align 8, !tbaa !9
  br label %119

96:                                               ; preds = %90, %87
  %97 = load ptr, ptr %15, align 8, !tbaa !5
  %98 = load i64, ptr %97, align 8, !tbaa !9
  %99 = icmp slt i64 %98, 0
  br i1 %99, label %100, label %102

100:                                              ; preds = %96
  %101 = load ptr, ptr %21, align 8, !tbaa !5
  store i64 -4, ptr %101, align 8, !tbaa !9
  br label %118

102:                                              ; preds = %96
  %103 = load ptr, ptr %17, align 8, !tbaa !5
  %104 = load i64, ptr %103, align 8, !tbaa !9
  %105 = load ptr, ptr %15, align 8, !tbaa !5
  %106 = load i64, ptr %105, align 8, !tbaa !9
  %107 = icmp sge i64 1, %106
  br i1 %107, label %108, label %109

108:                                              ; preds = %102
  br label %112

109:                                              ; preds = %102
  %110 = load ptr, ptr %15, align 8, !tbaa !5
  %111 = load i64, ptr %110, align 8, !tbaa !9
  br label %112

112:                                              ; preds = %109, %108
  %113 = phi i64 [ 1, %108 ], [ %111, %109 ]
  %114 = icmp slt i64 %104, %113
  br i1 %114, label %115, label %117

115:                                              ; preds = %112
  %116 = load ptr, ptr %21, align 8, !tbaa !5
  store i64 -6, ptr %116, align 8, !tbaa !9
  br label %117

117:                                              ; preds = %115, %112
  br label %118

118:                                              ; preds = %117, %100
  br label %119

119:                                              ; preds = %118, %94
  br label %120

120:                                              ; preds = %119, %85
  br label %121

121:                                              ; preds = %120, %76
  %122 = load ptr, ptr %21, align 8, !tbaa !5
  %123 = load i64, ptr %122, align 8, !tbaa !9
  %124 = icmp ne i64 %123, 0
  br i1 %124, label %125, label %130

125:                                              ; preds = %121
  %126 = load ptr, ptr %21, align 8, !tbaa !5
  %127 = load i64, ptr %126, align 8, !tbaa !9
  %128 = sub nsw i64 0, %127
  store i64 %128, ptr %24, align 8, !tbaa !9
  %129 = call i32 @xerbla_(ptr noundef @.str.5, ptr noundef %24)
  store i32 0, ptr %11, align 4
  store i32 1, ptr %40, align 4
  br label %283

130:                                              ; preds = %121
  %131 = load ptr, ptr %15, align 8, !tbaa !5
  %132 = load i64, ptr %131, align 8, !tbaa !9
  %133 = icmp eq i64 %132, 0
  br i1 %133, label %134, label %136

134:                                              ; preds = %130
  %135 = load ptr, ptr %18, align 8, !tbaa !5
  store double 1.000000e+00, ptr %135, align 8, !tbaa !12
  store i32 0, ptr %11, align 4
  store i32 1, ptr %40, align 4
  br label %283

136:                                              ; preds = %130
  %137 = load ptr, ptr %18, align 8, !tbaa !5
  store double 0.000000e+00, ptr %137, align 8, !tbaa !12
  %138 = call double @dlamch_(ptr noundef @.str.6)
  %139 = load ptr, ptr %15, align 8, !tbaa !5
  %140 = load i64, ptr %139, align 8, !tbaa !9
  %141 = icmp sge i64 1, %140
  br i1 %141, label %142, label %143

142:                                              ; preds = %136
  br label %146

143:                                              ; preds = %136
  %144 = load ptr, ptr %15, align 8, !tbaa !5
  %145 = load i64, ptr %144, align 8, !tbaa !9
  br label %146

146:                                              ; preds = %143, %142
  %147 = phi i64 [ 1, %142 ], [ %145, %143 ]
  %148 = sitofp i64 %147 to double
  %149 = fmul double %138, %148
  store double %149, ptr %38, align 8, !tbaa !12
  %150 = load ptr, ptr %12, align 8, !tbaa !5
  %151 = load ptr, ptr %13, align 8, !tbaa !5
  %152 = load ptr, ptr %14, align 8, !tbaa !5
  %153 = load ptr, ptr %15, align 8, !tbaa !5
  %154 = load ptr, ptr %15, align 8, !tbaa !5
  %155 = load ptr, ptr %16, align 8, !tbaa !5
  %156 = load i64, ptr %23, align 8, !tbaa !9
  %157 = getelementptr inbounds %struct.doublecomplex, ptr %155, i64 %156
  %158 = load ptr, ptr %17, align 8, !tbaa !5
  %159 = load ptr, ptr %20, align 8, !tbaa !5
  %160 = getelementptr inbounds double, ptr %159, i64 1
  %161 = call double @zlantr_(ptr noundef %150, ptr noundef %151, ptr noundef %152, ptr noundef %153, ptr noundef %154, ptr noundef %157, ptr noundef %158, ptr noundef %160)
  store double %161, ptr %32, align 8, !tbaa !12
  %162 = load double, ptr %32, align 8, !tbaa !12
  %163 = fcmp ogt double %162, 0.000000e+00
  br i1 %163, label %164, label %281

164:                                              ; preds = %146
  store double 0.000000e+00, ptr %35, align 8, !tbaa !12
  %165 = getelementptr inbounds [1 x i8], ptr %37, i64 0, i64 0
  store i8 78, ptr %165, align 1, !tbaa !11
  %166 = load i64, ptr %36, align 8, !tbaa !9
  %167 = icmp ne i64 %166, 0
  br i1 %167, label %168, label %169

168:                                              ; preds = %164
  store i64 1, ptr %29, align 8, !tbaa !9
  br label %170

169:                                              ; preds = %164
  store i64 2, ptr %29, align 8, !tbaa !9
  br label %170

170:                                              ; preds = %169, %168
  store i64 0, ptr %28, align 8, !tbaa !9
  br label %171

171:                                              ; preds = %270, %170
  %172 = load ptr, ptr %15, align 8, !tbaa !5
  %173 = load ptr, ptr %19, align 8, !tbaa !5
  %174 = load ptr, ptr %15, align 8, !tbaa !5
  %175 = load i64, ptr %174, align 8, !tbaa !9
  %176 = add nsw i64 %175, 1
  %177 = getelementptr inbounds %struct.doublecomplex, ptr %173, i64 %176
  %178 = load ptr, ptr %19, align 8, !tbaa !5
  %179 = getelementptr inbounds %struct.doublecomplex, ptr %178, i64 1
  %180 = getelementptr inbounds [3 x i64], ptr %31, i64 0, i64 0
  %181 = call i32 @zlacn2_(ptr noundef %172, ptr noundef %177, ptr noundef %179, ptr noundef %35, ptr noundef %28, ptr noundef %180)
  %182 = load i64, ptr %28, align 8, !tbaa !9
  %183 = icmp ne i64 %182, 0
  br i1 %183, label %184, label %271

184:                                              ; preds = %171
  %185 = load i64, ptr %28, align 8, !tbaa !9
  %186 = load i64, ptr %29, align 8, !tbaa !9
  %187 = icmp eq i64 %185, %186
  br i1 %187, label %188, label %203

188:                                              ; preds = %184
  %189 = load ptr, ptr %13, align 8, !tbaa !5
  %190 = load ptr, ptr %14, align 8, !tbaa !5
  %191 = getelementptr inbounds [1 x i8], ptr %37, i64 0, i64 0
  %192 = load ptr, ptr %15, align 8, !tbaa !5
  %193 = load ptr, ptr %16, align 8, !tbaa !5
  %194 = load i64, ptr %23, align 8, !tbaa !9
  %195 = getelementptr inbounds %struct.doublecomplex, ptr %193, i64 %194
  %196 = load ptr, ptr %17, align 8, !tbaa !5
  %197 = load ptr, ptr %19, align 8, !tbaa !5
  %198 = getelementptr inbounds %struct.doublecomplex, ptr %197, i64 1
  %199 = load ptr, ptr %20, align 8, !tbaa !5
  %200 = getelementptr inbounds double, ptr %199, i64 1
  %201 = load ptr, ptr %21, align 8, !tbaa !5
  %202 = call i32 @zlatrs_(ptr noundef %189, ptr noundef @.str.7, ptr noundef %190, ptr noundef %191, ptr noundef %192, ptr noundef %195, ptr noundef %196, ptr noundef %198, ptr noundef %30, ptr noundef %200, ptr noundef %201)
  br label %218

203:                                              ; preds = %184
  %204 = load ptr, ptr %13, align 8, !tbaa !5
  %205 = load ptr, ptr %14, align 8, !tbaa !5
  %206 = getelementptr inbounds [1 x i8], ptr %37, i64 0, i64 0
  %207 = load ptr, ptr %15, align 8, !tbaa !5
  %208 = load ptr, ptr %16, align 8, !tbaa !5
  %209 = load i64, ptr %23, align 8, !tbaa !9
  %210 = getelementptr inbounds %struct.doublecomplex, ptr %208, i64 %209
  %211 = load ptr, ptr %17, align 8, !tbaa !5
  %212 = load ptr, ptr %19, align 8, !tbaa !5
  %213 = getelementptr inbounds %struct.doublecomplex, ptr %212, i64 1
  %214 = load ptr, ptr %20, align 8, !tbaa !5
  %215 = getelementptr inbounds double, ptr %214, i64 1
  %216 = load ptr, ptr %21, align 8, !tbaa !5
  %217 = call i32 @zlatrs_(ptr noundef %204, ptr noundef @.str.8, ptr noundef %205, ptr noundef %206, ptr noundef %207, ptr noundef %210, ptr noundef %211, ptr noundef %213, ptr noundef %30, ptr noundef %215, ptr noundef %216)
  br label %218

218:                                              ; preds = %203, %188
  %219 = getelementptr inbounds [1 x i8], ptr %37, i64 0, i64 0
  store i8 89, ptr %219, align 1, !tbaa !11
  %220 = load double, ptr %30, align 8, !tbaa !12
  %221 = fcmp une double %220, 1.000000e+00
  br i1 %221, label %222, label %270

222:                                              ; preds = %218
  %223 = load ptr, ptr %15, align 8, !tbaa !5
  %224 = load ptr, ptr %19, align 8, !tbaa !5
  %225 = getelementptr inbounds %struct.doublecomplex, ptr %224, i64 1
  %226 = call i64 @f2c_izamax(ptr noundef %223, ptr noundef %225, ptr noundef @c__1)
  store i64 %226, ptr %27, align 8, !tbaa !9
  %227 = load i64, ptr %27, align 8, !tbaa !9
  store i64 %227, ptr %24, align 8, !tbaa !9
  %228 = load ptr, ptr %19, align 8, !tbaa !5
  %229 = load i64, ptr %24, align 8, !tbaa !9
  %230 = getelementptr inbounds %struct.doublecomplex, ptr %228, i64 %229
  %231 = getelementptr inbounds %struct.doublecomplex, ptr %230, i32 0, i32 0
  %232 = load double, ptr %231, align 8, !tbaa !14
  store double %232, ptr %25, align 8, !tbaa !12
  %233 = load double, ptr %25, align 8, !tbaa !12
  %234 = fcmp oge double %233, 0.000000e+00
  br i1 %234, label %235, label %237

235:                                              ; preds = %222
  %236 = load double, ptr %25, align 8, !tbaa !12
  br label %240

237:                                              ; preds = %222
  %238 = load double, ptr %25, align 8, !tbaa !12
  %239 = fneg double %238
  br label %240

240:                                              ; preds = %237, %235
  %241 = phi double [ %236, %235 ], [ %239, %237 ]
  %242 = load ptr, ptr %19, align 8, !tbaa !5
  %243 = load i64, ptr %27, align 8, !tbaa !9
  %244 = getelementptr inbounds %struct.doublecomplex, ptr %242, i64 %243
  %245 = call double @d_imag(ptr noundef %244)
  store double %245, ptr %26, align 8, !tbaa !12
  %246 = load double, ptr %26, align 8, !tbaa !12
  %247 = fcmp oge double %246, 0.000000e+00
  br i1 %247, label %248, label %250

248:                                              ; preds = %240
  %249 = load double, ptr %26, align 8, !tbaa !12
  br label %253

250:                                              ; preds = %240
  %251 = load double, ptr %26, align 8, !tbaa !12
  %252 = fneg double %251
  br label %253

253:                                              ; preds = %250, %248
  %254 = phi double [ %249, %248 ], [ %252, %250 ]
  %255 = fadd double %241, %254
  store double %255, ptr %34, align 8, !tbaa !12
  %256 = load double, ptr %30, align 8, !tbaa !12
  %257 = load double, ptr %34, align 8, !tbaa !12
  %258 = load double, ptr %38, align 8, !tbaa !12
  %259 = fmul double %257, %258
  %260 = fcmp olt double %256, %259
  br i1 %260, label %264, label %261

261:                                              ; preds = %253
  %262 = load double, ptr %30, align 8, !tbaa !12
  %263 = fcmp oeq double %262, 0.000000e+00
  br i1 %263, label %264, label %265

264:                                              ; preds = %261, %253
  br label %282

265:                                              ; preds = %261
  %266 = load ptr, ptr %15, align 8, !tbaa !5
  %267 = load ptr, ptr %19, align 8, !tbaa !5
  %268 = getelementptr inbounds %struct.doublecomplex, ptr %267, i64 1
  %269 = call i32 @zdrscl_(ptr noundef %266, ptr noundef %30, ptr noundef %268, ptr noundef @c__1)
  br label %270

270:                                              ; preds = %265, %218
  br label %171

271:                                              ; preds = %171
  %272 = load double, ptr %35, align 8, !tbaa !12
  %273 = fcmp une double %272, 0.000000e+00
  br i1 %273, label %274, label %280

274:                                              ; preds = %271
  %275 = load double, ptr %32, align 8, !tbaa !12
  %276 = fdiv double 1.000000e+00, %275
  %277 = load double, ptr %35, align 8, !tbaa !12
  %278 = fdiv double %276, %277
  %279 = load ptr, ptr %18, align 8, !tbaa !5
  store double %278, ptr %279, align 8, !tbaa !12
  br label %280

280:                                              ; preds = %274, %271
  br label %281

281:                                              ; preds = %280, %146
  br label %282

282:                                              ; preds = %281, %264
  store i32 0, ptr %11, align 4
  store i32 1, ptr %40, align 4
  br label %283

283:                                              ; preds = %282, %134, %125
  call void @llvm.lifetime.end.p0(i64 8, ptr %39) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %38) #3
  call void @llvm.lifetime.end.p0(i64 1, ptr %37) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %36) #3
  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 8, ptr %33) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %32) #3
  call void @llvm.lifetime.end.p0(i64 24, ptr %31) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #3
  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
  %284 = load i32, ptr %11, align 4
  ret i32 %284
}

; 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 @zlantr_(ptr noundef, ptr noundef, 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 @zlatrs_(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 = !{!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 @ztrcon_(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4, ptr noundef %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 [1 x i8], align 1
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %14) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %15) #4
  call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %16) #4
  %17 = getelementptr inbounds i8, ptr %7, i64 -16
  store i64 0, ptr %9, align 8, !tbaa !5
  %18 = tail call i64 @lsame_(ptr noundef %1, ptr noundef nonnull @.str) #4
  %19 = load i8, ptr %0, align 1, !tbaa !9
  %20 = icmp eq i8 %19, 49
  br i1 %20, label %.thread, label %22

.thread:                                          ; preds = %10
  %21 = tail call i64 @lsame_(ptr noundef %2, ptr noundef nonnull @.str.2) #4
  br label %27

22:                                               ; preds = %10
  %23 = tail call i64 @lsame_(ptr noundef nonnull %0, ptr noundef nonnull @.str.1) #4
  %.not101 = icmp eq i64 %23, 0
  %24 = tail call i64 @lsame_(ptr noundef %2, ptr noundef nonnull @.str.2) #4
  br i1 %.not101, label %25, label %27

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

27:                                               ; preds = %.thread, %25, %22
  %28 = phi i64 [ %21, %.thread ], [ %24, %25 ], [ %24, %22 ]
  %. = phi i64 [ 1, %.thread ], [ 2, %25 ], [ 1, %22 ]
  %.not92 = icmp eq i64 %18, 0
  br i1 %.not92, label %29, label %31

29:                                               ; preds = %27
  %30 = tail call i64 @lsame_(ptr noundef %1, ptr noundef nonnull @.str.4) #4
  %.not93 = icmp eq i64 %30, 0
  br i1 %.not93, label %.thread99.sink.split, label %31

31:                                               ; preds = %29, %27
  %.not94 = icmp eq i64 %28, 0
  br i1 %.not94, label %32, label %34

32:                                               ; preds = %31
  %33 = tail call i64 @lsame_(ptr noundef %2, ptr noundef nonnull @.str) #4
  %.not95 = icmp eq i64 %33, 0
  br i1 %.not95, label %.thread99.sink.split, label %34

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

37:                                               ; preds = %34
  %38 = load i64, ptr %5, align 8, !tbaa !5
  %spec.select = tail call i64 @llvm.umax.i64(i64 %35, i64 1)
  %39 = icmp slt i64 %38, %spec.select
  br i1 %39, label %.thread99.sink.split, label %40

40:                                               ; preds = %37
  %.pr = load i64, ptr %9, align 8, !tbaa !5
  %.not96 = icmp eq i64 %.pr, 0
  br i1 %.not96, label %44, label %.thread99

.thread99.sink.split:                             ; preds = %37, %34, %32, %29, %25
  %.sink = phi i64 [ -1, %25 ], [ -2, %29 ], [ -3, %32 ], [ -4, %34 ], [ -6, %37 ]
  store i64 %.sink, ptr %9, align 8, !tbaa !5
  br label %.thread99

.thread99:                                        ; preds = %.thread99.sink.split, %40
  %41 = phi i64 [ %.pr, %40 ], [ %.sink, %.thread99.sink.split ]
  %42 = sub nsw i64 0, %41
  store i64 %42, ptr %11, align 8, !tbaa !5
  %43 = call i32 @xerbla_(ptr noundef nonnull @.str.5, ptr noundef nonnull %11) #4
  br label %.loopexit

44:                                               ; preds = %40
  %45 = icmp eq i64 %35, 0
  br i1 %45, label %46, label %47

46:                                               ; preds = %44
  store double 1.000000e+00, ptr %6, align 8, !tbaa !10
  br label %.loopexit

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

56:                                               ; preds = %47
  store double 0.000000e+00, ptr %15, align 8, !tbaa !10
  store i8 78, ptr %16, align 1, !tbaa !9
  store i64 0, ptr %12, align 8, !tbaa !5
  %57 = load i64, ptr %3, align 8, !tbaa !5
  %58 = getelementptr %struct.doublecomplex, ptr %7, i64 %57
  %59 = call i32 @zlacn2_(ptr noundef nonnull %3, ptr noundef %58, ptr noundef %7, ptr noundef nonnull %15, ptr noundef nonnull %12, ptr noundef nonnull %14) #4
  %60 = load i64, ptr %12, align 8, !tbaa !5
  %.not97102 = icmp eq i64 %60, 0
  br i1 %.not97102, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %56, %84
  %61 = phi i64 [ %88, %84 ], [ %60, %56 ]
  %62 = icmp eq i64 %61, %.
  %.str.7..str.8 = select i1 %62, ptr @.str.7, ptr @.str.8
  %63 = call i32 @zlatrs_(ptr noundef %1, ptr noundef nonnull %.str.7..str.8, ptr noundef %2, ptr noundef nonnull %16, ptr noundef nonnull %3, ptr noundef %4, ptr noundef nonnull %5, ptr noundef %7, ptr noundef nonnull %13, ptr noundef %8, ptr noundef nonnull %9) #4
  store i8 89, ptr %16, align 1, !tbaa !9
  %64 = load double, ptr %13, align 8, !tbaa !10
  %65 = fcmp une double %64, 1.000000e+00
  br i1 %65, label %66, label %84

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

82:                                               ; preds = %66
  %83 = call i32 @zdrscl_(ptr noundef nonnull %3, ptr noundef nonnull %13, ptr noundef nonnull %7, ptr noundef nonnull @c__1) #4
  br label %84

84:                                               ; preds = %82, %.lr.ph
  %85 = load i64, ptr %3, align 8, !tbaa !5
  %86 = getelementptr %struct.doublecomplex, ptr %7, i64 %85
  %87 = call i32 @zlacn2_(ptr noundef nonnull %3, ptr noundef %86, ptr noundef %7, ptr noundef nonnull %15, ptr noundef nonnull %12, ptr noundef nonnull %14) #4
  %88 = load i64, ptr %12, align 8, !tbaa !5
  %.not97 = icmp eq i64 %88, 0
  br i1 %.not97, label %._crit_edge, label %.lr.ph

._crit_edge:                                      ; preds = %84, %56
  %89 = load double, ptr %15, align 8, !tbaa !10
  %90 = fcmp une double %89, 0.000000e+00
  br i1 %90, label %91, label %.loopexit

91:                                               ; preds = %._crit_edge
  %92 = fdiv double 1.000000e+00, %54
  %93 = fdiv double %92, %89
  store double %93, ptr %6, align 8, !tbaa !10
  br label %.loopexit

.loopexit:                                        ; preds = %66, %._crit_edge, %91, %47, %46, %.thread99
  call void @llvm.lifetime.end.p0(i64 1, ptr nonnull %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %15) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #4
  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 @zlantr_(ptr noundef, ptr noundef, 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 @zlatrs_(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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.umax.i64(i64, i64) #3

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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
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 = !{!"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