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

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

45:                                               ; preds = %8
  %46 = load ptr, ptr %17, align 8, !tbaa !5
  store i8 78, ptr %46, align 1, !tbaa !11
  store i32 0, ptr %9, align 4
  store i32 1, ptr %31, align 4
  br label %217

47:                                               ; preds = %8
  %48 = call double @dlamch_(ptr noundef @.str)
  %49 = call double @dlamch_(ptr noundef @.str.1)
  %50 = fdiv double %48, %49
  store double %50, ptr %30, align 8, !tbaa !12
  %51 = load double, ptr %30, align 8, !tbaa !12
  %52 = fdiv double 1.000000e+00, %51
  store double %52, ptr %29, align 8, !tbaa !12
  %53 = load ptr, ptr %15, align 8, !tbaa !5
  %54 = load double, ptr %53, align 8, !tbaa !12
  %55 = fcmp oge double %54, 1.000000e-01
  br i1 %55, label %56, label %68

56:                                               ; preds = %47
  %57 = load ptr, ptr %16, align 8, !tbaa !5
  %58 = load double, ptr %57, align 8, !tbaa !12
  %59 = load double, ptr %30, align 8, !tbaa !12
  %60 = fcmp oge double %58, %59
  br i1 %60, label %61, label %68

61:                                               ; preds = %56
  %62 = load ptr, ptr %16, align 8, !tbaa !5
  %63 = load double, ptr %62, align 8, !tbaa !12
  %64 = load double, ptr %29, align 8, !tbaa !12
  %65 = fcmp ole double %63, %64
  br i1 %65, label %66, label %68

66:                                               ; preds = %61
  %67 = load ptr, ptr %17, align 8, !tbaa !5
  store i8 78, ptr %67, align 1, !tbaa !11
  br label %216

68:                                               ; preds = %61, %56, %47
  %69 = load ptr, ptr %10, align 8, !tbaa !5
  %70 = call i64 @lsame_(ptr noundef %69, ptr noundef @.str.2)
  %71 = icmp ne i64 %70, 0
  br i1 %71, label %72, label %142

72:                                               ; preds = %68
  %73 = load ptr, ptr %11, align 8, !tbaa !5
  %74 = load i64, ptr %73, align 8, !tbaa !9
  store i64 %74, ptr %20, align 8, !tbaa !9
  store i64 1, ptr %27, align 8, !tbaa !9
  br label %75

75:                                               ; preds = %138, %72
  %76 = load i64, ptr %27, align 8, !tbaa !9
  %77 = load i64, ptr %20, align 8, !tbaa !9
  %78 = icmp sle i64 %76, %77
  br i1 %78, label %79, label %141

79:                                               ; preds = %75
  %80 = load ptr, ptr %14, align 8, !tbaa !5
  %81 = load i64, ptr %27, align 8, !tbaa !9
  %82 = getelementptr inbounds double, ptr %80, i64 %81
  %83 = load double, ptr %82, align 8, !tbaa !12
  store double %83, ptr %28, align 8, !tbaa !12
  %84 = load i64, ptr %27, align 8, !tbaa !9
  store i64 %84, ptr %21, align 8, !tbaa !9
  store i64 1, ptr %26, align 8, !tbaa !9
  br label %85

85:                                               ; preds = %134, %79
  %86 = load i64, ptr %26, align 8, !tbaa !9
  %87 = load i64, ptr %21, align 8, !tbaa !9
  %88 = icmp sle i64 %86, %87
  br i1 %88, label %89, label %137

89:                                               ; preds = %85
  %90 = load i64, ptr %26, align 8, !tbaa !9
  %91 = load i64, ptr %27, align 8, !tbaa !9
  %92 = load i64, ptr %18, align 8, !tbaa !9
  %93 = mul nsw i64 %91, %92
  %94 = add nsw i64 %90, %93
  store i64 %94, ptr %22, align 8, !tbaa !9
  %95 = load double, ptr %28, align 8, !tbaa !12
  %96 = load ptr, ptr %14, align 8, !tbaa !5
  %97 = load i64, ptr %26, align 8, !tbaa !9
  %98 = getelementptr inbounds double, ptr %96, i64 %97
  %99 = load double, ptr %98, align 8, !tbaa !12
  %100 = fmul double %95, %99
  store double %100, ptr %24, align 8, !tbaa !12
  %101 = load i64, ptr %26, align 8, !tbaa !9
  %102 = load i64, ptr %27, align 8, !tbaa !9
  %103 = load i64, ptr %18, align 8, !tbaa !9
  %104 = mul nsw i64 %102, %103
  %105 = add nsw i64 %101, %104
  store i64 %105, ptr %23, align 8, !tbaa !9
  %106 = load double, ptr %24, align 8, !tbaa !12
  %107 = load ptr, ptr %12, align 8, !tbaa !5
  %108 = load i64, ptr %23, align 8, !tbaa !9
  %109 = getelementptr inbounds %struct.doublecomplex, ptr %107, i64 %108
  %110 = getelementptr inbounds %struct.doublecomplex, ptr %109, i32 0, i32 0
  %111 = load double, ptr %110, align 8, !tbaa !14
  %112 = fmul double %106, %111
  %113 = getelementptr inbounds %struct.doublecomplex, ptr %25, i32 0, i32 0
  store double %112, ptr %113, align 8, !tbaa !14
  %114 = load double, ptr %24, align 8, !tbaa !12
  %115 = load ptr, ptr %12, align 8, !tbaa !5
  %116 = load i64, ptr %23, align 8, !tbaa !9
  %117 = getelementptr inbounds %struct.doublecomplex, ptr %115, i64 %116
  %118 = getelementptr inbounds %struct.doublecomplex, ptr %117, i32 0, i32 1
  %119 = load double, ptr %118, align 8, !tbaa !16
  %120 = fmul double %114, %119
  %121 = getelementptr inbounds %struct.doublecomplex, ptr %25, i32 0, i32 1
  store double %120, ptr %121, align 8, !tbaa !16
  %122 = getelementptr inbounds %struct.doublecomplex, ptr %25, i32 0, i32 0
  %123 = load double, ptr %122, align 8, !tbaa !14
  %124 = load ptr, ptr %12, align 8, !tbaa !5
  %125 = load i64, ptr %22, align 8, !tbaa !9
  %126 = getelementptr inbounds %struct.doublecomplex, ptr %124, i64 %125
  %127 = getelementptr inbounds %struct.doublecomplex, ptr %126, i32 0, i32 0
  store double %123, ptr %127, align 8, !tbaa !14
  %128 = getelementptr inbounds %struct.doublecomplex, ptr %25, i32 0, i32 1
  %129 = load double, ptr %128, align 8, !tbaa !16
  %130 = load ptr, ptr %12, align 8, !tbaa !5
  %131 = load i64, ptr %22, align 8, !tbaa !9
  %132 = getelementptr inbounds %struct.doublecomplex, ptr %130, i64 %131
  %133 = getelementptr inbounds %struct.doublecomplex, ptr %132, i32 0, i32 1
  store double %129, ptr %133, align 8, !tbaa !16
  br label %134

134:                                              ; preds = %89
  %135 = load i64, ptr %26, align 8, !tbaa !9
  %136 = add nsw i64 %135, 1
  store i64 %136, ptr %26, align 8, !tbaa !9
  br label %85, !llvm.loop !17

137:                                              ; preds = %85
  br label %138

138:                                              ; preds = %137
  %139 = load i64, ptr %27, align 8, !tbaa !9
  %140 = add nsw i64 %139, 1
  store i64 %140, ptr %27, align 8, !tbaa !9
  br label %75, !llvm.loop !19

141:                                              ; preds = %75
  br label %214

142:                                              ; preds = %68
  %143 = load ptr, ptr %11, align 8, !tbaa !5
  %144 = load i64, ptr %143, align 8, !tbaa !9
  store i64 %144, ptr %20, align 8, !tbaa !9
  store i64 1, ptr %27, align 8, !tbaa !9
  br label %145

145:                                              ; preds = %210, %142
  %146 = load i64, ptr %27, align 8, !tbaa !9
  %147 = load i64, ptr %20, align 8, !tbaa !9
  %148 = icmp sle i64 %146, %147
  br i1 %148, label %149, label %213

149:                                              ; preds = %145
  %150 = load ptr, ptr %14, align 8, !tbaa !5
  %151 = load i64, ptr %27, align 8, !tbaa !9
  %152 = getelementptr inbounds double, ptr %150, i64 %151
  %153 = load double, ptr %152, align 8, !tbaa !12
  store double %153, ptr %28, align 8, !tbaa !12
  %154 = load ptr, ptr %11, align 8, !tbaa !5
  %155 = load i64, ptr %154, align 8, !tbaa !9
  store i64 %155, ptr %21, align 8, !tbaa !9
  %156 = load i64, ptr %27, align 8, !tbaa !9
  store i64 %156, ptr %26, align 8, !tbaa !9
  br label %157

157:                                              ; preds = %206, %149
  %158 = load i64, ptr %26, align 8, !tbaa !9
  %159 = load i64, ptr %21, align 8, !tbaa !9
  %160 = icmp sle i64 %158, %159
  br i1 %160, label %161, label %209

161:                                              ; preds = %157
  %162 = load i64, ptr %26, align 8, !tbaa !9
  %163 = load i64, ptr %27, align 8, !tbaa !9
  %164 = load i64, ptr %18, align 8, !tbaa !9
  %165 = mul nsw i64 %163, %164
  %166 = add nsw i64 %162, %165
  store i64 %166, ptr %22, align 8, !tbaa !9
  %167 = load double, ptr %28, align 8, !tbaa !12
  %168 = load ptr, ptr %14, align 8, !tbaa !5
  %169 = load i64, ptr %26, align 8, !tbaa !9
  %170 = getelementptr inbounds double, ptr %168, i64 %169
  %171 = load double, ptr %170, align 8, !tbaa !12
  %172 = fmul double %167, %171
  store double %172, ptr %24, align 8, !tbaa !12
  %173 = load i64, ptr %26, align 8, !tbaa !9
  %174 = load i64, ptr %27, align 8, !tbaa !9
  %175 = load i64, ptr %18, align 8, !tbaa !9
  %176 = mul nsw i64 %174, %175
  %177 = add nsw i64 %173, %176
  store i64 %177, ptr %23, align 8, !tbaa !9
  %178 = load double, ptr %24, align 8, !tbaa !12
  %179 = load ptr, ptr %12, align 8, !tbaa !5
  %180 = load i64, ptr %23, align 8, !tbaa !9
  %181 = getelementptr inbounds %struct.doublecomplex, ptr %179, i64 %180
  %182 = getelementptr inbounds %struct.doublecomplex, ptr %181, i32 0, i32 0
  %183 = load double, ptr %182, align 8, !tbaa !14
  %184 = fmul double %178, %183
  %185 = getelementptr inbounds %struct.doublecomplex, ptr %25, i32 0, i32 0
  store double %184, ptr %185, align 8, !tbaa !14
  %186 = load double, ptr %24, align 8, !tbaa !12
  %187 = load ptr, ptr %12, align 8, !tbaa !5
  %188 = load i64, ptr %23, align 8, !tbaa !9
  %189 = getelementptr inbounds %struct.doublecomplex, ptr %187, i64 %188
  %190 = getelementptr inbounds %struct.doublecomplex, ptr %189, i32 0, i32 1
  %191 = load double, ptr %190, align 8, !tbaa !16
  %192 = fmul double %186, %191
  %193 = getelementptr inbounds %struct.doublecomplex, ptr %25, i32 0, i32 1
  store double %192, ptr %193, align 8, !tbaa !16
  %194 = getelementptr inbounds %struct.doublecomplex, ptr %25, i32 0, i32 0
  %195 = load double, ptr %194, align 8, !tbaa !14
  %196 = load ptr, ptr %12, align 8, !tbaa !5
  %197 = load i64, ptr %22, align 8, !tbaa !9
  %198 = getelementptr inbounds %struct.doublecomplex, ptr %196, i64 %197
  %199 = getelementptr inbounds %struct.doublecomplex, ptr %198, i32 0, i32 0
  store double %195, ptr %199, align 8, !tbaa !14
  %200 = getelementptr inbounds %struct.doublecomplex, ptr %25, i32 0, i32 1
  %201 = load double, ptr %200, align 8, !tbaa !16
  %202 = load ptr, ptr %12, align 8, !tbaa !5
  %203 = load i64, ptr %22, align 8, !tbaa !9
  %204 = getelementptr inbounds %struct.doublecomplex, ptr %202, i64 %203
  %205 = getelementptr inbounds %struct.doublecomplex, ptr %204, i32 0, i32 1
  store double %201, ptr %205, align 8, !tbaa !16
  br label %206

206:                                              ; preds = %161
  %207 = load i64, ptr %26, align 8, !tbaa !9
  %208 = add nsw i64 %207, 1
  store i64 %208, ptr %26, align 8, !tbaa !9
  br label %157, !llvm.loop !20

209:                                              ; preds = %157
  br label %210

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

213:                                              ; preds = %145
  br label %214

214:                                              ; preds = %213, %141
  %215 = load ptr, ptr %17, align 8, !tbaa !5
  store i8 89, ptr %215, align 1, !tbaa !11
  br label %216

216:                                              ; preds = %214, %66
  store i32 0, ptr %9, align 4
  store i32 1, ptr %31, align 4
  br label %217

217:                                              ; preds = %216, %45
  call void @llvm.lifetime.end.p0(i64 8, ptr %30) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %29) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %28) #3
  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 16, ptr %25) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %24) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #3
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #3
  %218 = load i32, ptr %9, align 4
  ret i32 %218
}

; 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 @zlaqsy_(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 readonly %6, ptr nocapture noundef writeonly %7) local_unnamed_addr #0 {
  %9 = load i64, ptr %3, align 8, !tbaa !5
  %10 = xor i64 %9, -1
  %11 = getelementptr inbounds %struct.doublecomplex, ptr %2, i64 %10
  %12 = getelementptr inbounds i8, ptr %4, i64 -8
  %13 = load i64, ptr %1, align 8, !tbaa !5
  %14 = icmp slt i64 %13, 1
  br i1 %14, label %.loopexit, label %15

15:                                               ; preds = %8
  %16 = tail call double @dlamch_(ptr noundef nonnull @.str) #3
  %17 = tail call double @dlamch_(ptr noundef nonnull @.str.1) #3
  %18 = load double, ptr %5, align 8, !tbaa !9
  %19 = fcmp ult double %18, 1.000000e-01
  br i1 %19, label %26, label %20

20:                                               ; preds = %15
  %21 = fdiv double %16, %17
  %22 = fdiv double 1.000000e+00, %21
  %23 = load double, ptr %6, align 8, !tbaa !9
  %24 = fcmp ult double %23, %21
  %25 = fcmp ugt double %23, %22
  %or.cond = or i1 %24, %25
  br i1 %or.cond, label %26, label %.loopexit

26:                                               ; preds = %20, %15
  %27 = tail call i64 @lsame_(ptr noundef %0, ptr noundef nonnull @.str.2) #3
  %.not = icmp eq i64 %27, 0
  %28 = load i64, ptr %1, align 8, !tbaa !5
  %.not8092 = icmp slt i64 %28, 1
  br i1 %.not, label %80, label %29

29:                                               ; preds = %26
  br i1 %.not8092, label %.loopexit, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %29
  %30 = add nuw i64 %28, 1
  %31 = shl i64 %9, 4
  %32 = shl i64 %9, 4
  %33 = add i64 %32, 16
  %invariant.gep156 = getelementptr i8, ptr %2, i64 16
  %invariant.gep158 = getelementptr i8, ptr %4, i64 8
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %.loopexit152
  %indvar = phi i64 [ 0, %.lr.ph.preheader ], [ %indvar.next, %.loopexit152 ]
  %indvars.iv = phi i64 [ 2, %.lr.ph.preheader ], [ %indvars.iv.next, %.loopexit152 ]
  %.07788 = phi i64 [ 1, %.lr.ph.preheader ], [ %79, %.loopexit152 ]
  %34 = mul i64 %32, %indvar
  %scevgep104 = getelementptr i8, ptr %2, i64 %34
  %35 = mul i64 %33, %indvar
  %gep157 = getelementptr i8, ptr %invariant.gep156, i64 %35
  %36 = shl i64 %indvar, 3
  %gep159 = getelementptr i8, ptr %invariant.gep158, i64 %36
  %37 = getelementptr inbounds double, ptr %12, i64 %.07788
  %38 = load double, ptr %37, align 8, !tbaa !9
  %39 = mul nsw i64 %.07788, %9
  %invariant.gep = getelementptr %struct.doublecomplex, ptr %11, i64 %39
  %min.iters.check = icmp ult i64 %.07788, 10
  br i1 %min.iters.check, label %scalar.ph.preheader, label %vector.scevcheck

vector.scevcheck:                                 ; preds = %.lr.ph
  %40 = mul i64 %31, %indvar
  %scevgep100 = getelementptr i8, ptr %2, i64 %40
  %41 = or disjoint i64 %40, 8
  %scevgep = getelementptr i8, ptr %2, i64 %41
  %mul.result = shl i64 %indvar, 4
  %42 = getelementptr i8, ptr %scevgep, i64 %mul.result
  %43 = icmp ult ptr %42, %scevgep
  %mul.result102 = shl i64 %indvar, 4
  %mul.overflow103 = icmp ugt i64 %indvar, 1152921504606846975
  %44 = getelementptr i8, ptr %scevgep100, i64 %mul.result102
  %45 = icmp ult ptr %44, %scevgep100
  %46 = or i1 %45, %mul.overflow103
  %47 = or i1 %43, %46
  br i1 %47, label %scalar.ph.preheader, label %vector.memcheck

vector.memcheck:                                  ; preds = %vector.scevcheck
  %bound0 = icmp ult ptr %scevgep104, %gep159
  %bound1 = icmp ugt ptr %gep157, %4
  %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 %.07788, 9223372036854775806
  %ind.end = or i64 %.07788, 1
  %broadcast.splatinsert = insertelement <2 x double> poison, double %38, 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
  %48 = getelementptr double, ptr %4, i64 %index
  %wide.load = load <2 x double>, ptr %48, align 8, !tbaa !9, !alias.scope !11
  %49 = fmul <2 x double> %broadcast.splat, %wide.load
  %50 = getelementptr %struct.doublecomplex, ptr %invariant.gep, i64 %offset.idx
  %wide.vec = load <4 x double>, ptr %50, align 8, !tbaa !9
  %strided.vec = shufflevector <4 x double> %wide.vec, <4 x double> poison, <2 x i32> <i32 0, i32 2>
  %strided.vec107 = shufflevector <4 x double> %wide.vec, <4 x double> poison, <2 x i32> <i32 1, i32 3>
  %51 = fmul <2 x double> %49, %strided.vec
  %52 = fmul <2 x double> %49, %strided.vec107
  %interleaved.vec = shufflevector <2 x double> %51, <2 x double> %52, <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
  %53 = icmp eq i64 %index.next, %n.vec
  br i1 %53, label %middle.block, label %vector.body, !llvm.loop !14

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

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

scalar.ph.prol:                                   ; preds = %scalar.ph.preheader
  %55 = getelementptr inbounds double, ptr %12, i64 %.07886.ph
  %56 = load double, ptr %55, align 8, !tbaa !9
  %57 = fmul double %38, %56
  %gep.prol = getelementptr %struct.doublecomplex, ptr %invariant.gep, i64 %.07886.ph
  %58 = load <2 x double>, ptr %gep.prol, align 8, !tbaa !9
  %59 = insertelement <2 x double> poison, double %57, 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 %gep.prol, align 8, !tbaa !9
  %62 = add nuw i64 %.07886.ph, 1
  br label %scalar.ph.prol.loopexit

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

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

scalar.ph:                                        ; preds = %scalar.ph, %scalar.ph.preheader.new
  %.07886 = phi i64 [ %.07886.unr, %scalar.ph.preheader.new ], [ %78, %scalar.ph ]
  %64 = getelementptr inbounds double, ptr %12, i64 %.07886
  %65 = load double, ptr %64, align 8, !tbaa !9
  %66 = fmul double %38, %65
  %gep = getelementptr %struct.doublecomplex, ptr %invariant.gep, i64 %.07886
  %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 %4, i64 %.07886
  %72 = load double, ptr %71, align 8, !tbaa !9
  %73 = fmul double %38, %72
  %gep155 = getelementptr %struct.doublecomplex, ptr %invariant.gep154, i64 %.07886
  %74 = load <2 x double>, ptr %gep155, align 8, !tbaa !9
  %75 = insertelement <2 x double> poison, double %73, i64 0
  %76 = shufflevector <2 x double> %75, <2 x double> poison, <2 x i32> zeroinitializer
  %77 = fmul <2 x double> %76, %74
  store <2 x double> %77, ptr %gep155, align 8, !tbaa !9
  %78 = add nuw i64 %.07886, 2
  %exitcond.not.1 = icmp eq i64 %78, %indvars.iv
  br i1 %exitcond.not.1, label %.loopexit152, label %scalar.ph, !llvm.loop !18

.loopexit152:                                     ; preds = %scalar.ph.prol.loopexit, %scalar.ph, %middle.block
  %79 = add nuw nsw i64 %.07788, 1
  %indvars.iv.next = add nuw i64 %indvars.iv, 1
  %exitcond96.not = icmp eq i64 %indvars.iv, %30
  %indvar.next = add i64 %indvar, 1
  br i1 %exitcond96.not, label %.loopexit, label %.lr.ph, !llvm.loop !19

80:                                               ; preds = %26
  br i1 %.not8092, label %.loopexit, label %.lr.ph94.preheader

.lr.ph94.preheader:                               ; preds = %80
  %81 = shl i64 %9, 4
  %82 = add i64 %81, 16
  %invariant.gep160 = getelementptr i8, ptr %2, i64 16
  %invariant.gep162 = getelementptr i8, ptr %4, i64 8
  br label %.lr.ph94

.lr.ph94:                                         ; preds = %.lr.ph94.preheader, %.loopexit151
  %indvar109 = phi i64 [ 0, %.lr.ph94.preheader ], [ %indvar.next110, %.loopexit151 ]
  %.193 = phi i64 [ 1, %.lr.ph94.preheader ], [ %117, %.loopexit151 ]
  %smax130 = tail call i64 @llvm.smax.i64(i64 %28, i64 %.193)
  %83 = sub i64 %smax130, %indvar109
  %84 = mul i64 %82, %indvar109
  %scevgep120 = getelementptr i8, ptr %2, i64 %84
  %gep161 = getelementptr i8, ptr %invariant.gep160, i64 %84
  %smax122 = tail call i64 @llvm.smax.i64(i64 %28, i64 %.193)
  %85 = xor i64 %indvar109, -1
  %86 = add i64 %smax122, %85
  %87 = shl i64 %86, 4
  %scevgep123 = getelementptr i8, ptr %gep161, i64 %87
  %88 = shl i64 %indvar109, 3
  %scevgep124 = getelementptr i8, ptr %4, i64 %88
  %gep163 = getelementptr i8, ptr %invariant.gep162, i64 %88
  %89 = shl i64 %86, 3
  %scevgep126 = getelementptr i8, ptr %gep163, i64 %89
  %90 = getelementptr inbounds double, ptr %12, i64 %.193
  %91 = load double, ptr %90, align 8, !tbaa !9
  %92 = mul nsw i64 %.193, %9
  %invariant.gep90 = getelementptr %struct.doublecomplex, ptr %11, i64 %92
  %min.iters.check133 = icmp ult i64 %83, 10
  br i1 %min.iters.check133, label %scalar.ph132.preheader, label %vector.scevcheck108

vector.scevcheck108:                              ; preds = %.lr.ph94
  %93 = mul i64 %82, %indvar109
  %scevgep115 = getelementptr i8, ptr %2, i64 %93
  %94 = or disjoint i64 %93, 8
  %scevgep111 = getelementptr i8, ptr %2, i64 %94
  %smax = tail call i64 @llvm.smax.i64(i64 %28, i64 %.193)
  %95 = xor i64 %indvar109, -1
  %96 = add i64 %smax, %95
  %mul.result113 = shl i64 %96, 4
  %97 = getelementptr i8, ptr %scevgep111, i64 %mul.result113
  %98 = icmp ult ptr %97, %scevgep111
  %mul.result117 = shl i64 %96, 4
  %mul.overflow118 = icmp ugt i64 %96, 1152921504606846975
  %99 = getelementptr i8, ptr %scevgep115, i64 %mul.result117
  %100 = icmp ult ptr %99, %scevgep115
  %101 = or i1 %100, %mul.overflow118
  %102 = or i1 %98, %101
  br i1 %102, label %scalar.ph132.preheader, label %vector.memcheck119

vector.memcheck119:                               ; preds = %vector.scevcheck108
  %bound0127 = icmp ult ptr %scevgep120, %scevgep126
  %bound1128 = icmp ult ptr %scevgep124, %scevgep123
  %found.conflict129 = and i1 %bound0127, %bound1128
  br i1 %found.conflict129, label %scalar.ph132.preheader, label %vector.ph134

vector.ph134:                                     ; preds = %vector.memcheck119
  %n.vec136 = and i64 %83, -2
  %ind.end137 = add i64 %.193, %n.vec136
  %broadcast.splatinsert143 = insertelement <2 x double> poison, double %91, i64 0
  %broadcast.splat144 = shufflevector <2 x double> %broadcast.splatinsert143, <2 x double> poison, <2 x i32> zeroinitializer
  br label %vector.body139

vector.body139:                                   ; preds = %vector.body139, %vector.ph134
  %index140 = phi i64 [ 0, %vector.ph134 ], [ %index.next149, %vector.body139 ]
  %offset.idx141 = add i64 %.193, %index140
  %103 = getelementptr inbounds double, ptr %12, i64 %offset.idx141
  %wide.load142 = load <2 x double>, ptr %103, align 8, !tbaa !9, !alias.scope !20
  %104 = fmul <2 x double> %broadcast.splat144, %wide.load142
  %105 = getelementptr %struct.doublecomplex, ptr %invariant.gep90, i64 %offset.idx141
  %wide.vec145 = load <4 x double>, ptr %105, align 8, !tbaa !9
  %strided.vec146 = shufflevector <4 x double> %wide.vec145, <4 x double> poison, <2 x i32> <i32 0, i32 2>
  %strided.vec147 = shufflevector <4 x double> %wide.vec145, <4 x double> poison, <2 x i32> <i32 1, i32 3>
  %106 = fmul <2 x double> %104, %strided.vec146
  %107 = fmul <2 x double> %104, %strided.vec147
  %interleaved.vec148 = shufflevector <2 x double> %106, <2 x double> %107, <4 x i32> <i32 0, i32 2, i32 1, i32 3>
  store <4 x double> %interleaved.vec148, ptr %105, align 8, !tbaa !9
  %index.next149 = add nuw i64 %index140, 2
  %108 = icmp eq i64 %index.next149, %n.vec136
  br i1 %108, label %middle.block131, label %vector.body139, !llvm.loop !23

middle.block131:                                  ; preds = %vector.body139
  %cmp.n150 = icmp eq i64 %83, %n.vec136
  br i1 %cmp.n150, label %.loopexit151, label %scalar.ph132.preheader

scalar.ph132.preheader:                           ; preds = %middle.block131, %vector.memcheck119, %vector.scevcheck108, %.lr.ph94
  %.17989.ph = phi i64 [ %.193, %vector.memcheck119 ], [ %.193, %vector.scevcheck108 ], [ %.193, %.lr.ph94 ], [ %ind.end137, %middle.block131 ]
  br label %scalar.ph132

scalar.ph132:                                     ; preds = %scalar.ph132.preheader, %scalar.ph132
  %.17989 = phi i64 [ %116, %scalar.ph132 ], [ %.17989.ph, %scalar.ph132.preheader ]
  %109 = getelementptr inbounds double, ptr %12, i64 %.17989
  %110 = load double, ptr %109, align 8, !tbaa !9
  %111 = fmul double %91, %110
  %gep91 = getelementptr %struct.doublecomplex, ptr %invariant.gep90, i64 %.17989
  %112 = load <2 x double>, ptr %gep91, align 8, !tbaa !9
  %113 = insertelement <2 x double> poison, double %111, i64 0
  %114 = shufflevector <2 x double> %113, <2 x double> poison, <2 x i32> zeroinitializer
  %115 = fmul <2 x double> %114, %112
  store <2 x double> %115, ptr %gep91, align 8, !tbaa !9
  %116 = add nuw nsw i64 %.17989, 1
  %.not81.not = icmp slt i64 %.17989, %28
  br i1 %.not81.not, label %scalar.ph132, label %.loopexit151, !llvm.loop !24

.loopexit151:                                     ; preds = %scalar.ph132, %middle.block131
  %117 = add nuw i64 %.193, 1
  %exitcond97.not = icmp eq i64 %.193, %28
  %indvar.next110 = add i64 %indvar109, 1
  br i1 %exitcond97.not, label %.loopexit, label %.lr.ph94, !llvm.loop !25

.loopexit:                                        ; preds = %.loopexit152, %.loopexit151, %29, %80, %20, %8
  %storemerge84 = phi i8 [ 78, %8 ], [ 78, %20 ], [ 89, %80 ], [ 89, %29 ], [ 89, %.loopexit151 ], [ 89, %.loopexit152 ]
  store i8 %storemerge84, ptr %7, 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,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopLoadEliminationPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,LoopVectorizePass,PostOrderFunctionAttrsPass,SLPVectorizerPass,SROAPass,SimplifyCFGPass,TailCallElimPass