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

; 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 [13 x i8], align 1
@c__1 = external hidden global i64, align 8

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

38:                                               ; preds = %6
  %39 = load ptr, ptr %8, align 8, !tbaa !5
  %40 = load i64, ptr %39, align 8, !tbaa !11
  store i64 %40, ptr %14, align 8, !tbaa !11
  store i64 1, ptr %20, align 8, !tbaa !11
  br label %41

41:                                               ; preds = %66, %38
  %42 = load i64, ptr %20, align 8, !tbaa !11
  %43 = load i64, ptr %14, align 8, !tbaa !11
  %44 = icmp sle i64 %42, %43
  br i1 %44, label %45, label %69

45:                                               ; preds = %41
  %46 = load i64, ptr %20, align 8, !tbaa !11
  store i64 %46, ptr %15, align 8, !tbaa !11
  %47 = load ptr, ptr %8, align 8, !tbaa !5
  %48 = load i64, ptr %47, align 8, !tbaa !11
  %49 = sitofp i64 %48 to double
  %50 = fdiv double 1.000000e+00, %49
  store double %50, ptr %17, align 8, !tbaa !9
  %51 = load double, ptr %17, align 8, !tbaa !9
  %52 = getelementptr inbounds %struct.doublecomplex, ptr %19, i32 0, i32 0
  store double %51, ptr %52, align 8, !tbaa !13
  %53 = getelementptr inbounds %struct.doublecomplex, ptr %19, i32 0, i32 1
  store double 0.000000e+00, ptr %53, align 8, !tbaa !15
  %54 = getelementptr inbounds %struct.doublecomplex, ptr %19, i32 0, i32 0
  %55 = load double, ptr %54, align 8, !tbaa !13
  %56 = load ptr, ptr %10, align 8, !tbaa !5
  %57 = load i64, ptr %15, align 8, !tbaa !11
  %58 = getelementptr inbounds %struct.doublecomplex, ptr %56, i64 %57
  %59 = getelementptr inbounds %struct.doublecomplex, ptr %58, i32 0, i32 0
  store double %55, ptr %59, align 8, !tbaa !13
  %60 = getelementptr inbounds %struct.doublecomplex, ptr %19, i32 0, i32 1
  %61 = load double, ptr %60, align 8, !tbaa !15
  %62 = load ptr, ptr %10, align 8, !tbaa !5
  %63 = load i64, ptr %15, align 8, !tbaa !11
  %64 = getelementptr inbounds %struct.doublecomplex, ptr %62, i64 %63
  %65 = getelementptr inbounds %struct.doublecomplex, ptr %64, i32 0, i32 1
  store double %61, ptr %65, align 8, !tbaa !15
  br label %66

66:                                               ; preds = %45
  %67 = load i64, ptr %20, align 8, !tbaa !11
  %68 = add nsw i64 %67, 1
  store i64 %68, ptr %20, align 8, !tbaa !11
  br label %41, !llvm.loop !16

69:                                               ; preds = %41
  %70 = load ptr, ptr %12, align 8, !tbaa !5
  store i64 1, ptr %70, align 8, !tbaa !11
  %71 = load ptr, ptr %13, align 8, !tbaa !5
  %72 = getelementptr inbounds i64, ptr %71, i64 1
  store i64 1, ptr %72, align 8, !tbaa !11
  store i32 0, ptr %7, align 4
  store i32 1, ptr %27, align 4
  br label %407

73:                                               ; preds = %6
  %74 = load ptr, ptr %13, align 8, !tbaa !5
  %75 = getelementptr inbounds i64, ptr %74, i64 1
  %76 = load i64, ptr %75, align 8, !tbaa !11
  switch i64 %76, label %82 [
    i64 1, label %77
    i64 2, label %78
    i64 3, label %79
    i64 4, label %80
    i64 5, label %81
  ]

77:                                               ; preds = %73
  br label %83

78:                                               ; preds = %73
  br label %176

79:                                               ; preds = %73
  br label %220

80:                                               ; preds = %73
  br label %304

81:                                               ; preds = %73
  br label %380

82:                                               ; preds = %73
  br label %83

83:                                               ; preds = %82, %77
  %84 = load ptr, ptr %8, align 8, !tbaa !5
  %85 = load i64, ptr %84, align 8, !tbaa !11
  %86 = icmp eq i64 %85, 1
  br i1 %86, label %87, label %106

87:                                               ; preds = %83
  %88 = load ptr, ptr %10, align 8, !tbaa !5
  %89 = getelementptr inbounds %struct.doublecomplex, ptr %88, i64 1
  %90 = getelementptr inbounds %struct.doublecomplex, ptr %89, i32 0, i32 0
  %91 = load double, ptr %90, align 8, !tbaa !13
  %92 = load ptr, ptr %9, align 8, !tbaa !5
  %93 = getelementptr inbounds %struct.doublecomplex, ptr %92, i64 1
  %94 = getelementptr inbounds %struct.doublecomplex, ptr %93, i32 0, i32 0
  store double %91, ptr %94, align 8, !tbaa !13
  %95 = load ptr, ptr %10, align 8, !tbaa !5
  %96 = getelementptr inbounds %struct.doublecomplex, ptr %95, i64 1
  %97 = getelementptr inbounds %struct.doublecomplex, ptr %96, i32 0, i32 1
  %98 = load double, ptr %97, align 8, !tbaa !15
  %99 = load ptr, ptr %9, align 8, !tbaa !5
  %100 = getelementptr inbounds %struct.doublecomplex, ptr %99, i64 1
  %101 = getelementptr inbounds %struct.doublecomplex, ptr %100, i32 0, i32 1
  store double %98, ptr %101, align 8, !tbaa !15
  %102 = load ptr, ptr %9, align 8, !tbaa !5
  %103 = getelementptr inbounds %struct.doublecomplex, ptr %102, i64 1
  %104 = call double @z_abs(ptr noundef %103)
  %105 = load ptr, ptr %11, align 8, !tbaa !5
  store double %104, ptr %105, align 8, !tbaa !9
  br label %405

