; LLVM IR from sp-nitech/SPTK :: src/generation (periodic_waveform_generation)

; 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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" = type { ptr, ptr, ptr }
%"class.sptk::PeriodicWaveformGeneration" = type <{ ptr, double, i8, [7 x i8], ptr, i8, [7 x i8], double, double, i8, [7 x i8] }>

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN4sptk26PeriodicWaveformGeneration3GetEPdS1_S1_S1_(ptr noundef nonnull align 8 dereferenceable(57) %0, ptr noundef %1, ptr noundef %2, ptr noundef %3, ptr noundef %4) #0 align 2 personality ptr @__gxx_personality_v0 {
  %6 = alloca i1, align 1
  %7 = alloca ptr, align 8
  %8 = alloca ptr, align 8
  %9 = alloca ptr, align 8
  %10 = alloca ptr, align 8
  %11 = alloca ptr, align 8
  %12 = alloca double, align 8
  %13 = alloca %"class.std::vector", align 8
  %14 = alloca ptr, align 8
  %15 = alloca i32, align 4
  %16 = alloca i32, align 4
  %17 = alloca i8, align 1
  %18 = alloca double, align 8
  store ptr %0, ptr %7, align 8, !tbaa !5
  store ptr %1, ptr %8, align 8, !tbaa !5
  store ptr %2, ptr %9, align 8, !tbaa !5
  store ptr %3, ptr %10, align 8, !tbaa !5
  store ptr %4, ptr %11, align 8, !tbaa !5
  %19 = load ptr, ptr %7, align 8
  %20 = getelementptr inbounds %"class.sptk::PeriodicWaveformGeneration", ptr %19, i32 0, i32 5
  %21 = load i8, ptr %20, align 8, !tbaa !9, !range !13, !noundef !14
  %22 = trunc i8 %21 to i1
  br i1 %22, label %24, label %23

23:                                               ; preds = %5
  store i1 false, ptr %6, align 1
  br label %175

24:                                               ; preds = %5
  call void @llvm.lifetime.start.p0(i64 8, ptr %12) #4
  call void @llvm.lifetime.start.p0(i64 24, ptr %13) #4
  call void @_ZNSt6vectorIdSaIdEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #4
  %25 = getelementptr inbounds %"class.sptk::PeriodicWaveformGeneration", ptr %19, i32 0, i32 4
  %26 = load ptr, ptr %25, align 8, !tbaa !15
  %27 = load ptr, ptr %26, align 8, !tbaa !16
  %28 = getelementptr inbounds ptr, ptr %27, i64 4
  %29 = load ptr, ptr %28, align 8
  %30 = invoke noundef zeroext i1 %29(ptr noundef nonnull align 8 dereferenceable(136) %26, ptr noundef %13)
          to label %31 unwind label %37

31:                                               ; preds = %24
  br i1 %30, label %32, label %36

32:                                               ; preds = %31
  %33 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef 0) #4
  %34 = load double, ptr %33, align 8, !tbaa !18
  %35 = fcmp olt double %34, 0.000000e+00
  br i1 %35, label %36, label %41

36:                                               ; preds = %32, %31
  store i1 false, ptr %6, align 1
  store i32 1, ptr %16, align 4
  br label %44

37:                                               ; preds = %24
  %38 = landingpad { ptr, i32 }
          cleanup
  %39 = extractvalue { ptr, i32 } %38, 0
  store ptr %39, ptr %14, align 8
  %40 = extractvalue { ptr, i32 } %38, 1
  store i32 %40, ptr %15, align 4
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #4
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  br label %177

41:                                               ; preds = %32
  %42 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %13, i64 noundef 0) #4
  %43 = load double, ptr %42, align 8, !tbaa !18
  store double %43, ptr %12, align 8, !tbaa !18
  store i32 0, ptr %16, align 4
  br label %44

44:                                               ; preds = %41, %36
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %13) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr %13) #4
  %45 = load i32, ptr %16, align 4
  switch i32 %45, label %174 [
    i32 0, label %46
  ]

46:                                               ; preds = %44
  call void @llvm.lifetime.start.p0(i64 1, ptr %17) #4
  %47 = getelementptr inbounds %"class.sptk::PeriodicWaveformGeneration", ptr %19, i32 0, i32 4
  %48 = load ptr, ptr %47, align 8, !tbaa !15
  %49 = call noundef double @_ZNK4sptk39InputSourceInterpolationWithMagicNumber14GetMagicNumberEv(ptr noundef nonnull align 8 dereferenceable(136) %48)
  %50 = load double, ptr %12, align 8, !tbaa !18
  %51 = fcmp oeq double %49, %50
  %52 = zext i1 %51 to i8
  store i8 %52, ptr %17, align 1, !tbaa !19
  %53 = getelementptr inbounds %"class.sptk::PeriodicWaveformGeneration", ptr %19, i32 0, i32 2
  %54 = load i8, ptr %53, align 8, !tbaa !20, !range !13, !noundef !14
  %55 = trunc i8 %54 to i1
  br i1 %55, label %66, label %56

56:                                               ; preds = %46
  %57 = load i8, ptr %17, align 1, !tbaa !19, !range !13, !noundef !14
  %58 = trunc i8 %57 to i1
  br i1 %58, label %59, label %66

59:                                               ; preds = %56
  %60 = getelementptr inbounds %"class.sptk::PeriodicWaveformGeneration", ptr %19, i32 0, i32 9
  %61 = load i8, ptr %60, align 8, !tbaa !21, !range !13, !noundef !14
  %62 = trunc i8 %61 to i1
  br i1 %62, label %63, label %66

63:                                               ; preds = %59
  %64 = getelementptr inbounds %"class.sptk::PeriodicWaveformGeneration", ptr %19, i32 0, i32 8
  %65 = load double, ptr %64, align 8, !tbaa !22
  store double %65, ptr %12, align 8, !tbaa !18
  br label %66

66:                                               ; preds = %63, %59, %56, %46
  %67 = load ptr, ptr %11, align 8, !tbaa !5
  %68 = icmp ne ptr %67, null
  br i1 %68, label %69, label %72

69:                                               ; preds = %66
  %70 = load double, ptr %12, align 8, !tbaa !18
  %71 = load ptr, ptr %11, align 8, !tbaa !5
  store double %70, ptr %71, align 8, !tbaa !18
  br label %72

72:                                               ; preds = %69, %66
  %73 = getelementptr inbounds %"class.sptk::PeriodicWaveformGeneration", ptr %19, i32 0, i32 4
  %74 = load ptr, ptr %73, align 8, !tbaa !15
  %75 = call noundef double @_ZNK4sptk39InputSourceInterpolationWithMagicNumber14GetMagicNumberEv(ptr noundef nonnull align 8 dereferenceable(136) %74)
  %76 = load double, ptr %12, align 8, !tbaa !18
  %77 = fcmp oeq double %75, %76
  br i1 %77, label %78, label %101

78:                                               ; preds = %72
  %79 = getelementptr inbounds %"class.sptk::PeriodicWaveformGeneration", ptr %19, i32 0, i32 7
  store double 0.000000e+00, ptr %79, align 8, !tbaa !23
  %80 = load ptr, ptr %8, align 8, !tbaa !5
  %81 = icmp ne ptr %80, null
  br i1 %81, label %82, label %86

82:                                               ; preds = %78
  %83 = getelementptr inbounds %"class.sptk::PeriodicWaveformGeneration", ptr %19, i32 0, i32 1
  %84 = load double, ptr %83, align 8, !tbaa !24
  %85 = load ptr, ptr %8, align 8, !tbaa !5
  store double %84, ptr %85, align 8, !tbaa !18
  br label %86

86:                                               ; preds = %82, %78
  %87 = load ptr, ptr %9, align 8, !tbaa !5
  %88 = icmp ne ptr %87, null
  br i1 %88, label %89, label %93

89:                                               ; preds = %86
  %90 = getelementptr inbounds %"class.sptk::PeriodicWaveformGeneration", ptr %19, i32 0, i32 1
  %91 = load double, ptr %90, align 8, !tbaa !24
  %92 = load ptr, ptr %9, align 8, !tbaa !5
  store double %91, ptr %92, align 8, !tbaa !18
  br label %93

93:                                               ; preds = %89, %86
  %94 = load ptr, ptr %10, align 8, !tbaa !5
  %95 = icmp ne ptr %94, null
  br i1 %95, label %96, label %100

96:                                               ; preds = %93
  %97 = getelementptr inbounds %"class.sptk::PeriodicWaveformGeneration", ptr %19, i32 0, i32 1
  %98 = load double, ptr %97, align 8, !tbaa !24
  %99 = load ptr, ptr %10, align 8, !tbaa !5
  store double %98, ptr %99, align 8, !tbaa !18
  br label %100

100:                                              ; preds = %96, %93
  store i1 true, ptr %6, align 1
  store i32 1, ptr %16, align 4
  br label %173

101:                                              ; preds = %72
  %102 = load ptr, ptr %8, align 8, !tbaa !5
  %103 = icmp ne ptr %102, null
  br i1 %103, label %104, label %109

104:                                              ; preds = %101
  %105 = getelementptr inbounds %"class.sptk::PeriodicWaveformGeneration", ptr %19, i32 0, i32 7
  %106 = load double, ptr %105, align 8, !tbaa !23
  %107 = call double @sin(double noundef %106) #4
  %108 = load ptr, ptr %8, align 8, !tbaa !5
  store double %107, ptr %108, align 8, !tbaa !18
  br label %109

109:                                              ; preds = %104, %101
  %110 = load ptr, ptr %9, align 8, !tbaa !5
  %111 = icmp ne ptr %110, null
  br i1 %111, label %112, label %117

112:                                              ; preds = %109
  %113 = getelementptr inbounds %"class.sptk::PeriodicWaveformGeneration", ptr %19, i32 0, i32 7
  %114 = load double, ptr %113, align 8, !tbaa !23
  %115 = call double @cos(double noundef %114) #4
  %116 = load ptr, ptr %9, align 8, !tbaa !5
  store double %115, ptr %116, align 8, !tbaa !18
  br label %117

117:                                              ; preds = %112, %109
  %118 = load ptr, ptr %10, align 8, !tbaa !5
  %119 = icmp ne ptr %118, null
  br i1 %119, label %120, label %126

120:                                              ; preds = %117
  %121 = getelementptr inbounds %"class.sptk::PeriodicWaveformGeneration", ptr %19, i32 0, i32 7
  %122 = load double, ptr %121, align 8, !tbaa !23
  %123 = fdiv double %122, 0x400921FB54442D18
  %124 = fsub double %123, 1.000000e+00
  %125 = load ptr, ptr %10, align 8, !tbaa !5
  store double %124, ptr %125, align 8, !tbaa !18
  br label %126

126:                                              ; preds = %120, %117
  %127 = getelementptr inbounds %"class.sptk::PeriodicWaveformGeneration", ptr %19, i32 0, i32 2
  %128 = load i8, ptr %127, align 8, !tbaa !20, !range !13, !noundef !14
  %129 = trunc i8 %128 to i1
  br i1 %129, label %134, label %130

130:                                              ; preds = %126
  %131 = getelementptr inbounds %"class.sptk::PeriodicWaveformGeneration", ptr %19, i32 0, i32 9
  store i8 1, ptr %131, align 8, !tbaa !21
  %132 = load double, ptr %12, align 8, !tbaa !18
  %133 = getelementptr inbounds %"class.sptk::PeriodicWaveformGeneration", ptr %19, i32 0, i32 8
  store double %132, ptr %133, align 8, !tbaa !22
  br label %134

134:                                              ; preds = %130, %126
  call void @llvm.lifetime.start.p0(i64 8, ptr %18) #4
  %135 = getelementptr inbounds %"class.sptk::PeriodicWaveformGeneration", ptr %19, i32 0, i32 7
  %136 = load double, ptr %135, align 8, !tbaa !23
  store double %136, ptr %18, align 8, !tbaa !18
  %137 = load double, ptr %12, align 8, !tbaa !18
  %138 = fdiv double 0x401921FB54442D18, %137
  %139 = getelementptr inbounds %"class.sptk::PeriodicWaveformGeneration", ptr %19, i32 0, i32 7
  %140 = load double, ptr %139, align 8, !tbaa !23
  %141 = fadd double %140, %138
  store double %141, ptr %139, align 8, !tbaa !23
  %142 = getelementptr inbounds %"class.sptk::PeriodicWaveformGeneration", ptr %19, i32 0, i32 2
  %143 = load i8, ptr %142, align 8, !tbaa !20, !range !13, !noundef !14
  %144 = trunc i8 %143 to i1
  br i1 %144, label %164, label %145

145:                                              ; preds = %134
  %146 = load i8, ptr %17, align 1, !tbaa !19, !range !13, !noundef !14
  %147 = trunc i8 %146 to i1
  br i1 %147, label %148, label %164

148:                                              ; preds = %145
  %149 = load double, ptr %18, align 8, !tbaa !18
  %150 = fcmp ole double %149, 0x400921FB54442D18
  br i1 %150, label %151, label %155

151:                                              ; preds = %148
  %152 = getelementptr inbounds %"class.sptk::PeriodicWaveformGeneration", ptr %19, i32 0, i32 7
  %153 = load double, ptr %152, align 8, !tbaa !23
  %154 = fcmp ole double 0x400921FB54442D18, %153
  br i1 %154, label %162, label %155

155:                                              ; preds = %151, %148
  %156 = load double, ptr %18, align 8, !tbaa !18
  %157 = fcmp ole double %156, 0x401921FB54442D18
  br i1 %157, label %158, label %164

158:                                              ; preds = %155
  %159 = getelementptr inbounds %"class.sptk::PeriodicWaveformGeneration", ptr %19, i32 0, i32 7
  %160 = load double, ptr %159, align 8, !tbaa !23
  %161 = fcmp ole double 0x401921FB54442D18, %160
  br i1 %161, label %162, label %164

162:                                              ; preds = %158, %151
  %163 = getelementptr inbounds %"class.sptk::PeriodicWaveformGeneration", ptr %19, i32 0, i32 9
  store i8 0, ptr %163, align 8, !tbaa !21
  br label %164

164:                                              ; preds = %162, %158, %155, %145, %134
  %165 = getelementptr inbounds %"class.sptk::PeriodicWaveformGeneration", ptr %19, i32 0, i32 7
  %166 = load double, ptr %165, align 8, !tbaa !23
  %167 = fcmp olt double 0x401921FB54442D18, %166
  br i1 %167, label %168, label %172

168:                                              ; preds = %164
  %169 = getelementptr inbounds %"class.sptk::PeriodicWaveformGeneration", ptr %19, i32 0, i32 7
  %170 = load double, ptr %169, align 8, !tbaa !23
  %171 = fsub double %170, 0x401921FB54442D18
  store double %171, ptr %169, align 8, !tbaa !23
  br label %172

172:                                              ; preds = %168, %164
  store i1 true, ptr %6, align 1
  store i32 1, ptr %16, align 4
  call void @llvm.lifetime.end.p0(i64 8, ptr %18) #4
  br label %173

173:                                              ; preds = %172, %100
  call void @llvm.lifetime.end.p0(i64 1, ptr %17) #4
  br label %174

174:                                              ; preds = %173, %44
  call void @llvm.lifetime.end.p0(i64 8, ptr %12) #4
  br label %175

175:                                              ; preds = %174, %23
  %176 = load i1, ptr %6, align 1
  ret i1 %176

177:                                              ; preds = %37
  %178 = load ptr, ptr %14, align 8
  %179 = load i32, ptr %15, align 4
  %180 = insertvalue { ptr, i32 } poison, ptr %178, 0
  %181 = insertvalue { ptr, i32 } %180, i32 %179, 1
  resume { ptr, i32 } %181
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIdSaIdEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

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

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

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

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

attributes #0 = { 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 #1 = { nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { 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, !12, i64 32}
!10 = !{!"_ZTSN4sptk26PeriodicWaveformGenerationE", !11, i64 8, !12, i64 16, !6, i64 24, !12, i64 32, !11, i64 40, !11, i64 48, !12, i64 56}
!11 = !{!"double", !7, i64 0}
!12 = !{!"bool", !7, i64 0}
!13 = !{i8 0, i8 2}
!14 = !{}
!15 = !{!10, !6, i64 24}
!16 = !{!17, !17, i64 0}
!17 = !{!"vtable pointer", !8, i64 0}
!18 = !{!11, !11, i64 0}
!19 = !{!12, !12, i64 0}
!20 = !{!10, !12, i64 16}
!21 = !{!10, !12, i64 56}
!22 = !{!10, !11, i64 48}
!23 = !{!10, !11, i64 40}
!24 = !{!10, !11, i64 8}


; 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::vector" = type { %"struct.std::_Vector_base" }
%"struct.std::_Vector_base" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl" = type { %"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" }
%"struct.std::_Vector_base<double, std::allocator<double>>::_Vector_impl_data" = type { ptr, ptr, ptr }

; Function Attrs: mustprogress uwtable
define dso_local noundef zeroext i1 @_ZN4sptk26PeriodicWaveformGeneration3GetEPdS1_S1_S1_(ptr nocapture noundef nonnull align 8 dereferenceable(57) %0, ptr noundef writeonly %1, ptr noundef writeonly %2, ptr noundef writeonly %3, ptr noundef writeonly %4) local_unnamed_addr #0 align 2 personality ptr @__gxx_personality_v0 {
  %6 = alloca %"class.std::vector", align 8
  %7 = getelementptr inbounds i8, ptr %0, i64 32
  %8 = load i8, ptr %7, align 8, !tbaa !5, !range !12, !noundef !13
  %9 = trunc nuw i8 %8 to i1
  br i1 %9, label %10, label %102

10:                                               ; preds = %5
  call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %6) #4
  call void @_ZNSt6vectorIdSaIdEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #4
  %11 = getelementptr inbounds i8, ptr %0, i64 24
  %12 = load ptr, ptr %11, align 8, !tbaa !14
  %13 = load ptr, ptr %12, align 8, !tbaa !15
  %14 = getelementptr inbounds i8, ptr %13, i64 32
  %15 = load ptr, ptr %14, align 8
  %16 = invoke noundef zeroext i1 %15(ptr noundef nonnull align 8 dereferenceable(136) %12, ptr noundef nonnull %6)
          to label %17 unwind label %22

17:                                               ; preds = %10
  br i1 %16, label %18, label %.thread

18:                                               ; preds = %17
  %19 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef 0) #4
  %20 = load double, ptr %19, align 8, !tbaa !17
  %21 = fcmp olt double %20, 0.000000e+00
  br i1 %21, label %.thread, label %24

22:                                               ; preds = %10
  %23 = landingpad { ptr, i32 }
          cleanup
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #4
  resume { ptr, i32 } %23

.thread:                                          ; preds = %18, %17
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #4
  br label %102

24:                                               ; preds = %18
  %25 = call noundef nonnull align 8 dereferenceable(8) ptr @_ZNSt6vectorIdSaIdEEixEm(ptr noundef nonnull align 8 dereferenceable(24) %6, i64 noundef 0) #4
  %26 = load double, ptr %25, align 8, !tbaa !17
  call void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24) %6) #4
  call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %6) #4
  %27 = load ptr, ptr %11, align 8, !tbaa !14
  %28 = call noundef double @_ZNK4sptk39InputSourceInterpolationWithMagicNumber14GetMagicNumberEv(ptr noundef nonnull align 8 dereferenceable(136) %27)
  %29 = fcmp une double %28, %26
  %30 = getelementptr inbounds i8, ptr %0, i64 16
  %31 = load i8, ptr %30, align 8, !tbaa !18, !range !12, !noundef !13
  %32 = trunc nuw i8 %31 to i1
  %brmerge = select i1 %32, i1 true, i1 %29
  br i1 %brmerge, label %40, label %33

33:                                               ; preds = %24
  %34 = getelementptr inbounds i8, ptr %0, i64 56
  %35 = load i8, ptr %34, align 8, !tbaa !19, !range !12, !noundef !13
  %36 = trunc nuw i8 %35 to i1
  br i1 %36, label %37, label %40

37:                                               ; preds = %33
  %38 = getelementptr inbounds i8, ptr %0, i64 48
  %39 = load double, ptr %38, align 8, !tbaa !20
  br label %40

40:                                               ; preds = %24, %37, %33
  %.128 = phi double [ %26, %24 ], [ %39, %37 ], [ %26, %33 ]
  %.not = icmp eq ptr %4, null
  br i1 %.not, label %42, label %41

41:                                               ; preds = %40
  store double %.128, ptr %4, align 8, !tbaa !17
  br label %42

42:                                               ; preds = %41, %40
  %43 = load ptr, ptr %11, align 8, !tbaa !14
  %44 = call noundef double @_ZNK4sptk39InputSourceInterpolationWithMagicNumber14GetMagicNumberEv(ptr noundef nonnull align 8 dereferenceable(136) %43)
  %45 = fcmp oeq double %44, %.128
  br i1 %45, label %46, label %59

46:                                               ; preds = %42
  %47 = getelementptr inbounds i8, ptr %0, i64 40
  store double 0.000000e+00, ptr %47, align 8, !tbaa !21
  %.not39 = icmp eq ptr %1, null
  br i1 %.not39, label %51, label %48

48:                                               ; preds = %46
  %49 = getelementptr inbounds i8, ptr %0, i64 8
  %50 = load double, ptr %49, align 8, !tbaa !22
  store double %50, ptr %1, align 8, !tbaa !17
  br label %51

51:                                               ; preds = %48, %46
  %.not40 = icmp eq ptr %2, null
  br i1 %.not40, label %55, label %52

52:                                               ; preds = %51
  %53 = getelementptr inbounds i8, ptr %0, i64 8
  %54 = load double, ptr %53, align 8, !tbaa !22
  store double %54, ptr %2, align 8, !tbaa !17
  br label %55

55:                                               ; preds = %52, %51
  %.not41 = icmp eq ptr %3, null
  br i1 %.not41, label %102, label %56

56:                                               ; preds = %55
  %57 = getelementptr inbounds i8, ptr %0, i64 8
  %58 = load double, ptr %57, align 8, !tbaa !22
  store double %58, ptr %3, align 8, !tbaa !17
  br label %102

59:                                               ; preds = %42
  %.not36 = icmp eq ptr %1, null
  br i1 %.not36, label %64, label %60

60:                                               ; preds = %59
  %61 = getelementptr inbounds i8, ptr %0, i64 40
  %62 = load double, ptr %61, align 8, !tbaa !21
  %63 = call double @sin(double noundef %62) #4
  store double %63, ptr %1, align 8, !tbaa !17
  br label %64

64:                                               ; preds = %60, %59
  %.not37 = icmp eq ptr %2, null
  br i1 %.not37, label %69, label %65

65:                                               ; preds = %64
  %66 = getelementptr inbounds i8, ptr %0, i64 40
  %67 = load double, ptr %66, align 8, !tbaa !21
  %68 = call double @cos(double noundef %67) #4
  store double %68, ptr %2, align 8, !tbaa !17
  br label %69

69:                                               ; preds = %65, %64
  %.not38 = icmp eq ptr %3, null
  br i1 %.not38, label %75, label %70

70:                                               ; preds = %69
  %71 = getelementptr inbounds i8, ptr %0, i64 40
  %72 = load double, ptr %71, align 8, !tbaa !21
  %73 = fdiv double %72, 0x400921FB54442D18
  %74 = fadd double %73, -1.000000e+00
  store double %74, ptr %3, align 8, !tbaa !17
  br label %75

75:                                               ; preds = %70, %69
  %76 = load i8, ptr %30, align 8, !tbaa !18, !range !12, !noundef !13
  %77 = trunc nuw i8 %76 to i1
  br i1 %77, label %.thread49, label %82

.thread49:                                        ; preds = %75
  %78 = getelementptr inbounds i8, ptr %0, i64 40
  %79 = load double, ptr %78, align 8, !tbaa !21
  %80 = fdiv double 0x401921FB54442D18, %.128
  %81 = fadd double %80, %79
  store double %81, ptr %78, align 8, !tbaa !21
  br label %96

82:                                               ; preds = %75
  %83 = getelementptr inbounds i8, ptr %0, i64 56
  store i8 1, ptr %83, align 8, !tbaa !19
  %84 = getelementptr inbounds i8, ptr %0, i64 48
  store double %.128, ptr %84, align 8, !tbaa !20
  %85 = getelementptr inbounds i8, ptr %0, i64 40
  %86 = load double, ptr %85, align 8, !tbaa !21
  %87 = fdiv double 0x401921FB54442D18, %.128
  %88 = fadd double %87, %86
  store double %88, ptr %85, align 8, !tbaa !21
  br i1 %29, label %96, label %89

89:                                               ; preds = %82
  %90 = fcmp ugt double %86, 0x400921FB54442D18
  %91 = fcmp ult double %88, 0x400921FB54442D18
  %or.cond = select i1 %90, i1 true, i1 %91
  br i1 %or.cond, label %92, label %95

92:                                               ; preds = %89
  %93 = fcmp ugt double %86, 0x401921FB54442D18
  %94 = fcmp ult double %88, 0x401921FB54442D18
  %or.cond46 = select i1 %93, i1 true, i1 %94
  br i1 %or.cond46, label %96, label %95

95:                                               ; preds = %92, %89
  store i8 0, ptr %83, align 8, !tbaa !19
  br label %96

96:                                               ; preds = %.thread49, %82, %95, %92
  %97 = phi double [ %81, %.thread49 ], [ %88, %82 ], [ %88, %95 ], [ %88, %92 ]
  %98 = phi ptr [ %78, %.thread49 ], [ %85, %82 ], [ %85, %95 ], [ %85, %92 ]
  %99 = fcmp ogt double %97, 0x401921FB54442D18
  br i1 %99, label %100, label %102

100:                                              ; preds = %96
  %101 = fadd double %97, 0xC01921FB54442D18
  store double %101, ptr %98, align 8, !tbaa !21
  br label %102

102:                                              ; preds = %.thread, %96, %100, %55, %56, %5
  %.3 = phi i1 [ false, %5 ], [ true, %56 ], [ true, %55 ], [ true, %100 ], [ true, %96 ], [ false, %.thread ]
  ret i1 %.3
}

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIdSaIdEEC2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 2

declare i32 @__gxx_personality_v0(...)

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

; Function Attrs: mustprogress nounwind uwtable
declare dso_local void @_ZNSt6vectorIdSaIdEED2Ev(ptr noundef nonnull align 8 dereferenceable(24)) unnamed_addr #2 align 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: mustprogress nounwind uwtable
declare dso_local noundef double @_ZNK4sptk39InputSourceInterpolationWithMagicNumber14GetMagicNumberEv(ptr noundef nonnull align 8 dereferenceable(136)) local_unnamed_addr #2 align 2

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @sin(double noundef) local_unnamed_addr #3

; Function Attrs: mustprogress nofree nounwind willreturn memory(write)
declare double @cos(double noundef) local_unnamed_addr #3

attributes #0 = { 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 #1 = { mustprogress nocallback nofree nosync nounwind willreturn memory(argmem: readwrite) }
attributes #2 = { 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 #3 = { mustprogress nofree nounwind willreturn memory(write) "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
attributes #4 = { nounwind }

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

!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 8, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 2}
!4 = !{!"clang version 19.1.0 (git@github.com:llvm/llvm-project.git a4bf6cd7cfb1a1421ba92bca9d017b49936c55e4)"}
!5 = !{!6, !10, i64 32}
!6 = !{!"_ZTSN4sptk26PeriodicWaveformGenerationE", !7, i64 8, !10, i64 16, !11, i64 24, !10, i64 32, !7, i64 40, !7, i64 48, !10, i64 56}
!7 = !{!"double", !8, i64 0}
!8 = !{!"omnipotent char", !9, i64 0}
!9 = !{!"Simple C++ TBAA"}
!10 = !{!"bool", !8, i64 0}
!11 = !{!"any pointer", !8, i64 0}
!12 = !{i8 0, i8 2}
!13 = !{}
!14 = !{!6, !11, i64 24}
!15 = !{!16, !16, i64 0}
!16 = !{!"vtable pointer", !9, i64 0}
!17 = !{!7, !7, i64 0}
!18 = !{!6, !10, i64 16}
!19 = !{!6, !10, i64 56}
!20 = !{!6, !7, i64 48}
!21 = !{!6, !7, i64 40}
!22 = !{!6, !7, i64 8}


; Effective O3 passes: CorrelatedValuePropagationPass,EarlyCSEPass,GVNPass,GlobalOptPass,IPSCCPPass,InferFunctionAttrsPass,InstCombinePass,JumpThreadingPass,PostOrderFunctionAttrsPass,ReassociatePass,SROAPass,SimplifyCFGPass