; LLVM IR from OpenMathLib/OpenBLAS :: lapack-netlib/SRC (zrscl)

; 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

; Function Attrs: nounwind uwtable
define dso_local i32 @zrscl_(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) #0 {
  %5 = alloca i32, align 4
  %6 = alloca ptr, align 8
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  %12 = alloca %struct.doublecomplex, align 8
  %13 = alloca double, align 8
  %14 = alloca double, align 8
  %15 = alloca double, align 8
  %16 = alloca double, align 8
  %17 = alloca double, align 8
  %18 = alloca double, align 8
  %19 = alloca double, align 8
  %20 = alloca double, align 8
  %21 = alloca double, align 8
  %22 = alloca i32, align 4
  store ptr %0, ptr %6, align 8, !tbaa !5
  store ptr %1, ptr %7, align 8, !tbaa !5
  store ptr %2, ptr %8, align 8, !tbaa !5
  store ptr %3, ptr %9, align 8, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %10) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.start.p0(i64 16, ptr %12) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #5
  %23 = load ptr, ptr %8, align 8, !tbaa !5
  %24 = getelementptr inbounds %struct.doublecomplex, ptr %23, i32 -1
  store ptr %24, ptr %8, align 8, !tbaa !5
  %25 = load ptr, ptr %6, align 8, !tbaa !5
  %26 = load i32, ptr %25, align 4, !tbaa !9
  %27 = icmp sle i32 %26, 0
  br i1 %27, label %28, label %29

28:                                               ; preds = %4
  store i32 0, ptr %5, align 4
  store i32 1, ptr %22, align 4
  br label %357

29:                                               ; preds = %4
  %30 = call double @dlamch_(ptr noundef @.str)
  store double %30, ptr %20, align 8, !tbaa !11
  %31 = load double, ptr %20, align 8, !tbaa !11
  %32 = fdiv double 1.000000e+00, %31
  store double %32, ptr %21, align 8, !tbaa !11
  %33 = call double @dlamch_(ptr noundef @.str.1)
  store double %33, ptr %18, align 8, !tbaa !11
  %34 = load ptr, ptr %7, align 8, !tbaa !5
  %35 = getelementptr inbounds %struct.doublecomplex, ptr %34, i32 0, i32 0
  %36 = load double, ptr %35, align 8, !tbaa !13
  store double %36, ptr %16, align 8, !tbaa !11
  %37 = load ptr, ptr %7, align 8, !tbaa !5
  %38 = call { double, double } @Cd(ptr noundef %37)
  %39 = extractvalue { double, double } %38, 0
  %40 = extractvalue { double, double } %38, 1
  store double %40, ptr %15, align 8, !tbaa !11
  %41 = load double, ptr %16, align 8, !tbaa !11
  %42 = fcmp oge double %41, 0.000000e+00
  br i1 %42, label %43, label %45

43:                                               ; preds = %29
  %44 = load double, ptr %16, align 8, !tbaa !11
  br label %48

45:                                               ; preds = %29
  %46 = load double, ptr %16, align 8, !tbaa !11
  %47 = fneg double %46
  br label %48

48:                                               ; preds = %45, %43
  %49 = phi double [ %44, %43 ], [ %47, %45 ]
  store double %49, ptr %14, align 8, !tbaa !11
  %50 = load double, ptr %15, align 8, !tbaa !11
  %51 = fcmp oge double %50, 0.000000e+00
  br i1 %51, label %52, label %54

52:                                               ; preds = %48
  %53 = load double, ptr %15, align 8, !tbaa !11
  br label %57

54:                                               ; preds = %48
  %55 = load double, ptr %15, align 8, !tbaa !11
  %56 = fneg double %55
  br label %57

57:                                               ; preds = %54, %52
  %58 = phi double [ %53, %52 ], [ %56, %54 ]
  store double %58, ptr %13, align 8, !tbaa !11
  %59 = load double, ptr %15, align 8, !tbaa !11
  %60 = fcmp oeq double %59, 0.000000e+00
  br i1 %60, label %61, label %67

61:                                               ; preds = %57
  %62 = load ptr, ptr %6, align 8, !tbaa !5
  %63 = load ptr, ptr %8, align 8, !tbaa !5
  %64 = getelementptr inbounds %struct.doublecomplex, ptr %63, i64 1
  %65 = load ptr, ptr %9, align 8, !tbaa !5
  %66 = call i32 @zdrscl_(ptr noundef %62, ptr noundef %16, ptr noundef %64, ptr noundef %65)
  br label %356

67:                                               ; preds = %57
  %68 = load double, ptr %16, align 8, !tbaa !11
  %69 = fcmp oeq double %68, 0.000000e+00
  br i1 %69, label %70, label %127

70:                                               ; preds = %67
  %71 = load double, ptr %13, align 8, !tbaa !11
  %72 = load double, ptr %21, align 8, !tbaa !11
  %73 = fcmp ogt double %71, %72
  br i1 %73, label %74, label %92

74:                                               ; preds = %70
  %75 = load ptr, ptr %6, align 8, !tbaa !5
  %76 = load ptr, ptr %8, align 8, !tbaa !5
  %77 = getelementptr inbounds %struct.doublecomplex, ptr %76, i64 1
  %78 = load ptr, ptr %9, align 8, !tbaa !5
  %79 = call i32 @zdscal_(ptr noundef %75, ptr noundef %20, ptr noundef %77, ptr noundef %78)
  %80 = load double, ptr %21, align 8, !tbaa !11
  %81 = fneg double %80
  %82 = load double, ptr %15, align 8, !tbaa !11
  %83 = fdiv double %81, %82
  store double %83, ptr %10, align 8, !tbaa !11
  %84 = getelementptr inbounds %struct.doublecomplex, ptr %12, i32 0, i32 0
  store double 0.000000e+00, ptr %84, align 8, !tbaa !13
  %85 = load double, ptr %10, align 8, !tbaa !11
  %86 = getelementptr inbounds %struct.doublecomplex, ptr %12, i32 0, i32 1
  store double %85, ptr %86, align 8, !tbaa !15
  %87 = load ptr, ptr %6, align 8, !tbaa !5
  %88 = load ptr, ptr %8, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.doublecomplex, ptr %88, i64 1
  %90 = load ptr, ptr %9, align 8, !tbaa !5
  %91 = call i32 @zscal_(ptr noundef %87, ptr noundef %12, ptr noundef %89, ptr noundef %90)
  br label %126

92:                                               ; preds = %70
  %93 = load double, ptr %13, align 8, !tbaa !11
  %94 = load double, ptr %20, align 8, !tbaa !11
  %95 = fcmp olt double %93, %94
  br i1 %95, label %96, label %114

96:                                               ; preds = %92
  %97 = load double, ptr %20, align 8, !tbaa !11
  %98 = fneg double %97
  %99 = load double, ptr %15, align 8, !tbaa !11
  %100 = fdiv double %98, %99
  store double %100, ptr %10, align 8, !tbaa !11
  %101 = getelementptr inbounds %struct.doublecomplex, ptr %12, i32 0, i32 0
  store double 0.000000e+00, ptr %101, align 8, !tbaa !13
  %102 = load double, ptr %10, align 8, !tbaa !11
  %103 = getelementptr inbounds %struct.doublecomplex, ptr %12, i32 0, i32 1
  store double %102, ptr %103, align 8, !tbaa !15
  %104 = load ptr, ptr %6, align 8, !tbaa !5
  %105 = load ptr, ptr %8, align 8, !tbaa !5
  %106 = getelementptr inbounds %struct.doublecomplex, ptr %105, i64 1
  %107 = load ptr, ptr %9, align 8, !tbaa !5
  %108 = call i32 @zscal_(ptr noundef %104, ptr noundef %12, ptr noundef %106, ptr noundef %107)
  %109 = load ptr, ptr %6, align 8, !tbaa !5
  %110 = load ptr, ptr %8, align 8, !tbaa !5
  %111 = getelementptr inbounds %struct.doublecomplex, ptr %110, i64 1
  %112 = load ptr, ptr %9, align 8, !tbaa !5
  %113 = call i32 @zdscal_(ptr noundef %109, ptr noundef %21, ptr noundef %111, ptr noundef %112)
  br label %125

114:                                              ; preds = %92
  %115 = load double, ptr %15, align 8, !tbaa !11
  %116 = fdiv double -1.000000e+00, %115
  store double %116, ptr %10, align 8, !tbaa !11
  %117 = getelementptr inbounds %struct.doublecomplex, ptr %12, i32 0, i32 0
  store double 0.000000e+00, ptr %117, align 8, !tbaa !13
  %118 = load double, ptr %10, align 8, !tbaa !11
  %119 = getelementptr inbounds %struct.doublecomplex, ptr %12, i32 0, i32 1
  store double %118, ptr %119, align 8, !tbaa !15
  %120 = load ptr, ptr %6, align 8, !tbaa !5
  %121 = load ptr, ptr %8, align 8, !tbaa !5
  %122 = getelementptr inbounds %struct.doublecomplex, ptr %121, i64 1
  %123 = load ptr, ptr %9, align 8, !tbaa !5
  %124 = call i32 @zscal_(ptr noundef %120, ptr noundef %12, ptr noundef %122, ptr noundef %123)
  br label %125

