; LLVM IR from zsiciarz/aquila :: examples/spectrogram (spectrogram)

; 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::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.Aquila::FramesCollection" = type <{ %"class.std::vector.0", i32, [4 x i8] }>
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<Aquila::Frame, std::allocator<Aquila::Frame>>::_Vector_impl" }
%"struct.std::_Vector_base<Aquila::Frame, std::allocator<Aquila::Frame>>::_Vector_impl" = type { %"struct.std::_Vector_base<Aquila::Frame, std::allocator<Aquila::Frame>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Aquila::Frame, std::allocator<Aquila::Frame>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.Aquila::Spectrogram" = type { i64, i64, %"class.std::shared_ptr", %"class.std::shared_ptr.5" }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.std::shared_ptr.5" = type { %"class.std::__shared_ptr.6" }
%"class.std::__shared_ptr.6" = type { ptr, %"class.std::__shared_count" }
%"class.std::complex" = type { { double, double } }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [19 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr noundef %1) #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca i32, align 4
  %4 = alloca i32, align 4
  %5 = alloca ptr, align 8
  %6 = alloca i32, align 4
  %7 = alloca double, align 8
  %8 = alloca double, align 8
  %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 ptr, align 8
  %16 = alloca ptr, align 8
  %17 = alloca i32, align 4
  %18 = alloca %"class.Aquila::FramesCollection", align 8
  %19 = alloca %"class.Aquila::Spectrogram", align 8
  %20 = alloca i64, align 8
  %21 = alloca i32, align 4
  %22 = alloca i64, align 8
  %23 = alloca %"class.std::complex", align 8
  %24 = alloca %"class.std::complex", align 8
  store i32 0, ptr %3, align 4
  store i32 %0, ptr %4, align 4, !tbaa !5
  store ptr %1, ptr %5, align 8, !tbaa !9
  call void @llvm.lifetime.start.p0(i64 4, ptr %6) #12
  store i32 1000, ptr %6, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 8, ptr %7) #12
  store double 4.410000e+04, ptr %7, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 8, ptr %8) #12
  store double 1.000000e+03, ptr %8, align 8, !tbaa !11
  call void @llvm.lifetime.start.p0(i64 4, ptr %9) #12
  store i32 44100, ptr %9, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %10) #12
  store i32 1024, ptr %10, align 4, !tbaa !5
  %25 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str)
  %26 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %25, double noundef 4.410000e+04)
  %27 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %26, ptr noundef @.str.1)
  %28 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %27, ptr noundef @.str.2)
  %29 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8) %28, i32 noundef 1000)
  %30 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %29, ptr noundef @.str.3)
  %31 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8) %30, i32 noundef 44100)
  %32 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %31, ptr noundef @.str.4)
  %33 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %32, ptr noundef @.str.5)
  %34 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8) %33, i32 noundef 1024)
  %35 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %34, ptr noundef @.str.6)
  call void @llvm.lifetime.start.p0(i64 4, ptr %11) #12
  store i32 1, ptr %11, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %12) #12
  store i32 2, ptr %12, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %13) #12
  store i32 3, ptr %13, align 4, !tbaa !5
  call void @llvm.lifetime.start.p0(i64 4, ptr %14) #12
  store i32 1, ptr %14, align 4, !tbaa !5
  %36 = load i32, ptr %4, align 4, !tbaa !5
  %37 = icmp sgt i32 %36, 1
  br i1 %37, label %38, label %43

38:                                               ; preds = %2
  %39 = load ptr, ptr %5, align 8, !tbaa !9
  %40 = getelementptr inbounds ptr, ptr %39, i64 1
  %41 = load ptr, ptr %40, align 8, !tbaa !9
  %42 = call i32 @atoi(ptr noundef %41) #13
  store i32 %42, ptr %14, align 4, !tbaa !5
  br label %43

43:                                               ; preds = %38, %2
  call void @llvm.lifetime.start.p0(i64 8, ptr %15) #12
  store ptr null, ptr %15, align 8, !tbaa !9
  %44 = load i32, ptr %14, align 4, !tbaa !5
  %45 = icmp eq i32 2, %44
  br i1 %45, label %46, label %53

46:                                               ; preds = %43
  %47 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 72) #14
  invoke void @_ZN6Aquila15SquareGeneratorC1Ed(ptr noundef nonnull align 8 dereferenceable(72) %47, double noundef 4.410000e+04)
          to label %48 unwind label %49

48:                                               ; preds = %46
  store ptr %47, ptr %15, align 8, !tbaa !9
  br label %71

49:                                               ; preds = %46
  %50 = landingpad { ptr, i32 }
          cleanup
  %51 = extractvalue { ptr, i32 } %50, 0
  store ptr %51, ptr %16, align 8
  %52 = extractvalue { ptr, i32 } %50, 1
  store i32 %52, ptr %17, align 4
  call void @_ZdlPvm(ptr noundef %47, i64 noundef 72) #15
  br label %164

53:                                               ; preds = %43
  %54 = load i32, ptr %14, align 4, !tbaa !5
  %55 = icmp eq i32 3, %54
  br i1 %55, label %56, label %63

56:                                               ; preds = %53
  %57 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 72) #14
  invoke void @_ZN6Aquila17TriangleGeneratorC1Ed(ptr noundef nonnull align 8 dereferenceable(72) %57, double noundef 4.410000e+04)
          to label %58 unwind label %59

58:                                               ; preds = %56
  store ptr %57, ptr %15, align 8, !tbaa !9
  br label %70

59:                                               ; preds = %56
  %60 = landingpad { ptr, i32 }
          cleanup
  %61 = extractvalue { ptr, i32 } %60, 0
  store ptr %61, ptr %16, align 8
  %62 = extractvalue { ptr, i32 } %60, 1
  store i32 %62, ptr %17, align 4
  call void @_ZdlPvm(ptr noundef %57, i64 noundef 72) #15
  br label %164

63:                                               ; preds = %53
  %64 = call noalias noundef nonnull ptr @_Znwm(i64 noundef 64) #14
  invoke void @_ZN6Aquila13SineGeneratorC1Ed(ptr noundef nonnull align 8 dereferenceable(64) %64, double noundef 4.410000e+04)
          to label %65 unwind label %66

65:                                               ; preds = %63
  store ptr %64, ptr %15, align 8, !tbaa !9
  br label %70

66:                                               ; preds = %63
  %67 = landingpad { ptr, i32 }
          cleanup
  %68 = extractvalue { ptr, i32 } %67, 0
  store ptr %68, ptr %16, align 8
  %69 = extractvalue { ptr, i32 } %67, 1
  store i32 %69, ptr %17, align 4
  call void @_ZdlPvm(ptr noundef %64, i64 noundef 64) #15
  br label %164

70:                                               ; preds = %65, %58
  br label %71

71:                                               ; preds = %70, %48
  %72 = load ptr, ptr %15, align 8, !tbaa !9
  %73 = call noundef nonnull align 8 dereferenceable(64) ptr @_ZN6Aquila9Generator12setFrequencyEd(ptr noundef nonnull align 8 dereferenceable(64) %72, double noundef 1.000000e+03)
  %74 = call noundef nonnull align 8 dereferenceable(64) ptr @_ZN6Aquila9Generator12setAmplitudeEd(ptr noundef nonnull align 8 dereferenceable(64) %73, double noundef 2.550000e+02)
  %75 = load ptr, ptr %74, align 8, !tbaa !13
  %76 = getelementptr inbounds ptr, ptr %75, i64 8
  %77 = load ptr, ptr %76, align 8
  call void %77(ptr noundef nonnull align 8 dereferenceable(64) %74, i64 noundef 44100)
  call void @llvm.lifetime.start.p0(i64 32, ptr %18) #12
  %78 = load ptr, ptr %15, align 8, !tbaa !9
  call void @_ZN6Aquila16FramesCollectionC1ERKNS_12SignalSourceEjj(ptr noundef nonnull align 8 dereferenceable(28) %18, ptr noundef nonnull align 8 dereferenceable(40) %78, i32 noundef 1024, i32 noundef 0)
  %79 = invoke noundef i64 @_ZNK6Aquila16FramesCollection5countEv(ptr noundef nonnull align 8 dereferenceable(28) %18)
          to label %80 unwind label %94

80:                                               ; preds = %71
  %81 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %79)
          to label %82 unwind label %94

82:                                               ; preds = %80
  %83 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %81, ptr noundef @.str.7)
          to label %84 unwind label %94

84:                                               ; preds = %82
  %85 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %83, ptr noundef @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %86 unwind label %94

86:                                               ; preds = %84
  call void @llvm.lifetime.start.p0(i64 48, ptr %19) #12
  invoke void @_ZN6Aquila11SpectrogramC1ERNS_16FramesCollectionE(ptr noundef nonnull align 8 dereferenceable(48) %19, ptr noundef nonnull align 8 dereferenceable(28) %18)
          to label %87 unwind label %98

87:                                               ; preds = %86
  call void @llvm.lifetime.start.p0(i64 8, ptr %20) #12
  store i64 0, ptr %20, align 8, !tbaa !15
  br label %88

88:                                               ; preds = %149, %87
  %89 = load i64, ptr %20, align 8, !tbaa !15
  %90 = invoke noundef i64 @_ZNK6Aquila11Spectrogram13getFrameCountEv(ptr noundef nonnull align 8 dereferenceable(48) %19)
          to label %91 unwind label %102

91:                                               ; preds = %88
  %92 = icmp ult i64 %89, %90
  br i1 %92, label %106, label %93

93:                                               ; preds = %91
  store i32 2, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #12
  br label %153

94:                                               ; preds = %84, %82, %80, %71
  %95 = landingpad { ptr, i32 }
          cleanup
  %96 = extractvalue { ptr, i32 } %95, 0
  store ptr %96, ptr %16, align 8
  %97 = extractvalue { ptr, i32 } %95, 1
  store i32 %97, ptr %17, align 4
  br label %163

98:                                               ; preds = %86
  %99 = landingpad { ptr, i32 }
          cleanup
  %100 = extractvalue { ptr, i32 } %99, 0
  store ptr %100, ptr %16, align 8
  %101 = extractvalue { ptr, i32 } %99, 1
  store i32 %101, ptr %17, align 4
  br label %162

102:                                              ; preds = %146, %88
  %103 = landingpad { ptr, i32 }
          cleanup
  %104 = extractvalue { ptr, i32 } %103, 0
  store ptr %104, ptr %16, align 8
  %105 = extractvalue { ptr, i32 } %103, 1
  store i32 %105, ptr %17, align 4
  br label %152

106:                                              ; preds = %91
  call void @llvm.lifetime.start.p0(i64 8, ptr %22) #12
  store i64 0, ptr %22, align 8, !tbaa !15
  br label %107

107:                                              ; preds = %138, %106
  %108 = load i64, ptr %22, align 8, !tbaa !15
  %109 = invoke noundef i64 @_ZNK6Aquila11Spectrogram15getSpectrumSizeEv(ptr noundef nonnull align 8 dereferenceable(48) %19)
          to label %110 unwind label %114

110:                                              ; preds = %107
  %111 = udiv i64 %109, 2
  %112 = icmp ult i64 %108, %111
  br i1 %112, label %118, label %113

113:                                              ; preds = %110
  store i32 5, ptr %21, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #12
  br label %146

114:                                              ; preds = %107
  %115 = landingpad { ptr, i32 }
          cleanup
  %116 = extractvalue { ptr, i32 } %115, 0
  store ptr %116, ptr %16, align 8
  %117 = extractvalue { ptr, i32 } %115, 1
  store i32 %117, ptr %17, align 4
  br label %145

118:                                              ; preds = %110
  call void @llvm.lifetime.start.p0(i64 16, ptr %23) #12
  %119 = load i64, ptr %20, align 8, !tbaa !15
  %120 = load i64, ptr %22, align 8, !tbaa !15
  %121 = invoke { double, double } @_ZNK6Aquila11Spectrogram8getPointEmm(ptr noundef nonnull align 8 dereferenceable(48) %19, i64 noundef %119, i64 noundef %120)
          to label %122 unwind label %141

122:                                              ; preds = %118
  %123 = getelementptr inbounds %"class.std::complex", ptr %23, i32 0, i32 0
  %124 = getelementptr inbounds { double, double }, ptr %123, i32 0, i32 0
  %125 = extractvalue { double, double } %121, 0
  store double %125, ptr %124, align 8
  %126 = getelementptr inbounds { double, double }, ptr %123, i32 0, i32 1
  %127 = extractvalue { double, double } %121, 1
  store double %127, ptr %126, align 8
  call void @llvm.memcpy.p0.p0.i64(ptr align 8 %24, ptr align 8 %23, i64 16, i1 false), !tbaa.struct !17
  %128 = getelementptr inbounds { double, double }, ptr %24, i32 0, i32 0
  %129 = load double, ptr %128, align 8
  %130 = getelementptr inbounds { double, double }, ptr %24, i32 0, i32 1
  %131 = load double, ptr %130, align 8
  %132 = invoke noundef double @_ZN6Aquila2dBESt7complexIdE(double %129, double %131)
          to label %133 unwind label %141

133:                                              ; preds = %122
  %134 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, double noundef %132)
          to label %135 unwind label %141

135:                                              ; preds = %133
  %136 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %134, ptr noundef @.str.8)
          to label %137 unwind label %141

137:                                              ; preds = %135
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #12
  br label %138

138:                                              ; preds = %137
  %139 = load i64, ptr %22, align 8, !tbaa !15
  %140 = add i64 %139, 1
  store i64 %140, ptr %22, align 8, !tbaa !15
  br label %107, !llvm.loop !19

141:                                              ; preds = %135, %133, %122, %118
  %142 = landingpad { ptr, i32 }
          cleanup
  %143 = extractvalue { ptr, i32 } %142, 0
  store ptr %143, ptr %16, align 8
  %144 = extractvalue { ptr, i32 } %142, 1
  store i32 %144, ptr %17, align 4
  call void @llvm.lifetime.end.p0(i64 16, ptr %23) #12
  br label %145

145:                                              ; preds = %141, %114
  call void @llvm.lifetime.end.p0(i64 8, ptr %22) #12
  br label %152

146:                                              ; preds = %113
  %147 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef @.str.9)
          to label %148 unwind label %102

148:                                              ; preds = %146
  br label %149

149:                                              ; preds = %148
  %150 = load i64, ptr %20, align 8, !tbaa !15
  %151 = add i64 %150, 1
  store i64 %151, ptr %20, align 8, !tbaa !15
  br label %88, !llvm.loop !21

152:                                              ; preds = %145, %102
  call void @llvm.lifetime.end.p0(i64 8, ptr %20) #12
  call void @_ZN6Aquila11SpectrogramD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %19) #12
  br label %162

153:                                              ; preds = %93
  %154 = load ptr, ptr %15, align 8, !tbaa !9
  %155 = icmp eq ptr %154, null
  br i1 %155, label %160, label %156

156:                                              ; preds = %153
  %157 = load ptr, ptr %154, align 8, !tbaa !13
  %158 = getelementptr inbounds ptr, ptr %157, i64 1
  %159 = load ptr, ptr %158, align 8
  call void %159(ptr noundef nonnull align 8 dereferenceable(64) %154) #12
  br label %160

160:                                              ; preds = %156, %153
  store i32 0, ptr %3, align 4
  store i32 1, ptr %21, align 4
  call void @_ZN6Aquila11SpectrogramD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %19) #12
  call void @llvm.lifetime.end.p0(i64 48, ptr %19) #12
  call void @_ZN6Aquila16FramesCollectionD1Ev(ptr noundef nonnull align 8 dereferenceable(28) %18) #12
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #12
  %161 = load i32, ptr %3, align 4
  ret i32 %161

162:                                              ; preds = %152, %98
  call void @llvm.lifetime.end.p0(i64 48, ptr %19) #12
  br label %163

163:                                              ; preds = %162, %94
  call void @_ZN6Aquila16FramesCollectionD1Ev(ptr noundef nonnull align 8 dereferenceable(28) %18) #12
  call void @llvm.lifetime.end.p0(i64 32, ptr %18) #12
  br label %164

164:                                              ; preds = %163, %66, %59, %49
  call void @llvm.lifetime.end.p0(i64 8, ptr %15) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %14) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %13) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %12) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %11) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %10) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %9) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %8) #12
  call void @llvm.lifetime.end.p0(i64 8, ptr %7) #12
  call void @llvm.lifetime.end.p0(i64 4, ptr %6) #12
  br label %165

165:                                              ; preds = %164
  %166 = load ptr, ptr %16, align 8
  %167 = load i32, ptr %17, align 4
  %168 = insertvalue { ptr, i32 } poison, ptr %166, 0
  %169 = insertvalue { ptr, i32 } %168, i32 %167, 1
  resume { ptr, i32 } %169
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8), double noundef) #3 align 2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) #3 align 2

; Function Attrs: inlinehint mustprogress nounwind willreturn memory(read) uwtable
declare i32 @atoi(ptr noundef nonnull) #4

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) #5

declare void @_ZN6Aquila15SquareGeneratorC1Ed(ptr noundef nonnull align 8 dereferenceable(72), double noundef) unnamed_addr #6

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) #7

declare void @_ZN6Aquila17TriangleGeneratorC1Ed(ptr noundef nonnull align 8 dereferenceable(72), double noundef) unnamed_addr #6

declare void @_ZN6Aquila13SineGeneratorC1Ed(ptr noundef nonnull align 8 dereferenceable(64), double noundef) unnamed_addr #6

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(64) ptr @_ZN6Aquila9Generator12setFrequencyEd(ptr noundef nonnull align 8 dereferenceable(64), double noundef) #8 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(64) ptr @_ZN6Aquila9Generator12setAmplitudeEd(ptr noundef nonnull align 8 dereferenceable(64), double noundef) #8 align 2

declare void @_ZN6Aquila16FramesCollectionC1ERKNS_12SignalSourceEjj(ptr noundef nonnull align 8 dereferenceable(28), ptr noundef nonnull align 8 dereferenceable(40), i32 noundef, i32 noundef) unnamed_addr #6

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK6Aquila16FramesCollection5countEv(ptr noundef nonnull align 8 dereferenceable(28)) #8 align 2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #2

declare void @_ZN6Aquila11SpectrogramC1ERNS_16FramesCollectionE(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(28)) unnamed_addr #6

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK6Aquila11Spectrogram13getFrameCountEv(ptr noundef nonnull align 8 dereferenceable(48)) #8 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK6Aquila11Spectrogram15getSpectrumSizeEv(ptr noundef nonnull align 8 dereferenceable(48)) #8 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { double, double } @_ZNK6Aquila11Spectrogram8getPointEmm(ptr noundef nonnull align 8 dereferenceable(48), i64 noundef, i64 noundef) #8 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef double @_ZN6Aquila2dBESt7complexIdE(double, double) #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) #9

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

; Function Attrs: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6Aquila11SpectrogramD2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #10 align 2

; Function Attrs: nounwind
declare void @_ZN6Aquila16FramesCollectionD1Ev(ptr noundef nonnull align 8 dereferenceable(28)) unnamed_addr #11

attributes #0 = { mustprogress norecurse 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 = { inlinehint 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 #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 willreturn memory(read) 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 = { nobuiltin allocsize(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 = { nobuiltin 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 #8 = { 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 #9 = { nocallback nofree nounwind willreturn memory(argmem: readwrite) }
attributes #10 = { 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 #11 = { 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 #12 = { nounwind }
attributes #13 = { nounwind willreturn memory(read) }
attributes #14 = { builtin allocsize(0) }
attributes #15 = { builtin 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++ TBAA"}
!9 = !{!10, !10, i64 0}
!10 = !{!"any pointer", !7, i64 0}
!11 = !{!12, !12, i64 0}
!12 = !{!"double", !7, i64 0}
!13 = !{!14, !14, i64 0}
!14 = !{!"vtable pointer", !8, i64 0}
!15 = !{!16, !16, i64 0}
!16 = !{!"long", !7, i64 0}
!17 = !{i64 0, i64 16, !18}
!18 = !{!7, !7, i64 0}
!19 = distinct !{!19, !20}
!20 = !{!"llvm.loop.mustprogress"}
!21 = distinct !{!21, !20}


; 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::basic_ostream" = type { ptr, %"class.std::basic_ios" }
%"class.std::basic_ios" = type { %"class.std::ios_base", ptr, i8, i8, ptr, ptr, ptr, ptr }
%"class.std::ios_base" = type { ptr, i64, i64, i32, i32, i32, ptr, %"struct.std::ios_base::_Words", [8 x %"struct.std::ios_base::_Words"], i32, ptr, %"class.std::locale" }
%"struct.std::ios_base::_Words" = type { ptr, i64 }
%"class.std::locale" = type { ptr }
%"class.Aquila::FramesCollection" = type <{ %"class.std::vector.0", i32, [4 x i8] }>
%"class.std::vector.0" = type { %"struct.std::_Vector_base.1" }
%"struct.std::_Vector_base.1" = type { %"struct.std::_Vector_base<Aquila::Frame, std::allocator<Aquila::Frame>>::_Vector_impl" }
%"struct.std::_Vector_base<Aquila::Frame, std::allocator<Aquila::Frame>>::_Vector_impl" = type { %"struct.std::_Vector_base<Aquila::Frame, std::allocator<Aquila::Frame>>::_Vector_impl_data" }
%"struct.std::_Vector_base<Aquila::Frame, std::allocator<Aquila::Frame>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.Aquila::Spectrogram" = type { i64, i64, %"class.std::shared_ptr", %"class.std::shared_ptr.5" }
%"class.std::shared_ptr" = type { %"class.std::__shared_ptr" }
%"class.std::__shared_ptr" = type { ptr, %"class.std::__shared_count" }
%"class.std::__shared_count" = type { ptr }
%"class.std::shared_ptr.5" = type { %"class.std::__shared_ptr.6" }
%"class.std::__shared_ptr.6" = type { ptr, %"class.std::__shared_count" }

@_ZSt4cout = external global %"class.std::basic_ostream", align 8
@.str = external hidden unnamed_addr constant [19 x i8], align 1
@.str.1 = external hidden unnamed_addr constant [5 x i8], align 1
@.str.2 = external hidden unnamed_addr constant [16 x i8], align 1
@.str.3 = external hidden unnamed_addr constant [6 x i8], align 1
@.str.4 = external hidden unnamed_addr constant [11 x i8], align 1
@.str.5 = external hidden unnamed_addr constant [15 x i8], align 1
@.str.6 = external hidden unnamed_addr constant [10 x i8], align 1
@.str.7 = external hidden unnamed_addr constant [23 x i8], align 1
@.str.8 = external hidden unnamed_addr constant [2 x i8], align 1
@.str.9 = external hidden unnamed_addr constant [2 x i8], align 1

; Function Attrs: mustprogress norecurse uwtable
define dso_local noundef i32 @main(i32 noundef %0, ptr nocapture noundef readonly %1) local_unnamed_addr #0 personality ptr @__gxx_personality_v0 {
  %3 = alloca %"class.Aquila::FramesCollection", align 8
  %4 = alloca %"class.Aquila::Spectrogram", align 8
  %5 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str)
  %6 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) %5, double noundef 4.410000e+04)
  %7 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %6, ptr noundef nonnull @.str.1)
  %8 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %7, ptr noundef nonnull @.str.2)
  %9 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8) %8, i32 noundef 1000)
  %10 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %9, ptr noundef nonnull @.str.3)
  %11 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8) %10, i32 noundef 44100)
  %12 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %11, ptr noundef nonnull @.str.4)
  %13 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %12, ptr noundef nonnull @.str.5)
  %14 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8) %13, i32 noundef 1024)
  %15 = tail call noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %14, ptr noundef nonnull @.str.6)
  %16 = icmp sgt i32 %0, 1
  br i1 %16, label %17, label %.thread

17:                                               ; preds = %2
  %18 = getelementptr inbounds i8, ptr %1, i64 8
  %19 = load ptr, ptr %18, align 8, !tbaa !5
  %20 = tail call i32 @atoi(ptr nocapture noundef %19) #11
  switch i32 %20, label %.thread [
    i32 2, label %21
    i32 3, label %25
  ]

21:                                               ; preds = %17
  %22 = tail call noalias noundef nonnull dereferenceable(72) ptr @_Znwm(i64 noundef 72) #12
  invoke void @_ZN6Aquila15SquareGeneratorC1Ed(ptr noundef nonnull align 8 dereferenceable(72) %22, double noundef 4.410000e+04)
          to label %32 unwind label %23

23:                                               ; preds = %21
  %24 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZdlPvm(ptr noundef nonnull %22, i64 noundef 72) #13
  br label %79

25:                                               ; preds = %17
  %26 = tail call noalias noundef nonnull dereferenceable(72) ptr @_Znwm(i64 noundef 72) #12
  invoke void @_ZN6Aquila17TriangleGeneratorC1Ed(ptr noundef nonnull align 8 dereferenceable(72) %26, double noundef 4.410000e+04)
          to label %32 unwind label %27

27:                                               ; preds = %25
  %28 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZdlPvm(ptr noundef nonnull %26, i64 noundef 72) #13
  br label %79

.thread:                                          ; preds = %2, %17
  %29 = tail call noalias noundef nonnull dereferenceable(64) ptr @_Znwm(i64 noundef 64) #12
  invoke void @_ZN6Aquila13SineGeneratorC1Ed(ptr noundef nonnull align 8 dereferenceable(64) %29, double noundef 4.410000e+04)
          to label %32 unwind label %30

30:                                               ; preds = %.thread
  %31 = landingpad { ptr, i32 }
          cleanup
  tail call void @_ZdlPvm(ptr noundef nonnull %29, i64 noundef 64) #13
  br label %79

32:                                               ; preds = %.thread, %25, %21
  %.016 = phi ptr [ %22, %21 ], [ %26, %25 ], [ %29, %.thread ]
  %33 = tail call noundef nonnull align 8 dereferenceable(64) ptr @_ZN6Aquila9Generator12setFrequencyEd(ptr noundef nonnull align 8 dereferenceable(64) %.016, double noundef 1.000000e+03)
  %34 = tail call noundef nonnull align 8 dereferenceable(64) ptr @_ZN6Aquila9Generator12setAmplitudeEd(ptr noundef nonnull align 8 dereferenceable(64) %33, double noundef 2.550000e+02)
  %35 = load ptr, ptr %34, align 8, !tbaa !9
  %36 = getelementptr inbounds i8, ptr %35, i64 64
  %37 = load ptr, ptr %36, align 8
  tail call void %37(ptr noundef nonnull align 8 dereferenceable(64) %34, i64 noundef 44100)
  call void @llvm.lifetime.start.p0(i64 32, ptr nonnull %3) #14
  call void @_ZN6Aquila16FramesCollectionC1ERKNS_12SignalSourceEjj(ptr noundef nonnull align 8 dereferenceable(28) %3, ptr noundef nonnull align 8 dereferenceable(40) %.016, i32 noundef 1024, i32 noundef 0)
  %38 = call noundef i64 @_ZNK6Aquila16FramesCollection5countEv(ptr noundef nonnull align 8 dereferenceable(28) %3)
  %39 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, i64 noundef %38)
          to label %40 unwind label %47

40:                                               ; preds = %32
  %41 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %39, ptr noundef nonnull @.str.7)
          to label %42 unwind label %47

42:                                               ; preds = %40
  %43 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8) %41, ptr noundef nonnull @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_)
          to label %44 unwind label %47

44:                                               ; preds = %42
  call void @llvm.lifetime.start.p0(i64 48, ptr nonnull %4) #14
  invoke void @_ZN6Aquila11SpectrogramC1ERNS_16FramesCollectionE(ptr noundef nonnull align 8 dereferenceable(48) %4, ptr noundef nonnull align 8 dereferenceable(28) %3)
          to label %.preheader29 unwind label %49

.preheader29:                                     ; preds = %44
  %45 = call noundef i64 @_ZNK6Aquila11Spectrogram13getFrameCountEv(ptr noundef nonnull align 8 dereferenceable(48) %4)
  %.not = icmp eq i64 %45, 0
  br i1 %.not, label %._crit_edge32, label %.preheader

.preheader:                                       ; preds = %.preheader29, %69
  %.01931 = phi i64 [ %70, %69 ], [ 0, %.preheader29 ]
  %46 = call noundef i64 @_ZNK6Aquila11Spectrogram15getSpectrumSizeEv(ptr noundef nonnull align 8 dereferenceable(48) %4)
  %.not33 = icmp ult i64 %46, 2
  br i1 %.not33, label %._crit_edge, label %.lr.ph

47:                                               ; preds = %42, %40, %32
  %48 = landingpad { ptr, i32 }
          cleanup
  br label %78

49:                                               ; preds = %44
  %50 = landingpad { ptr, i32 }
          cleanup
  br label %77

51:                                               ; preds = %._crit_edge
  %52 = landingpad { ptr, i32 }
          cleanup
  br label %73

._crit_edge:                                      ; preds = %62, %.preheader
  %53 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, ptr noundef nonnull @.str.9)
          to label %69 unwind label %51

.lr.ph:                                           ; preds = %.preheader, %62
  %.01830 = phi i64 [ %63, %62 ], [ 0, %.preheader ]
  %54 = call { double, double } @_ZNK6Aquila11Spectrogram8getPointEmm(ptr noundef nonnull align 8 dereferenceable(48) %4, i64 noundef %.01931, i64 noundef %.01830)
  %55 = extractvalue { double, double } %54, 0
  %56 = extractvalue { double, double } %54, 1
  %57 = invoke noundef double @_ZN6Aquila2dBESt7complexIdE(double %55, double %56)
          to label %58 unwind label %67

58:                                               ; preds = %.lr.ph
  %59 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8) @_ZSt4cout, double noundef %57)
          to label %60 unwind label %67

60:                                               ; preds = %58
  %61 = invoke noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8) %59, ptr noundef nonnull @.str.8)
          to label %62 unwind label %67

62:                                               ; preds = %60
  %63 = add nuw nsw i64 %.01830, 1
  %64 = call noundef i64 @_ZNK6Aquila11Spectrogram15getSpectrumSizeEv(ptr noundef nonnull align 8 dereferenceable(48) %4)
  %65 = lshr i64 %64, 1
  %66 = icmp ult i64 %63, %65
  br i1 %66, label %.lr.ph, label %._crit_edge, !llvm.loop !11

67:                                               ; preds = %60, %58, %.lr.ph
  %68 = landingpad { ptr, i32 }
          cleanup
  br label %73

69:                                               ; preds = %._crit_edge
  %70 = add nuw i64 %.01931, 1
  %71 = call noundef i64 @_ZNK6Aquila11Spectrogram13getFrameCountEv(ptr noundef nonnull align 8 dereferenceable(48) %4)
  %72 = icmp ult i64 %70, %71
  br i1 %72, label %.preheader, label %._crit_edge32, !llvm.loop !13

73:                                               ; preds = %67, %51
  %.pn = phi { ptr, i32 } [ %68, %67 ], [ %52, %51 ]
  call void @_ZN6Aquila11SpectrogramD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #14
  br label %77

._crit_edge32:                                    ; preds = %69, %.preheader29
  %74 = load ptr, ptr %.016, align 8, !tbaa !9
  %75 = getelementptr inbounds i8, ptr %74, i64 8
  %76 = load ptr, ptr %75, align 8
  call void %76(ptr noundef nonnull align 8 dereferenceable(64) %.016) #14
  call void @_ZN6Aquila11SpectrogramD2Ev(ptr noundef nonnull align 8 dereferenceable(48) %4) #14
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %4) #14
  call void @_ZN6Aquila16FramesCollectionD1Ev(ptr noundef nonnull align 8 dereferenceable(28) %3) #14
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #14
  ret i32 0

77:                                               ; preds = %73, %49
  %.pn.pn = phi { ptr, i32 } [ %.pn, %73 ], [ %50, %49 ]
  call void @llvm.lifetime.end.p0(i64 48, ptr nonnull %4) #14
  br label %78

78:                                               ; preds = %77, %47
  %.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn, %77 ], [ %48, %47 ]
  call void @_ZN6Aquila16FramesCollectionD1Ev(ptr noundef nonnull align 8 dereferenceable(28) %3) #14
  call void @llvm.lifetime.end.p0(i64 32, ptr nonnull %3) #14
  br label %79

79:                                               ; preds = %78, %30, %27, %23
  %.pn.pn.pn.pn = phi { ptr, i32 } [ %.pn.pn.pn, %78 ], [ %24, %23 ], [ %28, %27 ], [ %31, %30 ]
  resume { ptr, i32 } %.pn.pn.pn.pn
}

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

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZStlsISt11char_traitsIcEERSt13basic_ostreamIcT_ES5_PKc(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEd(ptr noundef nonnull align 8 dereferenceable(8), double noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEj(ptr noundef nonnull align 8 dereferenceable(8), i32 noundef) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress nofree nounwind willreturn memory(read) uwtable
declare i32 @atoi(ptr nocapture noundef nonnull) local_unnamed_addr #4

; Function Attrs: nobuiltin allocsize(0)
declare noundef nonnull ptr @_Znwm(i64 noundef) local_unnamed_addr #5

declare void @_ZN6Aquila15SquareGeneratorC1Ed(ptr noundef nonnull align 8 dereferenceable(72), double noundef) unnamed_addr #6

declare i32 @__gxx_personality_v0(...)

; Function Attrs: nobuiltin nounwind
declare void @_ZdlPvm(ptr noundef, i64 noundef) local_unnamed_addr #7

declare void @_ZN6Aquila17TriangleGeneratorC1Ed(ptr noundef nonnull align 8 dereferenceable(72), double noundef) unnamed_addr #6

declare void @_ZN6Aquila13SineGeneratorC1Ed(ptr noundef nonnull align 8 dereferenceable(64), double noundef) unnamed_addr #6

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(64) ptr @_ZN6Aquila9Generator12setFrequencyEd(ptr noundef nonnull align 8 dereferenceable(64), double noundef) local_unnamed_addr #8 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef nonnull align 8 dereferenceable(64) ptr @_ZN6Aquila9Generator12setAmplitudeEd(ptr noundef nonnull align 8 dereferenceable(64), double noundef) local_unnamed_addr #8 align 2

declare void @_ZN6Aquila16FramesCollectionC1ERKNS_12SignalSourceEjj(ptr noundef nonnull align 8 dereferenceable(28), ptr noundef nonnull align 8 dereferenceable(40), i32 noundef, i32 noundef) unnamed_addr #6

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEm(ptr noundef nonnull align 8 dereferenceable(8), i64 noundef) local_unnamed_addr #3 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK6Aquila16FramesCollection5countEv(ptr noundef nonnull align 8 dereferenceable(28)) local_unnamed_addr #8 align 2

; Function Attrs: mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZNSolsEPFRSoS_E(ptr noundef nonnull align 8 dereferenceable(8), ptr noundef) local_unnamed_addr #3 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare noundef nonnull align 8 dereferenceable(8) ptr @_ZSt4endlIcSt11char_traitsIcEERSt13basic_ostreamIT_T0_ES6_(ptr noundef nonnull align 8 dereferenceable(8)) #2

declare void @_ZN6Aquila11SpectrogramC1ERNS_16FramesCollectionE(ptr noundef nonnull align 8 dereferenceable(48), ptr noundef nonnull align 8 dereferenceable(28)) unnamed_addr #6

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK6Aquila11Spectrogram13getFrameCountEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #8 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local noundef i64 @_ZNK6Aquila11Spectrogram15getSpectrumSizeEv(ptr noundef nonnull align 8 dereferenceable(48)) local_unnamed_addr #8 align 2

; Function Attrs: mustprogress nounwind uwtable
declare dso_local { double, double } @_ZNK6Aquila11Spectrogram8getPointEmm(ptr noundef nonnull align 8 dereferenceable(48), i64 noundef, i64 noundef) local_unnamed_addr #8 align 2

; Function Attrs: inlinehint mustprogress uwtable
declare dso_local noundef double @_ZN6Aquila2dBESt7complexIdE(double, double) 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: inlinehint mustprogress nounwind uwtable
declare dso_local void @_ZN6Aquila11SpectrogramD2Ev(ptr noundef nonnull align 8 dereferenceable(48)) unnamed_addr #9 align 2

; Function Attrs: nounwind
declare void @_ZN6Aquila16FramesCollectionD1Ev(ptr noundef nonnull align 8 dereferenceable(28)) unnamed_addr #10

attributes #0 = { mustprogress norecurse 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 = { inlinehint 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 #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 nofree nounwind willreturn memory(read) 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 = { nobuiltin allocsize(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 = { nobuiltin 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 #8 = { 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 #9 = { 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 #10 = { 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 #11 = { nounwind willreturn memory(read) }
attributes #12 = { builtin allocsize(0) }
attributes #13 = { builtin nounwind }
attributes #14 = { 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 = !{!"vtable pointer", !8, i64 0}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
!13 = distinct !{!13, !12}


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