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

; 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
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1

; Function Attrs: nounwind uwtable
define dso_local void @zgeqr2_(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 i32, align 4
  %17 = alloca i32, align 4
  %18 = alloca i32, align 4
  %19 = alloca i32, align 4
  %20 = alloca %struct.doublecomplex, align 8
  %21 = alloca i32, align 4
  %22 = alloca i32, align 4
  %23 = alloca %struct.doublecomplex, align 8
  %24 = alloca i32, align 4
  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) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %16) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %17) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %18) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %19) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr %20) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %21) #4
  call void @llvm.lifetime.start.p0(i64 4, ptr %22) #4
  call void @llvm.lifetime.start.p0(i64 16, ptr %23) #4
  %25 = load ptr, ptr %11, align 8, !tbaa !5
  %26 = load i32, ptr %25, align 4, !tbaa !9
  store i32 %26, ptr %15, align 4, !tbaa !9
  %27 = load i32, ptr %15, align 4, !tbaa !9
  %28 = mul nsw i32 %27, 1
  %29 = add nsw i32 1, %28
  store i32 %29, ptr %16, align 4, !tbaa !9
  %30 = load i32, ptr %16, align 4, !tbaa !9
  %31 = load ptr, ptr %10, align 8, !tbaa !5
  %32 = sext i32 %30 to i64
  %33 = sub i64 0, %32
  %34 = getelementptr inbounds %struct.doublecomplex, ptr %31, i64 %33
  store ptr %34, ptr %10, align 8, !tbaa !5
  %35 = load ptr, ptr %12, align 8, !tbaa !5
  %36 = getelementptr inbounds %struct.doublecomplex, ptr %35, i32 -1
  store ptr %36, ptr %12, align 8, !tbaa !5
  %37 = load ptr, ptr %13, align 8, !tbaa !5
  %38 = getelementptr inbounds %struct.doublecomplex, ptr %37, i32 -1
  store ptr %38, ptr %13, align 8, !tbaa !5
  %39 = load ptr, ptr %14, align 8, !tbaa !5
  store i32 0, ptr %39, align 4, !tbaa !9
  %40 = load ptr, ptr %8, align 8, !tbaa !5
  %41 = load i32, ptr %40, align 4, !tbaa !9
  %42 = icmp slt i32 %41, 0
  br i1 %42, label %43, label %45

43:                                               ; preds = %7
  %44 = load ptr, ptr %14, align 8, !tbaa !5
  store i32 -1, ptr %44, align 4, !tbaa !9
  br label %68

45:                                               ; preds = %7
  %46 = load ptr, ptr %9, align 8, !tbaa !5
  %47 = load i32, ptr %46, align 4, !tbaa !9
  %48 = icmp slt i32 %47, 0
  br i1 %48, label %49, label %51

49:                                               ; preds = %45
  %50 = load ptr, ptr %14, align 8, !tbaa !5
  store i32 -2, ptr %50, align 4, !tbaa !9
  br label %67

51:                                               ; preds = %45
  %52 = load ptr, ptr %11, align 8, !tbaa !5
  %53 = load i32, ptr %52, align 4, !tbaa !9
  %54 = load ptr, ptr %8, align 8, !tbaa !5
  %55 = load i32, ptr %54, align 4, !tbaa !9
  %56 = icmp sge i32 1, %55
  br i1 %56, label %57, label %58

57:                                               ; preds = %51
  br label %61

58:                                               ; preds = %51
  %59 = load ptr, ptr %8, align 8, !tbaa !5
  %60 = load i32, ptr %59, align 4, !tbaa !9
  br label %61

61:                                               ; preds = %58, %57
  %62 = phi i32 [ 1, %57 ], [ %60, %58 ]
  %63 = icmp slt i32 %53, %62
  br i1 %63, label %64, label %66

64:                                               ; preds = %61
  %65 = load ptr, ptr %14, align 8, !tbaa !5
  store i32 -4, ptr %65, align 4, !tbaa !9
  br label %66

66:                                               ; preds = %64, %61
  br label %67

67:                                               ; preds = %66, %49
  br label %68

68:                                               ; preds = %67, %43
  %69 = load ptr, ptr %14, align 8, !tbaa !5
  %70 = load i32, ptr %69, align 4, !tbaa !9
  %71 = icmp ne i32 %70, 0
  br i1 %71, label %72, label %77

72:                                               ; preds = %68
  %73 = load ptr, ptr %14, align 8, !tbaa !5
  %74 = load i32, ptr %73, align 4, !tbaa !9
  %75 = sub nsw i32 0, %74
  store i32 %75, ptr %17, align 4, !tbaa !9
  %76 = call i32 @xerbla_(ptr noundef @.str, ptr noundef %17, i32 noundef 6)
  store i32 1, ptr %24, align 4
  br label %237

77:                                               ; preds = %68
  %78 = load ptr, ptr %8, align 8, !tbaa !5
  %79 = load i32, ptr %78, align 4, !tbaa !9
  %80 = load ptr, ptr %9, align 8, !tbaa !5
  %81 = load i32, ptr %80, align 4, !tbaa !9
  %82 = icmp sle i32 %79, %81
  br i1 %82, label %83, label %86

83:                                               ; preds = %77
  %84 = load ptr, ptr %8, align 8, !tbaa !5
  %85 = load i32, ptr %84, align 4, !tbaa !9
  br label %89

86:                                               ; preds = %77
  %87 = load ptr, ptr %9, align 8, !tbaa !5
  %88 = load i32, ptr %87, align 4, !tbaa !9
  br label %89

89:                                               ; preds = %86, %83
  %90 = phi i32 [ %85, %83 ], [ %88, %86 ]
  store i32 %90, ptr %22, align 4, !tbaa !9
  %91 = load i32, ptr %22, align 4, !tbaa !9
  store i32 %91, ptr %17, align 4, !tbaa !9
  store i32 1, ptr %21, align 4, !tbaa !9
  br label %92

92:                                               ; preds = %233, %89
  %93 = load i32, ptr %21, align 4, !tbaa !9
  %94 = load i32, ptr %17, align 4, !tbaa !9
  %95 = icmp sle i32 %93, %94
  br i1 %95, label %96, label %236

96:                                               ; preds = %92
  %97 = load ptr, ptr %8, align 8, !tbaa !5
  %98 = load i32, ptr %97, align 4, !tbaa !9
  %99 = load i32, ptr %21, align 4, !tbaa !9
  %100 = sub nsw i32 %98, %99
  %101 = add nsw i32 %100, 1
  store i32 %101, ptr %18, align 4, !tbaa !9
  %102 = load i32, ptr %21, align 4, !tbaa !9
  %103 = add nsw i32 %102, 1
  store i32 %103, ptr %19, align 4, !tbaa !9
  %104 = load ptr, ptr %10, align 8, !tbaa !5
  %105 = load i32, ptr %21, align 4, !tbaa !9
  %106 = load i32, ptr %21, align 4, !tbaa !9
  %107 = load i32, ptr %15, align 4, !tbaa !9
  %108 = mul nsw i32 %106, %107
  %109 = add nsw i32 %105, %108
  %110 = sext i32 %109 to i64
  %111 = getelementptr inbounds %struct.doublecomplex, ptr %104, i64 %110
  %112 = load ptr, ptr %10, align 8, !tbaa !5
  %113 = load i32, ptr %19, align 4, !tbaa !9
  %114 = load ptr, ptr %8, align 8, !tbaa !5
  %115 = load i32, ptr %114, align 4, !tbaa !9
  %116 = icmp sle i32 %113, %115
  br i1 %116, label %117, label %119

117:                                              ; preds = %96
  %118 = load i32, ptr %19, align 4, !tbaa !9
  br label %122

119:                                              ; preds = %96
  %120 = load ptr, ptr %8, align 8, !tbaa !5
  %121 = load i32, ptr %120, align 4, !tbaa !9
  br label %122

122:                                              ; preds = %119, %117
  %123 = phi i32 [ %118, %117 ], [ %121, %119 ]
  %124 = load i32, ptr %21, align 4, !tbaa !9
  %125 = load i32, ptr %15, align 4, !tbaa !9
  %126 = mul nsw i32 %124, %125
  %127 = add nsw i32 %123, %126
  %128 = sext i32 %127 to i64
  %129 = getelementptr inbounds %struct.doublecomplex, ptr %112, i64 %128
  %130 = load ptr, ptr %12, align 8, !tbaa !5
  %131 = load i32, ptr %21, align 4, !tbaa !9
  %132 = sext i32 %131 to i64
  %133 = getelementptr inbounds %struct.doublecomplex, ptr %130, i64 %132
  call void @zlarfg_(ptr noundef %18, ptr noundef %111, ptr noundef %129, ptr noundef @c__1, ptr noundef %133)
  %134 = load i32, ptr %21, align 4, !tbaa !9
  %135 = load ptr, ptr %9, align 8, !tbaa !5
  %136 = load i32, ptr %135, align 4, !tbaa !9
  %137 = icmp slt i32 %134, %136
  br i1 %137, label %138, label %232

138:                                              ; preds = %122
  %139 = load i32, ptr %21, align 4, !tbaa !9
  %140 = load i32, ptr %21, align 4, !tbaa !9
  %141 = load i32, ptr %15, align 4, !tbaa !9
  %142 = mul nsw i32 %140, %141
  %143 = add nsw i32 %139, %142
  store i32 %143, ptr %18, align 4, !tbaa !9
  %144 = load ptr, ptr %10, align 8, !tbaa !5
  %145 = load i32, ptr %18, align 4, !tbaa !9
  %146 = sext i32 %145 to i64
  %147 = getelementptr inbounds %struct.doublecomplex, ptr %144, i64 %146
  %148 = getelementptr inbounds %struct.doublecomplex, ptr %147, i32 0, i32 0
  %149 = load double, ptr %148, align 8, !tbaa !11
  %150 = getelementptr inbounds %struct.doublecomplex, ptr %23, i32 0, i32 0
  store double %149, ptr %150, align 8, !tbaa !11
  %151 = load ptr, ptr %10, align 8, !tbaa !5
  %152 = load i32, ptr %18, align 4, !tbaa !9
  %153 = sext i32 %152 to i64
  %154 = getelementptr inbounds %struct.doublecomplex, ptr %151, i64 %153
  %155 = getelementptr inbounds %struct.doublecomplex, ptr %154, i32 0, i32 1
  %156 = load double, ptr %155, align 8, !tbaa !14
  %157 = getelementptr inbounds %struct.doublecomplex, ptr %23, i32 0, i32 1
  store double %156, ptr %157, align 8, !tbaa !14
  %158 = load i32, ptr %21, align 4, !tbaa !9
  %159 = load i32, ptr %21, align 4, !tbaa !9
  %160 = load i32, ptr %15, align 4, !tbaa !9
  %161 = mul nsw i32 %159, %160
  %162 = add nsw i32 %158, %161
  store i32 %162, ptr %18, align 4, !tbaa !9
  %163 = load ptr, ptr %10, align 8, !tbaa !5
  %164 = load i32, ptr %18, align 4, !tbaa !9
  %165 = sext i32 %164 to i64
  %166 = getelementptr inbounds %struct.doublecomplex, ptr %163, i64 %165
  %167 = getelementptr inbounds %struct.doublecomplex, ptr %166, i32 0, i32 0
  store double 1.000000e+00, ptr %167, align 8, !tbaa !11
  %168 = load ptr, ptr %10, align 8, !tbaa !5
  %169 = load i32, ptr %18, align 4, !tbaa !9
  %170 = sext i32 %169 to i64
  %171 = getelementptr inbounds %struct.doublecomplex, ptr %168, i64 %170
  %172 = getelementptr inbounds %struct.doublecomplex, ptr %171, i32 0, i32 1
  store double 0.000000e+00, ptr %172, align 8, !tbaa !14
  %173 = load ptr, ptr %8, align 8, !tbaa !5
  %174 = load i32, ptr %173, align 4, !tbaa !9
  %175 = load i32, ptr %21, align 4, !tbaa !9
  %176 = sub nsw i32 %174, %175
  %177 = add nsw i32 %176, 1
  store i32 %177, ptr %18, align 4, !tbaa !9
  %178 = load ptr, ptr %9, align 8, !tbaa !5
  %179 = load i32, ptr %178, align 4, !tbaa !9
  %180 = load i32, ptr %21, align 4, !tbaa !9
  %181 = sub nsw i32 %179, %180
  store i32 %181, ptr %19, align 4, !tbaa !9
  %182 = load ptr, ptr %12, align 8, !tbaa !5
  %183 = load i32, ptr %21, align 4, !tbaa !9
  %184 = sext i32 %183 to i64
  %185 = getelementptr inbounds %struct.doublecomplex, ptr %182, i64 %184
  %186 = call { double, double } @Cd(ptr noundef %185)
  %187 = extractvalue { double, double } %186, 0
  %188 = extractvalue { double, double } %186, 1
  %189 = fneg double %188
  %190 = call ptr @_pCd(ptr noundef %20)
  %191 = getelementptr inbounds { double, double }, ptr %190, i32 0, i32 0
  %192 = getelementptr inbounds { double, double }, ptr %190, i32 0, i32 1
  store double %187, ptr %191, align 8
  store double %189, ptr %192, align 8
  %193 = load ptr, ptr %10, align 8, !tbaa !5
  %194 = load i32, ptr %21, align 4, !tbaa !9
  %195 = load i32, ptr %21, align 4, !tbaa !9
  %196 = load i32, ptr %15, align 4, !tbaa !9
  %197 = mul nsw i32 %195, %196
  %198 = add nsw i32 %194, %197
  %199 = sext i32 %198 to i64
  %200 = getelementptr inbounds %struct.doublecomplex, ptr %193, i64 %199
  %201 = load ptr, ptr %10, align 8, !tbaa !5
  %202 = load i32, ptr %21, align 4, !tbaa !9
  %203 = load i32, ptr %21, align 4, !tbaa !9
  %204 = add nsw i32 %203, 1
  %205 = load i32, ptr %15, align 4, !tbaa !9
  %206 = mul nsw i32 %204, %205
  %207 = add nsw i32 %202, %206
  %208 = sext i32 %207 to i64
  %209 = getelementptr inbounds %struct.doublecomplex, ptr %201, i64 %208
  %210 = load ptr, ptr %11, align 8, !tbaa !5
  %211 = load ptr, ptr %13, align 8, !tbaa !5
  %212 = getelementptr inbounds %struct.doublecomplex, ptr %211, i64 1
  call void @zlarf_(ptr noundef @.str.1, ptr noundef %18, ptr noundef %19, ptr noundef %200, ptr noundef @c__1, ptr noundef %20, ptr noundef %209, ptr noundef %210, ptr noundef %212)
  %213 = load i32, ptr %21, align 4, !tbaa !9
  %214 = load i32, ptr %21, align 4, !tbaa !9
  %215 = load i32, ptr %15, align 4, !tbaa !9
  %216 = mul nsw i32 %214, %215
  %217 = add nsw i32 %213, %216
  store i32 %217, ptr %18, align 4, !tbaa !9
  %218 = getelementptr inbounds %struct.doublecomplex, ptr %23, i32 0, i32 0
  %219 = load double, ptr %218, align 8, !tbaa !11
  %220 = load ptr, ptr %10, align 8, !tbaa !5
  %221 = load i32, ptr %18, align 4, !tbaa !9
  %222 = sext i32 %221 to i64
  %223 = getelementptr inbounds %struct.doublecomplex, ptr %220, i64 %222
  %224 = getelementptr inbounds %struct.doublecomplex, ptr %223, i32 0, i32 0
  store double %219, ptr %224, align 8, !tbaa !11
  %225 = getelementptr inbounds %struct.doublecomplex, ptr %23, i32 0, i32 1
  %226 = load double, ptr %225, align 8, !tbaa !14
  %227 = load ptr, ptr %10, align 8, !tbaa !5
  %228 = load i32, ptr %18, align 4, !tbaa !9
  %229 = sext i32 %228 to i64
  %230 = getelementptr inbounds %struct.doublecomplex, ptr %227, i64 %229
  %231 = getelementptr inbounds %struct.doublecomplex, ptr %230, i32 0, i32 1
  store double %226, ptr %231, align 8, !tbaa !14
  br label %232

232:                                              ; preds = %138, %122
  br label %233

233:                                              ; preds = %232
  %234 = load i32, ptr %21, align 4, !tbaa !9
  %235 = add nsw i32 %234, 1
  store i32 %235, ptr %21, align 4, !tbaa !9
  br label %92, !llvm.loop !15

236:                                              ; preds = %92
  store i32 1, ptr %24, align 4
  br label %237

237:                                              ; preds = %236, %72
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #4
  call void @llvm.lifetime.end.p0(i64 16, ptr %20) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #4
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #4
  ret void
}

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

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

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

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @_pCd(ptr noundef) #3

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

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

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

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

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


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

%struct.doublecomplex = type { double, double }

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

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

18:                                               ; preds = %7
  %19 = load i32, ptr %1, align 4, !tbaa !5
  %20 = icmp slt i32 %19, 0
  br i1 %20, label %.thread, label %21

21:                                               ; preds = %18
  %22 = load i32, ptr %3, align 4, !tbaa !5
  %spec.select = tail call i32 @llvm.umax.i32(i32 %16, i32 1)
  %23 = icmp slt i32 %22, %spec.select
  br i1 %23, label %.thread, label %25

.thread:                                          ; preds = %21, %18, %7
  %.sink = phi i32 [ -1, %7 ], [ -2, %18 ], [ -4, %21 ]
  %.neg = phi i32 [ 1, %7 ], [ 2, %18 ], [ 4, %21 ]
  store i32 %.sink, ptr %6, align 4, !tbaa !5
  store i32 %.neg, ptr %8, align 4, !tbaa !5
  %24 = call i32 @xerbla_(ptr noundef nonnull @.str, ptr noundef nonnull %8, i32 noundef 6) #5
  br label %.loopexit

25:                                               ; preds = %21
  %26 = tail call i32 @llvm.umin.i32(i32 %16, i32 %19)
  %.not7781 = icmp eq i32 %26, 0
  br i1 %.not7781, label %.loopexit, label %.lr.ph.preheader

.lr.ph.preheader:                                 ; preds = %25
  %27 = sext i32 %12 to i64
  %28 = zext nneg i32 %26 to i64
  br label %.lr.ph

.lr.ph:                                           ; preds = %.lr.ph.preheader, %61
  %indvars.iv = phi i64 [ 1, %.lr.ph.preheader ], [ %indvars.iv.next, %61 ]
  %.0.neg83 = phi i32 [ -1, %.lr.ph.preheader ], [ %63, %61 ]
  %indvars85 = trunc i64 %indvars.iv to i32
  %29 = load i32, ptr %0, align 4, !tbaa !5
  %30 = add nsw i32 %.0.neg83, 1
  %31 = add i32 %30, %29
  store i32 %31, ptr %9, align 4, !tbaa !5
  %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  %32 = trunc nsw i64 %indvars.iv.next to i32
  store i32 %32, ptr %10, align 4, !tbaa !5
  %33 = mul nsw i64 %indvars.iv, %27
  %34 = mul nsw i32 %12, %indvars85
  %35 = sext i32 %34 to i64
  %36 = add nsw i64 %indvars.iv, %35
  %37 = getelementptr inbounds %struct.doublecomplex, ptr %14, i64 %36
  %38 = sext i32 %29 to i64
  %.not78.not = icmp slt i64 %indvars.iv, %38
  %.79 = select i1 %.not78.not, i32 %32, i32 %29
  %39 = sext i32 %.79 to i64
  %40 = getelementptr %struct.doublecomplex, ptr %14, i64 %33
  %41 = getelementptr %struct.doublecomplex, ptr %40, i64 %39
  %42 = getelementptr inbounds %struct.doublecomplex, ptr %15, i64 %indvars.iv
  call void @zlarfg_(ptr noundef nonnull %9, ptr noundef %37, ptr noundef %41, ptr noundef nonnull @c__1, ptr noundef nonnull %42) #5
  %43 = load i32, ptr %1, align 4, !tbaa !5
  %44 = sext i32 %43 to i64
  %45 = icmp slt i64 %indvars.iv, %44
  br i1 %45, label %46, label %61

46:                                               ; preds = %.lr.ph
  %47 = trunc nsw i64 %36 to i32
  %48 = load i32, ptr %0, align 4, !tbaa !5
  %49 = add i32 %30, %48
  store i32 %49, ptr %9, align 4, !tbaa !5
  %50 = sub nsw i32 %43, %indvars85
  store i32 %50, ptr %10, align 4, !tbaa !5
  %51 = mul nsw i64 %indvars.iv.next, %27
  %52 = getelementptr %struct.doublecomplex, ptr %14, i64 %51
  %53 = getelementptr %struct.doublecomplex, ptr %52, i64 %indvars.iv
  %54 = load <2 x double>, ptr %37, align 8, !tbaa !9
  store <2 x double> <double 1.000000e+00, double 0.000000e+00>, ptr %37, align 8, !tbaa !9
  %55 = call { double, double } @Cd(ptr noundef nonnull %42)
  %56 = extractvalue { double, double } %55, 0
  %57 = extractvalue { double, double } %55, 1
  %58 = fneg double %57
  %59 = call ptr @_pCd(ptr noundef nonnull %11)
  %60 = getelementptr inbounds i8, ptr %59, i64 8
  store double %56, ptr %59, align 8
  store double %58, ptr %60, align 8
  call void @zlarf_(ptr noundef nonnull @.str.1, ptr noundef nonnull %9, ptr noundef nonnull %10, ptr noundef nonnull %37, ptr noundef nonnull @c__1, ptr noundef nonnull %11, ptr noundef %53, ptr noundef nonnull %3, ptr noundef %5) #5
  store i32 %47, ptr %9, align 4, !tbaa !5
  store <2 x double> %54, ptr %37, align 8, !tbaa !9
  br label %61

61:                                               ; preds = %.lr.ph, %46
  %.not77.not = icmp ult i64 %indvars.iv, %28
  %62 = trunc i64 %indvars.iv to i32
  %63 = xor i32 %62, -1
  br i1 %.not77.not, label %.lr.ph, label %.loopexit, !llvm.loop !11

.loopexit:                                        ; preds = %61, %25, %.thread
  call void @llvm.lifetime.end.p0(i64 16, ptr nonnull %11) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %8) #5
  ret void
}

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

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

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

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @_pCd(ptr noundef) local_unnamed_addr #3

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

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

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.umax.i32(i32, i32) #4

; Function Attrs: nocallback nofree nosync nounwind speculatable willreturn memory(none)
declare i32 @llvm.umin.i32(i32, i32) #4

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

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

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


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