125:                                              ; preds = %114, %96
  br label %126

126:                                              ; preds = %125, %74
  br label %355

127:                                              ; preds = %67
  %128 = load double, ptr %16, align 8, !tbaa !11
  %129 = load double, ptr %15, align 8, !tbaa !11
  %130 = load double, ptr %15, align 8, !tbaa !11
  %131 = load double, ptr %16, align 8, !tbaa !11
  %132 = fdiv double %130, %131
  %133 = call double @llvm.fmuladd.f64(double %129, double %132, double %128)
  store double %133, ptr %19, align 8, !tbaa !11
  %134 = load double, ptr %15, align 8, !tbaa !11
  %135 = load double, ptr %16, align 8, !tbaa !11
  %136 = load double, ptr %16, align 8, !tbaa !11
  %137 = load double, ptr %15, align 8, !tbaa !11
  %138 = fdiv double %136, %137
  %139 = call double @llvm.fmuladd.f64(double %135, double %138, double %134)
  store double %139, ptr %17, align 8, !tbaa !11
  %140 = load double, ptr %19, align 8, !tbaa !11
  %141 = fcmp oge double %140, 0.000000e+00
  br i1 %141, label %142, label %144

142:                                              ; preds = %127
  %143 = load double, ptr %19, align 8, !tbaa !11
  br label %147

144:                                              ; preds = %127
  %145 = load double, ptr %19, align 8, !tbaa !11
  %146 = fneg double %145
  br label %147

147:                                              ; preds = %144, %142
  %148 = phi double [ %143, %142 ], [ %146, %144 ]
  %149 = load double, ptr %20, align 8, !tbaa !11
  %150 = fcmp olt double %148, %149
  br i1 %150, label %163, label %151

151:                                              ; preds = %147
  %152 = load double, ptr %17, align 8, !tbaa !11
  %153 = fcmp oge double %152, 0.000000e+00
  br i1 %153, label %154, label %156

154:                                              ; preds = %151
  %155 = load double, ptr %17, align 8, !tbaa !11
  br label %159

156:                                              ; preds = %151
  %157 = load double, ptr %17, align 8, !tbaa !11
  %158 = fneg double %157
  br label %159

159:                                              ; preds = %156, %154
  %160 = phi double [ %155, %154 ], [ %158, %156 ]
  %161 = load double, ptr %20, align 8, !tbaa !11
  %162 = fcmp olt double %160, %161
  br i1 %162, label %163, label %185

163:                                              ; preds = %159, %147
  %164 = load double, ptr %20, align 8, !tbaa !11
  %165 = load double, ptr %19, align 8, !tbaa !11
  %166 = fdiv double %164, %165
  store double %166, ptr %10, align 8, !tbaa !11
  %167 = load double, ptr %20, align 8, !tbaa !11
  %168 = fneg double %167
  %169 = load double, ptr %17, align 8, !tbaa !11
  %170 = fdiv double %168, %169
  store double %170, ptr %11, align 8, !tbaa !11
  %171 = load double, ptr %10, align 8, !tbaa !11
  %172 = getelementptr inbounds %struct.doublecomplex, ptr %12, i32 0, i32 0
  store double %171, ptr %172, align 8, !tbaa !13
  %173 = load double, ptr %11, align 8, !tbaa !11
  %174 = getelementptr inbounds %struct.doublecomplex, ptr %12, i32 0, i32 1
  store double %173, ptr %174, align 8, !tbaa !15
  %175 = load ptr, ptr %6, align 8, !tbaa !5
  %176 = load ptr, ptr %8, align 8, !tbaa !5
  %177 = getelementptr inbounds %struct.doublecomplex, ptr %176, i64 1
  %178 = load ptr, ptr %9, align 8, !tbaa !5
  %179 = call i32 @zscal_(ptr noundef %175, ptr noundef %12, ptr noundef %177, ptr noundef %178)
  %180 = load ptr, ptr %6, align 8, !tbaa !5
  %181 = load ptr, ptr %8, align 8, !tbaa !5
  %182 = getelementptr inbounds %struct.doublecomplex, ptr %181, i64 1
  %183 = load ptr, ptr %9, align 8, !tbaa !5
  %184 = call i32 @zdscal_(ptr noundef %180, ptr noundef %21, ptr noundef %182, ptr noundef %183)
  br label %354

185:                                              ; preds = %159
  %186 = load double, ptr %19, align 8, !tbaa !11
  %187 = fcmp oge double %186, 0.000000e+00
  br i1 %187, label %188, label %190

