Maybe you can chunk this too? It should need nothing more then (ok, I bet you don't even need to set `res` to 0):
```
real += res[0];
imag += res[1];
res[0] = 0;
res[1] = 0;
```
and continue the loop, when done, write back to `res`.