	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_Colours_SetPreset              ## -- Begin function Colours_SetPreset
	.p2align	4, 0x90
_Colours_SetPreset:                     ## @Colours_SetPreset
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_COLOURS_PRESET_CUSTOM@GOTPCREL(%rip), %rax
	cmpq	%rdi, (%rax)
	jbe	LBB0_3
## %bb.1:
	movq	_presets@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%rdi,4), %eax
	movq	_Colours_setup@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	%eax, (%rcx)
	movq	_Atari800_tv_mode@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_Atari800_TV_NTSC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.4:
	xorl	%eax, %eax
	popq	%rbp
	jmp	_COLOURS_NTSC_RestoreDefaults   ## TAILCALL
LBB0_3:
	popq	%rbp
	retq
LBB0_2:
	xorl	%eax, %eax
	popq	%rbp
	jmp	_COLOURS_PAL_RestoreDefaults    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_COLOURS_PRESET_CUSTOM,8,3      ## @COLOURS_PRESET_CUSTOM
	.comm	_presets,8,3                    ## @presets
	.comm	_Colours_setup,8,3              ## @Colours_setup
	.comm	_Atari800_tv_mode,8,3           ## @Atari800_tv_mode
	.comm	_Atari800_TV_NTSC,8,3           ## @Atari800_TV_NTSC
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_Colours_SetPreset              ; -- Begin function Colours_SetPreset
	.p2align	2
_Colours_SetPreset:                     ; @Colours_SetPreset
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _COLOURS_PRESET_CUSTOM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _COLOURS_PRESET_CUSTOM@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x0
	b.ls	LBB0_3
; %bb.1:
Lloh3:
	adrp	x8, _presets@GOTPAGE
Lloh4:
	ldr	x8, [x8, _presets@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	ldr	w8, [x8, x0, lsl #2]
Lloh6:
	adrp	x9, _Colours_setup@GOTPAGE
Lloh7:
	ldr	x9, [x9, _Colours_setup@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
Lloh9:
	adrp	x10, _Atari800_tv_mode@GOTPAGE
Lloh10:
	ldr	x10, [x10, _Atari800_tv_mode@GOTPAGEOFF]
	str	w8, [x9]
Lloh11:
	ldr	x8, [x10]
Lloh12:
	adrp	x9, _Atari800_TV_NTSC@GOTPAGE
Lloh13:
	ldr	x9, [x9, _Atari800_TV_NTSC@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.2:
	b	_COLOURS_NTSC_RestoreDefaults
LBB0_3:
	ret
LBB0_4:
	b	_COLOURS_PAL_RestoreDefaults
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_COLOURS_PRESET_CUSTOM,8,3      ; @COLOURS_PRESET_CUSTOM
	.comm	_presets,8,3                    ; @presets
	.comm	_Colours_setup,8,3              ; @Colours_setup
	.comm	_Atari800_tv_mode,8,3           ; @Atari800_tv_mode
	.comm	_Atari800_TV_NTSC,8,3           ; @Atari800_TV_NTSC
.subsections_via_symbols