188:                                              ; preds = %185
  %189 = load double, ptr %19, align 8, !tbaa !11
  br label %193

190:                                              ; preds = %185
  %191 = load double, ptr %19, align 8, !tbaa !11
  %192 = fneg double %191
  br label %193

193:                                              ; preds = %190, %188
  %194 = phi double [ %189, %188 ], [ %192, %190 ]
  %195 = load double, ptr %21, align 8, !tbaa !11
  %196 = fcmp ogt double %194, %195
  br i1 %196, label %209, label %197

197:                                              ; preds = %193
  %198 = load double, ptr %17, align 8, !tbaa !11
  %199 = fcmp oge double %198, 0.000000e+00
  br i1 %199, label %200, label %202

200:                                              ; preds = %197
  %201 = load double, ptr %17, align 8, !tbaa !11
  br label %205

202:                                              ; preds = %197
  %203 = load double, ptr %17, align 8, !tbaa !11
  %204 = fneg double %203
  br label %205

205:                                              ; preds = %202, %200
  %206 = phi double [ %201, %200 ], [ %204, %202 ]
  %207 = load double, ptr %21, align 8, !tbaa !11
  %208 = fcmp ogt double %206, %207
  br i1 %208, label %209, label %339

209:                                              ; preds = %205, %193
  %210 = load double, ptr %14, align 8, !tbaa !11
  %211 = load double, ptr %18, align 8, !tbaa !11
  %212 = fcmp ogt double %210, %211
  br i1 %212, label %217, label %213

213:                                              ; preds = %209
  %214 = load double, ptr %13, align 8, !tbaa !11
  %215 = load double, ptr %18, align 8, !tbaa !11
  %216 = fcmp ogt double %214, %215
  br i1 %216, label %217, label %231

217:                                              ; preds = %213, %209
  %218 = load double, ptr %19, align 8, !tbaa !11
  %219 = fdiv double 1.000000e+00, %218
  store double %219, ptr %10, align 8, !tbaa !11
  %220 = load double, ptr %17, align 8, !tbaa !11
  %221 = fdiv double -1.000000e+00, %220
  store double %221, ptr %11, align 8, !tbaa !11
  %222 = load double, ptr %10, align 8, !tbaa !11
  %223 = getelementptr inbounds %struct.doublecomplex, ptr %12, i32 0, i32 0
  store double %222, ptr %223, align 8, !tbaa !13
  %224 = load double, ptr %11, align 8, !tbaa !11
  %225 = getelementptr inbounds %struct.doublecomplex, ptr %12, i32 0, i32 1
  store double %224, ptr %225, align 8, !tbaa !15
  %226 = load ptr, ptr %6, align 8, !tbaa !5
  %227 = load ptr, ptr %8, align 8, !tbaa !5
  %228 = getelementptr inbounds %struct.doublecomplex, ptr %227, i64 1
  %229 = load ptr, ptr %9, align 8, !tbaa !5
  %230 = call i32 @zscal_(ptr noundef %226, ptr noundef %12, ptr noundef %228, ptr noundef %229)
  br label %338

231:                                              ; preds = %213
  %232 = load ptr, ptr %6, align 8, !tbaa !5
  %233 = load ptr, ptr %8, align 8, !tbaa !5
  %234 = getelementptr inbounds %struct.doublecomplex, ptr %233, i64 1
  %235 = load ptr, ptr %9, align 8, !tbaa !5
  %236 = call i32 @zdscal_(ptr noundef %232, ptr noundef %20, ptr noundef %234, ptr noundef %235)
  %237 = load double, ptr %19, align 8, !tbaa !11
  %238 = fcmp oge double %237, 0.000000e+00
  br i1 %238, label %239, label %241

239:                                              ; preds = %231
  %240 = load double, ptr %19, align 8, !tbaa !11
  br label %244

241:                                              ; preds = %231
  %242 = load double, ptr %19, align 8, !tbaa !11
  %243 = fneg double %242
  br label %244

244:                                              ; preds = %241, %239
  %245 = phi double [ %240, %239 ], [ %243, %241 ]
  %246 = load double, ptr %18, align 8, !tbaa !11
  %247 = fcmp ogt double %245, %246
  br i1 %247, label %260, label %248

248:                                              ; preds = %244
  %249 = load double, ptr %17, align 8, !tbaa !11
  %250 = fcmp oge double %249, 0.000000e+00
  br i1 %250, label %251, label %253

251:                                              ; preds = %248
  %252 = load double, ptr %17, align 8, !tbaa !11
  br label %256

253:                                              ; preds = %248
  %254 = load double, ptr %17, align 8, !tbaa !11
  %255 = fneg double %254
  br label %256

256:                                              ; preds = %253, %251
  %257 = phi double [ %252, %251 ], [ %255, %253 ]
  %258 = load double, ptr %18, align 8, !tbaa !11
  %259 = fcmp ogt double %257, %258
  br i1 %259, label %260, label %320

260:                                              ; preds = %256, %244
  %261 = load double, ptr %14, align 8, !tbaa !11
  %262 = load double, ptr %13, align 8, !tbaa !11
  %263 = fcmp oge double %261, %262
  br i1 %263, label %264, label %285

264:                                              ; preds = %260
  %265 = load double, ptr %20, align 8, !tbaa !11
  %266 = load double, ptr %16, align 8, !tbaa !11
  %267 = load double, ptr %20, align 8, !tbaa !11
  %268 = load double, ptr %15, align 8, !tbaa !11
  %269 = load double, ptr %15, align 8, !tbaa !11
  %270 = load double, ptr %16, align 8, !tbaa !11
  %271 = fdiv double %269, %270
  %272 = fmul double %268, %271
  %273 = fmul double %267, %272
  %274 = call double @llvm.fmuladd.f64(double %265, double %266, double %273)
  store double %274, ptr %19, align 8, !tbaa !11
  %275 = load double, ptr %20, align 8, !tbaa !11
  %276 = load double, ptr %15, align 8, !tbaa !11
  %277 = load double, ptr %16, align 8, !tbaa !11
  %278 = load double, ptr %20, align 8, !tbaa !11
  %279 = load double, ptr %16, align 8, !tbaa !11
  %280 = fmul double %278, %279
  %281 = load double, ptr %15, align 8, !tbaa !11
  %282 = fdiv double %280, %281
  %283 = fmul double %277, %282
  %284 = call double @llvm.fmuladd.f64(double %275, double %276, double %283)
  store double %284, ptr %17, align 8, !tbaa !11
  br label %306

285:                                              ; preds = %260
  %286 = load double, ptr %20, align 8, !tbaa !11
  %287 = load double, ptr %16, align 8, !tbaa !11
  %288 = load double, ptr %15, align 8, !tbaa !11
  %289 = load double, ptr %20, align 8, !tbaa !11
  %290 = load double, ptr %15, align 8, !tbaa !11
  %291 = fmul double %289, %290
  %292 = load double, ptr %16, align 8, !tbaa !11
  %293 = fdiv double %291, %292
  %294 = fmul double %288, %293
  %295 = call double @llvm.fmuladd.f64(double %286, double %287, double %294)
  store double %295, ptr %19, align 8, !tbaa !11
  %296 = load double, ptr %20, align 8, !tbaa !11
  %297 = load double, ptr %15, align 8, !tbaa !11
  %298 = load double, ptr %20, align 8, !tbaa !11
  %299 = load double, ptr %16, align 8, !tbaa !11
  %300 = load double, ptr %16, align 8, !tbaa !11
  %301 = load double, ptr %15, align 8, !tbaa !11
  %302 = fdiv double %300, %301
  %303 = fmul double %299, %302
  %304 = fmul double %298, %303
  %305 = call double @llvm.fmuladd.f64(double %296, double %297, double %304)
  store double %305, ptr %17, align 8, !tbaa !11
  br label %306

306:                                              ; preds = %285, %264
  %307 = load double, ptr %19, align 8, !tbaa !11
  %308 = fdiv double 1.000000e+00, %307
  store double %308, ptr %10, align 8, !tbaa !11
  %309 = load double, ptr %17, align 8, !tbaa !11
  %310 = fdiv double -1.000000e+00, %309
  store double %310, ptr %11, align 8, !tbaa !11
  %311 = load double, ptr %10, align 8, !tbaa !11
  %312 = getelementptr inbounds %struct.doublecomplex, ptr %12, i32 0, i32 0
  store double %311, ptr %312, align 8, !tbaa !13
  %313 = load double, ptr %11, align 8, !tbaa !11
  %314 = getelementptr inbounds %struct.doublecomplex, ptr %12, i32 0, i32 1
  store double %313, ptr %314, align 8, !tbaa !15
  %315 = load ptr, ptr %6, align 8, !tbaa !5
  %316 = load ptr, ptr %8, align 8, !tbaa !5
  %317 = getelementptr inbounds %struct.doublecomplex, ptr %316, i64 1
  %318 = load ptr, ptr %9, align 8, !tbaa !5
  %319 = call i32 @zscal_(ptr noundef %315, ptr noundef %12, ptr noundef %317, ptr noundef %318)
  br label %337

