; LLVM IR from niuyishuai/PDCABB :: LAPACK_BLAS/LAPACK (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 i32 @zlarfg_(ptr noundef %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4) #0 {
  %6 = alloca i32, align 4
  %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 i64, align 8
  %13 = alloca double, align 8
  %14 = alloca double, align 8
  %15 = alloca %struct.doublecomplex, align 8
  %16 = alloca %struct.doublecomplex, align 8
  %17 = alloca i64, align 8
  %18 = alloca i64, align 8
  %19 = alloca double, align 8
  %20 = alloca double, align 8
  %21 = alloca double, align 8
  %22 = alloca double, align 8
  %23 = alloca double, align 8
  %24 = alloca double, align 8
  %25 = alloca i32, align 4
  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
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.start.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.start.p0(i64 16, ptr %15) #3
  call void @llvm.lifetime.start.p0(i64 16, 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 8, 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
  %26 = load ptr, ptr %9, align 8, !tbaa !5
  %27 = getelementptr inbounds %struct.doublecomplex, ptr %26, i32 -1
  store ptr %27, ptr %9, align 8, !tbaa !5
  %28 = load ptr, ptr %7, align 8, !tbaa !5
  %29 = load i64, ptr %28, align 8, !tbaa !9
  %30 = icmp sle i64 %29, 0
  br i1 %30, label %31, label %36

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

36:                                               ; preds = %5
  %37 = load ptr, ptr %7, align 8, !tbaa !5
  %38 = load i64, ptr %37, align 8, !tbaa !9
  %39 = sub nsw i64 %38, 1
  store i64 %39, ptr %12, align 8, !tbaa !9
  %40 = load ptr, ptr %9, align 8, !tbaa !5
  %41 = getelementptr inbounds %struct.doublecomplex, ptr %40, i64 1
  %42 = load ptr, ptr %10, align 8, !tbaa !5
  %43 = call double @f2c_dznrm2(ptr noundef %12, ptr noundef %41, ptr noundef %42)
  store double %43, ptr %22, align 8, !tbaa !15
  %44 = load ptr, ptr %8, align 8, !tbaa !5
  %45 = getelementptr inbounds %struct.doublecomplex, ptr %44, i32 0, i32 0
  %46 = load double, ptr %45, align 8, !tbaa !11
  store double %46, ptr %21, align 8, !tbaa !15
  %47 = load ptr, ptr %8, align 8, !tbaa !5
  %48 = call double @d_imag(ptr noundef %47)
  store double %48, ptr %20, align 8, !tbaa !15
  %49 = load double, ptr %22, align 8, !tbaa !15
  %50 = fcmp oeq double %49, 0.000000e+00
  br i1 %50, label %51, label %59

51:                                               ; preds = %36
  %52 = load double, ptr %20, align 8, !tbaa !15
  %53 = fcmp oeq double %52, 0.000000e+00
  br i1 %53, label %54, label %59

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

59:                                               ; preds = %51, %36
  %60 = call double @dlapy3_(ptr noundef %21, ptr noundef %20, ptr noundef %22)
  store double %60, ptr %13, align 8, !tbaa !15
  %61 = call double @d_sign(ptr noundef %13, ptr noundef %21)
  %62 = fneg double %61
  store double %62, ptr %19, align 8, !tbaa !15
  %63 = call double @dlamch_(ptr noundef @.str)
  %64 = call double @dlamch_(ptr noundef @.str.1)
  %65 = fdiv double %63, %64
  store double %65, ptr %23, align 8, !tbaa !15
  %66 = load double, ptr %23, align 8, !tbaa !15
  %67 = fdiv double 1.000000e+00, %66
  store double %67, ptr %24, align 8, !tbaa !15
  store i64 0, ptr %18, align 8, !tbaa !9
  %68 = load double, ptr %19, align 8, !tbaa !15
  %69 = fcmp oge double %68, 0.000000e+00
  br i1 %69, label %70, label %72

70:                                               ; preds = %59
  %71 = load double, ptr %19, align 8, !tbaa !15
  br label %75

72:                                               ; preds = %59
  %73 = load double, ptr %19, align 8, !tbaa !15
  %74 = fneg double %73
  br label %75

75:                                               ; preds = %72, %70
  %76 = phi double [ %71, %70 ], [ %74, %72 ]
  %77 = load double, ptr %23, align 8, !tbaa !15
  %78 = fcmp olt double %76, %77
  br i1 %78, label %79, label %134

79:                                               ; preds = %75
  br label %80

80:                                               ; preds = %110, %79
  %81 = load i64, ptr %18, align 8, !tbaa !9
  %82 = add nsw i64 %81, 1
  store i64 %82, ptr %18, align 8, !tbaa !9
  %83 = load ptr, ptr %7, align 8, !tbaa !5
  %84 = load i64, ptr %83, align 8, !tbaa !9
  %85 = sub nsw i64 %84, 1
  store i64 %85, ptr %12, align 8, !tbaa !9
  %86 = load ptr, ptr %9, align 8, !tbaa !5
  %87 = getelementptr inbounds %struct.doublecomplex, ptr %86, i64 1
  %88 = load ptr, ptr %10, align 8, !tbaa !5
  %89 = call i32 @f2c_zdscal(ptr noundef %12, ptr noundef %24, ptr noundef %87, ptr noundef %88)
  %90 = load double, ptr %24, align 8, !tbaa !15
  %91 = load double, ptr %19, align 8, !tbaa !15
  %92 = fmul double %91, %90
  store double %92, ptr %19, align 8, !tbaa !15
  %93 = load double, ptr %24, align 8, !tbaa !15
  %94 = load double, ptr %20, align 8, !tbaa !15
  %95 = fmul double %94, %93
  store double %95, ptr %20, align 8, !tbaa !15
  %96 = load double, ptr %24, align 8, !tbaa !15
  %97 = load double, ptr %21, align 8, !tbaa !15
  %98 = fmul double %97, %96
  store double %98, ptr %21, align 8, !tbaa !15
  %99 = load double, ptr %19, align 8, !tbaa !15
  %100 = fcmp oge double %99, 0.000000e+00
  br i1 %100, label %101, label %103

101:                                              ; preds = %80
  %102 = load double, ptr %19, align 8, !tbaa !15
  br label %106

103:                                              ; preds = %80
  %104 = load double, ptr %19, align 8, !tbaa !15
  %105 = fneg double %104
  br label %106

106:                                              ; preds = %103, %101
  %107 = phi double [ %102, %101 ], [ %105, %103 ]
  %108 = load double, ptr %23, align 8, !tbaa !15
  %109 = fcmp olt double %107, %108
  br i1 %109, label %110, label %111

110:                                              ; preds = %106
  br label %80

111:                                              ; preds = %106
  %112 = load ptr, ptr %7, align 8, !tbaa !5
  %113 = load i64, ptr %112, align 8, !tbaa !9
  %114 = sub nsw i64 %113, 1
  store i64 %114, ptr %12, align 8, !tbaa !9
  %115 = load ptr, ptr %9, align 8, !tbaa !5
  %116 = getelementptr inbounds %struct.doublecomplex, ptr %115, i64 1
  %117 = load ptr, ptr %10, align 8, !tbaa !5
  %118 = call double @f2c_dznrm2(ptr noundef %12, ptr noundef %116, ptr noundef %117)
  store double %118, ptr %22, align 8, !tbaa !15
  %119 = load double, ptr %21, align 8, !tbaa !15
  %120 = getelementptr inbounds %struct.doublecomplex, ptr %15, i32 0, i32 0
  store double %119, ptr %120, align 8, !tbaa !11
  %121 = load double, ptr %20, align 8, !tbaa !15
  %122 = getelementptr inbounds %struct.doublecomplex, ptr %15, i32 0, i32 1
  store double %121, ptr %122, align 8, !tbaa !14
  %123 = getelementptr inbounds %struct.doublecomplex, ptr %15, i32 0, i32 0
  %124 = load double, ptr %123, align 8, !tbaa !11
  %125 = load ptr, ptr %8, align 8, !tbaa !5
  %126 = getelementptr inbounds %struct.doublecomplex, ptr %125, i32 0, i32 0
  store double %124, ptr %126, align 8, !tbaa !11
  %127 = getelementptr inbounds %struct.doublecomplex, ptr %15, i32 0, i32 1
  %128 = load double, ptr %127, align 8, !tbaa !14
  %129 = load ptr, ptr %8, align 8, !tbaa !5
  %130 = getelementptr inbounds %struct.doublecomplex, ptr %129, i32 0, i32 1
  store double %128, ptr %130, align 8, !tbaa !14
  %131 = call double @dlapy3_(ptr noundef %21, ptr noundef %20, ptr noundef %22)
  store double %131, ptr %13, align 8, !tbaa !15
  %132 = call double @d_sign(ptr noundef %13, ptr noundef %21)
  %133 = fneg double %132
  store double %133, ptr %19, align 8, !tbaa !15
  br label %134

134:                                              ; preds = %111, %75
  %135 = load double, ptr %19, align 8, !tbaa !15
  %136 = load double, ptr %21, align 8, !tbaa !15
  %137 = fsub double %135, %136
  %138 = load double, ptr %19, align 8, !tbaa !15
  %139 = fdiv double %137, %138
  store double %139, ptr %13, align 8, !tbaa !15
  %140 = load double, ptr %20, align 8, !tbaa !15
  %141 = fneg double %140
  %142 = load double, ptr %19, align 8, !tbaa !15
  %143 = fdiv double %141, %142
  store double %143, ptr %14, align 8, !tbaa !15
  %144 = load double, ptr %13, align 8, !tbaa !15
  %145 = getelementptr inbounds %struct.doublecomplex, ptr %15, i32 0, i32 0
  store double %144, ptr %145, align 8, !tbaa !11
  %146 = load double, ptr %14, align 8, !tbaa !15
  %147 = getelementptr inbounds %struct.doublecomplex, ptr %15, i32 0, i32 1
  store double %146, ptr %147, align 8, !tbaa !14
  %148 = getelementptr inbounds %struct.doublecomplex, ptr %15, i32 0, i32 0
  %149 = load double, ptr %148, align 8, !tbaa !11
  %150 = load ptr, ptr %11, align 8, !tbaa !5
  %151 = getelementptr inbounds %struct.doublecomplex, ptr %150, i32 0, i32 0
  store double %149, ptr %151, align 8, !tbaa !11
  %152 = getelementptr inbounds %struct.doublecomplex, ptr %15, i32 0, i32 1
  %153 = load double, ptr %152, align 8, !tbaa !14
  %154 = load ptr, ptr %11, align 8, !tbaa !5
  %155 = getelementptr inbounds %struct.doublecomplex, ptr %154, i32 0, i32 1
  store double %153, ptr %155, align 8, !tbaa !14
  %156 = load ptr, ptr %8, align 8, !tbaa !5
  %157 = getelementptr inbounds %struct.doublecomplex, ptr %156, i32 0, i32 0
  %158 = load double, ptr %157, align 8, !tbaa !11
  %159 = load double, ptr %19, align 8, !tbaa !15
  %160 = fsub double %158, %159
  %161 = getelementptr inbounds %struct.doublecomplex, ptr %16, i32 0, i32 0
  store double %160, ptr %161, align 8, !tbaa !11
  %162 = load ptr, ptr %8, align 8, !tbaa !5
  %163 = getelementptr inbounds %struct.doublecomplex, ptr %162, i32 0, i32 1
  %164 = load double, ptr %163, align 8, !tbaa !14
  %165 = getelementptr inbounds %struct.doublecomplex, ptr %16, i32 0, i32 1
  store double %164, ptr %165, align 8, !tbaa !14
  call void @zladiv_(ptr noundef %15, ptr noundef @c_b5, ptr noundef %16)
  %166 = getelementptr inbounds %struct.doublecomplex, ptr %15, i32 0, i32 0
  %167 = load double, ptr %166, align 8, !tbaa !11
  %168 = load ptr, ptr %8, align 8, !tbaa !5
  %169 = getelementptr inbounds %struct.doublecomplex, ptr %168, i32 0, i32 0
  store double %167, ptr %169, align 8, !tbaa !11
  %170 = getelementptr inbounds %struct.doublecomplex, ptr %15, i32 0, i32 1
  %171 = load double, ptr %170, align 8, !tbaa !14
  %172 = load ptr, ptr %8, align 8, !tbaa !5
  %173 = getelementptr inbounds %struct.doublecomplex, ptr %172, i32 0, i32 1
  store double %171, ptr %173, align 8, !tbaa !14
  %174 = load ptr, ptr %7, align 8, !tbaa !5
  %175 = load i64, ptr %174, align 8, !tbaa !9
  %176 = sub nsw i64 %175, 1
  store i64 %176, ptr %12, align 8, !tbaa !9
  %177 = load ptr, ptr %8, align 8, !tbaa !5
  %178 = load ptr, ptr %9, align 8, !tbaa !5
  %179 = getelementptr inbounds %struct.doublecomplex, ptr %178, i64 1
  %180 = load ptr, ptr %10, align 8, !tbaa !5
  %181 = call i32 @f2c_zscal(ptr noundef %12, ptr noundef %177, ptr noundef %179, ptr noundef %180)
  %182 = load i64, ptr %18, align 8, !tbaa !9
  store i64 %182, ptr %12, align 8, !tbaa !9
  store i64 1, ptr %17, align 8, !tbaa !9
  br label %183

183:                                              ; preds = %191, %134
  %184 = load i64, ptr %17, align 8, !tbaa !9
  %185 = load i64, ptr %12, align 8, !tbaa !9
  %186 = icmp sle i64 %184, %185
  br i1 %186, label %187, label %194

187:                                              ; preds = %183
  %188 = load double, ptr %23, align 8, !tbaa !15
  %189 = load double, ptr %19, align 8, !tbaa !15
  %190 = fmul double %189, %188
  store double %190, ptr %19, align 8, !tbaa !15
  br label %191

191:                                              ; preds = %187
  %192 = load i64, ptr %17, align 8, !tbaa !9
  %193 = add nsw i64 %192, 1
  store i64 %193, ptr %17, align 8, !tbaa !9
  br label %183, !llvm.loop !16

194:                                              ; preds = %183
  %195 = load double, ptr %19, align 8, !tbaa !15
  %196 = load ptr, ptr %8, align 8, !tbaa !5
  %197 = getelementptr inbounds %struct.doublecomplex, ptr %196, i32 0, i32 0
  store double %195, ptr %197, align 8, !tbaa !11
  %198 = load ptr, ptr %8, align 8, !tbaa !5
  %199 = getelementptr inbounds %struct.doublecomplex, ptr %198, i32 0, i32 1
  store double 0.000000e+00, ptr %199, align 8, !tbaa !14
  br label %200

200:                                              ; preds = %194, %54
  store i32 0, ptr %6, align 4
  store i32 1, ptr %25, align 4
  br label %201

201:                                              ; preds = %200, %31
  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 8, 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 16, ptr %16) #3
  call void @llvm.lifetime.end.p0(i64 16, ptr %15) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %14) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %13) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #3
  %202 = load i32, ptr %6, align 4
  ret i32 %202
}

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

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

declare double @d_imag(ptr noundef) #2

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

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

declare double @dlamch_(ptr noundef) #2

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

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

declare i32 @f2c_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 = { 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, !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 noundef i32 @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 i64, align 8
  %7 = alloca double, align 8
  %8 = alloca %struct.doublecomplex, align 16
  %9 = alloca %struct.doublecomplex, align 8
  %10 = alloca double, align 8
  %11 = alloca double, align 8
  %12 = alloca double, align 8
  %13 = alloca double, align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %8) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr nonnull %9) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %10) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %12) #4
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %13) #4
  %14 = load i64, ptr %0, align 8, !tbaa !5
  %15 = icmp slt i64 %14, 1
  br i1 %15, label %16, label %17

16:                                               ; 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 %91

17:                                               ; preds = %5
  %18 = add nsw i64 %14, -1
  store i64 %18, ptr %6, align 8, !tbaa !5
  %19 = call double @f2c_dznrm2(ptr noundef nonnull %6, ptr noundef %2, ptr noundef %3) #4
  store double %19, ptr %12, align 8, !tbaa !9
  %20 = load double, ptr %1, align 8, !tbaa !11
  store double %20, ptr %11, align 8, !tbaa !9
  %21 = call double @d_imag(ptr noundef nonnull %1) #4
  store double %21, ptr %10, align 8, !tbaa !9
  %22 = fcmp oeq double %19, 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 = %17
  call void @llvm.memset.p0.i64(ptr noundef nonnull align 8 dereferenceable(16) %4, i8 0, i64 16, i1 false)
  br label %91

25:                                               ; preds = %17
  %26 = call double @dlapy3_(ptr noundef nonnull %11, ptr noundef nonnull %10, ptr noundef nonnull %12) #4
  store double %26, ptr %7, align 8, !tbaa !9
  %27 = call double @d_sign(ptr noundef nonnull %7, ptr noundef nonnull %11) #4
  %28 = fneg double %27
  %29 = call double @dlamch_(ptr noundef nonnull @.str) #4
  %30 = call double @dlamch_(ptr noundef nonnull @.str.1) #4
  %31 = fdiv double %29, %30
  %32 = fdiv double 1.000000e+00, %31
  store double %32, ptr %13, align 8, !tbaa !9
  %33 = fcmp ole double %27, 0.000000e+00
  %34 = select i1 %33, double %28, double %27
  %35 = fcmp olt double %34, %31
  br i1 %35, label %.preheader, label %61

.preheader:                                       ; preds = %25, %.preheader
  %.055 = phi i64 [ %36, %.preheader ], [ 0, %25 ]
  %.054 = phi double [ %41, %.preheader ], [ %28, %25 ]
  %36 = add nuw nsw i64 %.055, 1
  %37 = load i64, ptr %0, align 8, !tbaa !5
  %38 = add nsw i64 %37, -1
  store i64 %38, ptr %6, align 8, !tbaa !5
  %39 = call i32 @f2c_zdscal(ptr noundef nonnull %6, ptr noundef nonnull %13, ptr noundef %2, ptr noundef %3) #4
  %40 = load double, ptr %13, align 8, !tbaa !9
  %41 = fmul double %.054, %40
  %42 = load double, ptr %10, align 8, !tbaa !9
  %43 = fmul double %40, %42
  store double %43, ptr %10, align 8, !tbaa !9
  %44 = load double, ptr %11, align 8, !tbaa !9
  %45 = fmul double %40, %44
  store double %45, ptr %11, align 8, !tbaa !9
  %46 = fcmp oge double %41, 0.000000e+00
  %47 = fneg double %41
  %48 = select i1 %46, double %41, double %47
  %49 = fcmp olt double %48, %31
  br i1 %49, label %.preheader, label %50

50:                                               ; preds = %.preheader
  %51 = load i64, ptr %0, align 8, !tbaa !5
  %52 = add nsw i64 %51, -1
  store i64 %52, ptr %6, align 8, !tbaa !5
  %53 = call double @f2c_dznrm2(ptr noundef nonnull %6, ptr noundef %2, ptr noundef %3) #4
  store double %53, ptr %12, align 8, !tbaa !9
  %54 = load double, ptr %11, align 8, !tbaa !9
  store double %54, ptr %8, align 16, !tbaa !11
  %55 = load double, ptr %10, align 8, !tbaa !9
  %56 = getelementptr inbounds i8, ptr %8, i64 8
  store double %55, ptr %56, align 8, !tbaa !13
  store double %54, ptr %1, align 8, !tbaa !11
  %57 = getelementptr inbounds i8, ptr %1, i64 8
  store double %55, ptr %57, align 8, !tbaa !13
  %58 = call double @dlapy3_(ptr noundef nonnull %11, ptr noundef nonnull %10, ptr noundef nonnull %12) #4
  store double %58, ptr %7, align 8, !tbaa !9
  %59 = call double @d_sign(ptr noundef nonnull %7, ptr noundef nonnull %11) #4
  %60 = fneg double %59
  br label %61

61:                                               ; preds = %50, %25
  %.156 = phi i64 [ %36, %50 ], [ 0, %25 ]
  %.1 = phi double [ %60, %50 ], [ %28, %25 ]
  %62 = load double, ptr %11, align 8, !tbaa !9
  %63 = fsub double %.1, %62
  %64 = load double, ptr %10, align 8, !tbaa !9
  %65 = fneg double %64
  %66 = insertelement <2 x double> poison, double %63, i64 0
  %67 = insertelement <2 x double> %66, double %65, i64 1
  %68 = insertelement <2 x double> poison, double %.1, i64 0
  %69 = shufflevector <2 x double> %68, <2 x double> poison, <2 x i32> zeroinitializer
  %70 = fdiv <2 x double> %67, %69
  %71 = extractelement <2 x double> %70, i64 0
  store double %71, ptr %7, align 8, !tbaa !9
  store <2 x double> %70, ptr %8, align 16, !tbaa !9
  store <2 x double> %70, ptr %4, align 8, !tbaa !9
  %72 = load double, ptr %1, align 8, !tbaa !11
  %73 = fsub double %72, %.1
  store double %73, ptr %9, align 8, !tbaa !11
  %74 = getelementptr inbounds i8, ptr %1, i64 8
  %75 = load double, ptr %74, align 8, !tbaa !13
  %76 = getelementptr inbounds i8, ptr %9, i64 8
  store double %75, ptr %76, align 8, !tbaa !13
  call void @zladiv_(ptr noundef nonnull %8, ptr noundef nonnull @c_b5, ptr noundef nonnull %9) #4
  %77 = load <2 x double>, ptr %8, align 16, !tbaa !9
  store <2 x double> %77, ptr %1, align 8, !tbaa !9
  %78 = load i64, ptr %0, align 8, !tbaa !5
  %79 = add nsw i64 %78, -1
  store i64 %79, ptr %6, align 8, !tbaa !5
  %80 = call i32 @f2c_zscal(ptr noundef nonnull %6, ptr noundef nonnull %1, ptr noundef %2, ptr noundef %3) #4
  %.not58 = icmp slt i64 %.156, 1
  br i1 %.not58, label %._crit_edge, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %61
  %xtraiter = and i64 %.156, 7
  %81 = icmp ult i64 %.156, 8
  br i1 %81, label %._crit_edge.loopexit.unr-lcssa, label %.lr.ph.preheader.new

.lr.ph.preheader.new:                             ; preds = %.lr.ph.preheader
  %unroll_iter = and i64 %.156, 9223372036854775800
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph, %.lr.ph.preheader.new
  %.260 = phi double [ %.1, %.lr.ph.preheader.new ], [ %89, %.lr.ph ]
  %niter = phi i64 [ 0, %.lr.ph.preheader.new ], [ %niter.next.7, %.lr.ph ]
  %82 = fmul double %31, %.260
  %83 = fmul double %31, %82
  %84 = fmul double %31, %83
  %85 = fmul double %31, %84
  %86 = fmul double %31, %85
  %87 = fmul double %31, %86
  %88 = fmul double %31, %87
  %89 = fmul double %31, %88
  %niter.next.7 = add i64 %niter, 8
  %niter.ncmp.7 = icmp eq i64 %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 ], [ %89, %.lr.ph ]
  %.260.unr = phi double [ %.1, %.lr.ph.preheader ], [ %89, %.lr.ph ]
  %lcmp.mod.not = icmp eq i64 %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
  %.260.epil = phi double [ %90, %.lr.ph.epil ], [ %.260.unr, %._crit_edge.loopexit.unr-lcssa ]
  %epil.iter = phi i64 [ %epil.iter.next, %.lr.ph.epil ], [ 0, %._crit_edge.loopexit.unr-lcssa ]
  %90 = fmul double %31, %.260.epil
  %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 %._crit_edge, label %.lr.ph.epil, !llvm.loop !16

._crit_edge:                                      ; preds = %._crit_edge.loopexit.unr-lcssa, %.lr.ph.epil, %61
  %.2.lcssa = phi double [ %.1, %61 ], [ %.lcssa.ph, %._crit_edge.loopexit.unr-lcssa ], [ %90, %.lr.ph.epil ]
  store double %.2.lcssa, ptr %1, align 8, !tbaa !11
  store double 0.000000e+00, ptr %74, align 8, !tbaa !13
  br label %91

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

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

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

declare double @d_imag(ptr noundef) local_unnamed_addr #2

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

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

declare double @dlamch_(ptr noundef) local_unnamed_addr #2

declare i32 @f2c_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 i32 @f2c_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) #3

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

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !6, i64 0}
!6 = !{!"long", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!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: DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,MemCpyOptPass,PostOrderFunctionAttrsPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass