The correct statements would be:
protectedWrite(CLKCTRL.MCLKCTRLA, CLKCTRL_CLKSEL_XOSC32K_gc); // Select crystal oscillator
protectedWrite(CLKCTRL.MCLKCTRLB, 0); // Disable prescaler
iom4809.h doesn’t support Clock Out, but you might use
protectedWrite(CLKCTRL.MCLKCTRLA, CLKCTRL.MCLKCTRLA | 0x80); // Activate CLKOUT
Combined it would make
protectedWrite(CLKCTRL.MCLKCTRLA, CLKCTRL_CLKSEL_XOSC32K_gc | 0x80); // Crystal oscillator and CLKOUT