320:                                              ; preds = %256
  %321 = load double, ptr %21, align 8, !tbaa !11
  %322 = load double, ptr %19, align 8, !tbaa !11
  %323 = fdiv double %321, %322
  store double %323, ptr %10, align 8, !tbaa !11
  %324 = load double, ptr %21, align 8, !tbaa !11
  %325 = fneg double %324
  %326 = load double, ptr %17, align 8, !tbaa !11
  %327 = fdiv double %325, %326
  store double %327, ptr %11, align 8, !tbaa !11
  %328 = load double, ptr %10, align 8, !tbaa !11
  %329 = getelementptr inbounds %struct.doublecomplex, ptr %12, i32 0, i32 0
  store double %328, ptr %329, align 8, !tbaa !13
  %330 = load double, ptr %11, align 8, !tbaa !11
  %331 = getelementptr inbounds %struct.doublecomplex, ptr %12, i32 0, i32 1
  store double %330, ptr %331, align 8, !tbaa !15
  %332 = load ptr, ptr %6, align 8, !tbaa !5
  %333 = load ptr, ptr %8, align 8, !tbaa !5
  %334 = getelementptr inbounds %struct.doublecomplex, ptr %333, i64 1
  %335 = load ptr, ptr %9, align 8, !tbaa !5
  %336 = call i32 @zscal_(ptr noundef %332, ptr noundef %12, ptr noundef %334, ptr noundef %335)
  br label %337

337:                                              ; preds = %320, %306
  br label %338

338:                                              ; preds = %337, %217
  br label %353

339:                                              ; preds = %205
  %340 = load double, ptr %19, align 8, !tbaa !11
  %341 = fdiv double 1.000000e+00, %340
  store double %341, ptr %10, align 8, !tbaa !11
  %342 = load double, ptr %17, align 8, !tbaa !11
  %343 = fdiv double -1.000000e+00, %342
  store double %343, ptr %11, align 8, !tbaa !11
  %344 = load double, ptr %10, align 8, !tbaa !11
  %345 = getelementptr inbounds %struct.doublecomplex, ptr %12, i32 0, i32 0
  store double %344, ptr %345, align 8, !tbaa !13
  %346 = load double, ptr %11, align 8, !tbaa !11
  %347 = getelementptr inbounds %struct.doublecomplex, ptr %12, i32 0, i32 1
  store double %346, ptr %347, align 8, !tbaa !15
  %348 = load ptr, ptr %6, align 8, !tbaa !5
  %349 = load ptr, ptr %8, align 8, !tbaa !5
  %350 = getelementptr inbounds %struct.doublecomplex, ptr %349, i64 1
  %351 = load ptr, ptr %9, align 8, !tbaa !5
  %352 = call i32 @zscal_(ptr noundef %348, ptr noundef %12, ptr noundef %350, ptr noundef %351)
  br label %353

353:                                              ; preds = %339, %338
  br label %354

354:                                              ; preds = %353, %163
  br label %355

355:                                              ; preds = %354, %126
  br label %356

356:                                              ; preds = %355, %61
  store i32 0, ptr %5, align 4
  store i32 1, ptr %22, align 4
  br label %357

357:                                              ; preds = %356, %28
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %10) #5
  %358 = load i32, ptr %5, align 4
  ret i32 %358
}

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

declare double @dlamch_(ptr noundef) #2

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

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

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #4

; 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 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { 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 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!14, !12, i64 0}
!14 = !{!"", !12, i64 0, !12, i64 8}
!15 = !{!14, !12, i64 8}


; Optimized IR (opt -passes='default<O3>'):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.doublecomplex = type { double, double }

@.str = external hidden unnamed_addr constant [2 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @zrscl_(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3) local_unnamed_addr #0 {
  %5 = alloca %struct.doublecomplex, align 16
  %6 = alloca double, align 8
  %7 = alloca double, align 8
  %8 = alloca double, align 8
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %5) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #6
  %9 = load i32, ptr %0, align 4, !tbaa !5
  %10 = icmp slt i32 %9, 1
  br i1 %10, label %123, label %11

