; LLVM IR from kkumatani/distant_speech_recognition :: btk20_src/matrix/linpack_c.ll (Z5cpbfaPSt7complexIfEiii)

; 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"

%"class.std::complex" = type { { float, float } }

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt7complexIfEC2Eff(ptr noundef nonnull align 4 dereferenceable(8), float noundef, float noundef) unnamed_addr #1 align 2

; Function Attrs: nocallback nofree nounwind willreturn memory(argmem: readwrite)
declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg) #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local <2 x float> @_ZSt4conjIfESt7complexIT_ERKS2_(ptr noundef nonnull align 4 dereferenceable(8)) #3

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

; Function Attrs: mustprogress uwtable
declare dso_local noundef float @_ZSt4realIfET_RKSt7complexIS0_E(ptr noundef nonnull align 4 dereferenceable(8)) #4

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt4sqrtf(float noundef) #5

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local <2 x float> @_ZStdvIfESt7complexIT_ERKS2_S4_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local <2 x float> @_ZStmiIfESt7complexIT_ERKS2_S4_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) #3

declare <2 x float> @_Z5cdotciPSt7complexIfEiS1_i(i32 noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef) #6

; Function Attrs: mustprogress uwtable
declare dso_local noundef float @_ZSt4imagIfET_RKSt7complexIS0_E(ptr noundef nonnull align 4 dereferenceable(8)) #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local <2 x float> @_ZStmlIfESt7complexIT_ERKS2_S4_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) #3

declare noundef i32 @_Z6i4_maxii(i32 noundef, i32 noundef) #6

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z5cpbfaPSt7complexIfEiii(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3) #7 {
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca i32, align 4
  %8 = alloca i32, align 4
  %9 = alloca i32, align 4
  %10 = alloca i32, align 4
  %11 = alloca i32, align 4
  %12 = alloca i32, align 4
  %13 = alloca i32, align 4
  %14 = alloca i32, align 4
  %15 = alloca float, align 4
  %16 = alloca %"class.std::complex", align 4
  %17 = alloca %"class.std::complex", align 4
  %18 = alloca %"class.std::complex", align 4
  %19 = alloca %"class.std::complex", align 4
  %20 = alloca %"class.std::complex", align 4
  %21 = alloca %"class.std::complex", align 4
  %22 = alloca %"class.std::complex", align 4
  store ptr %0, ptr %5, align 8, !tbaa !5
  store i32 %1, ptr %6, align 4, !tbaa !9
  store i32 %2, ptr %7, align 4, !tbaa !9
  store i32 %3, ptr %8, align 4, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #8
  call void @llvm.lifetime.start.p0(i64 4, ptr %15) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %16) #8
  call void @_ZNSt7complexIfEC2Eff(ptr noundef nonnull align 4 dereferenceable(8) %16, float noundef 0.000000e+00, float noundef 0.000000e+00)
  store i32 0, ptr %10, align 4, !tbaa !9
  store i32 1, ptr %11, align 4, !tbaa !9
  br label %23

23:                                               ; preds = %162, %4
  %24 = load i32, ptr %11, align 4, !tbaa !9
  %25 = load i32, ptr %7, align 4, !tbaa !9
  %26 = icmp sle i32 %24, %25
  br i1 %26, label %27, label %165

27:                                               ; preds = %23
  store float 0.000000e+00, ptr %15, align 4, !tbaa !11
  %28 = load i32, ptr %8, align 4, !tbaa !9
  %29 = add nsw i32 %28, 1
  store i32 %29, ptr %9, align 4, !tbaa !9
  %30 = load i32, ptr %11, align 4, !tbaa !9
  %31 = load i32, ptr %8, align 4, !tbaa !9
  %32 = sub nsw i32 %30, %31
  %33 = call noundef i32 @_Z6i4_maxii(i32 noundef %32, i32 noundef 1)
  store i32 %33, ptr %12, align 4, !tbaa !9
  %34 = load i32, ptr %8, align 4, !tbaa !9
  %35 = add nsw i32 %34, 2
  %36 = load i32, ptr %11, align 4, !tbaa !9
  %37 = sub nsw i32 %35, %36
  %38 = call noundef i32 @_Z6i4_maxii(i32 noundef %37, i32 noundef 1)
  store i32 %38, ptr %14, align 4, !tbaa !9
  %39 = load i32, ptr %14, align 4, !tbaa !9
  store i32 %39, ptr %13, align 4, !tbaa !9
  br label %40

40:                                               ; preds = %116, %27
  %41 = load i32, ptr %13, align 4, !tbaa !9
  %42 = load i32, ptr %8, align 4, !tbaa !9
  %43 = icmp sle i32 %41, %42
  br i1 %43, label %44, label %119

44:                                               ; preds = %40
  call void @llvm.lifetime.start.p0(i64 8, ptr %17) #8
  %45 = load ptr, ptr %5, align 8, !tbaa !5
  %46 = load i32, ptr %13, align 4, !tbaa !9
  %47 = sub nsw i32 %46, 1
  %48 = load i32, ptr %11, align 4, !tbaa !9
  %49 = sub nsw i32 %48, 1
  %50 = load i32, ptr %6, align 4, !tbaa !9
  %51 = mul nsw i32 %49, %50
  %52 = add nsw i32 %47, %51
  %53 = sext i32 %52 to i64
  %54 = getelementptr inbounds %"class.std::complex", ptr %45, i64 %53
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #8
  %55 = load i32, ptr %13, align 4, !tbaa !9
  %56 = load i32, ptr %14, align 4, !tbaa !9
  %57 = sub nsw i32 %55, %56
  %58 = load ptr, ptr %5, align 8, !tbaa !5
  %59 = load i32, ptr %9, align 4, !tbaa !9
  %60 = sext i32 %59 to i64
  %61 = getelementptr inbounds %"class.std::complex", ptr %58, i64 %60
  %62 = getelementptr inbounds %"class.std::complex", ptr %61, i64 -1
  %63 = load i32, ptr %12, align 4, !tbaa !9
  %64 = sub nsw i32 %63, 1
  %65 = load i32, ptr %6, align 4, !tbaa !9
  %66 = mul nsw i32 %64, %65
  %67 = sext i32 %66 to i64
  %68 = getelementptr inbounds %"class.std::complex", ptr %62, i64 %67
  %69 = load ptr, ptr %5, align 8, !tbaa !5
  %70 = load i32, ptr %14, align 4, !tbaa !9
  %71 = sext i32 %70 to i64
  %72 = getelementptr inbounds %"class.std::complex", ptr %69, i64 %71
  %73 = getelementptr inbounds %"class.std::complex", ptr %72, i64 -1
  %74 = load i32, ptr %11, align 4, !tbaa !9
  %75 = sub nsw i32 %74, 1
  %76 = load i32, ptr %6, align 4, !tbaa !9
  %77 = mul nsw i32 %75, %76
  %78 = sext i32 %77 to i64
  %79 = getelementptr inbounds %"class.std::complex", ptr %73, i64 %78
  %80 = call <2 x float> @_Z5cdotciPSt7complexIfEiS1_i(i32 noundef %57, ptr noundef %68, i32 noundef 1, ptr noundef %79, i32 noundef 1)
  %81 = getelementptr inbounds %"class.std::complex", ptr %18, i32 0, i32 0
  store <2 x float> %80, ptr %81, align 4
  %82 = call <2 x float> @_ZStmiIfESt7complexIT_ERKS2_S4_(ptr noundef nonnull align 4 dereferenceable(8) %54, ptr noundef nonnull align 4 dereferenceable(8) %18)
  %83 = getelementptr inbounds %"class.std::complex", ptr %17, i32 0, i32 0
  store <2 x float> %82, ptr %83, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %16, ptr align 4 %17, i64 8, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %17) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %19) #8
  %84 = load ptr, ptr %5, align 8, !tbaa !5
  %85 = load i32, ptr %8, align 4, !tbaa !9
  %86 = load i32, ptr %12, align 4, !tbaa !9
  %87 = sub nsw i32 %86, 1
  %88 = load i32, ptr %6, align 4, !tbaa !9
  %89 = mul nsw i32 %87, %88
  %90 = add nsw i32 %85, %89
  %91 = sext i32 %90 to i64
  %92 = getelementptr inbounds %"class.std::complex", ptr %84, i64 %91
  %93 = call <2 x float> @_ZStdvIfESt7complexIT_ERKS2_S4_(ptr noundef nonnull align 4 dereferenceable(8) %16, ptr noundef nonnull align 4 dereferenceable(8) %92)
  %94 = getelementptr inbounds %"class.std::complex", ptr %19, i32 0, i32 0
  store <2 x float> %93, ptr %94, align 4
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %16, ptr align 4 %19, i64 8, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 8, ptr %19) #8
  %95 = load ptr, ptr %5, align 8, !tbaa !5
  %96 = load i32, ptr %13, align 4, !tbaa !9
  %97 = sub nsw i32 %96, 1
  %98 = load i32, ptr %11, align 4, !tbaa !9
  %99 = sub nsw i32 %98, 1
  %100 = load i32, ptr %6, align 4, !tbaa !9
  %101 = mul nsw i32 %99, %100
  %102 = add nsw i32 %97, %101
  %103 = sext i32 %102 to i64
  %104 = getelementptr inbounds %"class.std::complex", ptr %95, i64 %103
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %104, ptr align 4 %16, i64 8, i1 false), !tbaa.struct !13
  %105 = load float, ptr %15, align 4, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #8
  call void @llvm.lifetime.start.p0(i64 8, ptr %21) #8
  %106 = call <2 x float> @_ZSt4conjIfESt7complexIT_ERKS2_(ptr noundef nonnull align 4 dereferenceable(8) %16)
  %107 = getelementptr inbounds %"class.std::complex", ptr %21, i32 0, i32 0
  store <2 x float> %106, ptr %107, align 4
  %108 = call <2 x float> @_ZStmlIfESt7complexIT_ERKS2_S4_(ptr noundef nonnull align 4 dereferenceable(8) %16, ptr noundef nonnull align 4 dereferenceable(8) %21)
  %109 = getelementptr inbounds %"class.std::complex", ptr %20, i32 0, i32 0
  store <2 x float> %108, ptr %109, align 4
  %110 = call noundef float @_ZSt4realIfET_RKSt7complexIS0_E(ptr noundef nonnull align 4 dereferenceable(8) %20)
  %111 = fadd float %105, %110
  store float %111, ptr %15, align 4, !tbaa !11
  call void @llvm.lifetime.end.p0(i64 8, ptr %21) #8
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #8
  %112 = load i32, ptr %9, align 4, !tbaa !9
  %113 = sub nsw i32 %112, 1
  store i32 %113, ptr %9, align 4, !tbaa !9
  %114 = load i32, ptr %12, align 4, !tbaa !9
  %115 = add nsw i32 %114, 1
  store i32 %115, ptr %12, align 4, !tbaa !9
  br label %116

116:                                              ; preds = %44
  %117 = load i32, ptr %13, align 4, !tbaa !9
  %118 = add nsw i32 %117, 1
  store i32 %118, ptr %13, align 4, !tbaa !9
  br label %40, !llvm.loop !15

119:                                              ; preds = %40
  %120 = load ptr, ptr %5, align 8, !tbaa !5
  %121 = load i32, ptr %8, align 4, !tbaa !9
  %122 = load i32, ptr %11, align 4, !tbaa !9
  %123 = sub nsw i32 %122, 1
  %124 = load i32, ptr %6, align 4, !tbaa !9
  %125 = mul nsw i32 %123, %124
  %126 = add nsw i32 %121, %125
  %127 = sext i32 %126 to i64
  %128 = getelementptr inbounds %"class.std::complex", ptr %120, i64 %127
  %129 = call noundef float @_ZSt4realIfET_RKSt7complexIS0_E(ptr noundef nonnull align 4 dereferenceable(8) %128)
  %130 = load float, ptr %15, align 4, !tbaa !11
  %131 = fsub float %129, %130
  store float %131, ptr %15, align 4, !tbaa !11
  %132 = load float, ptr %15, align 4, !tbaa !11
  %133 = fpext float %132 to double
  %134 = fcmp ole double %133, 0.000000e+00
  br i1 %134, label %148, label %135

135:                                              ; preds = %119
  %136 = load ptr, ptr %5, align 8, !tbaa !5
  %137 = load i32, ptr %8, align 4, !tbaa !9
  %138 = load i32, ptr %11, align 4, !tbaa !9
  %139 = sub nsw i32 %138, 1
  %140 = load i32, ptr %6, align 4, !tbaa !9
  %141 = mul nsw i32 %139, %140
  %142 = add nsw i32 %137, %141
  %143 = sext i32 %142 to i64
  %144 = getelementptr inbounds %"class.std::complex", ptr %136, i64 %143
  %145 = call noundef float @_ZSt4imagIfET_RKSt7complexIS0_E(ptr noundef nonnull align 4 dereferenceable(8) %144)
  %146 = fpext float %145 to double
  %147 = fcmp une double %146, 0.000000e+00
  br i1 %147, label %148, label %150

148:                                              ; preds = %135, %119
  %149 = load i32, ptr %11, align 4, !tbaa !9
  store i32 %149, ptr %10, align 4, !tbaa !9
  br label %165

150:                                              ; preds = %135
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #8
  %151 = load float, ptr %15, align 4, !tbaa !11
  %152 = call noundef float @_ZSt4sqrtf(float noundef %151)
  call void @_ZNSt7complexIfEC2Eff(ptr noundef nonnull align 4 dereferenceable(8) %22, float noundef %152, float noundef 0.000000e+00)
  %153 = load ptr, ptr %5, align 8, !tbaa !5
  %154 = load i32, ptr %8, align 4, !tbaa !9
  %155 = load i32, ptr %11, align 4, !tbaa !9
  %156 = sub nsw i32 %155, 1
  %157 = load i32, ptr %6, align 4, !tbaa !9
  %158 = mul nsw i32 %156, %157
  %159 = add nsw i32 %154, %158
  %160 = sext i32 %159 to i64
  %161 = getelementptr inbounds %"class.std::complex", ptr %153, i64 %160
  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %161, ptr align 4 %22, i64 8, i1 false), !tbaa.struct !13
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #8
  br label %162

162:                                              ; preds = %150
  %163 = load i32, ptr %11, align 4, !tbaa !9
  %164 = add nsw i32 %163, 1
  store i32 %164, ptr %11, align 4, !tbaa !9
  br label %23, !llvm.loop !17

165:                                              ; preds = %148, %23
  %166 = load i32, ptr %10, align 4, !tbaa !9
  call void @llvm.lifetime.end.p0(i64 8, ptr %16) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %15) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #8
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #8
  ret i32 %166
}

attributes #0 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress 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 #2 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #3 = { inlinehint mustprogress 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 = { mustprogress 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 = { inlinehint mustprogress 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 #6 = { "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 #7 = { mustprogress 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 #8 = { 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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"int", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"float", !7, i64 0}
!13 = !{i64 0, i64 8, !14}
!14 = !{!7, !7, i64 0}
!15 = distinct !{!15, !16}
!16 = !{!"llvm.loop.mustprogress"}
!17 = distinct !{!17, !16}


; 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"

%"class.std::complex" = type { { float, float } }

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt7complexIfEC2Eff(ptr noundef nonnull align 4 dereferenceable(8), float noundef, float noundef) unnamed_addr #1 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local <2 x float> @_ZSt4conjIfESt7complexIT_ERKS2_(ptr noundef nonnull align 4 dereferenceable(8)) 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) #0

; Function Attrs: mustprogress uwtable
declare dso_local noundef float @_ZSt4realIfET_RKSt7complexIS0_E(ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local noundef float @_ZSt4sqrtf(float noundef) local_unnamed_addr #4

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local <2 x float> @_ZStdvIfESt7complexIT_ERKS2_S4_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local <2 x float> @_ZStmiIfESt7complexIT_ERKS2_S4_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #2

declare <2 x float> @_Z5cdotciPSt7complexIfEiS1_i(i32 noundef, ptr noundef, i32 noundef, ptr noundef, i32 noundef) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
declare dso_local noundef float @_ZSt4imagIfET_RKSt7complexIS0_E(ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #3

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local <2 x float> @_ZStmlIfESt7complexIT_ERKS2_S4_(ptr noundef nonnull align 4 dereferenceable(8), ptr noundef nonnull align 4 dereferenceable(8)) local_unnamed_addr #2

declare noundef i32 @_Z6i4_maxii(i32 noundef, i32 noundef) local_unnamed_addr #5

; Function Attrs: mustprogress uwtable
define dso_local noundef i32 @_Z5cpbfaPSt7complexIfEiii(ptr noundef %0, i32 noundef %1, i32 noundef %2, i32 noundef %3) local_unnamed_addr #6 {
  %5 = alloca %"class.std::complex", align 8
  %6 = alloca %"class.std::complex", align 8
  %7 = alloca %"class.std::complex", align 8
  %8 = alloca %"class.std::complex", align 8
  %9 = alloca %"class.std::complex", align 8
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %5) #7
  call void @_ZNSt7complexIfEC2Eff(ptr noundef nonnull align 4 dereferenceable(8) %5, float noundef 0.000000e+00, float noundef 0.000000e+00)
  %.not68 = icmp slt i32 %2, 1
  br i1 %.not68, label %._crit_edge72, label %.lr.ph71

.lr.ph71:                                         ; preds = %4
  %10 = add i32 %3, 1
  %11 = add nsw i32 %3, 2
  %invariant.gep = getelementptr i8, ptr %0, i64 -8
  %12 = sext i32 %10 to i64
  %13 = sext i32 %1 to i64
  %14 = sext i32 %3 to i64
  %15 = add nuw i32 %2, 1
  %wide.trip.count = zext i32 %15 to i64
  %invariant.gep93 = getelementptr %"class.std::complex", ptr %0, i64 %14
  %invariant.gep95 = getelementptr %"class.std::complex", ptr %0, i64 %14
  br label %16

16:                                               ; preds = %.lr.ph71, %49
  %indvars.iv87 = phi i64 [ 1, %.lr.ph71 ], [ %indvars.iv.next88, %49 ]
  %17 = trunc i64 %indvars.iv87 to i32
  %18 = sub i32 %17, %3
  %19 = call noundef i32 @_Z6i4_maxii(i32 noundef %18, i32 noundef 1)
  %20 = trunc nuw nsw i64 %indvars.iv87 to i32
  %21 = sub i32 %11, %20
  %22 = call noundef i32 @_Z6i4_maxii(i32 noundef %21, i32 noundef 1)
  %.not6063 = icmp sgt i32 %22, %3
  %.pre = add nsw i64 %indvars.iv87, -1
  %.pre91 = mul nsw i64 %.pre, %13
  br i1 %.not6063, label %._crit_edge, label %.lr.ph

.lr.ph:                                           ; preds = %16
  %23 = add i64 %.pre91, 4294967295
  %24 = sext i32 %22 to i64
  %gep62 = getelementptr %"class.std::complex", ptr %invariant.gep, i64 %24
  %25 = getelementptr inbounds %"class.std::complex", ptr %gep62, i64 %.pre91
  %26 = sext i32 %19 to i64
  br label %27

27:                                               ; preds = %.lr.ph, %27
  %indvars.iv80 = phi i64 [ %26, %.lr.ph ], [ %indvars.iv.next81, %27 ]
  %indvars.iv78 = phi i64 [ %24, %.lr.ph ], [ %indvars.iv.next79, %27 ]
  %indvars.iv = phi i64 [ %12, %.lr.ph ], [ %indvars.iv.next, %27 ]
  %.05566 = phi float [ 0.000000e+00, %.lr.ph ], [ %42, %27 ]
  %28 = add i64 %23, %indvars.iv78
  %sext = shl i64 %28, 32
  %29 = ashr exact i64 %sext, 29
  %30 = getelementptr inbounds i8, ptr %0, i64 %29
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %6) #7
  %gep = getelementptr %"class.std::complex", ptr %invariant.gep, i64 %indvars.iv
  %31 = add nsw i64 %indvars.iv80, -1
  %32 = mul nsw i64 %31, %13
  %33 = getelementptr inbounds %"class.std::complex", ptr %gep, i64 %32
  %34 = trunc i64 %indvars.iv78 to i32
  %35 = sub i32 %34, %22
  %36 = call <2 x float> @_Z5cdotciPSt7complexIfEiS1_i(i32 noundef %35, ptr noundef nonnull %33, i32 noundef 1, ptr noundef nonnull %25, i32 noundef 1)
  store <2 x float> %36, ptr %6, align 8
  %37 = call <2 x float> @_ZStmiIfESt7complexIT_ERKS2_S4_(ptr noundef nonnull align 4 dereferenceable(8) %30, ptr noundef nonnull align 4 dereferenceable(8) %6)
  store <2 x float> %37, ptr %5, align 8, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %6) #7
  %gep94 = getelementptr %"class.std::complex", ptr %invariant.gep93, i64 %32
  %38 = call <2 x float> @_ZStdvIfESt7complexIT_ERKS2_S4_(ptr noundef nonnull align 4 dereferenceable(8) %5, ptr noundef nonnull align 4 dereferenceable(8) %gep94)
  store <2 x float> %38, ptr %5, align 8, !tbaa !5
  store <2 x float> %38, ptr %30, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %7) #7
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %8) #7
  %39 = call <2 x float> @_ZSt4conjIfESt7complexIT_ERKS2_(ptr noundef nonnull align 4 dereferenceable(8) %5)
  store <2 x float> %39, ptr %8, align 8
  %40 = call <2 x float> @_ZStmlIfESt7complexIT_ERKS2_S4_(ptr noundef nonnull align 4 dereferenceable(8) %5, ptr noundef nonnull align 4 dereferenceable(8) %8)
  store <2 x float> %40, ptr %7, align 8
  %41 = call noundef float @_ZSt4realIfET_RKSt7complexIS0_E(ptr noundef nonnull align 4 dereferenceable(8) %7)
  %42 = fadd float %.05566, %41
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %8) #7
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %7) #7
  %indvars.iv.next = add nsw i64 %indvars.iv, -1
  %indvars.iv.next81 = add nsw i64 %indvars.iv80, 1
  %indvars.iv.next79 = add nsw i64 %indvars.iv78, 1
  %lftr.wideiv = trunc i64 %indvars.iv.next79 to i32
  %exitcond.not = icmp eq i32 %10, %lftr.wideiv
  br i1 %exitcond.not, label %._crit_edge, label %27, !llvm.loop !8

._crit_edge:                                      ; preds = %27, %16
  %.055.lcssa = phi float [ 0.000000e+00, %16 ], [ %42, %27 ]
  %gep96 = getelementptr %"class.std::complex", ptr %invariant.gep95, i64 %.pre91
  %43 = call noundef float @_ZSt4realIfET_RKSt7complexIS0_E(ptr noundef nonnull align 4 dereferenceable(8) %gep96)
  %44 = fsub float %43, %.055.lcssa
  %45 = fcmp ugt float %44, 0.000000e+00
  br i1 %45, label %46, label %._crit_edge72

46:                                               ; preds = %._crit_edge
  %47 = call noundef float @_ZSt4imagIfET_RKSt7complexIS0_E(ptr noundef nonnull align 4 dereferenceable(8) %gep96)
  %48 = fcmp une float %47, 0.000000e+00
  br i1 %48, label %._crit_edge72, label %49

49:                                               ; preds = %46
  call void @llvm.lifetime.start.p0(i64 8, ptr nonnull %9) #7
  %50 = call noundef float @_ZSt4sqrtf(float noundef %44)
  call void @_ZNSt7complexIfEC2Eff(ptr noundef nonnull align 4 dereferenceable(8) %9, float noundef %50, float noundef 0.000000e+00)
  %51 = load i64, ptr %9, align 8, !tbaa !5
  store i64 %51, ptr %gep96, align 4, !tbaa !5
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %9) #7
  %indvars.iv.next88 = add nuw nsw i64 %indvars.iv87, 1
  %exitcond90.not = icmp eq i64 %indvars.iv.next88, %wide.trip.count
  br i1 %exitcond90.not, label %._crit_edge72, label %16, !llvm.loop !10

._crit_edge72:                                    ; preds = %49, %46, %._crit_edge, %4
  %.054 = phi i32 [ 0, %4 ], [ %20, %._crit_edge ], [ %20, %46 ], [ 0, %49 ]
  call void @llvm.lifetime.end.p0(i64 8, ptr nonnull %5) #7
  ret i32 %.054
}

attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #1 = { mustprogress 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 #2 = { inlinehint mustprogress 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 #3 = { mustprogress 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 = { inlinehint mustprogress 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 = { "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 #6 = { mustprogress 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 #7 = { 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 = !{!"omnipotent char", !7, i64 0}
!7 = !{!"Simple C++ TBAA"}
!8 = distinct !{!8, !9}
!9 = !{!"llvm.loop.mustprogress"}
!10 = distinct !{!10, !9}


; Effective O3 passes: BDCEPass,EarlyCSEPass,GVNPass,GlobalOptPass,IndVarSimplifyPass,InferAlignmentPass,InferFunctionAttrsPass,InstCombinePass,InstSimplifyPass,JumpThreadingPass,LCSSAPass,LICMPass,LoopRotatePass,LoopSimplifyPass,LoopUnrollPass,ReassociatePass,SROAPass,SimplifyCFGPass