memcpy(tb+HALFSIZEB+2, key, kbs); /* copy key to temporary block */
tb[HALFSIZEB+0] = 0; /* set round counter high value to zero */
for(;r!=(enc?(rounds):-1);enc?r++:r--){ /* enc: 0..(rounds-1) ; !enc: (rounds-1)..0 */
memcpy(tb, R, HALFSIZEB); /* copy right half into tb */
tb[HALFSIZEB+1] = r;
memcpy(tb+HALFSIZEB+2, key, kbs); /* copy key to temporary block */
tb[HALFSIZEB+0] = 0; /* set round counter high value to zero */
for(;r!=(enc?(rounds):-1);enc?r++:r--){ /* enc: 0..(rounds-1) ; !enc: (rounds-1)..0 */
memcpy(tb, R, HALFSIZEB); /* copy right half into tb */
tb[HALFSIZEB+1] = r;