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

; 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
@c__1 = external hidden global i64, align 8

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

40:                                               ; preds = %6
  %41 = load ptr, ptr %8, align 8, !tbaa !5
  %42 = load i64, ptr %41, align 8, !tbaa !9
  br label %46

43:                                               ; preds = %6
  %44 = load ptr, ptr %9, align 8, !tbaa !5
  %45 = load i64, ptr %44, align 8, !tbaa !9
  br label %46

46:                                               ; preds = %43, %40
  %47 = phi i64 [ %42, %40 ], [ %45, %43 ]
  %48 = icmp eq i64 %47, 0
  br i1 %48, label %49, label %50

49:                                               ; preds = %46
  store double 0.000000e+00, ptr %24, align 8, !tbaa !11
  br label %261

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

54:                                               ; preds = %50
  store double 0.000000e+00, ptr %24, align 8, !tbaa !11
  %55 = load ptr, ptr %9, align 8, !tbaa !5
  %56 = load i64, ptr %55, align 8, !tbaa !9
  store i64 %56, ptr %15, align 8, !tbaa !9
  store i64 1, ptr %21, align 8, !tbaa !9
  br label %57

57:                                               ; preds = %91, %54
  %58 = load i64, ptr %21, align 8, !tbaa !9
  %59 = load i64, ptr %15, align 8, !tbaa !9
  %60 = icmp sle i64 %58, %59
  br i1 %60, label %61, label %94

61:                                               ; preds = %57
  %62 = load ptr, ptr %8, align 8, !tbaa !5
  %63 = load i64, ptr %62, align 8, !tbaa !9
  store i64 %63, ptr %16, align 8, !tbaa !9
  store i64 1, ptr %20, align 8, !tbaa !9
  br label %64

64:                                               ; preds = %87, %61
  %65 = load i64, ptr %20, align 8, !tbaa !9
  %66 = load i64, ptr %16, align 8, !tbaa !9
  %67 = icmp sle i64 %65, %66
  br i1 %67, label %68, label %90

68:                                               ; preds = %64
  %69 = load double, ptr %24, align 8, !tbaa !11
  store double %69, ptr %18, align 8, !tbaa !11
  %70 = load ptr, ptr %10, align 8, !tbaa !5
  %71 = load i64, ptr %20, align 8, !tbaa !9
  %72 = load i64, ptr %21, align 8, !tbaa !9
  %73 = load i64, ptr %13, align 8, !tbaa !9
  %74 = mul nsw i64 %72, %73
  %75 = add nsw i64 %71, %74
  %76 = getelementptr inbounds %struct.doublecomplex, ptr %70, i64 %75
  %77 = call double @z_abs(ptr noundef %76)
  store double %77, ptr %19, align 8, !tbaa !11
  %78 = load double, ptr %18, align 8, !tbaa !11
  %79 = load double, ptr %19, align 8, !tbaa !11
  %80 = fcmp oge double %78, %79
  br i1 %80, label %81, label %83

81:                                               ; preds = %68
  %82 = load double, ptr %18, align 8, !tbaa !11
  br label %85

83:                                               ; preds = %68
  %84 = load double, ptr %19, align 8, !tbaa !11
  br label %85

85:                                               ; preds = %83, %81
  %86 = phi double [ %82, %81 ], [ %84, %83 ]
  store double %86, ptr %24, align 8, !tbaa !11
  br label %87

87:                                               ; preds = %85
  %88 = load i64, ptr %20, align 8, !tbaa !9
  %89 = add nsw i64 %88, 1
  store i64 %89, ptr %20, align 8, !tbaa !9
  br label %64, !llvm.loop !13

90:                                               ; preds = %64
  br label %91

91:                                               ; preds = %90
  %92 = load i64, ptr %21, align 8, !tbaa !9
  %93 = add nsw i64 %92, 1
  store i64 %93, ptr %21, align 8, !tbaa !9
  br label %57, !llvm.loop !15

94:                                               ; preds = %57
  br label %260

95:                                               ; preds = %50
  %96 = load ptr, ptr %7, align 8, !tbaa !5
  %97 = call i64 @lsame_(ptr noundef %96, ptr noundef @.str.1)
  %98 = icmp ne i64 %97, 0
  br i1 %98, label %104, label %99

99:                                               ; preds = %95
  %100 = load ptr, ptr %7, align 8, !tbaa !5
  %101 = load i8, ptr %100, align 1, !tbaa !16
  %102 = zext i8 %101 to i32
  %103 = icmp eq i32 %102, 49
  br i1 %103, label %104, label %146

104:                                              ; preds = %99, %95
  store double 0.000000e+00, ptr %24, align 8, !tbaa !11
  %105 = load ptr, ptr %9, align 8, !tbaa !5
  %106 = load i64, ptr %105, align 8, !tbaa !9
  store i64 %106, ptr %15, align 8, !tbaa !9
  store i64 1, ptr %21, align 8, !tbaa !9
  br label %107

107:                                              ; preds = %142, %104
  %108 = load i64, ptr %21, align 8, !tbaa !9
  %109 = load i64, ptr %15, align 8, !tbaa !9
  %110 = icmp sle i64 %108, %109
  br i1 %110, label %111, label %145

111:                                              ; preds = %107
  store double 0.000000e+00, ptr %22, align 8, !tbaa !11
  %112 = load ptr, ptr %8, align 8, !tbaa !5
  %113 = load i64, ptr %112, align 8, !tbaa !9
  store i64 %113, ptr %16, align 8, !tbaa !9
  store i64 1, ptr %20, align 8, !tbaa !9
  br label %114

114:                                              ; preds = %129, %111
  %115 = load i64, ptr %20, align 8, !tbaa !9
  %116 = load i64, ptr %16, align 8, !tbaa !9
  %117 = icmp sle i64 %115, %116
  br i1 %117, label %118, label %132

118:                                              ; preds = %114
  %119 = load ptr, ptr %10, align 8, !tbaa !5
  %120 = load i64, ptr %20, align 8, !tbaa !9
  %121 = load i64, ptr %21, align 8, !tbaa !9
  %122 = load i64, ptr %13, align 8, !tbaa !9
  %123 = mul nsw i64 %121, %122
  %124 = add nsw i64 %120, %123
  %125 = getelementptr inbounds %struct.doublecomplex, ptr %119, i64 %124
  %126 = call double @z_abs(ptr noundef %125)
  %127 = load double, ptr %22, align 8, !tbaa !11
  %128 = fadd double %127, %126
  store double %128, ptr %22, align 8, !tbaa !11
  br label %129

129:                                              ; preds = %118
  %130 = load i64, ptr %20, align 8, !tbaa !9
  %131 = add nsw i64 %130, 1
  store i64 %131, ptr %20, align 8, !tbaa !9
  br label %114, !llvm.loop !17

132:                                              ; preds = %114
  %133 = load double, ptr %24, align 8, !tbaa !11
  %134 = load double, ptr %22, align 8, !tbaa !11
  %135 = fcmp oge double %133, %134
  br i1 %135, label %136, label %138

136:                                              ; preds = %132
  %137 = load double, ptr %24, align 8, !tbaa !11
  br label %140

138:                                              ; preds = %132
  %139 = load double, ptr %22, align 8, !tbaa !11
  br label %140

140:                                              ; preds = %138, %136
  %141 = phi double [ %137, %136 ], [ %139, %138 ]
  store double %141, ptr %24, align 8, !tbaa !11
  br label %142

142:                                              ; preds = %140
  %143 = load i64, ptr %21, align 8, !tbaa !9
  %144 = add nsw i64 %143, 1
  store i64 %144, ptr %21, align 8, !tbaa !9
  br label %107, !llvm.loop !18

145:                                              ; preds = %107
  br label %259

146:                                              ; preds = %99
  %147 = load ptr, ptr %7, align 8, !tbaa !5
  %148 = call i64 @lsame_(ptr noundef %147, ptr noundef @.str.2)
  %149 = icmp ne i64 %148, 0
  br i1 %149, label %150, label %225

150:                                              ; preds = %146
  %151 = load ptr, ptr %8, align 8, !tbaa !5
  %152 = load i64, ptr %151, align 8, !tbaa !9
  store i64 %152, ptr %15, align 8, !tbaa !9
  store i64 1, ptr %20, align 8, !tbaa !9
  br label %153

153:                                              ; preds = %161, %150
  %154 = load i64, ptr %20, align 8, !tbaa !9
  %155 = load i64, ptr %15, align 8, !tbaa !9
  %156 = icmp sle i64 %154, %155
  br i1 %156, label %157, label %164

157:                                              ; preds = %153
  %158 = load ptr, ptr %12, align 8, !tbaa !5
  %159 = load i64, ptr %20, align 8, !tbaa !9
  %160 = getelementptr inbounds double, ptr %158, i64 %159
  store double 0.000000e+00, ptr %160, align 8, !tbaa !11
  br label %161

161:                                              ; preds = %157
  %162 = load i64, ptr %20, align 8, !tbaa !9
  %163 = add nsw i64 %162, 1
  store i64 %163, ptr %20, align 8, !tbaa !9
  br label %153, !llvm.loop !19

164:                                              ; preds = %153
  %165 = load ptr, ptr %9, align 8, !tbaa !5
  %166 = load i64, ptr %165, align 8, !tbaa !9
  store i64 %166, ptr %15, align 8, !tbaa !9
  store i64 1, ptr %21, align 8, !tbaa !9
  br label %167

167:                                              ; preds = %196, %164
  %168 = load i64, ptr %21, align 8, !tbaa !9
  %169 = load i64, ptr %15, align 8, !tbaa !9
  %170 = icmp sle i64 %168, %169
  br i1 %170, label %171, label %199

171:                                              ; preds = %167
  %172 = load ptr, ptr %8, align 8, !tbaa !5
  %173 = load i64, ptr %172, align 8, !tbaa !9
  store i64 %173, ptr %16, align 8, !tbaa !9
  store i64 1, ptr %20, align 8, !tbaa !9
  br label %174

174:                                              ; preds = %192, %171
  %175 = load i64, ptr %20, align 8, !tbaa !9
  %176 = load i64, ptr %16, align 8, !tbaa !9
  %177 = icmp sle i64 %175, %176
  br i1 %177, label %178, label %195

178:                                              ; preds = %174
  %179 = load ptr, ptr %10, align 8, !tbaa !5
  %180 = load i64, ptr %20, align 8, !tbaa !9
  %181 = load i64, ptr %21, align 8, !tbaa !9
  %182 = load i64, ptr %13, align 8, !tbaa !9
  %183 = mul nsw i64 %181, %182
  %184 = add nsw i64 %180, %183
  %185 = getelementptr inbounds %struct.doublecomplex, ptr %179, i64 %184
  %186 = call double @z_abs(ptr noundef %185)
  %187 = load ptr, ptr %12, align 8, !tbaa !5
  %188 = load i64, ptr %20, align 8, !tbaa !9
  %189 = getelementptr inbounds double, ptr %187, i64 %188
  %190 = load double, ptr %189, align 8, !tbaa !11
  %191 = fadd double %190, %186
  store double %191, ptr %189, align 8, !tbaa !11
  br label %192

192:                                              ; preds = %178
  %193 = load i64, ptr %20, align 8, !tbaa !9
  %194 = add nsw i64 %193, 1
  store i64 %194, ptr %20, align 8, !tbaa !9
  br label %174, !llvm.loop !20

195:                                              ; preds = %174
  br label %196

196:                                              ; preds = %195
  %197 = load i64, ptr %21, align 8, !tbaa !9
  %198 = add nsw i64 %197, 1
  store i64 %198, ptr %21, align 8, !tbaa !9
  br label %167, !llvm.loop !21

199:                                              ; preds = %167
  store double 0.000000e+00, ptr %24, align 8, !tbaa !11
  %200 = load ptr, ptr %8, align 8, !tbaa !5
  %201 = load i64, ptr %200, align 8, !tbaa !9
  store i64 %201, ptr %15, align 8, !tbaa !9
  store i64 1, ptr %20, align 8, !tbaa !9
  br label %202

202:                                              ; preds = %221, %199
  %203 = load i64, ptr %20, align 8, !tbaa !9
  %204 = load i64, ptr %15, align 8, !tbaa !9
  %205 = icmp sle i64 %203, %204
  br i1 %205, label %206, label %224

206:                                              ; preds = %202
  %207 = load double, ptr %24, align 8, !tbaa !11
  store double %207, ptr %18, align 8, !tbaa !11
  %208 = load ptr, ptr %12, align 8, !tbaa !5
  %209 = load i64, ptr %20, align 8, !tbaa !9
  %210 = getelementptr inbounds double, ptr %208, i64 %209
  %211 = load double, ptr %210, align 8, !tbaa !11
  store double %211, ptr %19, align 8, !tbaa !11
  %212 = load double, ptr %18, align 8, !tbaa !11
  %213 = load double, ptr %19, align 8, !tbaa !11
  %214 = fcmp oge double %212, %213
  br i1 %214, label %215, label %217

215:                                              ; preds = %206
  %216 = load double, ptr %18, align 8, !tbaa !11
  br label %219

217:                                              ; preds = %206
  %218 = load double, ptr %19, align 8, !tbaa !11
  br label %219

219:                                              ; preds = %217, %215
  %220 = phi double [ %216, %215 ], [ %218, %217 ]
  store double %220, ptr %24, align 8, !tbaa !11
  br label %221

221:                                              ; preds = %219
  %222 = load i64, ptr %20, align 8, !tbaa !9
  %223 = add nsw i64 %222, 1
  store i64 %223, ptr %20, align 8, !tbaa !9
  br label %202, !llvm.loop !22

224:                                              ; preds = %202
  br label %258

225:                                              ; preds = %146
  %226 = load ptr, ptr %7, align 8, !tbaa !5
  %227 = call i64 @lsame_(ptr noundef %226, ptr noundef @.str.3)
  %228 = icmp ne i64 %227, 0
  br i1 %228, label %233, label %229

229:                                              ; preds = %225
  %230 = load ptr, ptr %7, align 8, !tbaa !5
  %231 = call i64 @lsame_(ptr noundef %230, ptr noundef @.str.4)
  %232 = icmp ne i64 %231, 0
  br i1 %232, label %233, label %257

233:                                              ; preds = %229, %225
  store double 0.000000e+00, ptr %23, align 8, !tbaa !11
  store double 1.000000e+00, ptr %22, align 8, !tbaa !11
  %234 = load ptr, ptr %9, align 8, !tbaa !5
  %235 = load i64, ptr %234, align 8, !tbaa !9
  store i64 %235, ptr %15, align 8, !tbaa !9
  store i64 1, ptr %21, align 8, !tbaa !9
  br label %236

236:                                              ; preds = %249, %233
  %237 = load i64, ptr %21, align 8, !tbaa !9
  %238 = load i64, ptr %15, align 8, !tbaa !9
  %239 = icmp sle i64 %237, %238
  br i1 %239, label %240, label %252

240:                                              ; preds = %236
  %241 = load ptr, ptr %8, align 8, !tbaa !5
  %242 = load ptr, ptr %10, align 8, !tbaa !5
  %243 = load i64, ptr %21, align 8, !tbaa !9
  %244 = load i64, ptr %13, align 8, !tbaa !9
  %245 = mul nsw i64 %243, %244
  %246 = add nsw i64 %245, 1
  %247 = getelementptr inbounds %struct.doublecomplex, ptr %242, i64 %246
  %248 = call i32 @zlassq_(ptr noundef %241, ptr noundef %247, ptr noundef @c__1, ptr noundef %23, ptr noundef %22)
  br label %249

249:                                              ; preds = %240
  %250 = load i64, ptr %21, align 8, !tbaa !9
  %251 = add nsw i64 %250, 1
  store i64 %251, ptr %21, align 8, !tbaa !9
  br label %236, !llvm.loop !23

252:                                              ; preds = %236
  %253 = load double, ptr %23, align 8, !tbaa !11
  %254 = load double, ptr %22, align 8, !tbaa !11
  %255 = call double @sqrt(double noundef %254) #4
  %256 = fmul double %253, %255
  store double %256, ptr %24, align 8, !tbaa !11
  br label %257

257:                                              ; preds = %252, %229
  br label %258

258:                                              ; preds = %257, %224
  br label %259

259:                                              ; preds = %258, %145
  br label %260

260:                                              ; preds = %259, %94
  br label %261

261:                                              ; preds = %260, %49
  %262 = load double, ptr %24, align 8, !tbaa !11
  store double %262, ptr %17, align 8, !tbaa !11
  %263 = load double, ptr %17, align 8, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  ret double %263
}

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

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

; Function Attrs: nounwind
declare double @sqrt(double noundef) #3

; 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 "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }

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

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


; 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
@c__1 = external hidden global i64, align 8

; Function Attrs: nounwind uwtable
define dso_local double @zlange_(ptr noundef %0, ptr noundef %1, ptr nocapture noundef readonly %2, ptr noundef %3, ptr nocapture noundef readonly %4, ptr nocapture noundef %5) local_unnamed_addr #0 {
  %7 = alloca double, align 8
  %8 = alloca double, align 8
  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 i64, ptr %4, align 8, !tbaa !5
  %10 = xor i64 %9, -1
  %11 = getelementptr inbounds %struct.doublecomplex, ptr %3, i64 %10
  %12 = getelementptr inbounds i8, ptr %5, i64 -8
  %13 = load i64, ptr %1, align 8, !tbaa !5
  %14 = load i64, ptr %2, align 8, !tbaa !5
  %. = tail call i64 @llvm.smin.i64(i64 %13, i64 %14)
  %15 = icmp eq i64 %., 0
  br i1 %15, label %.loopexit111, label %16

16:                                               ; preds = %6
  %17 = tail call i64 @lsame_(ptr noundef %0, ptr noundef nonnull @.str) #6
  %.not97 = icmp eq i64 %17, 0
  br i1 %.not97, label %30, label %18

18:                                               ; preds = %16
  %19 = load i64, ptr %2, align 8, !tbaa !5
  %.not109116 = icmp slt i64 %19, 1
  br i1 %.not109116, label %.loopexit111, label %.lr.ph120

.lr.ph120:                                        ; preds = %18
  %20 = load i64, ptr %1, align 8, !tbaa !5
  %21 = icmp slt i64 %20, 1
  br i1 %21, label %.loopexit111, label %.lr.ph120.split

.lr.ph120.splitthread-pre-split:                  ; preds = %._crit_edge
  %22 = add nuw i64 %.086117, 1
  %.pr = load i64, ptr %1, align 8, !tbaa !5
  br label %.lr.ph120.split

.lr.ph120.split:                                  ; preds = %.lr.ph120, %.lr.ph120.splitthread-pre-split
  %23 = phi i64 [ %.pr, %.lr.ph120.splitthread-pre-split ], [ %20, %.lr.ph120 ]
  %.0118 = phi double [ %.1.lcssa, %.lr.ph120.splitthread-pre-split ], [ 0.000000e+00, %.lr.ph120 ]
  %.086117 = phi i64 [ %22, %.lr.ph120.splitthread-pre-split ], [ 1, %.lr.ph120 ]
  %.not110113 = icmp slt i64 %23, 1
  br i1 %.not110113, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph120.split
  %24 = mul nsw i64 %.086117, %9
  %invariant.gep = getelementptr %struct.doublecomplex, ptr %11, i64 %24
  br label %25

25:                                               ; preds = %.lr.ph, %25
  %.1115 = phi double [ %.0118, %.lr.ph ], [ %28, %25 ]
  %.090114 = phi i64 [ 1, %.lr.ph ], [ %29, %25 ]
  %gep = getelementptr %struct.doublecomplex, ptr %invariant.gep, i64 %.090114
  %26 = tail call double @z_abs(ptr noundef %gep) #6
  %27 = fcmp oge double %.1115, %26
  %28 = select i1 %27, double %.1115, double %26
  %29 = add nuw i64 %.090114, 1
  %exitcond.not = icmp eq i64 %.090114, %23
  br i1 %exitcond.not, label %._crit_edge, label %25, !llvm.loop !9

._crit_edge:                                      ; preds = %25, %.lr.ph120.split
  %.1.lcssa = phi double [ %.0118, %.lr.ph120.split ], [ %28, %25 ]
  %exitcond179.not = icmp eq i64 %.086117, %19
  br i1 %exitcond179.not, label %.loopexit111, label %.lr.ph120.splitthread-pre-split, !llvm.loop !11

30:                                               ; preds = %16
  %31 = tail call i64 @lsame_(ptr noundef %0, ptr noundef nonnull @.str.1) #6
  %.not98 = icmp eq i64 %31, 0
  br i1 %.not98, label %32, label %35

32:                                               ; preds = %30
  %33 = load i8, ptr %0, align 1, !tbaa !13
  %34 = icmp eq i8 %33, 49
  br i1 %34, label %35, label %49

35:                                               ; preds = %32, %30
  %36 = load i64, ptr %2, align 8, !tbaa !5
  %.not107162 = icmp slt i64 %36, 1
  br i1 %.not107162, label %.loopexit111, label %.lr.ph166

.lr.ph166:                                        ; preds = %35
  %37 = load i64, ptr %1, align 8, !tbaa !5
  %38 = icmp slt i64 %37, 1
  br i1 %38, label %.loopexit111, label %.lr.ph166.split

.lr.ph166.splitthread-pre-split:                  ; preds = %._crit_edge156
  %39 = add nuw i64 %.187163, 1
  %.pr188 = load i64, ptr %1, align 8, !tbaa !5
  br label %.lr.ph166.split

.lr.ph166.split:                                  ; preds = %.lr.ph166, %.lr.ph166.splitthread-pre-split
  %40 = phi i64 [ %.pr188, %.lr.ph166.splitthread-pre-split ], [ %37, %.lr.ph166 ]
  %.2164 = phi double [ %48, %.lr.ph166.splitthread-pre-split ], [ 0.000000e+00, %.lr.ph166 ]
  %.187163 = phi i64 [ %39, %.lr.ph166.splitthread-pre-split ], [ 1, %.lr.ph166 ]
  %.not108152 = icmp slt i64 %40, 1
  br i1 %.not108152, label %._crit_edge156, label %.lr.ph155

.lr.ph155:                                        ; preds = %.lr.ph166.split
  %41 = mul nsw i64 %.187163, %9
  %invariant.gep158 = getelementptr %struct.doublecomplex, ptr %11, i64 %41
  br label %42

42:                                               ; preds = %.lr.ph155, %42
  %.191153 = phi i64 [ 1, %.lr.ph155 ], [ %46, %42 ]
  %43 = phi double [ 0.000000e+00, %.lr.ph155 ], [ %45, %42 ]
  %gep159 = getelementptr %struct.doublecomplex, ptr %invariant.gep158, i64 %.191153
  %44 = tail call double @z_abs(ptr noundef %gep159) #6
  %45 = fadd double %44, %43
  %46 = add nuw i64 %.191153, 1
  %exitcond184.not = icmp eq i64 %.191153, %40
  br i1 %exitcond184.not, label %._crit_edge156, label %42, !llvm.loop !14

._crit_edge156:                                   ; preds = %42, %.lr.ph166.split
  %.lcssa = phi double [ 0.000000e+00, %.lr.ph166.split ], [ %45, %42 ]
  %47 = fcmp oge double %.2164, %.lcssa
  %48 = select i1 %47, double %.2164, double %.lcssa
  %exitcond185.not = icmp eq i64 %.187163, %36
  br i1 %exitcond185.not, label %.loopexit111, label %.lr.ph166.splitthread-pre-split, !llvm.loop !15

49:                                               ; preds = %32
  %50 = tail call i64 @lsame_(ptr noundef nonnull %0, ptr noundef nonnull @.str.2) #6
  %.not99 = icmp eq i64 %50, 0
  br i1 %.not99, label %82, label %51

51:                                               ; preds = %49
  %52 = load i64, ptr %1, align 8, !tbaa !5
  %.not103122 = icmp slt i64 %52, 1
  br i1 %.not103122, label %._crit_edge138, label %._crit_edge126.thread

._crit_edge126.thread:                            ; preds = %51
  %53 = shl nuw i64 %52, 3
  tail call void @llvm.memset.p0.i64(ptr align 8 %5, i8 0, i64 %53, i1 false), !tbaa !16
  %54 = load i64, ptr %2, align 8, !tbaa !5
  %.not104134189 = icmp slt i64 %54, 1
  br i1 %.not104134189, label %.lr.ph143.preheader, label %.lr.ph137.split

.lr.ph137.split:                                  ; preds = %._crit_edge126.thread, %._crit_edge131
  %.288135 = phi i64 [ %63, %._crit_edge131 ], [ 1, %._crit_edge126.thread ]
  %55 = load i64, ptr %1, align 8, !tbaa !5
  %.not106127 = icmp slt i64 %55, 1
  br i1 %.not106127, label %._crit_edge131, label %.lr.ph130

.lr.ph130:                                        ; preds = %.lr.ph137.split
  %56 = mul nsw i64 %.288135, %9
  %invariant.gep132 = getelementptr %struct.doublecomplex, ptr %11, i64 %56
  br label %57

57:                                               ; preds = %.lr.ph130, %57
  %.393128 = phi i64 [ 1, %.lr.ph130 ], [ %62, %57 ]
  %gep133 = getelementptr %struct.doublecomplex, ptr %invariant.gep132, i64 %.393128
  %58 = tail call double @z_abs(ptr noundef %gep133) #6
  %59 = getelementptr inbounds double, ptr %12, i64 %.393128
  %60 = load double, ptr %59, align 8, !tbaa !16
  %61 = fadd double %58, %60
  store double %61, ptr %59, align 8, !tbaa !16
  %62 = add nuw i64 %.393128, 1
  %exitcond180.not = icmp eq i64 %.393128, %55
  br i1 %exitcond180.not, label %._crit_edge131, label %57, !llvm.loop !18

._crit_edge131:                                   ; preds = %57, %.lr.ph137.split
  %63 = add nuw i64 %.288135, 1
  %exitcond181.not = icmp eq i64 %.288135, %54
  br i1 %exitcond181.not, label %._crit_edge138.loopexit172, label %.lr.ph137.split, !llvm.loop !19

._crit_edge138.loopexit172:                       ; preds = %._crit_edge131
  %.pre = load i64, ptr %1, align 8, !tbaa !5
  br label %._crit_edge138

._crit_edge138:                                   ; preds = %51, %._crit_edge138.loopexit172
  %64 = phi i64 [ %.pre, %._crit_edge138.loopexit172 ], [ %52, %51 ]
  %.not105139 = icmp slt i64 %64, 1
  br i1 %.not105139, label %.loopexit111, label %.lr.ph143.preheader

.lr.ph143.preheader:                              ; preds = %._crit_edge126.thread, %._crit_edge138
  %65 = phi i64 [ %64, %._crit_edge138 ], [ %52, %._crit_edge126.thread ]
  %xtraiter = and i64 %65, 3
  %66 = icmp ult i64 %65, 4
  br i1 %66, label %.loopexit111.loopexit204.unr-lcssa, label %.lr.ph143.preheader.new

.lr.ph143.preheader.new:                          ; preds = %.lr.ph143.preheader
  %unroll_iter = and i64 %65, 9223372036854775804
  %invariant.gep215 = getelementptr i8, ptr %12, i64 16
  %invariant.gep217 = getelementptr i8, ptr %12, i64 24
  br label %.lr.ph143

.lr.ph143:                                        ; preds = %.lr.ph143, %.lr.ph143.preheader.new
  %.3141 = phi double [ 0.000000e+00, %.lr.ph143.preheader.new ], [ %80, %.lr.ph143 ]
  %.494140 = phi i64 [ 1, %.lr.ph143.preheader.new ], [ %81, %.lr.ph143 ]
  %niter = phi i64 [ 0, %.lr.ph143.preheader.new ], [ %niter.next.3, %.lr.ph143 ]
  %67 = getelementptr inbounds double, ptr %12, i64 %.494140
  %68 = load double, ptr %67, align 8, !tbaa !16
  %69 = fcmp oge double %.3141, %68
  %70 = select i1 %69, double %.3141, double %68
  %71 = getelementptr double, ptr %5, i64 %.494140
  %72 = load double, ptr %71, align 8, !tbaa !16
  %73 = fcmp oge double %70, %72
  %74 = select i1 %73, double %70, double %72
  %gep216 = getelementptr double, ptr %invariant.gep215, i64 %.494140
  %75 = load double, ptr %gep216, align 8, !tbaa !16
  %76 = fcmp oge double %74, %75
  %77 = select i1 %76, double %74, double %75
  %gep218 = getelementptr double, ptr %invariant.gep217, i64 %.494140
  %78 = load double, ptr %gep218, align 8, !tbaa !16
  %79 = fcmp oge double %77, %78
  %80 = select i1 %79, double %77, double %78
  %81 = add nuw i64 %.494140, 4
  %niter.next.3 = add i64 %niter, 4
  %niter.ncmp.3 = icmp eq i64 %niter.next.3, %unroll_iter
  br i1 %niter.ncmp.3, label %.loopexit111.loopexit204.unr-lcssa, label %.lr.ph143, !llvm.loop !20

82:                                               ; preds = %49
  %83 = tail call i64 @lsame_(ptr noundef nonnull %0, ptr noundef nonnull @.str.3) #6
  %.not100 = icmp eq i64 %83, 0
  br i1 %.not100, label %84, label %86

84:                                               ; preds = %82
  %85 = tail call i64 @lsame_(ptr noundef nonnull %0, ptr noundef nonnull @.str.4) #6
  %.not101 = icmp eq i64 %85, 0
  br i1 %.not101, label %.loopexit111, label %86

86:                                               ; preds = %84, %82
  store double 0.000000e+00, ptr %8, align 8, !tbaa !16
  store double 1.000000e+00, ptr %7, align 8, !tbaa !16
  %87 = load i64, ptr %2, align 8, !tbaa !5
  %invariant.gep145 = getelementptr i8, ptr %11, i64 16
  %.not102147 = icmp slt i64 %87, 1
  br i1 %.not102147, label %._crit_edge151, label %.lr.ph150

.lr.ph150:                                        ; preds = %86, %.lr.ph150
  %.389148 = phi i64 [ %90, %.lr.ph150 ], [ 1, %86 ]
  %88 = mul nsw i64 %.389148, %9
  %gep146 = getelementptr %struct.doublecomplex, ptr %invariant.gep145, i64 %88
  %89 = call i32 @zlassq_(ptr noundef nonnull %1, ptr noundef %gep146, ptr noundef nonnull @c__1, ptr noundef nonnull %8, ptr noundef nonnull %7) #6
  %90 = add nuw i64 %.389148, 1
  %exitcond183.not = icmp eq i64 %.389148, %87
  br i1 %exitcond183.not, label %._crit_edge151.loopexit, label %.lr.ph150, !llvm.loop !21

._crit_edge151.loopexit:                          ; preds = %.lr.ph150
  %.pre186 = load double, ptr %8, align 8, !tbaa !16
  %.pre187 = load double, ptr %7, align 8, !tbaa !16
  br label %._crit_edge151

._crit_edge151:                                   ; preds = %._crit_edge151.loopexit, %86
  %91 = phi double [ %.pre187, %._crit_edge151.loopexit ], [ 1.000000e+00, %86 ]
  %92 = phi double [ %.pre186, %._crit_edge151.loopexit ], [ 0.000000e+00, %86 ]
  %93 = call double @sqrt(double noundef %91) #6
  %94 = fmul double %92, %93
  br label %.loopexit111

.loopexit111.loopexit204.unr-lcssa:               ; preds = %.lr.ph143, %.lr.ph143.preheader
  %.lcssa205.ph = phi double [ poison, %.lr.ph143.preheader ], [ %80, %.lr.ph143 ]
  %.3141.unr = phi double [ 0.000000e+00, %.lr.ph143.preheader ], [ %80, %.lr.ph143 ]
  %.494140.unr = phi i64 [ 1, %.lr.ph143.preheader ], [ %81, %.lr.ph143 ]
  %lcmp.mod.not = icmp eq i64 %xtraiter, 0
  br i1 %lcmp.mod.not, label %.loopexit111, label %.lr.ph143.epil

.lr.ph143.epil:                                   ; preds = %.loopexit111.loopexit204.unr-lcssa, %.lr.ph143.epil
  %.3141.epil = phi double [ %98, %.lr.ph143.epil ], [ %.3141.unr, %.loopexit111.loopexit204.unr-lcssa ]
  %.494140.epil = phi i64 [ %99, %.lr.ph143.epil ], [ %.494140.unr, %.loopexit111.loopexit204.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph143.epil ], [ 0, %.loopexit111.loopexit204.unr-lcssa ]
  %95 = getelementptr inbounds double, ptr %12, i64 %.494140.epil
  %96 = load double, ptr %95, align 8, !tbaa !16
  %97 = fcmp oge double %.3141.epil, %96
  %98 = select i1 %97, double %.3141.epil, double %96
  %99 = add nuw i64 %.494140.epil, 1
  %epil.iter.next = add i64 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i64 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %.loopexit111, label %.lr.ph143.epil, !llvm.loop !22

.loopexit111:                                     ; preds = %._crit_edge, %.loopexit111.loopexit204.unr-lcssa, %.lr.ph143.epil, %._crit_edge156, %35, %.lr.ph166, %.lr.ph120, %18, %._crit_edge138, %6, %._crit_edge151, %84
  %.4 = phi double [ %94, %._crit_edge151 ], [ undef, %84 ], [ 0.000000e+00, %6 ], [ 0.000000e+00, %._crit_edge138 ], [ 0.000000e+00, %18 ], [ 0.000000e+00, %.lr.ph120 ], [ 0.000000e+00, %35 ], [ 0.000000e+00, %.lr.ph166 ], [ %48, %._crit_edge156 ], [ %.lcssa205.ph, %.loopexit111.loopexit204.unr-lcssa ], [ %98, %.lr.ph143.epil ], [ %.1.lcssa, %._crit_edge ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #6
  ret double %.4
}

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

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

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @sqrt(double noundef) local_unnamed_addr #3

; 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.smin.i64(i64, i64) #4

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: write)
declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg) #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 = { mustprogress nofree nounwind willreturn memory(write) "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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10}
!10 = !{!"llvm.loop.mustprogress"}
!11 = distinct !{!11, !10, !12}
!12 = !{!"llvm.loop.unswitch.partial.disable"}
!13 = !{!7, !7, i64 0}
!14 = distinct !{!14, !10}
!15 = distinct !{!15, !10, !12}
!16 = !{!17, !17, i64 0}
!17 = !{!"double", !7, i64 0}
!18 = distinct !{!18, !10}
!19 = distinct !{!19, !10, !12}
!20 = distinct !{!20, !10}
!21 = distinct !{!21, !10}
!22 = distinct !{!22, !23}
!23 = !{!"llvm.loop.unroll.disable"}


; Effective O3 passes: ADCEPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopIdiomRecognizePass,LoopInstSimplifyPass,LoopRotatePass,LoopSimplifyCFGPass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimpleLoopUnswitchPass,SimplifyCFGPass,TailCallElimPass