106:                                              ; preds = %83
  %107 = load ptr, ptr %8, align 8, !tbaa !5
  %108 = load ptr, ptr %10, align 8, !tbaa !5
  %109 = getelementptr inbounds %struct.doublecomplex, ptr %108, i64 1
  %110 = call double @dzsum1_(ptr noundef %107, ptr noundef %109, ptr noundef @c__1)
  %111 = load ptr, ptr %11, align 8, !tbaa !5
  store double %110, ptr %111, align 8, !tbaa !9
  %112 = load ptr, ptr %8, align 8, !tbaa !5
  %113 = load i64, ptr %112, align 8, !tbaa !11
  store i64 %113, ptr %14, align 8, !tbaa !11
  store i64 1, ptr %20, align 8, !tbaa !11
  br label %114

114:                                              ; preds = %169, %106
  %115 = load i64, ptr %20, align 8, !tbaa !11
  %116 = load i64, ptr %14, align 8, !tbaa !11
  %117 = icmp sle i64 %115, %116
  br i1 %117, label %118, label %172

118:                                              ; preds = %114
  %119 = load ptr, ptr %10, align 8, !tbaa !5
  %120 = load i64, ptr %20, align 8, !tbaa !11
  %121 = getelementptr inbounds %struct.doublecomplex, ptr %119, i64 %120
  %122 = call double @z_abs(ptr noundef %121)
  store double %122, ptr %22, align 8, !tbaa !9
  %123 = load double, ptr %22, align 8, !tbaa !9
  %124 = load double, ptr %24, align 8, !tbaa !9
  %125 = fcmp ogt double %123, %124
  br i1 %125, label %126, label %158

126:                                              ; preds = %118
  %127 = load i64, ptr %20, align 8, !tbaa !11
  store i64 %127, ptr %15, align 8, !tbaa !11
  %128 = load i64, ptr %20, align 8, !tbaa !11
  store i64 %128, ptr %16, align 8, !tbaa !11
  %129 = load ptr, ptr %10, align 8, !tbaa !5
  %130 = load i64, ptr %16, align 8, !tbaa !11
  %131 = getelementptr inbounds %struct.doublecomplex, ptr %129, i64 %130
  %132 = getelementptr inbounds %struct.doublecomplex, ptr %131, i32 0, i32 0
  %133 = load double, ptr %132, align 8, !tbaa !13
  %134 = load double, ptr %22, align 8, !tbaa !9
  %135 = fdiv double %133, %134
  store double %135, ptr %17, align 8, !tbaa !9
  %136 = load ptr, ptr %10, align 8, !tbaa !5
  %137 = load i64, ptr %20, align 8, !tbaa !11
  %138 = getelementptr inbounds %struct.doublecomplex, ptr %136, i64 %137
  %139 = call double @d_imag(ptr noundef %138)
  %140 = load double, ptr %22, align 8, !tbaa !9
  %141 = fdiv double %139, %140
  store double %141, ptr %18, align 8, !tbaa !9
  %142 = load double, ptr %17, align 8, !tbaa !9
  %143 = getelementptr inbounds %struct.doublecomplex, ptr %19, i32 0, i32 0
  store double %142, ptr %143, align 8, !tbaa !13
  %144 = load double, ptr %18, align 8, !tbaa !9
  %145 = getelementptr inbounds %struct.doublecomplex, ptr %19, i32 0, i32 1
  store double %144, ptr %145, align 8, !tbaa !15
  %146 = getelementptr inbounds %struct.doublecomplex, ptr %19, i32 0, i32 0
  %147 = load double, ptr %146, align 8, !tbaa !13
  %148 = load ptr, ptr %10, align 8, !tbaa !5
  %149 = load i64, ptr %15, align 8, !tbaa !11
  %150 = getelementptr inbounds %struct.doublecomplex, ptr %148, i64 %149
  %151 = getelementptr inbounds %struct.doublecomplex, ptr %150, i32 0, i32 0
  store double %147, ptr %151, align 8, !tbaa !13
  %152 = getelementptr inbounds %struct.doublecomplex, ptr %19, i32 0, i32 1
  %153 = load double, ptr %152, align 8, !tbaa !15
  %154 = load ptr, ptr %10, align 8, !tbaa !5
  %155 = load i64, ptr %15, align 8, !tbaa !11
  %156 = getelementptr inbounds %struct.doublecomplex, ptr %154, i64 %155
  %157 = getelementptr inbounds %struct.doublecomplex, ptr %156, i32 0, i32 1
  store double %153, ptr %157, align 8, !tbaa !15
  br label %168

158:                                              ; preds = %118
  %159 = load i64, ptr %20, align 8, !tbaa !11
  store i64 %159, ptr %15, align 8, !tbaa !11
  %160 = load ptr, ptr %10, align 8, !tbaa !5
  %161 = load i64, ptr %15, align 8, !tbaa !11
  %162 = getelementptr inbounds %struct.doublecomplex, ptr %160, i64 %161
  %163 = getelementptr inbounds %struct.doublecomplex, ptr %162, i32 0, i32 0
  store double 1.000000e+00, ptr %163, align 8, !tbaa !13
  %164 = load ptr, ptr %10, align 8, !tbaa !5
  %165 = load i64, ptr %15, align 8, !tbaa !11
  %166 = getelementptr inbounds %struct.doublecomplex, ptr %164, i64 %165
  %167 = getelementptr inbounds %struct.doublecomplex, ptr %166, i32 0, i32 1
  store double 0.000000e+00, ptr %167, align 8, !tbaa !15
  br label %168

168:                                              ; preds = %158, %126
  br label %169

169:                                              ; preds = %168
  %170 = load i64, ptr %20, align 8, !tbaa !11
  %171 = add nsw i64 %170, 1
  store i64 %171, ptr %20, align 8, !tbaa !11
  br label %114, !llvm.loop !18

172:                                              ; preds = %114
  %173 = load ptr, ptr %12, align 8, !tbaa !5
  store i64 2, ptr %173, align 8, !tbaa !11
  %174 = load ptr, ptr %13, align 8, !tbaa !5
  %175 = getelementptr inbounds i64, ptr %174, i64 1
  store i64 2, ptr %175, align 8, !tbaa !11
  store i32 0, ptr %7, align 4
  store i32 1, ptr %27, align 4
  br label %407

