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

; 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.complex = type { float, float }

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

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

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

50:                                               ; preds = %46
  %51 = load ptr, ptr %14, align 8, !tbaa !5
  store i32 -2, ptr %51, align 4, !tbaa !9
  br label %68

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

58:                                               ; preds = %52
  br label %62

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

62:                                               ; preds = %59, %58
  %63 = phi i32 [ 1, %58 ], [ %61, %59 ]
  %64 = icmp slt i32 %54, %63
  br i1 %64, label %65, label %67

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

67:                                               ; preds = %65, %62
  br label %68

68:                                               ; preds = %67, %50
  br label %69

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

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

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

84:                                               ; preds = %78
  %85 = load ptr, ptr %8, align 8, !tbaa !5
  %86 = load i32, ptr %85, align 4, !tbaa !9
  br label %90

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

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

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

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

118:                                              ; preds = %97
  %119 = load i32, ptr %19, align 4, !tbaa !9
  br label %123

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

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

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

235:                                              ; preds = %139, %123
  br label %236

236:                                              ; preds = %235
  %237 = load i32, ptr %21, align 4, !tbaa !9
  %238 = add nsw i32 %237, 1
  store i32 %238, ptr %21, align 4, !tbaa !9
  br label %93, !llvm.loop !15

239:                                              ; preds = %93
  store i32 1, ptr %24, align 4
  br label %240

240:                                              ; preds = %239, %73
  call void @llvm.lifetime.end.p0(i64 8, ptr %23) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %22) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %21) #5
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %19) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %18) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %17) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %16) #5
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #5
  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 @clarfg_(ptr noundef, ptr noundef, ptr noundef, ptr noundef, ptr noundef) #2

; Function Attrs: inlinehint nounwind uwtable
declare hidden <2 x float> @Cf(ptr noundef) #3

; Function Attrs: inlinehint nounwind uwtable
declare hidden ptr @_pCf(ptr noundef) #4

declare void @clarf_(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"="64" "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"="64" "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 = { 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 4}
!13 = !{!"float", !7, i64 0}
!14 = !{!12, !13, i64 4}
!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.complex = type { float, float }

@.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 @cgeqr2_(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.complex, align 4
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %8) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %9) #6
  call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %10) #6
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %11) #6
  %12 = load i32, ptr %3, align 4, !tbaa !5
  %narrow = xor i32 %12, -1
  %13 = sext i32 %narrow to i64
  %14 = getelementptr inbounds %struct.complex, ptr %2, i64 %13
  %15 = getelementptr inbounds i8, ptr %4, i64 -8
  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) #6
  br label %.loopexit

25:                                               ; preds = %21
  %26 = tail call i32 @llvm.umin.i32(i32 %16, i32 %19)
  %.not7882 = icmp eq i32 %26, 0
  br i1 %.not7882, 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, %59
  %indvars.iv = phi i64 [ 1, %.lr.ph.preheader ], [ %indvars.iv.next, %59 ]
  %.0.neg84 = phi i32 [ -1, %.lr.ph.preheader ], [ %61, %59 ]
  %indvars86 = trunc i64 %indvars.iv to i32
  %29 = load i32, ptr %0, align 4, !tbaa !5
  %30 = add nsw i32 %.0.neg84, 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, %indvars86
  %35 = sext i32 %34 to i64
  %36 = add nsw i64 %indvars.iv, %35
  %37 = getelementptr inbounds %struct.complex, ptr %14, i64 %36
  %38 = sext i32 %29 to i64
  %.not79.not = icmp slt i64 %indvars.iv, %38
  %.80 = select i1 %.not79.not, i32 %32, i32 %29
  %39 = sext i32 %.80 to i64
  %40 = getelementptr %struct.complex, ptr %14, i64 %33
  %41 = getelementptr %struct.complex, ptr %40, i64 %39
  %42 = getelementptr inbounds %struct.complex, ptr %15, i64 %indvars.iv
  call void @clarfg_(ptr noundef nonnull %9, ptr noundef %37, ptr noundef %41, ptr noundef nonnull @c__1, ptr noundef nonnull %42) #6
  %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 %59

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, %indvars86
  store i32 %50, ptr %10, align 4, !tbaa !5
  %51 = mul nsw i64 %indvars.iv.next, %27
  %52 = getelementptr %struct.complex, ptr %14, i64 %51
  %53 = getelementptr %struct.complex, ptr %52, i64 %indvars.iv
  %54 = load <2 x float>, ptr %37, align 4, !tbaa !9
  store <2 x float> <float 1.000000e+00, float 0.000000e+00>, ptr %37, align 4, !tbaa !9
  %55 = call <2 x float> @Cf(ptr noundef nonnull %42)
  %.sroa.0.0.vec.extract = extractelement <2 x float> %55, i64 0
  %.sroa.0.4.vec.extract = extractelement <2 x float> %55, i64 1
  %56 = fneg float %.sroa.0.4.vec.extract
  %57 = call ptr @_pCf(ptr noundef nonnull %11)
  %58 = getelementptr inbounds i8, ptr %57, i64 4
  store float %.sroa.0.0.vec.extract, ptr %57, align 4
  store float %56, ptr %58, align 4
  call void @clarf_(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) #6
  store i32 %47, ptr %9, align 4, !tbaa !5
  store <2 x float> %54, ptr %37, align 4, !tbaa !9
  br label %59

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

.loopexit:                                        ; preds = %59, %25, %.thread
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %11) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %10) #6
  call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %9) #6
  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

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

; Function Attrs: inlinehint nounwind uwtable
declare hidden <2 x float> @Cf(ptr noundef) local_unnamed_addr #3

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

declare void @clarf_(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) #5

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

attributes #0 = { nounwind uwtable "min-legal-vector-width"="64" "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"="64" "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 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"float", !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