1
2
3
4
5
6
7
8
9
10
11
    int16_t left;
    asm 
    (
        "1: ldrh %0, [%1], #2   \n"
        "   strh %0, [%1], #2   \n"
        "   cmp %1, %2          \n"
        "   bne  1b             \n"
       :"=r"(left), "+r"(mono_samples)
       :"r"(end)
       :"memory"
    );