176:                                              ; preds = %78
  %177 = load ptr, ptr %8, align 8, !tbaa !5
  %178 = load ptr, ptr %10, align 8, !tbaa !5
  %179 = getelementptr inbounds %struct.doublecomplex, ptr %178, i64 1
  %180 = call i64 @izmax1_(ptr noundef %177, ptr noundef %179, ptr noundef @c__1)
  %181 = load ptr, ptr %13, align 8, !tbaa !5
  %182 = getelementptr inbounds i64, ptr %181, i64 2
  store i64 %180, ptr %182, align 8, !tbaa !11
  %183 = load ptr, ptr %13, align 8, !tbaa !5
  %184 = getelementptr inbounds i64, ptr %183, i64 3
  store i64 2, ptr %184, align 8, !tbaa !11
  br label %185

185:                                              ; preds = %330, %176
  %186 = load ptr, ptr %8, align 8, !tbaa !5
  %187 = load i64, ptr %186, align 8, !tbaa !11
  store i64 %187, ptr %14, align 8, !tbaa !11
  store i64 1, ptr %20, align 8, !tbaa !11
  br label %188

188:                                              ; preds = %202, %185
  %189 = load i64, ptr %20, align 8, !tbaa !11
  %190 = load i64, ptr %14, align 8, !tbaa !11
  %191 = icmp sle i64 %189, %190
  br i1 %191, label %192, label %205

192:                                              ; preds = %188
  %193 = load i64, ptr %20, align 8, !tbaa !11
  store i64 %193, ptr %15, align 8, !tbaa !11
  %194 = load ptr, ptr %10, align 8, !tbaa !5
  %195 = load i64, ptr %15, align 8, !tbaa !11
  %196 = getelementptr inbounds %struct.doublecomplex, ptr %194, i64 %195
  %197 = getelementptr inbounds %struct.doublecomplex, ptr %196, i32 0, i32 0
  store double 0.000000e+00, ptr %197, align 8, !tbaa !13
  %198 = load ptr, ptr %10, align 8, !tbaa !5
  %199 = load i64, ptr %15, align 8, !tbaa !11
  %200 = getelementptr inbounds %struct.doublecomplex, ptr %198, i64 %199
  %201 = getelementptr inbounds %struct.doublecomplex, ptr %200, i32 0, i32 1
  store double 0.000000e+00, ptr %201, align 8, !tbaa !15
  br label %202

202:                                              ; preds = %192
  %203 = load i64, ptr %20, align 8, !tbaa !11
  %204 = add nsw i64 %203, 1
  store i64 %204, ptr %20, align 8, !tbaa !11
  br label %188, !llvm.loop !19

205:                                              ; preds = %188
  %206 = load ptr, ptr %13, align 8, !tbaa !5
  %207 = getelementptr inbounds i64, ptr %206, i64 2
  %208 = load i64, ptr %207, align 8, !tbaa !11
  store i64 %208, ptr %14, align 8, !tbaa !11
  %209 = load ptr, ptr %10, align 8, !tbaa !5
  %210 = load i64, ptr %14, align 8, !tbaa !11
  %211 = getelementptr inbounds %struct.doublecomplex, ptr %209, i64 %210
  %212 = getelementptr inbounds %struct.doublecomplex, ptr %211, i32 0, i32 0
  store double 1.000000e+00, ptr %212, align 8, !tbaa !13
  %213 = load ptr, ptr %10, align 8, !tbaa !5
  %214 = load i64, ptr %14, align 8, !tbaa !11
  %215 = getelementptr inbounds %struct.doublecomplex, ptr %213, i64 %214
  %216 = getelementptr inbounds %struct.doublecomplex, ptr %215, i32 0, i32 1
  store double 0.000000e+00, ptr %216, align 8, !tbaa !15
  %217 = load ptr, ptr %12, align 8, !tbaa !5
  store i64 1, ptr %217, align 8, !tbaa !11
  %218 = load ptr, ptr %13, align 8, !tbaa !5
  %219 = getelementptr inbounds i64, ptr %218, i64 1
  store i64 3, ptr %219, align 8, !tbaa !11
  store i32 0, ptr %7, align 4
  store i32 1, ptr %27, align 4
  br label %407

220:                                              ; preds = %79
  %221 = load ptr, ptr %8, align 8, !tbaa !5
  %222 = load ptr, ptr %10, align 8, !tbaa !5
  %223 = getelementptr inbounds %struct.doublecomplex, ptr %222, i64 1
  %224 = load ptr, ptr %9, align 8, !tbaa !5
  %225 = getelementptr inbounds %struct.doublecomplex, ptr %224, i64 1
  %226 = call i32 @f2c_zcopy(ptr noundef %221, ptr noundef %223, ptr noundef @c__1, ptr noundef %225, ptr noundef @c__1)
  %227 = load ptr, ptr %11, align 8, !tbaa !5
  %228 = load double, ptr %227, align 8, !tbaa !9
  store double %228, ptr %26, align 8, !tbaa !9
  %229 = load ptr, ptr %8, align 8, !tbaa !5
  %230 = load ptr, ptr %9, align 8, !tbaa !5
  %231 = getelementptr inbounds %struct.doublecomplex, ptr %230, i64 1
  %232 = call double @dzsum1_(ptr noundef %229, ptr noundef %231, ptr noundef @c__1)
  %233 = load ptr, ptr %11, align 8, !tbaa !5
  store double %232, ptr %233, align 8, !tbaa !9
  %234 = load ptr, ptr %11, align 8, !tbaa !5
  %235 = load double, ptr %234, align 8, !tbaa !9
  %236 = load double, ptr %26, align 8, !tbaa !9
  %237 = fcmp ole double %235, %236
  br i1 %237, label %238, label %239

238:                                              ; preds = %220
  br label %336

239:                                              ; preds = %220
  %240 = load ptr, ptr %8, align 8, !tbaa !5
  %241 = load i64, ptr %240, align 8, !tbaa !11
  store i64 %241, ptr %14, align 8, !tbaa !11
  store i64 1, ptr %20, align 8, !tbaa !11
  br label %242

242:                                              ; preds = %297, %239
  %243 = load i64, ptr %20, align 8, !tbaa !11
  %244 = load i64, ptr %14, align 8, !tbaa !11
  %245 = icmp sle i64 %243, %244
  br i1 %245, label %246, label %300

246:                                              ; preds = %242
  %247 = load ptr, ptr %10, align 8, !tbaa !5
  %248 = load i64, ptr %20, align 8, !tbaa !11
  %249 = getelementptr inbounds %struct.doublecomplex, ptr %247, i64 %248
  %250 = call double @z_abs(ptr noundef %249)
  store double %250, ptr %22, align 8, !tbaa !9
  %251 = load double, ptr %22, align 8, !tbaa !9
  %252 = load double, ptr %24, align 8, !tbaa !9
  %253 = fcmp ogt double %251, %252
  br i1 %253, label %254, label %286

254:                                              ; preds = %246
  %255 = load i64, ptr %20, align 8, !tbaa !11
  store i64 %255, ptr %15, align 8, !tbaa !11
  %256 = load i64, ptr %20, align 8, !tbaa !11
  store i64 %256, ptr %16, align 8, !tbaa !11
  %257 = load ptr, ptr %10, align 8, !tbaa !5
  %258 = load i64, ptr %16, align 8, !tbaa !11
  %259 = getelementptr inbounds %struct.doublecomplex, ptr %257, i64 %258
  %260 = getelementptr inbounds %struct.doublecomplex, ptr %259, i32 0, i32 0
  %261 = load double, ptr %260, align 8, !tbaa !13
  %262 = load double, ptr %22, align 8, !tbaa !9
  %263 = fdiv double %261, %262
  store double %263, ptr %17, align 8, !tbaa !9
  %264 = load ptr, ptr %10, align 8, !tbaa !5
  %265 = load i64, ptr %20, align 8, !tbaa !11
  %266 = getelementptr inbounds %struct.doublecomplex, ptr %264, i64 %265
  %267 = call double @d_imag(ptr noundef %266)
  %268 = load double, ptr %22, align 8, !tbaa !9
  %269 = fdiv double %267, %268
  store double %269, ptr %18, align 8, !tbaa !9
  %270 = load double, ptr %17, align 8, !tbaa !9
  %271 = getelementptr inbounds %struct.doublecomplex, ptr %19, i32 0, i32 0
  store double %270, ptr %271, align 8, !tbaa !13
  %272 = load double, ptr %18, align 8, !tbaa !9
  %273 = getelementptr inbounds %struct.doublecomplex, ptr %19, i32 0, i32 1
  store double %272, ptr %273, align 8, !tbaa !15
  %274 = getelementptr inbounds %struct.doublecomplex, ptr %19, i32 0, i32 0
  %275 = load double, ptr %274, align 8, !tbaa !13
  %276 = load ptr, ptr %10, align 8, !tbaa !5
  %277 = load i64, ptr %15, align 8, !tbaa !11
  %278 = getelementptr inbounds %struct.doublecomplex, ptr %276, i64 %277
  %279 = getelementptr inbounds %struct.doublecomplex, ptr %278, i32 0, i32 0
  store double %275, ptr %279, align 8, !tbaa !13
  %280 = getelementptr inbounds %struct.doublecomplex, ptr %19, i32 0, i32 1
  %281 = load double, ptr %280, align 8, !tbaa !15
  %282 = load ptr, ptr %10, align 8, !tbaa !5
  %283 = load i64, ptr %15, align 8, !tbaa !11
  %284 = getelementptr inbounds %struct.doublecomplex, ptr %282, i64 %283
  %285 = getelementptr inbounds %struct.doublecomplex, ptr %284, i32 0, i32 1
  store double %281, ptr %285, align 8, !tbaa !15
  br label %296

286:                                              ; preds = %246
  %287 = load i64, ptr %20, align 8, !tbaa !11
  store i64 %287, ptr %15, align 8, !tbaa !11
  %288 = load ptr, ptr %10, align 8, !tbaa !5
  %289 = load i64, ptr %15, align 8, !tbaa !11
  %290 = getelementptr inbounds %struct.doublecomplex, ptr %288, i64 %289
  %291 = getelementptr inbounds %struct.doublecomplex, ptr %290, i32 0, i32 0
  store double 1.000000e+00, ptr %291, align 8, !tbaa !13
  %292 = load ptr, ptr %10, align 8, !tbaa !5
  %293 = load i64, ptr %15, align 8, !tbaa !11
  %294 = getelementptr inbounds %struct.doublecomplex, ptr %292, i64 %293
  %295 = getelementptr inbounds %struct.doublecomplex, ptr %294, i32 0, i32 1
  store double 0.000000e+00, ptr %295, align 8, !tbaa !15
  br label %296

296:                                              ; preds = %286, %254
  br label %297

297:                                              ; preds = %296
  %298 = load i64, ptr %20, align 8, !tbaa !11
  %299 = add nsw i64 %298, 1
  store i64 %299, ptr %20, align 8, !tbaa !11
  br label %242, !llvm.loop !20

300:                                              ; preds = %242
  %301 = load ptr, ptr %12, align 8, !tbaa !5
  store i64 2, ptr %301, align 8, !tbaa !11
  %302 = load ptr, ptr %13, align 8, !tbaa !5
  %303 = getelementptr inbounds i64, ptr %302, i64 1
  store i64 4, ptr %303, align 8, !tbaa !11
  store i32 0, ptr %7, align 4
  store i32 1, ptr %27, align 4
  br label %407

304:                                              ; preds = %80
  %305 = load ptr, ptr %13, align 8, !tbaa !5
  %306 = getelementptr inbounds i64, ptr %305, i64 2
  %307 = load i64, ptr %306, align 8, !tbaa !11
  store i64 %307, ptr %23, align 8, !tbaa !11
  %308 = load ptr, ptr %8, align 8, !tbaa !5
  %309 = load ptr, ptr %10, align 8, !tbaa !5
  %310 = getelementptr inbounds %struct.doublecomplex, ptr %309, i64 1
  %311 = call i64 @izmax1_(ptr noundef %308, ptr noundef %310, ptr noundef @c__1)
  %312 = load ptr, ptr %13, align 8, !tbaa !5
  %313 = getelementptr inbounds i64, ptr %312, i64 2
  store i64 %311, ptr %313, align 8, !tbaa !11
  %314 = load ptr, ptr %10, align 8, !tbaa !5
  %315 = load i64, ptr %23, align 8, !tbaa !11
  %316 = getelementptr inbounds %struct.doublecomplex, ptr %314, i64 %315
  %317 = call double @z_abs(ptr noundef %316)
  %318 = load ptr, ptr %10, align 8, !tbaa !5
  %319 = load ptr, ptr %13, align 8, !tbaa !5
  %320 = getelementptr inbounds i64, ptr %319, i64 2
  %321 = load i64, ptr %320, align 8, !tbaa !11
  %322 = getelementptr inbounds %struct.doublecomplex, ptr %318, i64 %321
  %323 = call double @z_abs(ptr noundef %322)
  %324 = fcmp une double %317, %323
  br i1 %324, label %325, label %335

325:                                              ; preds = %304
  %326 = load ptr, ptr %13, align 8, !tbaa !5
  %327 = getelementptr inbounds i64, ptr %326, i64 3
  %328 = load i64, ptr %327, align 8, !tbaa !11
  %329 = icmp slt i64 %328, 5
  br i1 %329, label %330, label %335

330:                                              ; preds = %325
  %331 = load ptr, ptr %13, align 8, !tbaa !5
  %332 = getelementptr inbounds i64, ptr %331, i64 3
  %333 = load i64, ptr %332, align 8, !tbaa !11
  %334 = add nsw i64 %333, 1
  store i64 %334, ptr %332, align 8, !tbaa !11
  br label %185

335:                                              ; preds = %325, %304
  br label %336

336:                                              ; preds = %335, %238
  store double 1.000000e+00, ptr %25, align 8, !tbaa !9
  %337 = load ptr, ptr %8, align 8, !tbaa !5
  %338 = load i64, ptr %337, align 8, !tbaa !11
  store i64 %338, ptr %14, align 8, !tbaa !11
  store i64 1, ptr %20, align 8, !tbaa !11
  br label %339

339:                                              ; preds = %373, %336
  %340 = load i64, ptr %20, align 8, !tbaa !11
  %341 = load i64, ptr %14, align 8, !tbaa !11
  %342 = icmp sle i64 %340, %341
  br i1 %342, label %343, label %376

343:                                              ; preds = %339
  %344 = load i64, ptr %20, align 8, !tbaa !11
  store i64 %344, ptr %15, align 8, !tbaa !11
  %345 = load double, ptr %25, align 8, !tbaa !9
  %346 = load i64, ptr %20, align 8, !tbaa !11
  %347 = sub nsw i64 %346, 1
  %348 = sitofp i64 %347 to double
  %349 = load ptr, ptr %8, align 8, !tbaa !5
  %350 = load i64, ptr %349, align 8, !tbaa !11
  %351 = sub nsw i64 %350, 1
  %352 = sitofp i64 %351 to double
  %353 = fdiv double %348, %352
  %354 = fadd double %353, 1.000000e+00
  %355 = fmul double %345, %354
  store double %355, ptr %17, align 8, !tbaa !9
  %356 = load double, ptr %17, align 8, !tbaa !9
  %357 = getelementptr inbounds %struct.doublecomplex, ptr %19, i32 0, i32 0
  store double %356, ptr %357, align 8, !tbaa !13
  %358 = getelementptr inbounds %struct.doublecomplex, ptr %19, i32 0, i32 1
  store double 0.000000e+00, ptr %358, align 8, !tbaa !15
  %359 = getelementptr inbounds %struct.doublecomplex, ptr %19, i32 0, i32 0
  %360 = load double, ptr %359, align 8, !tbaa !13
  %361 = load ptr, ptr %10, align 8, !tbaa !5
  %362 = load i64, ptr %15, align 8, !tbaa !11
  %363 = getelementptr inbounds %struct.doublecomplex, ptr %361, i64 %362
  %364 = getelementptr inbounds %struct.doublecomplex, ptr %363, i32 0, i32 0
  store double %360, ptr %364, align 8, !tbaa !13
  %365 = getelementptr inbounds %struct.doublecomplex, ptr %19, i32 0, i32 1
  %366 = load double, ptr %365, align 8, !tbaa !15
  %367 = load ptr, ptr %10, align 8, !tbaa !5
  %368 = load i64, ptr %15, align 8, !tbaa !11
  %369 = getelementptr inbounds %struct.doublecomplex, ptr %367, i64 %368
  %370 = getelementptr inbounds %struct.doublecomplex, ptr %369, i32 0, i32 1
  store double %366, ptr %370, align 8, !tbaa !15
  %371 = load double, ptr %25, align 8, !tbaa !9
  %372 = fneg double %371
  store double %372, ptr %25, align 8, !tbaa !9
  br label %373

373:                                              ; preds = %343
  %374 = load i64, ptr %20, align 8, !tbaa !11
  %375 = add nsw i64 %374, 1
  store i64 %375, ptr %20, align 8, !tbaa !11
  br label %339, !llvm.loop !21

376:                                              ; preds = %339
  %377 = load ptr, ptr %12, align 8, !tbaa !5
  store i64 1, ptr %377, align 8, !tbaa !11
  %378 = load ptr, ptr %13, align 8, !tbaa !5
  %379 = getelementptr inbounds i64, ptr %378, i64 1
  store i64 5, ptr %379, align 8, !tbaa !11
  store i32 0, ptr %7, align 4
  store i32 1, ptr %27, align 4
  br label %407

380:                                              ; preds = %81
  %381 = load ptr, ptr %8, align 8, !tbaa !5
  %382 = load ptr, ptr %10, align 8, !tbaa !5
  %383 = getelementptr inbounds %struct.doublecomplex, ptr %382, i64 1
  %384 = call double @dzsum1_(ptr noundef %381, ptr noundef %383, ptr noundef @c__1)
  %385 = load ptr, ptr %8, align 8, !tbaa !5
  %386 = load i64, ptr %385, align 8, !tbaa !11
  %387 = mul nsw i64 %386, 3
  %388 = sitofp i64 %387 to double
  %389 = fdiv double %384, %388
  %390 = fmul double %389, 2.000000e+00
  store double %390, ptr %21, align 8, !tbaa !9
  %391 = load double, ptr %21, align 8, !tbaa !9
  %392 = load ptr, ptr %11, align 8, !tbaa !5
  %393 = load double, ptr %392, align 8, !tbaa !9
  %394 = fcmp ogt double %391, %393
  br i1 %394, label %395, label %404

395:                                              ; preds = %380
  %396 = load ptr, ptr %8, align 8, !tbaa !5
  %397 = load ptr, ptr %10, align 8, !tbaa !5
  %398 = getelementptr inbounds %struct.doublecomplex, ptr %397, i64 1
  %399 = load ptr, ptr %9, align 8, !tbaa !5
  %400 = getelementptr inbounds %struct.doublecomplex, ptr %399, i64 1
  %401 = call i32 @f2c_zcopy(ptr noundef %396, ptr noundef %398, ptr noundef @c__1, ptr noundef %400, ptr noundef @c__1)
  %402 = load double, ptr %21, align 8, !tbaa !9
  %403 = load ptr, ptr %11, align 8, !tbaa !5
  store double %402, ptr %403, align 8, !tbaa !9
  br label %404

404:                                              ; preds = %395, %380
  br label %405

405:                                              ; preds = %404, %87
  %406 = load ptr, ptr %12, align 8, !tbaa !5
  store i64 0, ptr %406, align 8, !tbaa !11
  store i32 0, ptr %7, align 4
  store i32 1, ptr %27, align 4
  br label %407

407:                                              ; preds = %405, %376, %300, %205, %172, %69
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  %408 = load i32, ptr %7, align 4
  ret i32 %408
}

; 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

declare double @z_abs(ptr noundef) #2

declare double @dzsum1_(ptr noundef, ptr noundef, ptr noundef) #2

declare double @d_imag(ptr noundef) #2

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

declare i32 @f2c_zcopy(ptr noundef, 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 = !{!"double", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"long", !7, i64 0}
!13 = !{!14, !10, i64 0}
!14 = !{!"", !10, i64 0, !10, i64 8}
!15 = !{!14, !10, i64 8}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.mustprogress"}
!18 = distinct !{!18, !17}
!19 = distinct !{!19, !17}
!20 = distinct !{!20, !17}
!21 = distinct !{!21, !17}


; 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 [13 x i8], align 1
@c__1 = external hidden global i64, align 8

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @zlacn2_(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr nocapture noundef %3, ptr nocapture noundef %4, ptr nocapture noundef %5) local_unnamed_addr #0 {
  %7 = getelementptr inbounds i8, ptr %2, i64 -16
  %8 = tail call double @dlamch_(ptr noundef nonnull @.str) #3
  %9 = load i64, ptr %4, align 8, !tbaa !5
  %10 = icmp eq i64 %9, 0
  br i1 %10, label %11, label %22

11:                                               ; preds = %6
  %12 = load i64, ptr %0, align 8, !tbaa !5
  %.not166185 = icmp slt i64 %12, 1
  br i1 %.not166185, label %._crit_edge189, label %.lr.ph188

.lr.ph188:                                        ; preds = %11
  %13 = uitofp nneg i64 %12 to double
  %14 = fdiv double 1.000000e+00, %13
  %min.iters.check = icmp ult i64 %12, 4
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.ph

vector.ph:                                        ; preds = %.lr.ph188
  %n.vec = and i64 %12, 9223372036854775804
  %ind.end = or disjoint i64 %n.vec, 1
  %broadcast.splatinsert = insertelement <2 x double> poison, double %14, i64 0
  %broadcast.splat = shufflevector <2 x double> %broadcast.splatinsert, <2 x double> poison, <2 x i32> zeroinitializer
  %interleaved.vec = shufflevector <2 x double> %broadcast.splat, <2 x double> zeroinitializer, <4 x i32> <i32 0, i32 2, i32 1, i32 3>
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %15 = or disjoint i64 %index, 3
  %16 = getelementptr %struct.doublecomplex, ptr %2, i64 %index
  %17 = getelementptr inbounds %struct.doublecomplex, ptr %7, i64 %15
  store <4 x double> %interleaved.vec, ptr %16, align 8, !tbaa !9
  store <4 x double> %interleaved.vec, ptr %17, align 8, !tbaa !9
  %index.next = add nuw i64 %index, 4
  %18 = icmp eq i64 %index.next, %n.vec
  br i1 %18, label %middle.block, label %vector.body, !llvm.loop !11

middle.block:                                     ; preds = %vector.body
  %cmp.n = icmp eq i64 %12, %n.vec
  br i1 %cmp.n, label %._crit_edge189, label %scalar.ph.preheader

scalar.ph.preheader:                              ; preds = %middle.block, %.lr.ph188
  %.0159186.ph = phi i64 [ 1, %.lr.ph188 ], [ %ind.end, %middle.block ]
  br label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph.preheader, %scalar.ph
  %.0159186 = phi i64 [ %21, %scalar.ph ], [ %.0159186.ph, %scalar.ph.preheader ]
  %19 = getelementptr inbounds %struct.doublecomplex, ptr %7, i64 %.0159186
  store double %14, ptr %19, align 8, !tbaa !15
  %20 = getelementptr inbounds i8, ptr %19, i64 8
  store double 0.000000e+00, ptr %20, align 8, !tbaa !17
  %21 = add nuw i64 %.0159186, 1
  %exitcond192.not = icmp eq i64 %.0159186, %12
  br i1 %exitcond192.not, label %._crit_edge189, label %scalar.ph, !llvm.loop !18

._crit_edge189:                                   ; preds = %scalar.ph, %middle.block, %11
  store i64 1, ptr %4, align 8, !tbaa !5
  store i64 1, ptr %5, align 8, !tbaa !5
  br label %131

22:                                               ; preds = %6
  %23 = load i64, ptr %5, align 8, !tbaa !5
  switch i64 %23, label %24 [
    i64 5, label %119
    i64 2, label %47
    i64 3, label %57
    i64 4, label %78
  ]

24:                                               ; preds = %22
  %25 = load i64, ptr %0, align 8, !tbaa !5
  %26 = icmp eq i64 %25, 1
  br i1 %26, label %27, label %30

27:                                               ; preds = %24
  %28 = load <2 x double>, ptr %2, align 8, !tbaa !9
  store <2 x double> %28, ptr %1, align 8, !tbaa !9
  %29 = tail call double @z_abs(ptr noundef nonnull %1) #3
  br label %.sink.split

30:                                               ; preds = %24
  %31 = tail call double @dzsum1_(ptr noundef nonnull %0, ptr noundef %2, ptr noundef nonnull @c__1) #3
  store double %31, ptr %3, align 8, !tbaa !9
  %32 = load i64, ptr %0, align 8, !tbaa !5
  %.not165180 = icmp slt i64 %32, 1
  br i1 %.not165180, label %._crit_edge184, label %.lr.ph183

.lr.ph183:                                        ; preds = %30, %44
  %.1181 = phi i64 [ %46, %44 ], [ 1, %30 ]
  %33 = getelementptr inbounds %struct.doublecomplex, ptr %7, i64 %.1181
  %34 = tail call double @z_abs(ptr noundef nonnull %33) #3
  %35 = fcmp ogt double %34, %8
  br i1 %35, label %36, label %44

36:                                               ; preds = %.lr.ph183
  %37 = load double, ptr %33, align 8, !tbaa !15
  %38 = tail call double @d_imag(ptr noundef nonnull %33) #3
  %39 = insertelement <2 x double> poison, double %37, i64 0
  %40 = insertelement <2 x double> %39, double %38, i64 1
  %41 = insertelement <2 x double> poison, double %34, i64 0
  %42 = shufflevector <2 x double> %41, <2 x double> poison, <2 x i32> zeroinitializer
  %43 = fdiv <2 x double> %40, %42
  br label %44

44:                                               ; preds = %.lr.ph183, %36
  %45 = phi <2 x double> [ %43, %36 ], [ <double 1.000000e+00, double 0.000000e+00>, %.lr.ph183 ]
  store <2 x double> %45, ptr %33, align 8
  %46 = add nuw i64 %.1181, 1
  %exitcond191.not = icmp eq i64 %.1181, %32
  br i1 %exitcond191.not, label %._crit_edge184, label %.lr.ph183, !llvm.loop !19

._crit_edge184:                                   ; preds = %44, %30
  store i64 2, ptr %4, align 8, !tbaa !5
  store i64 2, ptr %5, align 8, !tbaa !5
  br label %131

47:                                               ; preds = %22
  %48 = tail call i64 @izmax1_(ptr noundef %0, ptr noundef %2, ptr noundef nonnull @c__1) #3
  %49 = getelementptr inbounds i8, ptr %5, i64 8
  store i64 %48, ptr %49, align 8, !tbaa !5
  %50 = getelementptr inbounds i8, ptr %5, i64 16
  store i64 2, ptr %50, align 8, !tbaa !5
  br label %51

51:                                               ; preds = %92, %47
  %52 = load i64, ptr %0, align 8, !tbaa !5
  %.not164175 = icmp slt i64 %52, 1
  br i1 %.not164175, label %._crit_edge179, label %.lr.ph178.preheader

.lr.ph178.preheader:                              ; preds = %51
  %53 = shl nuw i64 %52, 4
  tail call void @llvm.memset.p0.i64(ptr align 8 %2, i8 0, i64 %53, i1 false), !tbaa !9
  br label %._crit_edge179

._crit_edge179:                                   ; preds = %.lr.ph178.preheader, %51
  %54 = getelementptr inbounds i8, ptr %5, i64 8
  %55 = load i64, ptr %54, align 8, !tbaa !5
  %56 = getelementptr inbounds %struct.doublecomplex, ptr %7, i64 %55
  store <2 x double> <double 1.000000e+00, double 0.000000e+00>, ptr %56, align 8, !tbaa !9
  store i64 1, ptr %4, align 8, !tbaa !5
  store i64 3, ptr %5, align 8, !tbaa !5
  br label %131

57:                                               ; preds = %22
  %58 = tail call i32 @f2c_zcopy(ptr noundef %0, ptr noundef %2, ptr noundef nonnull @c__1, ptr noundef %1, ptr noundef nonnull @c__1) #3
  %59 = load double, ptr %3, align 8, !tbaa !9
  %60 = tail call double @dzsum1_(ptr noundef %0, ptr noundef %1, ptr noundef nonnull @c__1) #3
  store double %60, ptr %3, align 8, !tbaa !9
  %61 = fcmp ugt double %60, %59
  br i1 %61, label %62, label %94

62:                                               ; preds = %57
  %63 = load i64, ptr %0, align 8, !tbaa !5
  %.not170 = icmp slt i64 %63, 1
  br i1 %.not170, label %._crit_edge174, label %.lr.ph173

.lr.ph173:                                        ; preds = %62, %75
  %.3171 = phi i64 [ %77, %75 ], [ 1, %62 ]
  %64 = getelementptr inbounds %struct.doublecomplex, ptr %7, i64 %.3171
  %65 = tail call double @z_abs(ptr noundef nonnull %64) #3
  %66 = fcmp ogt double %65, %8
  br i1 %66, label %67, label %75

67:                                               ; preds = %.lr.ph173
  %68 = load double, ptr %64, align 8, !tbaa !15
  %69 = tail call double @d_imag(ptr noundef nonnull %64) #3
  %70 = insertelement <2 x double> poison, double %68, i64 0
  %71 = insertelement <2 x double> %70, double %69, i64 1
  %72 = insertelement <2 x double> poison, double %65, i64 0
  %73 = shufflevector <2 x double> %72, <2 x double> poison, <2 x i32> zeroinitializer
  %74 = fdiv <2 x double> %71, %73
  br label %75

75:                                               ; preds = %.lr.ph173, %67
  %76 = phi <2 x double> [ %74, %67 ], [ <double 1.000000e+00, double 0.000000e+00>, %.lr.ph173 ]
  store <2 x double> %76, ptr %64, align 8
  %77 = add nuw i64 %.3171, 1
  %exitcond190.not = icmp eq i64 %.3171, %63
  br i1 %exitcond190.not, label %._crit_edge174, label %.lr.ph173, !llvm.loop !20

._crit_edge174:                                   ; preds = %75, %62
  store i64 2, ptr %4, align 8, !tbaa !5
  store i64 4, ptr %5, align 8, !tbaa !5
  br label %131

78:                                               ; preds = %22
  %79 = getelementptr inbounds i8, ptr %5, i64 8
  %80 = load i64, ptr %79, align 8, !tbaa !5
  %81 = tail call i64 @izmax1_(ptr noundef %0, ptr noundef %2, ptr noundef nonnull @c__1) #3
  store i64 %81, ptr %79, align 8, !tbaa !5
  %82 = getelementptr inbounds %struct.doublecomplex, ptr %7, i64 %80
  %83 = tail call double @z_abs(ptr noundef nonnull %82) #3
  %84 = load i64, ptr %79, align 8, !tbaa !5
  %85 = getelementptr inbounds %struct.doublecomplex, ptr %7, i64 %84
  %86 = tail call double @z_abs(ptr noundef nonnull %85) #3
  %87 = fcmp une double %83, %86
  br i1 %87, label %88, label %94

88:                                               ; preds = %78
  %89 = getelementptr inbounds i8, ptr %5, i64 16
  %90 = load i64, ptr %89, align 8, !tbaa !5
  %91 = icmp slt i64 %90, 5
  br i1 %91, label %92, label %94

92:                                               ; preds = %88
  %93 = add nsw i64 %90, 1
  store i64 %93, ptr %89, align 8, !tbaa !5
  br label %51

94:                                               ; preds = %78, %88, %57
  %95 = load i64, ptr %0, align 8, !tbaa !5
  %.not163167 = icmp slt i64 %95, 1
  br i1 %.not163167, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %94
  %96 = add nsw i64 %95, -1
  %97 = uitofp nneg i64 %96 to double
  %xtraiter = and i64 %95, 1
  %98 = icmp eq i64 %95, 1
  br i1 %98, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph.new

.lr.ph.new:                                       ; preds = %.lr.ph
  %unroll_iter = and i64 %95, 9223372036854775806
  br label %99

99:                                               ; preds = %99, %.lr.ph.new
  %.4168 = phi i64 [ 1, %.lr.ph.new ], [ %112, %99 ]
  %niter = phi i64 [ 0, %.lr.ph.new ], [ %niter.next.1, %99 ]
  %100 = add nsw i64 %.4168, -1
  %101 = sitofp i64 %100 to double
  %102 = fdiv double %101, %97
  %103 = fadd double %102, 1.000000e+00
  %104 = getelementptr inbounds %struct.doublecomplex, ptr %7, i64 %.4168
  store double %103, ptr %104, align 8, !tbaa !15
  %105 = getelementptr inbounds i8, ptr %104, i64 8
  store double 0.000000e+00, ptr %105, align 8, !tbaa !17
  %106 = sitofp i64 %.4168 to double
  %107 = fdiv double %106, %97
  %108 = fadd double %107, 1.000000e+00
  %109 = fneg double %108
  %110 = getelementptr %struct.doublecomplex, ptr %2, i64 %.4168
  store double %109, ptr %110, align 8, !tbaa !15
  %111 = getelementptr inbounds i8, ptr %110, i64 8
  store double 0.000000e+00, ptr %111, align 8, !tbaa !17
  %112 = add nuw i64 %.4168, 2
  %niter.next.1 = add nuw i64 %niter, 2
  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter
  br i1 %niter.ncmp.1, label %._crit_edge.loopexit.unr-lcssa, label %99, !llvm.loop !21

._crit_edge.loopexit.unr-lcssa:                   ; preds = %99, %.lr.ph
  %.4168.unr = phi i64 [ 1, %.lr.ph ], [ %112, %99 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %._crit_edge.loopexit.epilog-lcssa

._crit_edge.loopexit.epilog-lcssa:                ; preds = %._crit_edge.loopexit.unr-lcssa
  %113 = add nsw i64 %.4168.unr, -1
  %114 = sitofp i64 %113 to double
  %115 = fdiv double %114, %97
  %116 = fadd double %115, 1.000000e+00
  %117 = getelementptr inbounds %struct.doublecomplex, ptr %7, i64 %.4168.unr
  store double %116, ptr %117, align 8, !tbaa !15
  %118 = getelementptr inbounds i8, ptr %117, i64 8
  store double 0.000000e+00, ptr %118, align 8, !tbaa !17
  br label %._crit_edge

._crit_edge:                                      ; preds = %._crit_edge.loopexit.epilog-lcssa, %._crit_edge.loopexit.unr-lcssa, %94
  store i64 1, ptr %4, align 8, !tbaa !5
  store i64 5, ptr %5, align 8, !tbaa !5
  br label %131

119:                                              ; preds = %22
  %120 = tail call double @dzsum1_(ptr noundef %0, ptr noundef %2, ptr noundef nonnull @c__1) #3
  %121 = load i64, ptr %0, align 8, !tbaa !5
  %122 = mul nsw i64 %121, 3
  %123 = sitofp i64 %122 to double
  %124 = fdiv double %120, %123
  %125 = fmul double %124, 2.000000e+00
  %126 = load double, ptr %3, align 8, !tbaa !9
  %127 = fcmp ogt double %125, %126
  br i1 %127, label %128, label %130

128:                                              ; preds = %119
  %129 = tail call i32 @f2c_zcopy(ptr noundef nonnull %0, ptr noundef %2, ptr noundef nonnull @c__1, ptr noundef %1, ptr noundef nonnull @c__1) #3
  br label %.sink.split

.sink.split:                                      ; preds = %27, %128
  %.sink196 = phi double [ %125, %128 ], [ %29, %27 ]
  store double %.sink196, ptr %3, align 8, !tbaa !9
  br label %130

130:                                              ; preds = %.sink.split, %119
  store i64 0, ptr %4, align 8, !tbaa !5
  br label %131

131:                                              ; preds = %130, %._crit_edge, %._crit_edge174, %._crit_edge179, %._crit_edge184, %._crit_edge189
  ret i32 0
}

declare double @dlamch_(ptr noundef) local_unnamed_addr #1

declare double @z_abs(ptr noundef) local_unnamed_addr #1

declare double @dzsum1_(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare double @d_imag(ptr noundef) local_unnamed_addr #1

declare i64 @izmax1_(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

declare i32 @f2c_zcopy(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #1

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #2

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 = { "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 #2 = { nocallback nofree nounwind willreturn memory(argmem: write) }
attributes #3 = { nounwind }

!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"double", !7, i64 0}
!11 = distinct !{!11, !12, !13, !14}
!12 = !{!"llvm.loop.mustprogress"}
!13 = !{!"llvm.loop.isvectorized", i32 1}
!14 = !{!"llvm.loop.unroll.runtime.disable"}
!15 = !{!16, !10, i64 0}
!16 = !{!"", !10, i64 0, !10, i64 8}
!17 = !{!16, !10, i64 8}
!18 = distinct !{!18, !12, !14, !13}
!19 = distinct !{!19, !12}
!20 = distinct !{!20, !12}
!21 = distinct !{!21, !12}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopIdiomRecognizePass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,MergedLoadStoreMotionPass,PostOrderFunctionAttrsPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass