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

; 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 [7 x i8], align 1
@c__1 = external hidden global i32, align 4

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

33:                                               ; preds = %7
  %34 = load ptr, ptr %14, align 8, !tbaa !5
  store i32 -1, ptr %34, align 4, !tbaa !9
  br label %42

35:                                               ; preds = %7
  %36 = load ptr, ptr %11, align 8, !tbaa !5
  %37 = load double, ptr %36, align 8, !tbaa !11
  %38 = fcmp olt double %37, 0.000000e+00
  br i1 %38, label %39, label %41

39:                                               ; preds = %35
  %40 = load ptr, ptr %14, align 8, !tbaa !5
  store i32 -4, ptr %40, align 4, !tbaa !9
  br label %41

41:                                               ; preds = %39, %35
  br label %42

42:                                               ; preds = %41, %33
  %43 = load ptr, ptr %14, align 8, !tbaa !5
  %44 = load i32, ptr %43, align 4, !tbaa !9
  %45 = icmp ne i32 %44, 0
  br i1 %45, label %46, label %51

46:                                               ; preds = %42
  %47 = load ptr, ptr %14, align 8, !tbaa !5
  %48 = load i32, ptr %47, align 4, !tbaa !9
  %49 = sub nsw i32 0, %48
  store i32 %49, ptr %15, align 4, !tbaa !9
  %50 = call i32 @xerbla_(ptr noundef @.str, ptr noundef %15, i32 noundef 6)
  store i32 1, ptr %20, align 4
  br label %211

51:                                               ; preds = %42
  %52 = load ptr, ptr %12, align 8, !tbaa !5
  store double 0.000000e+00, ptr %52, align 8, !tbaa !11
  %53 = load ptr, ptr %8, align 8, !tbaa !5
  %54 = load i32, ptr %53, align 4, !tbaa !9
  %55 = icmp eq i32 %54, 0
  br i1 %55, label %56, label %58

56:                                               ; preds = %51
  %57 = load ptr, ptr %12, align 8, !tbaa !5
  store double 1.000000e+00, ptr %57, align 8, !tbaa !11
  store i32 1, ptr %20, align 4
  br label %211

58:                                               ; preds = %51
  %59 = load ptr, ptr %11, align 8, !tbaa !5
  %60 = load double, ptr %59, align 8, !tbaa !11
  %61 = fcmp oeq double %60, 0.000000e+00
  br i1 %61, label %62, label %63

62:                                               ; preds = %58
  store i32 1, ptr %20, align 4
  br label %211

63:                                               ; preds = %58
  br label %64

64:                                               ; preds = %63
  %65 = load ptr, ptr %8, align 8, !tbaa !5
  %66 = load i32, ptr %65, align 4, !tbaa !9
  store i32 %66, ptr %15, align 4, !tbaa !9
  store i32 1, ptr %17, align 4, !tbaa !9
  br label %67

67:                                               ; preds = %80, %64
  %68 = load i32, ptr %17, align 4, !tbaa !9
  %69 = load i32, ptr %15, align 4, !tbaa !9
  %70 = icmp sle i32 %68, %69
  br i1 %70, label %71, label %83

71:                                               ; preds = %67
  %72 = load ptr, ptr %9, align 8, !tbaa !5
  %73 = load i32, ptr %17, align 4, !tbaa !9
  %74 = sext i32 %73 to i64
  %75 = getelementptr inbounds double, ptr %72, i64 %74
  %76 = load double, ptr %75, align 8, !tbaa !11
  %77 = fcmp ole double %76, 0.000000e+00
  br i1 %77, label %78, label %79

78:                                               ; preds = %71
  store i32 1, ptr %20, align 4
  br label %211

79:                                               ; preds = %71
  br label %80

80:                                               ; preds = %79
  %81 = load i32, ptr %17, align 4, !tbaa !9
  %82 = add nsw i32 %81, 1
  store i32 %82, ptr %17, align 4, !tbaa !9
  br label %67, !llvm.loop !13

83:                                               ; preds = %67
  %84 = load ptr, ptr %13, align 8, !tbaa !5
  %85 = getelementptr inbounds double, ptr %84, i64 1
  store double 1.000000e+00, ptr %85, align 8, !tbaa !11
  %86 = load ptr, ptr %8, align 8, !tbaa !5
  %87 = load i32, ptr %86, align 4, !tbaa !9
  store i32 %87, ptr %15, align 4, !tbaa !9
  store i32 2, ptr %17, align 4, !tbaa !9
  br label %88

88:                                               ; preds = %119, %83
  %89 = load i32, ptr %17, align 4, !tbaa !9
  %90 = load i32, ptr %15, align 4, !tbaa !9
  %91 = icmp sle i32 %89, %90
  br i1 %91, label %92, label %122

92:                                               ; preds = %88
  %93 = load ptr, ptr %13, align 8, !tbaa !5
  %94 = load i32, ptr %17, align 4, !tbaa !9
  %95 = sub nsw i32 %94, 1
  %96 = sext i32 %95 to i64
  %97 = getelementptr inbounds double, ptr %93, i64 %96
  %98 = load double, ptr %97, align 8, !tbaa !11
  %99 = load ptr, ptr %10, align 8, !tbaa !5
  %100 = load i32, ptr %17, align 4, !tbaa !9
  %101 = sub nsw i32 %100, 1
  %102 = sext i32 %101 to i64
  %103 = getelementptr inbounds %struct.doublecomplex, ptr %99, i64 %102
  %104 = call { double, double } @Cd(ptr noundef %103)
  %105 = extractvalue { double, double } %104, 0
  %106 = extractvalue { double, double } %104, 1
  %107 = getelementptr inbounds { double, double }, ptr %21, i32 0, i32 0
  %108 = getelementptr inbounds { double, double }, ptr %21, i32 0, i32 1
  store double %105, ptr %107, align 8
  store double %106, ptr %108, align 8
  %109 = getelementptr inbounds { double, double }, ptr %21, i32 0, i32 0
  %110 = load double, ptr %109, align 8
  %111 = getelementptr inbounds { double, double }, ptr %21, i32 0, i32 1
  %112 = load double, ptr %111, align 8
  %113 = call double @cabs(double noundef %110, double noundef %112) #6
  %114 = call double @llvm.fmuladd.f64(double %98, double %113, double 1.000000e+00)
  %115 = load ptr, ptr %13, align 8, !tbaa !5
  %116 = load i32, ptr %17, align 4, !tbaa !9
  %117 = sext i32 %116 to i64
  %118 = getelementptr inbounds double, ptr %115, i64 %117
  store double %114, ptr %118, align 8, !tbaa !11
  br label %119

119:                                              ; preds = %92
  %120 = load i32, ptr %17, align 4, !tbaa !9
  %121 = add nsw i32 %120, 1
  store i32 %121, ptr %17, align 4, !tbaa !9
  br label %88, !llvm.loop !15

122:                                              ; preds = %88
  %123 = load ptr, ptr %9, align 8, !tbaa !5
  %124 = load ptr, ptr %8, align 8, !tbaa !5
  %125 = load i32, ptr %124, align 4, !tbaa !9
  %126 = sext i32 %125 to i64
  %127 = getelementptr inbounds double, ptr %123, i64 %126
  %128 = load double, ptr %127, align 8, !tbaa !11
  %129 = load ptr, ptr %13, align 8, !tbaa !5
  %130 = load ptr, ptr %8, align 8, !tbaa !5
  %131 = load i32, ptr %130, align 4, !tbaa !9
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds double, ptr %129, i64 %132
  %134 = load double, ptr %133, align 8, !tbaa !11
  %135 = fdiv double %134, %128
  store double %135, ptr %133, align 8, !tbaa !11
  %136 = load ptr, ptr %8, align 8, !tbaa !5
  %137 = load i32, ptr %136, align 4, !tbaa !9
  %138 = sub nsw i32 %137, 1
  store i32 %138, ptr %17, align 4, !tbaa !9
  br label %139

139:                                              ; preds = %179, %122
  %140 = load i32, ptr %17, align 4, !tbaa !9
  %141 = icmp sge i32 %140, 1
  br i1 %141, label %142, label %182

142:                                              ; preds = %139
  %143 = load ptr, ptr %13, align 8, !tbaa !5
  %144 = load i32, ptr %17, align 4, !tbaa !9
  %145 = sext i32 %144 to i64
  %146 = getelementptr inbounds double, ptr %143, i64 %145
  %147 = load double, ptr %146, align 8, !tbaa !11
  %148 = load ptr, ptr %9, align 8, !tbaa !5
  %149 = load i32, ptr %17, align 4, !tbaa !9
  %150 = sext i32 %149 to i64
  %151 = getelementptr inbounds double, ptr %148, i64 %150
  %152 = load double, ptr %151, align 8, !tbaa !11
  %153 = fdiv double %147, %152
  %154 = load ptr, ptr %13, align 8, !tbaa !5
  %155 = load i32, ptr %17, align 4, !tbaa !9
  %156 = add nsw i32 %155, 1
  %157 = sext i32 %156 to i64
  %158 = getelementptr inbounds double, ptr %154, i64 %157
  %159 = load double, ptr %158, align 8, !tbaa !11
  %160 = load ptr, ptr %10, align 8, !tbaa !5
  %161 = load i32, ptr %17, align 4, !tbaa !9
  %162 = sext i32 %161 to i64
  %163 = getelementptr inbounds %struct.doublecomplex, ptr %160, i64 %162
  %164 = call { double, double } @Cd(ptr noundef %163)
  %165 = extractvalue { double, double } %164, 0
  %166 = extractvalue { double, double } %164, 1
  %167 = getelementptr inbounds { double, double }, ptr %22, i32 0, i32 0
  %168 = getelementptr inbounds { double, double }, ptr %22, i32 0, i32 1
  store double %165, ptr %167, align 8
  store double %166, ptr %168, align 8
  %169 = getelementptr inbounds { double, double }, ptr %22, i32 0, i32 0
  %170 = load double, ptr %169, align 8
  %171 = getelementptr inbounds { double, double }, ptr %22, i32 0, i32 1
  %172 = load double, ptr %171, align 8
  %173 = call double @cabs(double noundef %170, double noundef %172) #6
  %174 = call double @llvm.fmuladd.f64(double %159, double %173, double %153)
  %175 = load ptr, ptr %13, align 8, !tbaa !5
  %176 = load i32, ptr %17, align 4, !tbaa !9
  %177 = sext i32 %176 to i64
  %178 = getelementptr inbounds double, ptr %175, i64 %177
  store double %174, ptr %178, align 8, !tbaa !11
  br label %179

179:                                              ; preds = %142
  %180 = load i32, ptr %17, align 4, !tbaa !9
  %181 = add nsw i32 %180, -1
  store i32 %181, ptr %17, align 4, !tbaa !9
  br label %139, !llvm.loop !16

182:                                              ; preds = %139
  %183 = load ptr, ptr %8, align 8, !tbaa !5
  %184 = load ptr, ptr %13, align 8, !tbaa !5
  %185 = getelementptr inbounds double, ptr %184, i64 1
  %186 = call i32 @idamax_(ptr noundef %183, ptr noundef %185, ptr noundef @c__1)
  store i32 %186, ptr %18, align 4, !tbaa !9
  %187 = load ptr, ptr %13, align 8, !tbaa !5
  %188 = load i32, ptr %18, align 4, !tbaa !9
  %189 = sext i32 %188 to i64
  %190 = getelementptr inbounds double, ptr %187, i64 %189
  %191 = load double, ptr %190, align 8, !tbaa !11
  store double %191, ptr %16, align 8, !tbaa !11
  %192 = load double, ptr %16, align 8, !tbaa !11
  %193 = fcmp oge double %192, 0.000000e+00
  br i1 %193, label %194, label %196

194:                                              ; preds = %182
  %195 = load double, ptr %16, align 8, !tbaa !11
  br label %199

196:                                              ; preds = %182
  %197 = load double, ptr %16, align 8, !tbaa !11
  %198 = fneg double %197
  br label %199

199:                                              ; preds = %196, %194
  %200 = phi double [ %195, %194 ], [ %198, %196 ]
  store double %200, ptr %19, align 8, !tbaa !11
  %201 = load double, ptr %19, align 8, !tbaa !11
  %202 = fcmp une double %201, 0.000000e+00
  br i1 %202, label %203, label %210

203:                                              ; preds = %199
  %204 = load double, ptr %19, align 8, !tbaa !11
  %205 = fdiv double 1.000000e+00, %204
  %206 = load ptr, ptr %11, align 8, !tbaa !5
  %207 = load double, ptr %206, align 8, !tbaa !11
  %208 = fdiv double %205, %207
  %209 = load ptr, ptr %12, align 8, !tbaa !5
  store double %208, ptr %209, align 8, !tbaa !11
  br label %210

210:                                              ; preds = %203, %199
  store i32 1, ptr %20, align 4
  br label %211

211:                                              ; preds = %210, %78, %62, %56, %46
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #6
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #6
  ret void
}

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

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

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #5

declare i32 @idamax_(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 "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nounwind }

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

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


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

%struct.doublecomplex = type { double, double }

@.str = external hidden unnamed_addr constant [7 x i8], align 1
@c__1 = external hidden global i32, align 4

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

14:                                               ; preds = %7
  %15 = load double, ptr %3, align 8, !tbaa !9
  %16 = fcmp olt double %15, 0.000000e+00
  br i1 %16, label %.thread, label %19

.thread:                                          ; preds = %14, %7
  %storemerge = phi i32 [ -1, %7 ], [ -4, %14 ]
  store i32 %storemerge, ptr %6, align 4, !tbaa !5
  %17 = sub nsw i32 0, %storemerge
  store i32 %17, ptr %8, align 4, !tbaa !5
  %18 = call i32 @xerbla_(ptr noundef nonnull @.str, ptr noundef nonnull %8, i32 noundef 6) #6
  br label %.loopexit

19:                                               ; preds = %14
  store double 0.000000e+00, ptr %4, align 8, !tbaa !9
  %20 = icmp eq i32 %12, 0
  br i1 %20, label %21, label %22

21:                                               ; preds = %19
  store double 1.000000e+00, ptr %4, align 8, !tbaa !9
  br label %.loopexit

22:                                               ; preds = %19
  %23 = load double, ptr %3, align 8, !tbaa !9
  %24 = fcmp oeq double %23, 0.000000e+00
  br i1 %24, label %.loopexit, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %22
  %25 = add nuw i32 %12, 1
  %wide.trip.count = zext i32 %25 to i64
  br label %.lr.ph

26:                                               ; preds = %.lr.ph
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %exitcond.not = icmp eq i64 %indvars.iv.next, %wide.trip.count
  br i1 %exitcond.not, label %._crit_edge, label %.lr.ph, !llvm.loop !11

.lr.ph:                                           ; preds = %.lr.ph.preheader, %26
  %indvars.iv = phi i64 [ 1, %.lr.ph.preheader ], [ %indvars.iv.next, %26 ]
  %27 = getelementptr inbounds double, ptr %11, i64 %indvars.iv
  %28 = load double, ptr %27, align 8, !tbaa !9
  %29 = fcmp ugt double %28, 0.000000e+00
  br i1 %29, label %26, label %.loopexit

._crit_edge:                                      ; preds = %26
  store double 1.000000e+00, ptr %5, align 8, !tbaa !9
  %.not6266 = icmp slt i32 %12, 2
  br i1 %.not6266, label %._crit_edge70.thread, label %.lr.ph69.preheader

._crit_edge70.thread:                             ; preds = %._crit_edge
  %30 = zext nneg i32 %12 to i64
  %31 = getelementptr inbounds double, ptr %11, i64 %30
  %32 = load double, ptr %31, align 8, !tbaa !9
  %33 = getelementptr inbounds double, ptr %9, i64 %30
  %34 = load double, ptr %33, align 8, !tbaa !9
  %35 = fdiv double %34, %32
  store double %35, ptr %33, align 8, !tbaa !9
  br label %._crit_edge74

.lr.ph69.preheader:                               ; preds = %._crit_edge
  %36 = add nuw i32 %12, 1
  %wide.trip.count79 = zext i32 %36 to i64
  %invariant.gep = getelementptr i8, ptr %2, i64 -32
  br label %.lr.ph69

.lr.ph69:                                         ; preds = %.lr.ph69.preheader, %.lr.ph69
  %37 = phi double [ 1.000000e+00, %.lr.ph69.preheader ], [ %42, %.lr.ph69 ]
  %indvars.iv76 = phi i64 [ 2, %.lr.ph69.preheader ], [ %indvars.iv.next77, %.lr.ph69 ]
  %gep = getelementptr %struct.doublecomplex, ptr %invariant.gep, i64 %indvars.iv76
  %38 = tail call { double, double } @Cd(ptr noundef nonnull %gep)
  %39 = extractvalue { double, double } %38, 0
  %40 = extractvalue { double, double } %38, 1
  %41 = tail call double @cabs(double noundef %39, double noundef %40) #6
  %42 = tail call double @llvm.fmuladd.f64(double %37, double %41, double 1.000000e+00)
  %43 = getelementptr inbounds double, ptr %9, i64 %indvars.iv76
  store double %42, ptr %43, align 8, !tbaa !9
  %indvars.iv.next77 = add nuw nsw i64 %indvars.iv76, 1
  %exitcond80.not = icmp eq i64 %indvars.iv.next77, %wide.trip.count79
  br i1 %exitcond80.not, label %._crit_edge70, label %.lr.ph69, !llvm.loop !13

._crit_edge70:                                    ; preds = %.lr.ph69
  %.pre84 = load i32, ptr %0, align 4, !tbaa !5
  %44 = sext i32 %.pre84 to i64
  %45 = getelementptr inbounds double, ptr %11, i64 %44
  %46 = load double, ptr %45, align 8, !tbaa !9
  %47 = getelementptr inbounds double, ptr %9, i64 %44
  %48 = load double, ptr %47, align 8, !tbaa !9
  %49 = fdiv double %48, %46
  store double %49, ptr %47, align 8, !tbaa !9
  %50 = icmp sgt i32 %.pre84, 1
  br i1 %50, label %.lr.ph73.preheader, label %._crit_edge74

.lr.ph73.preheader:                               ; preds = %._crit_edge70
  %51 = zext nneg i32 %.pre84 to i64
  %.phi.trans.insert85 = getelementptr inbounds double, ptr %9, i64 %51
  %.pre86 = load double, ptr %.phi.trans.insert85, align 8, !tbaa !9
  br label %.lr.ph73

.lr.ph73:                                         ; preds = %.lr.ph73.preheader, %.lr.ph73
  %52 = phi double [ %.pre86, %.lr.ph73.preheader ], [ %63, %.lr.ph73 ]
  %indvars.iv81 = phi i64 [ %51, %.lr.ph73.preheader ], [ %indvars.iv.next82, %.lr.ph73 ]
  %indvars.iv.next82 = add nsw i64 %indvars.iv81, -1
  %53 = getelementptr inbounds double, ptr %9, i64 %indvars.iv.next82
  %54 = load double, ptr %53, align 8, !tbaa !9
  %55 = getelementptr inbounds double, ptr %11, i64 %indvars.iv.next82
  %56 = load double, ptr %55, align 8, !tbaa !9
  %57 = fdiv double %54, %56
  %58 = getelementptr inbounds %struct.doublecomplex, ptr %10, i64 %indvars.iv.next82
  %59 = tail call { double, double } @Cd(ptr noundef nonnull %58)
  %60 = extractvalue { double, double } %59, 0
  %61 = extractvalue { double, double } %59, 1
  %62 = tail call double @cabs(double noundef %60, double noundef %61) #6
  %63 = tail call double @llvm.fmuladd.f64(double %52, double %62, double %57)
  store double %63, ptr %53, align 8, !tbaa !9
  %64 = icmp ugt i64 %indvars.iv81, 2
  br i1 %64, label %.lr.ph73, label %._crit_edge74, !llvm.loop !14

._crit_edge74:                                    ; preds = %.lr.ph73, %._crit_edge70.thread, %._crit_edge70
  %65 = tail call i32 @idamax_(ptr noundef nonnull %0, ptr noundef nonnull %5, ptr noundef nonnull @c__1) #6
  %66 = sext i32 %65 to i64
  %67 = getelementptr inbounds double, ptr %9, i64 %66
  %68 = load double, ptr %67, align 8, !tbaa !9
  %69 = fcmp une double %68, 0.000000e+00
  br i1 %69, label %70, label %.loopexit

70:                                               ; preds = %._crit_edge74
  %71 = fcmp oge double %68, 0.000000e+00
  %72 = fneg double %68
  %73 = select i1 %71, double %68, double %72
  %74 = fdiv double 1.000000e+00, %73
  %75 = load double, ptr %3, align 8, !tbaa !9
  %76 = fdiv double %74, %75
  store double %76, ptr %4, align 8, !tbaa !9
  br label %.loopexit

.loopexit:                                        ; preds = %.lr.ph, %._crit_edge74, %70, %22, %21, %.thread
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #6
  ret void
}

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

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

; Function Attrs: nofree nounwind
declare double @cabs(double noundef, double noundef) local_unnamed_addr #3

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

; Function Attrs: mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare double @llvm.fmuladd.f64(double, double, double) #5

declare i32 @idamax_(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

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 = { nofree nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { inlinehint nounwind uwtable "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #5 = { mustprogress nocallback nofree nosync nounwind speculatable willreturn memory(none) }
attributes #6 = { nounwind }

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

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


; Effective O3 passes: BDCEPass,CorrelatedValuePropagationPass,DSEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,IndVarSimplifyPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,PostOrderFunctionAttrsPass,SCCPPass,SROAPass,SimplifyCFGPass,TailCallElimPass