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

; Unoptimized IR (clang -disable-llvm-passes):
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"

%struct.doublecomplex = type { double, double }

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

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

36:                                               ; preds = %7
  %37 = load ptr, ptr %15, align 8, !tbaa !5
  store i8 78, ptr %37, align 1, !tbaa !11
  store i32 0, ptr %8, align 4
  store i32 1, ptr %28, align 4
  br label %216

38:                                               ; preds = %7
  %39 = call double @dlamch_(ptr noundef @.str)
  %40 = call double @dlamch_(ptr noundef @.str.1)
  %41 = fdiv double %39, %40
  store double %41, ptr %27, align 8, !tbaa !12
  %42 = load double, ptr %27, align 8, !tbaa !12
  %43 = fdiv double 1.000000e+00, %42
  store double %43, ptr %26, align 8, !tbaa !12
  %44 = load ptr, ptr %13, align 8, !tbaa !5
  %45 = load double, ptr %44, align 8, !tbaa !12
  %46 = fcmp oge double %45, 1.000000e-01
  br i1 %46, label %47, label %59

47:                                               ; preds = %38
  %48 = load ptr, ptr %14, align 8, !tbaa !5
  %49 = load double, ptr %48, align 8, !tbaa !12
  %50 = load double, ptr %27, align 8, !tbaa !12
  %51 = fcmp oge double %49, %50
  br i1 %51, label %52, label %59

52:                                               ; preds = %47
  %53 = load ptr, ptr %14, align 8, !tbaa !5
  %54 = load double, ptr %53, align 8, !tbaa !12
  %55 = load double, ptr %26, align 8, !tbaa !12
  %56 = fcmp ole double %54, %55
  br i1 %56, label %57, label %59

57:                                               ; preds = %52
  %58 = load ptr, ptr %15, align 8, !tbaa !5
  store i8 78, ptr %58, align 1, !tbaa !11
  br label %215

59:                                               ; preds = %52, %47, %38
  %60 = load ptr, ptr %9, align 8, !tbaa !5
  %61 = call i64 @lsame_(ptr noundef %60, ptr noundef @.str.2)
  %62 = icmp ne i64 %61, 0
  br i1 %62, label %63, label %134

63:                                               ; preds = %59
  store i64 1, ptr %24, align 8, !tbaa !9
  %64 = load ptr, ptr %10, align 8, !tbaa !5
  %65 = load i64, ptr %64, align 8, !tbaa !9
  store i64 %65, ptr %16, align 8, !tbaa !9
  store i64 1, ptr %23, align 8, !tbaa !9
  br label %66

66:                                               ; preds = %130, %63
  %67 = load i64, ptr %23, align 8, !tbaa !9
  %68 = load i64, ptr %16, align 8, !tbaa !9
  %69 = icmp sle i64 %67, %68
  br i1 %69, label %70, label %133

70:                                               ; preds = %66
  %71 = load ptr, ptr %12, align 8, !tbaa !5
  %72 = load i64, ptr %23, align 8, !tbaa !9
  %73 = getelementptr inbounds double, ptr %71, i64 %72
  %74 = load double, ptr %73, align 8, !tbaa !12
  store double %74, ptr %25, align 8, !tbaa !12
  %75 = load i64, ptr %23, align 8, !tbaa !9
  store i64 %75, ptr %17, align 8, !tbaa !9
  store i64 1, ptr %22, align 8, !tbaa !9
  br label %76

76:                                               ; preds = %123, %70
  %77 = load i64, ptr %22, align 8, !tbaa !9
  %78 = load i64, ptr %17, align 8, !tbaa !9
  %79 = icmp sle i64 %77, %78
  br i1 %79, label %80, label %126

80:                                               ; preds = %76
  %81 = load i64, ptr %24, align 8, !tbaa !9
  %82 = load i64, ptr %22, align 8, !tbaa !9
  %83 = add nsw i64 %81, %82
  %84 = sub nsw i64 %83, 1
  store i64 %84, ptr %18, align 8, !tbaa !9
  %85 = load double, ptr %25, align 8, !tbaa !12
  %86 = load ptr, ptr %12, align 8, !tbaa !5
  %87 = load i64, ptr %22, align 8, !tbaa !9
  %88 = getelementptr inbounds double, ptr %86, i64 %87
  %89 = load double, ptr %88, align 8, !tbaa !12
  %90 = fmul double %85, %89
  store double %90, ptr %20, align 8, !tbaa !12
  %91 = load i64, ptr %24, align 8, !tbaa !9
  %92 = load i64, ptr %22, align 8, !tbaa !9
  %93 = add nsw i64 %91, %92
  %94 = sub nsw i64 %93, 1
  store i64 %94, ptr %19, align 8, !tbaa !9
  %95 = load double, ptr %20, align 8, !tbaa !12
  %96 = load ptr, ptr %11, align 8, !tbaa !5
  %97 = load i64, ptr %19, align 8, !tbaa !9
  %98 = getelementptr inbounds %struct.doublecomplex, ptr %96, i64 %97
  %99 = getelementptr inbounds %struct.doublecomplex, ptr %98, i32 0, i32 0
  %100 = load double, ptr %99, align 8, !tbaa !14
  %101 = fmul double %95, %100
  %102 = getelementptr inbounds %struct.doublecomplex, ptr %21, i32 0, i32 0
  store double %101, ptr %102, align 8, !tbaa !14
  %103 = load double, ptr %20, align 8, !tbaa !12
  %104 = load ptr, ptr %11, align 8, !tbaa !5
  %105 = load i64, ptr %19, align 8, !tbaa !9
  %106 = getelementptr inbounds %struct.doublecomplex, ptr %104, i64 %105
  %107 = getelementptr inbounds %struct.doublecomplex, ptr %106, i32 0, i32 1
  %108 = load double, ptr %107, align 8, !tbaa !16
  %109 = fmul double %103, %108
  %110 = getelementptr inbounds %struct.doublecomplex, ptr %21, i32 0, i32 1
  store double %109, ptr %110, align 8, !tbaa !16
  %111 = getelementptr inbounds %struct.doublecomplex, ptr %21, i32 0, i32 0
  %112 = load double, ptr %111, align 8, !tbaa !14
  %113 = load ptr, ptr %11, align 8, !tbaa !5
  %114 = load i64, ptr %18, align 8, !tbaa !9
  %115 = getelementptr inbounds %struct.doublecomplex, ptr %113, i64 %114
  %116 = getelementptr inbounds %struct.doublecomplex, ptr %115, i32 0, i32 0
  store double %112, ptr %116, align 8, !tbaa !14
  %117 = getelementptr inbounds %struct.doublecomplex, ptr %21, i32 0, i32 1
  %118 = load double, ptr %117, align 8, !tbaa !16
  %119 = load ptr, ptr %11, align 8, !tbaa !5
  %120 = load i64, ptr %18, align 8, !tbaa !9
  %121 = getelementptr inbounds %struct.doublecomplex, ptr %119, i64 %120
  %122 = getelementptr inbounds %struct.doublecomplex, ptr %121, i32 0, i32 1
  store double %118, ptr %122, align 8, !tbaa !16
  br label %123

123:                                              ; preds = %80
  %124 = load i64, ptr %22, align 8, !tbaa !9
  %125 = add nsw i64 %124, 1
  store i64 %125, ptr %22, align 8, !tbaa !9
  br label %76, !llvm.loop !17

126:                                              ; preds = %76
  %127 = load i64, ptr %23, align 8, !tbaa !9
  %128 = load i64, ptr %24, align 8, !tbaa !9
  %129 = add nsw i64 %128, %127
  store i64 %129, ptr %24, align 8, !tbaa !9
  br label %130

130:                                              ; preds = %126
  %131 = load i64, ptr %23, align 8, !tbaa !9
  %132 = add nsw i64 %131, 1
  store i64 %132, ptr %23, align 8, !tbaa !9
  br label %66, !llvm.loop !19

133:                                              ; preds = %66
  br label %213

134:                                              ; preds = %59
  store i64 1, ptr %24, align 8, !tbaa !9
  %135 = load ptr, ptr %10, align 8, !tbaa !5
  %136 = load i64, ptr %135, align 8, !tbaa !9
  store i64 %136, ptr %16, align 8, !tbaa !9
  store i64 1, ptr %23, align 8, !tbaa !9
  br label %137

137:                                              ; preds = %209, %134
  %138 = load i64, ptr %23, align 8, !tbaa !9
  %139 = load i64, ptr %16, align 8, !tbaa !9
  %140 = icmp sle i64 %138, %139
  br i1 %140, label %141, label %212

141:                                              ; preds = %137
  %142 = load ptr, ptr %12, align 8, !tbaa !5
  %143 = load i64, ptr %23, align 8, !tbaa !9
  %144 = getelementptr inbounds double, ptr %142, i64 %143
  %145 = load double, ptr %144, align 8, !tbaa !12
  store double %145, ptr %25, align 8, !tbaa !12
  %146 = load ptr, ptr %10, align 8, !tbaa !5
  %147 = load i64, ptr %146, align 8, !tbaa !9
  store i64 %147, ptr %17, align 8, !tbaa !9
  %148 = load i64, ptr %23, align 8, !tbaa !9
  store i64 %148, ptr %22, align 8, !tbaa !9
  br label %149

149:                                              ; preds = %198, %141
  %150 = load i64, ptr %22, align 8, !tbaa !9
  %151 = load i64, ptr %17, align 8, !tbaa !9
  %152 = icmp sle i64 %150, %151
  br i1 %152, label %153, label %201

153:                                              ; preds = %149
  %154 = load i64, ptr %24, align 8, !tbaa !9
  %155 = load i64, ptr %22, align 8, !tbaa !9
  %156 = add nsw i64 %154, %155
  %157 = load i64, ptr %23, align 8, !tbaa !9
  %158 = sub nsw i64 %156, %157
  store i64 %158, ptr %18, align 8, !tbaa !9
  %159 = load double, ptr %25, align 8, !tbaa !12
  %160 = load ptr, ptr %12, align 8, !tbaa !5
  %161 = load i64, ptr %22, align 8, !tbaa !9
  %162 = getelementptr inbounds double, ptr %160, i64 %161
  %163 = load double, ptr %162, align 8, !tbaa !12
  %164 = fmul double %159, %163
  store double %164, ptr %20, align 8, !tbaa !12
  %165 = load i64, ptr %24, align 8, !tbaa !9
  %166 = load i64, ptr %22, align 8, !tbaa !9
  %167 = add nsw i64 %165, %166
  %168 = load i64, ptr %23, align 8, !tbaa !9
  %169 = sub nsw i64 %167, %168
  store i64 %169, ptr %19, align 8, !tbaa !9
  %170 = load double, ptr %20, align 8, !tbaa !12
  %171 = load ptr, ptr %11, align 8, !tbaa !5
  %172 = load i64, ptr %19, align 8, !tbaa !9
  %173 = getelementptr inbounds %struct.doublecomplex, ptr %171, i64 %172
  %174 = getelementptr inbounds %struct.doublecomplex, ptr %173, i32 0, i32 0
  %175 = load double, ptr %174, align 8, !tbaa !14
  %176 = fmul double %170, %175
  %177 = getelementptr inbounds %struct.doublecomplex, ptr %21, i32 0, i32 0
  store double %176, ptr %177, align 8, !tbaa !14
  %178 = load double, ptr %20, align 8, !tbaa !12
  %179 = load ptr, ptr %11, align 8, !tbaa !5
  %180 = load i64, ptr %19, align 8, !tbaa !9
  %181 = getelementptr inbounds %struct.doublecomplex, ptr %179, i64 %180
  %182 = getelementptr inbounds %struct.doublecomplex, ptr %181, i32 0, i32 1
  %183 = load double, ptr %182, align 8, !tbaa !16
  %184 = fmul double %178, %183
  %185 = getelementptr inbounds %struct.doublecomplex, ptr %21, i32 0, i32 1
  store double %184, ptr %185, align 8, !tbaa !16
  %186 = getelementptr inbounds %struct.doublecomplex, ptr %21, i32 0, i32 0
  %187 = load double, ptr %186, align 8, !tbaa !14
  %188 = load ptr, ptr %11, align 8, !tbaa !5
  %189 = load i64, ptr %18, align 8, !tbaa !9
  %190 = getelementptr inbounds %struct.doublecomplex, ptr %188, i64 %189
  %191 = getelementptr inbounds %struct.doublecomplex, ptr %190, i32 0, i32 0
  store double %187, ptr %191, align 8, !tbaa !14
  %192 = getelementptr inbounds %struct.doublecomplex, ptr %21, i32 0, i32 1
  %193 = load double, ptr %192, align 8, !tbaa !16
  %194 = load ptr, ptr %11, align 8, !tbaa !5
  %195 = load i64, ptr %18, align 8, !tbaa !9
  %196 = getelementptr inbounds %struct.doublecomplex, ptr %194, i64 %195
  %197 = getelementptr inbounds %struct.doublecomplex, ptr %196, i32 0, i32 1
  store double %193, ptr %197, align 8, !tbaa !16
  br label %198

198:                                              ; preds = %153
  %199 = load i64, ptr %22, align 8, !tbaa !9
  %200 = add nsw i64 %199, 1
  store i64 %200, ptr %22, align 8, !tbaa !9
  br label %149, !llvm.loop !20

201:                                              ; preds = %149
  %202 = load i64, ptr %24, align 8, !tbaa !9
  %203 = load ptr, ptr %10, align 8, !tbaa !5
  %204 = load i64, ptr %203, align 8, !tbaa !9
  %205 = add nsw i64 %202, %204
  %206 = load i64, ptr %23, align 8, !tbaa !9
  %207 = sub nsw i64 %205, %206
  %208 = add nsw i64 %207, 1
  store i64 %208, ptr %24, align 8, !tbaa !9
  br label %209

209:                                              ; preds = %201
  %210 = load i64, ptr %23, align 8, !tbaa !9
  %211 = add nsw i64 %210, 1
  store i64 %211, ptr %23, align 8, !tbaa !9
  br label %137, !llvm.loop !21

212:                                              ; preds = %137
  br label %213

213:                                              ; preds = %212, %133
  %214 = load ptr, ptr %15, align 8, !tbaa !5
  store i8 89, ptr %214, align 1, !tbaa !11
  br label %215

215:                                              ; preds = %213, %57
  store i32 0, ptr %8, align 4
  store i32 1, ptr %28, align 4
  br label %216

216:                                              ; preds = %215, %36
  call void @llvm.lifetime.end.p0(i64 8, ptr %27) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %26) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %25) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #3
  call void @llvm.lifetime.end.p0(i64 16, 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 8, ptr %16) #3
  %217 = load i32, ptr %8, align 4
  ret i32 %217
}

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

declare double @dlamch_(ptr noundef) #2

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


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

%struct.doublecomplex = type { double, double }

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

; Function Attrs: nounwind uwtable
define dso_local noundef i32 @zlaqsp_(ptr noundef %0, ptr nocapture noundef readonly %1, ptr nocapture noundef %2, ptr nocapture noundef readonly %3, ptr nocapture noundef readonly %4, ptr nocapture noundef readonly %5, ptr nocapture noundef writeonly %6) local_unnamed_addr #0 {
  %8 = getelementptr inbounds i8, ptr %3, i64 -8
  %9 = getelementptr inbounds i8, ptr %2, i64 -16
  %10 = load i64, ptr %1, align 8, !tbaa !5
  %11 = icmp slt i64 %10, 1
  br i1 %11, label %.loopexit, label %12

12:                                               ; preds = %7
  %13 = tail call double @dlamch_(ptr noundef nonnull @.str) #3
  %14 = tail call double @dlamch_(ptr noundef nonnull @.str.1) #3
  %15 = load double, ptr %4, align 8, !tbaa !9
  %16 = fcmp ult double %15, 1.000000e-01
  br i1 %16, label %23, label %17

17:                                               ; preds = %12
  %18 = fdiv double %13, %14
  %19 = fdiv double 1.000000e+00, %18
  %20 = load double, ptr %5, align 8, !tbaa !9
  %21 = fcmp ult double %20, %18
  %22 = fcmp ugt double %20, %19
  %or.cond = or i1 %21, %22
  br i1 %or.cond, label %23, label %.loopexit

23:                                               ; preds = %17, %12
  %24 = tail call i64 @lsame_(ptr noundef %0, ptr noundef nonnull @.str.2) #3
  %.not = icmp eq i64 %24, 0
  %25 = load i64, ptr %1, align 8, !tbaa !5
  %.not8293 = icmp slt i64 %25, 1
  br i1 %.not, label %82, label %26

26:                                               ; preds = %23
  br i1 %.not8293, label %.loopexit, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %26
  %27 = add nuw i64 %25, 1
  %scevgep = getelementptr i8, ptr %2, i64 8
  %scevgep109 = getelementptr i8, ptr %2, i64 16
  %invariant.gep164 = getelementptr i8, ptr %3, i64 8
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.loopexit162
  %scev.check.iv110 = phi ptr [ %scevgep109, %.lr.ph.preheader ], [ %scevgep111, %.loopexit162 ]
  %scev.check.iv104 = phi ptr [ %2, %.lr.ph.preheader ], [ %scevgep105, %.loopexit162 ]
  %scev.check.iv = phi ptr [ %scevgep, %.lr.ph.preheader ], [ %scevgep103, %.loopexit162 ]
  %indvar = phi i64 [ 0, %.lr.ph.preheader ], [ %indvar.next, %.loopexit162 ]
  %indvars.iv = phi i64 [ 2, %.lr.ph.preheader ], [ %indvars.iv.next, %.loopexit162 ]
  %.07791 = phi i64 [ 1, %.lr.ph.preheader ], [ %80, %.loopexit162 ]
  %.07890 = phi i64 [ 1, %.lr.ph.preheader ], [ %81, %.loopexit162 ]
  %28 = shl i64 %indvar, 4
  %29 = add i64 %28, 32
  %30 = shl i64 %indvar, 3
  %gep165 = getelementptr i8, ptr %invariant.gep164, i64 %30
  %31 = shl i64 %indvar, 4
  %32 = add i64 %31, 16
  %33 = shl i64 %indvar, 4
  %34 = add i64 %33, 16
  %35 = getelementptr inbounds double, ptr %8, i64 %.07890
  %36 = load double, ptr %35, align 8, !tbaa !9
  %37 = getelementptr %struct.doublecomplex, ptr %9, i64 %.07791
  %min.iters.check = icmp ult i64 %.07890, 10
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.scevcheck

vector.scevcheck:                                 ; preds = %.lr.ph
  %mul.result = shl i64 %indvar, 4
  %38 = getelementptr i8, ptr %scev.check.iv, i64 %mul.result
  %39 = icmp ult ptr %38, %scev.check.iv
  %mul.result107 = shl i64 %indvar, 4
  %mul.overflow108 = icmp ugt i64 %indvar, 1152921504606846975
  %40 = getelementptr i8, ptr %scev.check.iv104, i64 %mul.result107
  %41 = icmp ult ptr %40, %scev.check.iv104
  %42 = or i1 %41, %mul.overflow108
  %43 = or i1 %39, %42
  br i1 %43, label %scalar.ph.preheader, label %vector.memcheck

vector.memcheck:                                  ; preds = %vector.scevcheck
  %bound0 = icmp ult ptr %scev.check.iv104, %gep165
  %bound1 = icmp ugt ptr %scev.check.iv110, %3
  %found.conflict = and i1 %bound0, %bound1
  br i1 %found.conflict, label %scalar.ph.preheader, label %vector.ph

vector.ph:                                        ; preds = %vector.memcheck
  %n.vec = and i64 %.07890, 9223372036854775806
  %ind.end = or i64 %.07890, 1
  %broadcast.splatinsert = insertelement <2 x double> poison, double %36, i64 0
  %broadcast.splat = shufflevector <2 x double> %broadcast.splatinsert, <2 x double> poison, <2 x i32> zeroinitializer
  br label %vector.body

vector.body:                                      ; preds = %vector.body, %vector.ph
  %index = phi i64 [ 0, %vector.ph ], [ %index.next, %vector.body ]
  %offset.idx = or disjoint i64 %index, 1
  %44 = getelementptr double, ptr %3, i64 %index
  %wide.load = load <2 x double>, ptr %44, align 8, !tbaa !9, !alias.scope !11
  %45 = fmul <2 x double> %broadcast.splat, %wide.load
  %46 = getelementptr %struct.doublecomplex, ptr %37, i64 %offset.idx
  %47 = getelementptr i8, ptr %46, i64 -16
  %wide.vec = load <4 x double>, ptr %47, align 8, !tbaa !9
  %strided.vec = shufflevector <4 x double> %wide.vec, <4 x double> poison, <2 x i32> <i32 0, i32 2>
  %strided.vec113 = shufflevector <4 x double> %wide.vec, <4 x double> poison, <2 x i32> <i32 1, i32 3>
  %48 = fmul <2 x double> %45, %strided.vec
  %49 = fmul <2 x double> %45, %strided.vec113
  %50 = getelementptr i8, ptr %46, i64 -16
  %interleaved.vec = shufflevector <2 x double> %48, <2 x double> %49, <4 x i32> <i32 0, i32 2, i32 1, i32 3>
  store <4 x double> %interleaved.vec, ptr %50, align 8, !tbaa !9
  %index.next = add nuw i64 %index, 2
  %51 = icmp eq i64 %index.next, %n.vec
  br i1 %51, label %middle.block, label %vector.body, !llvm.loop !14

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

scalar.ph.preheader:                              ; preds = %middle.block, %vector.memcheck, %vector.scevcheck, %.lr.ph
  %.08088.ph = phi i64 [ 1, %vector.memcheck ], [ 1, %vector.scevcheck ], [ 1, %.lr.ph ], [ %ind.end, %middle.block ]
  %52 = and i64 %indvars.iv, 1
  %lcmp.mod.not.not = icmp eq i64 %52, 0
  br i1 %lcmp.mod.not.not, label %scalar.ph.prol, label %scalar.ph.prol.loopexit

scalar.ph.prol:                                   ; preds = %scalar.ph.preheader
  %53 = getelementptr inbounds double, ptr %8, i64 %.08088.ph
  %54 = load double, ptr %53, align 8, !tbaa !9
  %55 = fmul double %36, %54
  %56 = getelementptr %struct.doublecomplex, ptr %37, i64 %.08088.ph
  %57 = getelementptr i8, ptr %56, i64 -16
  %58 = load <2 x double>, ptr %57, align 8, !tbaa !9
  %59 = insertelement <2 x double> poison, double %55, i64 0
  %60 = shufflevector <2 x double> %59, <2 x double> poison, <2 x i32> zeroinitializer
  %61 = fmul <2 x double> %60, %58
  store <2 x double> %61, ptr %57, align 8, !tbaa !9
  %62 = add nuw i64 %.08088.ph, 1
  br label %scalar.ph.prol.loopexit

scalar.ph.prol.loopexit:                          ; preds = %scalar.ph.prol, %scalar.ph.preheader
  %.08088.unr = phi i64 [ %.08088.ph, %scalar.ph.preheader ], [ %62, %scalar.ph.prol ]
  %63 = icmp eq i64 %.07890, %.08088.ph
  br i1 %63, label %.loopexit162, label %scalar.ph.preheader.new

scalar.ph.preheader.new:                          ; preds = %scalar.ph.prol.loopexit
  %invariant.gep = getelementptr i8, ptr %37, i64 -16
  br label %scalar.ph

scalar.ph:                                        ; preds = %scalar.ph, %scalar.ph.preheader.new
  %.08088 = phi i64 [ %.08088.unr, %scalar.ph.preheader.new ], [ %79, %scalar.ph ]
  %64 = getelementptr inbounds double, ptr %8, i64 %.08088
  %65 = load double, ptr %64, align 8, !tbaa !9
  %66 = fmul double %36, %65
  %gep = getelementptr %struct.doublecomplex, ptr %invariant.gep, i64 %.08088
  %67 = load <2 x double>, ptr %gep, align 8, !tbaa !9
  %68 = insertelement <2 x double> poison, double %66, i64 0
  %69 = shufflevector <2 x double> %68, <2 x double> poison, <2 x i32> zeroinitializer
  %70 = fmul <2 x double> %69, %67
  store <2 x double> %70, ptr %gep, align 8, !tbaa !9
  %71 = getelementptr double, ptr %3, i64 %.08088
  %72 = load double, ptr %71, align 8, !tbaa !9
  %73 = fmul double %36, %72
  %74 = getelementptr %struct.doublecomplex, ptr %37, i64 %.08088
  %75 = load <2 x double>, ptr %74, align 8, !tbaa !9
  %76 = insertelement <2 x double> poison, double %73, i64 0
  %77 = shufflevector <2 x double> %76, <2 x double> poison, <2 x i32> zeroinitializer
  %78 = fmul <2 x double> %77, %75
  store <2 x double> %78, ptr %74, align 8, !tbaa !9
  %79 = add nuw i64 %.08088, 2
  %exitcond.not.1 = icmp eq i64 %79, %indvars.iv
  br i1 %exitcond.not.1, label %.loopexit162, label %scalar.ph, !llvm.loop !18

.loopexit162:                                     ; preds = %scalar.ph.prol.loopexit, %scalar.ph, %middle.block
  %80 = add nuw nsw i64 %.07791, %.07890
  %81 = add nuw nsw i64 %.07890, 1
  %indvars.iv.next = add nuw i64 %indvars.iv, 1
  %exitcond99.not = icmp eq i64 %indvars.iv, %27
  %indvar.next = add i64 %indvar, 1
  %scevgep103 = getelementptr i8, ptr %scev.check.iv, i64 %34
  %scevgep105 = getelementptr i8, ptr %scev.check.iv104, i64 %32
  %scevgep111 = getelementptr i8, ptr %scev.check.iv110, i64 %29
  br i1 %exitcond99.not, label %.loopexit, label %.lr.ph, !llvm.loop !19

82:                                               ; preds = %23
  br i1 %.not8293, label %.loopexit, label %.lr.ph97

.lr.ph97:                                         ; preds = %82
  %83 = add nuw i64 %25, 1
  %scevgep115 = getelementptr i8, ptr %2, i64 8
  %scevgep129 = getelementptr i8, ptr %2, i64 16
  %invariant.gep166 = getelementptr i8, ptr %3, i64 8
  br label %84

84:                                               ; preds = %.lr.ph97, %.loopexit161
  %scev.check.iv130 = phi ptr [ %scevgep129, %.lr.ph97 ], [ %scevgep131, %.loopexit161 ]
  %scev.check.iv123 = phi ptr [ %2, %.lr.ph97 ], [ %scevgep124, %.loopexit161 ]
  %scev.check.iv118 = phi ptr [ %scevgep115, %.lr.ph97 ], [ %scevgep119, %.loopexit161 ]
  %indvar116 = phi i64 [ 0, %.lr.ph97 ], [ %indvar.next117, %.loopexit161 ]
  %.179.neg96 = phi i64 [ -1, %.lr.ph97 ], [ %.179.neg, %.loopexit161 ]
  %.195 = phi i64 [ 1, %.lr.ph97 ], [ %123, %.loopexit161 ]
  %.17994 = phi i64 [ 1, %.lr.ph97 ], [ %124, %.loopexit161 ]
  %smax140 = tail call i64 @llvm.smax.i64(i64 %25, i64 %.17994)
  %85 = sub i64 %smax140, %indvar116
  %86 = sub i64 %25, %indvar116
  %87 = shl i64 %86, 4
  %smax132 = tail call i64 @llvm.smax.i64(i64 %25, i64 %.17994)
  %88 = add i64 %smax132, %.179.neg96
  %89 = shl i64 %88, 4
  %scevgep133 = getelementptr i8, ptr %scev.check.iv130, i64 %89
  %90 = shl i64 %indvar116, 3
  %scevgep134 = getelementptr i8, ptr %3, i64 %90
  %gep167 = getelementptr i8, ptr %invariant.gep166, i64 %90
  %91 = shl i64 %88, 3
  %scevgep136 = getelementptr i8, ptr %gep167, i64 %91
  %92 = sub i64 %25, %indvar116
  %93 = shl i64 %92, 4
  %94 = sub i64 %25, %indvar116
  %95 = shl i64 %94, 4
  %96 = getelementptr inbounds double, ptr %8, i64 %.17994
  %97 = load double, ptr %96, align 8, !tbaa !9
  %98 = getelementptr %struct.doublecomplex, ptr %9, i64 %.195
  %99 = getelementptr %struct.doublecomplex, ptr %98, i64 %.179.neg96
  %min.iters.check143 = icmp ult i64 %85, 10
  br i1 %min.iters.check143, label %scalar.ph142.preheader, label %vector.scevcheck114

vector.scevcheck114:                              ; preds = %84
  %smax = tail call i64 @llvm.smax.i64(i64 %25, i64 %.17994)
  %100 = add i64 %smax, %.179.neg96
  %mul.result121 = shl i64 %100, 4
  %101 = getelementptr i8, ptr %scev.check.iv118, i64 %mul.result121
  %102 = icmp ult ptr %101, %scev.check.iv118
  %mul.result126 = shl i64 %100, 4
  %mul.overflow127 = icmp ugt i64 %100, 1152921504606846975
  %103 = getelementptr i8, ptr %scev.check.iv123, i64 %mul.result126
  %104 = icmp ult ptr %103, %scev.check.iv123
  %105 = or i1 %104, %mul.overflow127
  %106 = or i1 %102, %105
  br i1 %106, label %scalar.ph142.preheader, label %vector.memcheck128

vector.memcheck128:                               ; preds = %vector.scevcheck114
  %bound0137 = icmp ult ptr %scev.check.iv123, %scevgep136
  %bound1138 = icmp ult ptr %scevgep134, %scevgep133
  %found.conflict139 = and i1 %bound0137, %bound1138
  br i1 %found.conflict139, label %scalar.ph142.preheader, label %vector.ph144

vector.ph144:                                     ; preds = %vector.memcheck128
  %n.vec146 = and i64 %85, -2
  %ind.end147 = add i64 %.17994, %n.vec146
  %broadcast.splatinsert153 = insertelement <2 x double> poison, double %97, i64 0
  %broadcast.splat154 = shufflevector <2 x double> %broadcast.splatinsert153, <2 x double> poison, <2 x i32> zeroinitializer
  br label %vector.body149

vector.body149:                                   ; preds = %vector.body149, %vector.ph144
  %index150 = phi i64 [ 0, %vector.ph144 ], [ %index.next159, %vector.body149 ]
  %offset.idx151 = add i64 %.17994, %index150
  %107 = getelementptr inbounds double, ptr %8, i64 %offset.idx151
  %wide.load152 = load <2 x double>, ptr %107, align 8, !tbaa !9, !alias.scope !20
  %108 = fmul <2 x double> %broadcast.splat154, %wide.load152
  %109 = getelementptr %struct.doublecomplex, ptr %99, i64 %offset.idx151
  %wide.vec155 = load <4 x double>, ptr %109, align 8, !tbaa !9
  %strided.vec156 = shufflevector <4 x double> %wide.vec155, <4 x double> poison, <2 x i32> <i32 0, i32 2>
  %strided.vec157 = shufflevector <4 x double> %wide.vec155, <4 x double> poison, <2 x i32> <i32 1, i32 3>
  %110 = fmul <2 x double> %108, %strided.vec156
  %111 = fmul <2 x double> %108, %strided.vec157
  %interleaved.vec158 = shufflevector <2 x double> %110, <2 x double> %111, <4 x i32> <i32 0, i32 2, i32 1, i32 3>
  store <4 x double> %interleaved.vec158, ptr %109, align 8, !tbaa !9
  %index.next159 = add nuw i64 %index150, 2
  %112 = icmp eq i64 %index.next159, %n.vec146
  br i1 %112, label %middle.block141, label %vector.body149, !llvm.loop !23

middle.block141:                                  ; preds = %vector.body149
  %cmp.n160 = icmp eq i64 %85, %n.vec146
  br i1 %cmp.n160, label %.loopexit161, label %scalar.ph142.preheader

scalar.ph142.preheader:                           ; preds = %middle.block141, %vector.memcheck128, %vector.scevcheck114, %84
  %.18192.ph = phi i64 [ %.17994, %vector.memcheck128 ], [ %.17994, %vector.scevcheck114 ], [ %.17994, %84 ], [ %ind.end147, %middle.block141 ]
  br label %scalar.ph142

scalar.ph142:                                     ; preds = %scalar.ph142.preheader, %scalar.ph142
  %.18192 = phi i64 [ %121, %scalar.ph142 ], [ %.18192.ph, %scalar.ph142.preheader ]
  %113 = getelementptr inbounds double, ptr %8, i64 %.18192
  %114 = load double, ptr %113, align 8, !tbaa !9
  %115 = fmul double %97, %114
  %116 = getelementptr %struct.doublecomplex, ptr %99, i64 %.18192
  %117 = load <2 x double>, ptr %116, align 8, !tbaa !9
  %118 = insertelement <2 x double> poison, double %115, i64 0
  %119 = shufflevector <2 x double> %118, <2 x double> poison, <2 x i32> zeroinitializer
  %120 = fmul <2 x double> %119, %117
  store <2 x double> %120, ptr %116, align 8, !tbaa !9
  %121 = add nuw nsw i64 %.18192, 1
  %.not83.not = icmp slt i64 %.18192, %25
  br i1 %.not83.not, label %scalar.ph142, label %.loopexit161, !llvm.loop !24

.loopexit161:                                     ; preds = %scalar.ph142, %middle.block141
  %122 = add i64 %83, %.179.neg96
  %123 = add i64 %122, %.195
  %124 = add nuw i64 %.17994, 1
  %.179.neg = xor i64 %.17994, -1
  %exitcond100.not = icmp eq i64 %.17994, %25
  %indvar.next117 = add i64 %indvar116, 1
  %scevgep119 = getelementptr i8, ptr %scev.check.iv118, i64 %95
  %scevgep124 = getelementptr i8, ptr %scev.check.iv123, i64 %93
  %scevgep131 = getelementptr i8, ptr %scev.check.iv130, i64 %87
  br i1 %exitcond100.not, label %.loopexit, label %84, !llvm.loop !25

.loopexit:                                        ; preds = %.loopexit162, %.loopexit161, %26, %82, %17, %7
  %storemerge86 = phi i8 [ 78, %7 ], [ 78, %17 ], [ 89, %82 ], [ 89, %26 ], [ 89, %.loopexit161 ], [ 89, %.loopexit162 ]
  store i8 %storemerge86, ptr %6, align 1, !tbaa !26
  ret i32 0
}

declare double @dlamch_(ptr noundef) local_unnamed_addr #1

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i64 @llvm.smax.i64(i64, i64) #2

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

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

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


; Effective O3 passes: EarlyCSEPass,GlobalDCEPass,GlobalOptPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,PostOrderFunctionAttrsPass,ReassociatePass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass