    MOV rcx, Size
    Or rcx, rcx
    JZ SpectrumMonoMixJ1_No
    
    MOV rax, *SpectrumIn
    OR rax, rax
    JNZ SpectrumMonoMix_pSpecInValid
    MOV rax, SpecTmp
  !SpectrumMonoMix_pSpecInValid:
    MOV rdx, *SpectrumOut
    OR rdx, rdx
    JNZ SpectrumMonoMix_pSpecOutValid
    MOV rdx, SpecTmp
  !SpectrumMonoMix_pSpecOutValid:
    
    MOV r8, rcx
    SHL r8, 2
    ADD r8, rax
    FLD1
    FADD st, st ; 2
    FLD1
    FADD st, st1
    FDIVR st, st1 ; 0.66666
  ; (abs(ab)*0.666+a+b)/1  
  !SpectrumMonoMixJ1_Loop:
    FLD dword [rax]
    FSUB dword [r8]
    FABS
    FMUL st, st1
    FADD dword [rax]
    ADD rax, 4
    FADD dword [r8]
    ADD r8, 4
    FDIV st, st2
    FSTP dword [rdx]
    ADD rdx, 4
    DEC rcx
    JNZ SpectrumMonoMixJ1_Loop
  FSTP st
  FSTP st

!SpectrumMonoMixJ1_No:
; IDE Options = PureBasic 4.61 Beta 1 (Windows - x64)
; CursorPosition = 33
; FirstLine = 5
; EnableXP