11:                                               ; preds = %4
  %12 = tail call double @dlamch_(ptr noundef nonnull @.str) #6
  store double %12, ptr %7, align 8, !tbaa !9
  %13 = fdiv double 1.000000e+00, %12
  store double %13, ptr %8, align 8, !tbaa !9
  %14 = tail call double @dlamch_(ptr noundef nonnull @.str.1) #6
  %15 = load double, ptr %1, align 8, !tbaa !11
  store double %15, ptr %6, align 8, !tbaa !9
  %16 = tail call { double, double } @Cd(ptr noundef nonnull %1)
  %17 = extractvalue { double, double } %16, 1
  %18 = fcmp oge double %15, 0.000000e+00
  %19 = fneg double %15
  %20 = select i1 %18, double %15, double %19
  %21 = fcmp oge double %17, 0.000000e+00
  %22 = fneg double %17
  %23 = select i1 %21, double %17, double %22
  %24 = fcmp oeq double %17, 0.000000e+00
  br i1 %24, label %25, label %27

25:                                               ; preds = %11
  %26 = call i32 @zdrscl_(ptr noundef nonnull %0, ptr noundef nonnull %6, ptr noundef %2, ptr noundef %3) #6
  br label %123

27:                                               ; preds = %11
  %28 = fcmp oeq double %15, 0.000000e+00
  br i1 %28, label %29, label %50

29:                                               ; preds = %27
  %30 = fcmp ogt double %23, %13
  br i1 %30, label %31, label %38

31:                                               ; preds = %29
  %32 = call i32 @zdscal_(ptr noundef nonnull %0, ptr noundef nonnull %7, ptr noundef %2, ptr noundef %3) #6
  %33 = load double, ptr %8, align 8, !tbaa !9
  %34 = fneg double %33
  %35 = fdiv double %34, %17
  store double 0.000000e+00, ptr %5, align 16, !tbaa !11
  %36 = getelementptr inbounds i8, ptr %5, i64 8
  store double %35, ptr %36, align 8, !tbaa !13
  %37 = call i32 @zscal_(ptr noundef nonnull %0, ptr noundef nonnull %5, ptr noundef %2, ptr noundef %3) #6
  br label %123

38:                                               ; preds = %29
  %39 = fcmp olt double %23, %12
  br i1 %39, label %40, label %46

40:                                               ; preds = %38
  %41 = fneg double %12
  %42 = fdiv double %41, %17
  store double 0.000000e+00, ptr %5, align 16, !tbaa !11
  %43 = getelementptr inbounds i8, ptr %5, i64 8
  store double %42, ptr %43, align 8, !tbaa !13
  %44 = call i32 @zscal_(ptr noundef nonnull %0, ptr noundef nonnull %5, ptr noundef %2, ptr noundef %3) #6
  %45 = call i32 @zdscal_(ptr noundef nonnull %0, ptr noundef nonnull %8, ptr noundef %2, ptr noundef %3) #6
  br label %123

46:                                               ; preds = %38
  %47 = fdiv double -1.000000e+00, %17
  store double 0.000000e+00, ptr %5, align 16, !tbaa !11
  %48 = getelementptr inbounds i8, ptr %5, i64 8
  store double %47, ptr %48, align 8, !tbaa !13
  %49 = call i32 @zscal_(ptr noundef nonnull %0, ptr noundef nonnull %5, ptr noundef %2, ptr noundef %3) #6
  br label %123

50:                                               ; preds = %27
  %51 = insertelement <2 x double> poison, double %15, i64 0
  %52 = insertelement <2 x double> %51, double %17, i64 1
  %53 = shufflevector <2 x double> %52, <2 x double> poison, <2 x i32> <i32 1, i32 0>
  %54 = fdiv <2 x double> %52, %53
  %55 = shufflevector <2 x double> %54, <2 x double> poison, <2 x i32> <i32 1, i32 0>
  %56 = tail call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %53, <2 x double> %55, <2 x double> %52)
  %57 = extractelement <2 x double> %56, i64 0
  %58 = fcmp oge double %57, 0.000000e+00
  %59 = fneg double %57
  %60 = select i1 %58, double %57, double %59
  %61 = fcmp olt double %60, %12
  br i1 %61, label %68, label %62

62:                                               ; preds = %50
  %63 = extractelement <2 x double> %56, i64 1
  %64 = fcmp oge double %63, 0.000000e+00
  %65 = fneg double %63
  %66 = select i1 %64, double %63, double %65
  %67 = fcmp olt double %66, %12
  br i1 %67, label %68, label %75

68:                                               ; preds = %62, %50
  %69 = fneg double %12
  %70 = insertelement <2 x double> poison, double %12, i64 0
  %71 = insertelement <2 x double> %70, double %69, i64 1
  %72 = fdiv <2 x double> %71, %56
  store <2 x double> %72, ptr %5, align 16, !tbaa !9
  %73 = call i32 @zscal_(ptr noundef nonnull %0, ptr noundef nonnull %5, ptr noundef %2, ptr noundef %3) #6
  %74 = call i32 @zdscal_(ptr noundef nonnull %0, ptr noundef nonnull %8, ptr noundef %2, ptr noundef %3) #6
  br label %123

75:                                               ; preds = %62
  %76 = fcmp ogt double %60, %13
  %77 = fcmp ogt double %66, %13
  %or.cond = or i1 %76, %77
  br i1 %or.cond, label %78, label %120

78:                                               ; preds = %75
  %79 = fcmp ogt double %20, %14
  %80 = fcmp ogt double %23, %14
  %or.cond125 = or i1 %79, %80
  br i1 %or.cond125, label %81, label %84

81:                                               ; preds = %78
  %82 = fdiv <2 x double> <double 1.000000e+00, double -1.000000e+00>, %56
  store <2 x double> %82, ptr %5, align 16, !tbaa !9
  %83 = call i32 @zscal_(ptr noundef nonnull %0, ptr noundef nonnull %5, ptr noundef %2, ptr noundef %3) #6
  br label %123

84:                                               ; preds = %78
  %85 = call i32 @zdscal_(ptr noundef nonnull %0, ptr noundef nonnull %7, ptr noundef %2, ptr noundef %3) #6
  %86 = fcmp ogt double %60, %14
  %87 = fcmp ogt double %66, %14
  %or.cond126 = or i1 %86, %87
  br i1 %or.cond126, label %88, label %113

88:                                               ; preds = %84
  %89 = fcmp ult double %20, %23
  %90 = load double, ptr %7, align 8, !tbaa !9
  br i1 %89, label %99, label %91

91:                                               ; preds = %88
  %92 = extractelement <2 x double> %54, i64 1
  %93 = fmul double %17, %92
  %94 = fmul double %90, %93
  %95 = call double @llvm.fmuladd.f64(double %90, double %15, double %94)
  %96 = fmul double %90, %15
  %97 = fdiv double %96, %17
  %98 = fmul double %15, %97
  br label %107

99:                                               ; preds = %88
  %100 = fmul double %17, %90
  %101 = fdiv double %100, %15
  %102 = fmul double %17, %101
  %103 = call double @llvm.fmuladd.f64(double %90, double %15, double %102)
  %104 = extractelement <2 x double> %54, i64 0
  %105 = fmul double %15, %104
  %106 = fmul double %90, %105
  br label %107

107:                                              ; preds = %99, %91
  %.sink = phi double [ %106, %99 ], [ %98, %91 ]
  %.0 = phi double [ %103, %99 ], [ %95, %91 ]
  %108 = call double @llvm.fmuladd.f64(double %90, double %17, double %.sink)
  %109 = insertelement <2 x double> poison, double %.0, i64 0
  %110 = insertelement <2 x double> %109, double %108, i64 1
  %111 = fdiv <2 x double> <double 1.000000e+00, double -1.000000e+00>, %110
  store <2 x double> %111, ptr %5, align 16, !tbaa !9
  %112 = call i32 @zscal_(ptr noundef nonnull %0, ptr noundef nonnull %5, ptr noundef %2, ptr noundef %3) #6
  br label %123

113:                                              ; preds = %84
  %114 = load double, ptr %8, align 8, !tbaa !9
  %115 = fneg double %114
  %116 = insertelement <2 x double> poison, double %114, i64 0
  %117 = insertelement <2 x double> %116, double %115, i64 1
  %118 = fdiv <2 x double> %117, %56
  store <2 x double> %118, ptr %5, align 16, !tbaa !9
  %119 = call i32 @zscal_(ptr noundef nonnull %0, ptr noundef nonnull %5, ptr noundef %2, ptr noundef %3) #6
  br label %123

120:                                              ; preds = %75
  %121 = fdiv <2 x double> <double 1.000000e+00, double -1.000000e+00>, %56
  store <2 x double> %121, ptr %5, align 16, !tbaa !9
  %122 = call i32 @zscal_(ptr noundef nonnull %0, ptr noundef nonnull %5, ptr noundef %2, ptr noundef %3) #6
  br label %123

123:                                              ; preds = %25, %68, %81, %113, %107, %120, %31, %46, %40, %4
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #6
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %5) #6
  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 double @dlamch_(ptr noundef) local_unnamed_addr #2

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

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

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

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #4

; 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 <2 x double> @llvm.fmuladd.v2f64(<2 x double>, <2 x double>, <2 x double>) #5

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 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { 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 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = !{!12, !10, i64 0}
!12 = !{!"", !10, i64 0, !10, i64 8}
!13 = !{!12, !10, i64 8}


; Effective O3 passes: EarlyCSEPass,GVNPass,GlobalOptPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,PostOrderFunctionAttrsPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass