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

; 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
@c_b5 = external hidden global %struct.doublecomplex, align 8

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

30:                                               ; preds = %5
  %31 = load ptr, ptr %10, align 8, !tbaa !5
  %32 = getelementptr inbounds %struct.doublecomplex, ptr %31, i32 0, i32 0
  store double 0.000000e+00, ptr %32, align 8, !tbaa !11
  %33 = load ptr, ptr %10, align 8, !tbaa !5
  %34 = getelementptr inbounds %struct.doublecomplex, ptr %33, i32 0, i32 1
  store double 0.000000e+00, ptr %34, align 8, !tbaa !14
  store i32 1, ptr %24, align 4
  br label %251

35:                                               ; preds = %5
  %36 = load ptr, ptr %6, align 8, !tbaa !5
  %37 = load i32, ptr %36, align 4, !tbaa !9
  %38 = sub nsw i32 %37, 1
  store i32 %38, ptr %11, align 4, !tbaa !9
  %39 = load ptr, ptr %8, align 8, !tbaa !5
  %40 = getelementptr inbounds %struct.doublecomplex, ptr %39, i64 1
  %41 = load ptr, ptr %9, align 8, !tbaa !5
  %42 = call double @dznrm2_(ptr noundef %11, ptr noundef %40, ptr noundef %41)
  store double %42, ptr %20, align 8, !tbaa !15
  %43 = load ptr, ptr %7, align 8, !tbaa !5
  %44 = getelementptr inbounds %struct.doublecomplex, ptr %43, i32 0, i32 0
  %45 = load double, ptr %44, align 8, !tbaa !11
  store double %45, ptr %19, align 8, !tbaa !15
  %46 = load ptr, ptr %7, align 8, !tbaa !5
  %47 = call { double, double } @Cd(ptr noundef %46)
  %48 = extractvalue { double, double } %47, 0
  %49 = extractvalue { double, double } %47, 1
  store double %49, ptr %18, align 8, !tbaa !15
  %50 = load double, ptr %20, align 8, !tbaa !15
  %51 = fcmp oeq double %50, 0.000000e+00
  br i1 %51, label %52, label %60

52:                                               ; preds = %35
  %53 = load double, ptr %18, align 8, !tbaa !15
  %54 = fcmp oeq double %53, 0.000000e+00
  br i1 %54, label %55, label %60

55:                                               ; preds = %52
  %56 = load ptr, ptr %10, align 8, !tbaa !5
  %57 = getelementptr inbounds %struct.doublecomplex, ptr %56, i32 0, i32 0
  store double 0.000000e+00, ptr %57, align 8, !tbaa !11
  %58 = load ptr, ptr %10, align 8, !tbaa !5
  %59 = getelementptr inbounds %struct.doublecomplex, ptr %58, i32 0, i32 1
  store double 0.000000e+00, ptr %59, align 8, !tbaa !14
  br label %250

60:                                               ; preds = %52, %35
  %61 = call double @dlapy3_(ptr noundef %19, ptr noundef %18, ptr noundef %20)
  store double %61, ptr %12, align 8, !tbaa !15
  %62 = load double, ptr %19, align 8, !tbaa !15
  %63 = fcmp oge double %62, 0.000000e+00
  br i1 %63, label %64, label %74

64:                                               ; preds = %60
  %65 = load double, ptr %12, align 8, !tbaa !15
  %66 = fcmp oge double %65, 0.000000e+00
  br i1 %66, label %67, label %69

67:                                               ; preds = %64
  %68 = load double, ptr %12, align 8, !tbaa !15
  br label %72

69:                                               ; preds = %64
  %70 = load double, ptr %12, align 8, !tbaa !15
  %71 = fneg double %70
  br label %72

72:                                               ; preds = %69, %67
  %73 = phi double [ %68, %67 ], [ %71, %69 ]
  br label %85

74:                                               ; preds = %60
  %75 = load double, ptr %12, align 8, !tbaa !15
  %76 = fcmp oge double %75, 0.000000e+00
  br i1 %76, label %77, label %79

77:                                               ; preds = %74
  %78 = load double, ptr %12, align 8, !tbaa !15
  br label %82

79:                                               ; preds = %74
  %80 = load double, ptr %12, align 8, !tbaa !15
  %81 = fneg double %80
  br label %82

82:                                               ; preds = %79, %77
  %83 = phi double [ %78, %77 ], [ %81, %79 ]
  %84 = fneg double %83
  br label %85

85:                                               ; preds = %82, %72
  %86 = phi double [ %73, %72 ], [ %84, %82 ]
  %87 = fneg double %86
  store double %87, ptr %16, align 8, !tbaa !15
  %88 = call double @dlamch_(ptr noundef @.str)
  %89 = call double @dlamch_(ptr noundef @.str.1)
  %90 = fdiv double %88, %89
  store double %90, ptr %21, align 8, !tbaa !15
  %91 = load double, ptr %21, align 8, !tbaa !15
  %92 = fdiv double 1.000000e+00, %91
  store double %92, ptr %22, align 8, !tbaa !15
  store i32 0, ptr %23, align 4, !tbaa !9
  %93 = load double, ptr %16, align 8, !tbaa !15
  %94 = fcmp oge double %93, 0.000000e+00
  br i1 %94, label %95, label %97

95:                                               ; preds = %85
  %96 = load double, ptr %16, align 8, !tbaa !15
  br label %100

97:                                               ; preds = %85
  %98 = load double, ptr %16, align 8, !tbaa !15
  %99 = fneg double %98
  br label %100

100:                                              ; preds = %97, %95
  %101 = phi double [ %96, %95 ], [ %99, %97 ]
  %102 = load double, ptr %21, align 8, !tbaa !15
  %103 = fcmp olt double %101, %102
  br i1 %103, label %104, label %185

104:                                              ; preds = %100
  br label %105

105:                                              ; preds = %137, %104
  %106 = load i32, ptr %23, align 4, !tbaa !9
  %107 = add nsw i32 %106, 1
  store i32 %107, ptr %23, align 4, !tbaa !9
  %108 = load ptr, ptr %6, align 8, !tbaa !5
  %109 = load i32, ptr %108, align 4, !tbaa !9
  %110 = sub nsw i32 %109, 1
  store i32 %110, ptr %11, align 4, !tbaa !9
  %111 = load ptr, ptr %8, align 8, !tbaa !5
  %112 = getelementptr inbounds %struct.doublecomplex, ptr %111, i64 1
  %113 = load ptr, ptr %9, align 8, !tbaa !5
  call void @zdscal_(ptr noundef %11, ptr noundef %22, ptr noundef %112, ptr noundef %113)
  %114 = load double, ptr %22, align 8, !tbaa !15
  %115 = load double, ptr %16, align 8, !tbaa !15
  %116 = fmul double %115, %114
  store double %116, ptr %16, align 8, !tbaa !15
  %117 = load double, ptr %22, align 8, !tbaa !15
  %118 = load double, ptr %18, align 8, !tbaa !15
  %119 = fmul double %118, %117
  store double %119, ptr %18, align 8, !tbaa !15
  %120 = load double, ptr %22, align 8, !tbaa !15
  %121 = load double, ptr %19, align 8, !tbaa !15
  %122 = fmul double %121, %120
  store double %122, ptr %19, align 8, !tbaa !15
  %123 = load double, ptr %16, align 8, !tbaa !15
  %124 = fcmp oge double %123, 0.000000e+00
  br i1 %124, label %125, label %127

125:                                              ; preds = %105
  %126 = load double, ptr %16, align 8, !tbaa !15
  br label %130

127:                                              ; preds = %105
  %128 = load double, ptr %16, align 8, !tbaa !15
  %129 = fneg double %128
  br label %130

130:                                              ; preds = %127, %125
  %131 = phi double [ %126, %125 ], [ %129, %127 ]
  %132 = load double, ptr %21, align 8, !tbaa !15
  %133 = fcmp olt double %131, %132
  br i1 %133, label %134, label %138

134:                                              ; preds = %130
  %135 = load i32, ptr %23, align 4, !tbaa !9
  %136 = icmp slt i32 %135, 20
  br i1 %136, label %137, label %138

137:                                              ; preds = %134
  br label %105

138:                                              ; preds = %134, %130
  %139 = load ptr, ptr %6, align 8, !tbaa !5
  %140 = load i32, ptr %139, align 4, !tbaa !9
  %141 = sub nsw i32 %140, 1
  store i32 %141, ptr %11, align 4, !tbaa !9
  %142 = load ptr, ptr %8, align 8, !tbaa !5
  %143 = getelementptr inbounds %struct.doublecomplex, ptr %142, i64 1
  %144 = load ptr, ptr %9, align 8, !tbaa !5
  %145 = call double @dznrm2_(ptr noundef %11, ptr noundef %143, ptr noundef %144)
  store double %145, ptr %20, align 8, !tbaa !15
  %146 = load double, ptr %19, align 8, !tbaa !15
  %147 = getelementptr inbounds %struct.doublecomplex, ptr %14, i32 0, i32 0
  store double %146, ptr %147, align 8, !tbaa !11
  %148 = load double, ptr %18, align 8, !tbaa !15
  %149 = getelementptr inbounds %struct.doublecomplex, ptr %14, i32 0, i32 1
  store double %148, ptr %149, align 8, !tbaa !14
  %150 = getelementptr inbounds %struct.doublecomplex, ptr %14, i32 0, i32 0
  %151 = load double, ptr %150, align 8, !tbaa !11
  %152 = load ptr, ptr %7, align 8, !tbaa !5
  %153 = getelementptr inbounds %struct.doublecomplex, ptr %152, i32 0, i32 0
  store double %151, ptr %153, align 8, !tbaa !11
  %154 = getelementptr inbounds %struct.doublecomplex, ptr %14, i32 0, i32 1
  %155 = load double, ptr %154, align 8, !tbaa !14
  %156 = load ptr, ptr %7, align 8, !tbaa !5
  %157 = getelementptr inbounds %struct.doublecomplex, ptr %156, i32 0, i32 1
  store double %155, ptr %157, align 8, !tbaa !14
  %158 = call double @dlapy3_(ptr noundef %19, ptr noundef %18, ptr noundef %20)
  store double %158, ptr %12, align 8, !tbaa !15
  %159 = load double, ptr %19, align 8, !tbaa !15
  %160 = fcmp oge double %159, 0.000000e+00
  br i1 %160, label %161, label %171

161:                                              ; preds = %138
  %162 = load double, ptr %12, align 8, !tbaa !15
  %163 = fcmp oge double %162, 0.000000e+00
  br i1 %163, label %164, label %166

164:                                              ; preds = %161
  %165 = load double, ptr %12, align 8, !tbaa !15
  br label %169

166:                                              ; preds = %161
  %167 = load double, ptr %12, align 8, !tbaa !15
  %168 = fneg double %167
  br label %169

169:                                              ; preds = %166, %164
  %170 = phi double [ %165, %164 ], [ %168, %166 ]
  br label %182

171:                                              ; preds = %138
  %172 = load double, ptr %12, align 8, !tbaa !15
  %173 = fcmp oge double %172, 0.000000e+00
  br i1 %173, label %174, label %176

174:                                              ; preds = %171
  %175 = load double, ptr %12, align 8, !tbaa !15
  br label %179

176:                                              ; preds = %171
  %177 = load double, ptr %12, align 8, !tbaa !15
  %178 = fneg double %177
  br label %179

179:                                              ; preds = %176, %174
  %180 = phi double [ %175, %174 ], [ %178, %176 ]
  %181 = fneg double %180
  br label %182

182:                                              ; preds = %179, %169
  %183 = phi double [ %170, %169 ], [ %181, %179 ]
  %184 = fneg double %183
  store double %184, ptr %16, align 8, !tbaa !15
  br label %185

185:                                              ; preds = %182, %100
  %186 = load double, ptr %16, align 8, !tbaa !15
  %187 = load double, ptr %19, align 8, !tbaa !15
  %188 = fsub double %186, %187
  %189 = load double, ptr %16, align 8, !tbaa !15
  %190 = fdiv double %188, %189
  store double %190, ptr %12, align 8, !tbaa !15
  %191 = load double, ptr %18, align 8, !tbaa !15
  %192 = fneg double %191
  %193 = load double, ptr %16, align 8, !tbaa !15
  %194 = fdiv double %192, %193
  store double %194, ptr %13, align 8, !tbaa !15
  %195 = load double, ptr %12, align 8, !tbaa !15
  %196 = getelementptr inbounds %struct.doublecomplex, ptr %14, i32 0, i32 0
  store double %195, ptr %196, align 8, !tbaa !11
  %197 = load double, ptr %13, align 8, !tbaa !15
  %198 = getelementptr inbounds %struct.doublecomplex, ptr %14, i32 0, i32 1
  store double %197, ptr %198, align 8, !tbaa !14
  %199 = getelementptr inbounds %struct.doublecomplex, ptr %14, i32 0, i32 0
  %200 = load double, ptr %199, align 8, !tbaa !11
  %201 = load ptr, ptr %10, align 8, !tbaa !5
  %202 = getelementptr inbounds %struct.doublecomplex, ptr %201, i32 0, i32 0
  store double %200, ptr %202, align 8, !tbaa !11
  %203 = getelementptr inbounds %struct.doublecomplex, ptr %14, i32 0, i32 1
  %204 = load double, ptr %203, align 8, !tbaa !14
  %205 = load ptr, ptr %10, align 8, !tbaa !5
  %206 = getelementptr inbounds %struct.doublecomplex, ptr %205, i32 0, i32 1
  store double %204, ptr %206, align 8, !tbaa !14
  %207 = load ptr, ptr %7, align 8, !tbaa !5
  %208 = getelementptr inbounds %struct.doublecomplex, ptr %207, i32 0, i32 0
  %209 = load double, ptr %208, align 8, !tbaa !11
  %210 = load double, ptr %16, align 8, !tbaa !15
  %211 = fsub double %209, %210
  %212 = getelementptr inbounds %struct.doublecomplex, ptr %15, i32 0, i32 0
  store double %211, ptr %212, align 8, !tbaa !11
  %213 = load ptr, ptr %7, align 8, !tbaa !5
  %214 = getelementptr inbounds %struct.doublecomplex, ptr %213, i32 0, i32 1
  %215 = load double, ptr %214, align 8, !tbaa !14
  %216 = getelementptr inbounds %struct.doublecomplex, ptr %15, i32 0, i32 1
  store double %215, ptr %216, align 8, !tbaa !14
  call void @zladiv_(ptr noundef %14, ptr noundef @c_b5, ptr noundef %15)
  %217 = getelementptr inbounds %struct.doublecomplex, ptr %14, i32 0, i32 0
  %218 = load double, ptr %217, align 8, !tbaa !11
  %219 = load ptr, ptr %7, align 8, !tbaa !5
  %220 = getelementptr inbounds %struct.doublecomplex, ptr %219, i32 0, i32 0
  store double %218, ptr %220, align 8, !tbaa !11
  %221 = getelementptr inbounds %struct.doublecomplex, ptr %14, i32 0, i32 1
  %222 = load double, ptr %221, align 8, !tbaa !14
  %223 = load ptr, ptr %7, align 8, !tbaa !5
  %224 = getelementptr inbounds %struct.doublecomplex, ptr %223, i32 0, i32 1
  store double %222, ptr %224, align 8, !tbaa !14
  %225 = load ptr, ptr %6, align 8, !tbaa !5
  %226 = load i32, ptr %225, align 4, !tbaa !9
  %227 = sub nsw i32 %226, 1
  store i32 %227, ptr %11, align 4, !tbaa !9
  %228 = load ptr, ptr %7, align 8, !tbaa !5
  %229 = load ptr, ptr %8, align 8, !tbaa !5
  %230 = getelementptr inbounds %struct.doublecomplex, ptr %229, i64 1
  %231 = load ptr, ptr %9, align 8, !tbaa !5
  call void @zscal_(ptr noundef %11, ptr noundef %228, ptr noundef %230, ptr noundef %231)
  %232 = load i32, ptr %23, align 4, !tbaa !9
  store i32 %232, ptr %11, align 4, !tbaa !9
  store i32 1, ptr %17, align 4, !tbaa !9
  br label %233

233:                                              ; preds = %241, %185
  %234 = load i32, ptr %17, align 4, !tbaa !9
  %235 = load i32, ptr %11, align 4, !tbaa !9
  %236 = icmp sle i32 %234, %235
  br i1 %236, label %237, label %244

237:                                              ; preds = %233
  %238 = load double, ptr %21, align 8, !tbaa !15
  %239 = load double, ptr %16, align 8, !tbaa !15
  %240 = fmul double %239, %238
  store double %240, ptr %16, align 8, !tbaa !15
  br label %241

241:                                              ; preds = %237
  %242 = load i32, ptr %17, align 4, !tbaa !9
  %243 = add nsw i32 %242, 1
  store i32 %243, ptr %17, align 4, !tbaa !9
  br label %233, !llvm.loop !16

244:                                              ; preds = %233
  %245 = load double, ptr %16, align 8, !tbaa !15
  %246 = load ptr, ptr %7, align 8, !tbaa !5
  %247 = getelementptr inbounds %struct.doublecomplex, ptr %246, i32 0, i32 0
  store double %245, ptr %247, align 8, !tbaa !11
  %248 = load ptr, ptr %7, align 8, !tbaa !5
  %249 = getelementptr inbounds %struct.doublecomplex, ptr %248, i32 0, i32 1
  store double 0.000000e+00, ptr %249, align 8, !tbaa !14
  br label %250

250:                                              ; preds = %244, %55
  store i32 1, ptr %24, align 4
  br label %251

251:                                              ; preds = %250, %30
  call void @llvm.lifetime.end.p0(i64 4, 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 4, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %14) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #4
  ret void
}

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

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

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

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

declare double @dlamch_(ptr noundef) #2

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

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

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

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #3 = { inlinehint nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }

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

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


; 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
@c_b5 = external hidden global %struct.doublecomplex, align 8

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

15:                                               ; preds = %5
  tail call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %4, i8 0, i64 16, i1 false)
  br label %104

16:                                               ; preds = %5
  %17 = add nsw i32 %13, -1
  store i32 %17, ptr %6, align 4, !tbaa !5
  %18 = call double @dznrm2_(ptr noundef nonnull %6, ptr noundef %2, ptr noundef %3) #5
  store double %18, ptr %11, align 8, !tbaa !9
  %19 = load double, ptr %1, align 8, !tbaa !11
  store double %19, ptr %10, align 8, !tbaa !9
  %20 = call { double, double } @Cd(ptr noundef nonnull %1)
  %21 = extractvalue { double, double } %20, 1
  store double %21, ptr %9, align 8, !tbaa !9
  %22 = fcmp oeq double %18, 0.000000e+00
  %23 = fcmp oeq double %21, 0.000000e+00
  %or.cond = select i1 %22, i1 %23, i1 false
  br i1 %or.cond, label %24, label %25

24:                                               ; preds = %16
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %4, i8 0, i64 16, i1 false)
  br label %104

25:                                               ; preds = %16
  %26 = call double @dlapy3_(ptr noundef nonnull %10, ptr noundef nonnull %9, ptr noundef nonnull %11) #5
  %27 = load double, ptr %10, align 8, !tbaa !9
  %28 = fcmp ult double %27, 0.000000e+00
  %29 = fcmp oge double %26, 0.000000e+00
  %.neg = fneg double %26
  br i1 %28, label %32, label %30

30:                                               ; preds = %25
  %31 = select i1 %29, double %26, double %.neg
  br label %34

32:                                               ; preds = %25
  %33 = select i1 %29, double %.neg, double %26
  br label %34

34:                                               ; preds = %32, %30
  %35 = phi double [ %31, %30 ], [ %33, %32 ]
  %36 = fneg double %35
  %37 = call double @dlamch_(ptr noundef nonnull @.str) #5
  %38 = call double @dlamch_(ptr noundef nonnull @.str.1) #5
  %39 = fdiv double %37, %38
  %40 = fdiv double 1.000000e+00, %39
  store double %40, ptr %12, align 8, !tbaa !9
  %41 = fcmp ole double %35, 0.000000e+00
  %42 = select i1 %41, double %36, double %35
  %43 = fcmp olt double %42, %39
  br i1 %43, label %.preheader, label %._crit_edge78

._crit_edge78:                                    ; preds = %34
  %.pre = load double, ptr %10, align 8, !tbaa !9
  br label %76

.preheader:                                       ; preds = %34, %.preheader
  %.070 = phi double [ %48, %.preheader ], [ %36, %34 ]
  %.0 = phi i32 [ %44, %.preheader ], [ 0, %34 ]
  %44 = add nuw nsw i32 %.0, 1
  %45 = load i32, ptr %0, align 4, !tbaa !5
  %46 = add nsw i32 %45, -1
  store i32 %46, ptr %6, align 4, !tbaa !5
  call void @zdscal_(ptr noundef nonnull %6, ptr noundef nonnull %12, ptr noundef %2, ptr noundef %3) #5
  %47 = load double, ptr %12, align 8, !tbaa !9
  %48 = fmul double %.070, %47
  %49 = load double, ptr %9, align 8, !tbaa !9
  %50 = fmul double %47, %49
  store double %50, ptr %9, align 8, !tbaa !9
  %51 = load double, ptr %10, align 8, !tbaa !9
  %52 = fmul double %47, %51
  store double %52, ptr %10, align 8, !tbaa !9
  %53 = fcmp oge double %48, 0.000000e+00
  %54 = fneg double %48
  %55 = select i1 %53, double %48, double %54
  %56 = fcmp olt double %55, %39
  %57 = icmp ult i32 %.0, 19
  %or.cond3 = select i1 %56, i1 %57, i1 false
  br i1 %or.cond3, label %.preheader, label %58

58:                                               ; preds = %.preheader
  %59 = load i32, ptr %0, align 4, !tbaa !5
  %60 = add nsw i32 %59, -1
  store i32 %60, ptr %6, align 4, !tbaa !5
  %61 = call double @dznrm2_(ptr noundef nonnull %6, ptr noundef %2, ptr noundef %3) #5
  store double %61, ptr %11, align 8, !tbaa !9
  %62 = load double, ptr %10, align 8, !tbaa !9
  %63 = load double, ptr %9, align 8, !tbaa !9
  store double %62, ptr %1, align 8, !tbaa !11
  %64 = getelementptr inbounds i8, ptr %1, i64 8
  store double %63, ptr %64, align 8, !tbaa !13
  %65 = call double @dlapy3_(ptr noundef nonnull %10, ptr noundef nonnull %9, ptr noundef nonnull %11) #5
  %66 = load double, ptr %10, align 8, !tbaa !9
  %67 = fcmp ult double %66, 0.000000e+00
  %68 = fcmp oge double %65, 0.000000e+00
  %.neg73 = fneg double %65
  br i1 %67, label %71, label %69

69:                                               ; preds = %58
  %70 = select i1 %68, double %65, double %.neg73
  br label %73

71:                                               ; preds = %58
  %72 = select i1 %68, double %.neg73, double %65
  br label %73

73:                                               ; preds = %71, %69
  %74 = phi double [ %70, %69 ], [ %72, %71 ]
  %75 = fneg double %74
  br label %76

76:                                               ; preds = %._crit_edge78, %73
  %77 = phi double [ %66, %73 ], [ %.pre, %._crit_edge78 ]
  %.171 = phi double [ %75, %73 ], [ %36, %._crit_edge78 ]
  %.1 = phi i32 [ %44, %73 ], [ 0, %._crit_edge78 ]
  %78 = fsub double %.171, %77
  %79 = load double, ptr %9, align 8, !tbaa !9
  %80 = fneg double %79
  %81 = insertelement <2 x double> poison, double %78, i64 0
  %82 = insertelement <2 x double> %81, double %80, i64 1
  %83 = insertelement <2 x double> poison, double %.171, i64 0
  %84 = shufflevector <2 x double> %83, <2 x double> poison, <2 x i32> zeroinitializer
  %85 = fdiv <2 x double> %82, %84
  store <2 x double> %85, ptr %7, align 16, !tbaa !9
  store <2 x double> %85, ptr %4, align 8, !tbaa !9
  %86 = load double, ptr %1, align 8, !tbaa !11
  %87 = fsub double %86, %.171
  store double %87, ptr %8, align 8, !tbaa !11
  %88 = getelementptr inbounds i8, ptr %1, i64 8
  %89 = load double, ptr %88, align 8, !tbaa !13
  %90 = getelementptr inbounds i8, ptr %8, i64 8
  store double %89, ptr %90, align 8, !tbaa !13
  call void @zladiv_(ptr noundef nonnull %7, ptr noundef nonnull @c_b5, ptr noundef nonnull %8) #5
  %91 = load <2 x double>, ptr %7, align 16, !tbaa !9
  store <2 x double> %91, ptr %1, align 8, !tbaa !9
  %92 = load i32, ptr %0, align 4, !tbaa !5
  %93 = add nsw i32 %92, -1
  store i32 %93, ptr %6, align 4, !tbaa !5
  call void @zscal_(ptr noundef nonnull %6, ptr noundef nonnull %1, ptr noundef %2, ptr noundef %3) #5
  %.not74 = icmp eq i32 %.1, 0
  br i1 %.not74, label %._crit_edge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %76
  %xtraiter = and i32 %.1, 7
  %94 = icmp ult i32 %.1, 8
  br i1 %94, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph.preheader.new

.lr.ph.preheader.new:                             ; preds = %.lr.ph.preheader
  %unroll_iter = and i32 %.1, -8
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph, %.lr.ph.preheader.new
  %.275 = phi double [ %.171, %.lr.ph.preheader.new ], [ %102, %.lr.ph ]
  %niter = phi i32 [ 0, %.lr.ph.preheader.new ], [ %niter.next.7, %.lr.ph ]
  %95 = fmul double %39, %.275
  %96 = fmul double %39, %95
  %97 = fmul double %39, %96
  %98 = fmul double %39, %97
  %99 = fmul double %39, %98
  %100 = fmul double %39, %99
  %101 = fmul double %39, %100
  %102 = fmul double %39, %101
  %niter.next.7 = add i32 %niter, 8
  %niter.ncmp.7 = icmp eq i32 %niter.next.7, %unroll_iter
  br i1 %niter.ncmp.7, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph, !llvm.loop !14

._crit_edge.loopexit.unr-lcssa:                   ; preds = %.lr.ph, %.lr.ph.preheader
  %.lcssa.ph = phi double [ poison, %.lr.ph.preheader ], [ %102, %.lr.ph ]
  %.275.unr = phi double [ %.171, %.lr.ph.preheader ], [ %102, %.lr.ph ]
  %lcmp.mod.not = icmp eq i32 %xtraiter, 0
  br i1 %lcmp.mod.not, label %._crit_edge, label %.lr.ph.epil

.lr.ph.epil:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %.lr.ph.epil
  %.275.epil = phi double [ %103, %.lr.ph.epil ], [ %.275.unr, %._crit_edge.loopexit.unr-lcssa ]
  %epil.iter = phi i32 [ %epil.iter.next, %.lr.ph.epil ], [ 0, %._crit_edge.loopexit.unr-lcssa ]
  %103 = fmul double %39, %.275.epil
  %epil.iter.next = add i32 %epil.iter, 1
  %epil.iter.cmp.not = icmp eq i32 %epil.iter.next, %xtraiter
  br i1 %epil.iter.cmp.not, label %._crit_edge, label %.lr.ph.epil, !llvm.loop !16

._crit_edge:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %.lr.ph.epil, %76
  %.2.lcssa = phi double [ %.171, %76 ], [ %.lcssa.ph, %._crit_edge.loopexit.unr-lcssa ], [ %103, %.lr.ph.epil ]
  store double %.2.lcssa, ptr %1, align 8, !tbaa !11
  store double 0.000000e+00, ptr %88, align 8, !tbaa !13
  br label %104

104:                                              ; preds = %24, %._crit_edge, %15
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %12) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %8) #5
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %7) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %6) #5
  ret void
}

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

declare double @dznrm2_(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

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

declare double @dlapy3_(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

declare double @dlamch_(ptr noundef) local_unnamed_addr #2

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

declare void @zladiv_(ptr noundef, ptr noundef, ptr noundef) local_unnamed_addr #2

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

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

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

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 = { nocallback nofree nounwind willreturn memory(argmem: write) }
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 = !{!"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}
!14 = distinct !{!14, !15}
!15 = !{!"llvm.loop.mustprogress"}
!16 = distinct !{!16, !17}
!17 = !{!"llvm.loop.unroll.disable"}


; Effective O3 passes: CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,MemCpyOptPass,PostOrderFunctionAttrsPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass