How to read and write an on-chip fifo from HPS / ARM?

I’m using arria10_hps_0.h:

#define FIFO_0_IN_CSR_BASE 0x40
#define FIFO_0_IN_BASE 0xc
#define FIFO_0_OUT_BASE 0x8