Hi please check this application note
https://www.nxp.com/docs/en/application-note/AN3499.pdf
also please check this code with this I am setting to use an external crystal of 10 MHZ and bus clock of 10 MHz,CPU clock of 20 MHz
158: if (*(uint8_t*)0xFFAFU != 0xFFU) { /* Test if the device trim value is stored on the specified address */
00000012 C6FFAF LDA 0xFFAF
00000015 A1FF CMP #0xFF
00000017 270E BEQ *+16 ;abs = 0x0027
159: ICSTRM = *(uint8_t*)0xFFAFU; /* Initialize ICSTRM register from a non volatile memory */
00000019 C6FFAF LDA 0xFFAF
0000001C C70000 STA ICSTRM
160: ICSSC = (uint8_t)((*(uint8_t*)0xFFAEU) & (uint8_t)0x01U); /* Initialize ICSSC register from a non volatile memory */
0000001F C6FFAE LDA 0xFFAE
00000022 A401 AND #0x01
00000024 C70000 STA ICSSC
164: setReg8(ICSC1, 0x18U); /* Initialization of the ICS control register 1 */
00000027 A618 LDA #0x18
00000029 C70000 STA ICSC1
166: setReg8(ICSC2, 0x36U); /* Initialization of the ICS control register 2 */
0000002C A636 LDA #0x36
0000002E C70000 STA ICSC2
167: while(ICSSC_OSCINIT == 0U) { /* Wait until the initialization of the external crystal oscillator is completed */
00000031 C60000 LDA ICSSC
00000034 A502 BIT #0x02
00000036 27F9 BEQ *-5 ;abs = 0x0031
170: clrReg8Bits(ICSSC, 0xE0U); /* Initialization of the ICS status and control */
00000038 C60000 LDA ICSSC
0000003B A41F AND #0x1F
0000003D C70000 STA ICSSC
171: while((ICSSC & 0xC0U) != 0x00U) { /* Wait until the FLL switches to Low range DCO mode */
00000040 C60000 LDA ICSSC
00000043 A5C0 BIT #0xC0
00000045 26F9 BNE *-5 ;abs = 0x0040
176: __asm jmp _Startup ; /* Jump to C startup code */
Sorry I am not good in ASM code so I just disasambled my code
I hope this will help you
Have a good day