	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function Colours_GetPreset
LCPI0_0:
	.quad	0x3f50624dd2f1a9fc              ## double 0.001
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_Colours_GetPreset
	.p2align	4, 0x90
_Colours_GetPreset:                     ## @Colours_GetPreset
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_Atari800_tv_mode@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rax
	movq	_Atari800_TV_NTSC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.1:
	xorl	%eax, %eax
	callq	_COLOURS_NTSC_GetPreset
	movq	_COLOURS_PRESET_STANDARD@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.2:
	movq	(%rbx), %rax
LBB0_3:
	movq	_Atari800_TV_PAL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.4:
	xorl	%eax, %eax
	callq	_COLOURS_PAL_GetPreset
	movq	_COLOURS_PRESET_STANDARD@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
LBB0_7:
	movq	_COLOURS_PRESET_SIZE@GOTPCREL(%rip), %r14
	cmpl	$0, (%r14)
	jle	LBB0_5
## %bb.8:
	xorl	%ebx, %ebx
	movq	_Colours_setup@GOTPCREL(%rip), %r12
	movq	_presets@GOTPCREL(%rip), %r13
	movsd	LCPI0_0(%rip), %xmm0            ## xmm0 = mem[0],zero
	xorl	%r15d, %r15d
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_9 Depth=1
	incq	%r15
	movslq	(%r14), %rax
	addq	$40, %rbx
	cmpq	%rax, %r15
	movsd	LCPI0_0(%rip), %xmm0            ## xmm0 = mem[0],zero
	jge	LBB0_5
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rax
	movl	32(%rax), %edi
	movq	(%r13), %rax
	movl	32(%rax,%rbx), %esi
	callq	_Util_almostequal
	testq	%rax, %rax
	je	LBB0_16
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	(%r12), %rax
	movl	28(%rax), %edi
	movq	(%r13), %rax
	movl	28(%rax,%rbx), %esi
	movsd	LCPI0_0(%rip), %xmm0            ## xmm0 = mem[0],zero
	callq	_Util_almostequal
	testq	%rax, %rax
	je	LBB0_16
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	(%r12), %rax
	movl	24(%rax), %edi
	movq	(%r13), %rax
	movl	24(%rax,%rbx), %esi
	movsd	LCPI0_0(%rip), %xmm0            ## xmm0 = mem[0],zero
	callq	_Util_almostequal
	testq	%rax, %rax
	je	LBB0_16
## %bb.12:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	(%r12), %rax
	movl	20(%rax), %edi
	movq	(%r13), %rax
	movl	20(%rax,%rbx), %esi
	movsd	LCPI0_0(%rip), %xmm0            ## xmm0 = mem[0],zero
	callq	_Util_almostequal
	testq	%rax, %rax
	je	LBB0_16
## %bb.13:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	(%r12), %rax
	movl	16(%rax), %edi
	movq	(%r13), %rax
	movl	16(%rax,%rbx), %esi
	movsd	LCPI0_0(%rip), %xmm0            ## xmm0 = mem[0],zero
	callq	_Util_almostequal
	testq	%rax, %rax
	je	LBB0_16
## %bb.14:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	(%r12), %rax
	movq	(%rax), %rdx
	movq	(%r13), %rcx
	cmpq	(%rcx,%rbx), %rdx
	jne	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	8(%rax), %rax
	cmpq	8(%rcx,%rbx), %rax
	jne	LBB0_16
	jmp	LBB0_6
LBB0_5:
	movq	_COLOURS_PRESET_CUSTOM@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
LBB0_6:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_Atari800_tv_mode,8,3           ## @Atari800_tv_mode
	.comm	_Atari800_TV_NTSC,8,3           ## @Atari800_TV_NTSC
	.comm	_COLOURS_PRESET_STANDARD,8,3    ## @COLOURS_PRESET_STANDARD
	.comm	_Atari800_TV_PAL,8,3            ## @Atari800_TV_PAL
	.comm	_COLOURS_PRESET_CUSTOM,4,2      ## @COLOURS_PRESET_CUSTOM
	.comm	_COLOURS_PRESET_SIZE,4,2        ## @COLOURS_PRESET_SIZE
	.comm	_Colours_setup,8,3              ## @Colours_setup
	.comm	_presets,8,3                    ## @presets
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_Colours_GetPreset              ; -- Begin function Colours_GetPreset
	.p2align	2
_Colours_GetPreset:                     ; @Colours_GetPreset
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
Lloh0:
	adrp	x19, _Atari800_tv_mode@GOTPAGE
Lloh1:
	ldr	x19, [x19, _Atari800_tv_mode@GOTPAGEOFF]
	ldr	x8, [x19]
Lloh2:
	adrp	x9, _Atari800_TV_NTSC@GOTPAGE
Lloh3:
	ldr	x9, [x9, _Atari800_TV_NTSC@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.1:
	bl	_COLOURS_NTSC_GetPreset
Lloh5:
	adrp	x8, _COLOURS_PRESET_STANDARD@GOTPAGE
Lloh6:
	ldr	x8, [x8, _COLOURS_PRESET_STANDARD@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_15
; %bb.2:
	ldr	x8, [x19]
LBB0_3:
Lloh8:
	adrp	x9, _Atari800_TV_PAL@GOTPAGE
Lloh9:
	ldr	x9, [x9, _Atari800_TV_PAL@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.4:
	bl	_COLOURS_PAL_GetPreset
Lloh11:
	adrp	x8, _COLOURS_PRESET_STANDARD@GOTPAGE
Lloh12:
	ldr	x8, [x8, _COLOURS_PRESET_STANDARD@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_15
LBB0_5:
Lloh14:
	adrp	x20, _COLOURS_PRESET_SIZE@GOTPAGE
Lloh15:
	ldr	x20, [x20, _COLOURS_PRESET_SIZE@GOTPAGEOFF]
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_15
; %bb.6:
	mov	x21, #0
	mov	x19, #0
Lloh16:
	adrp	x22, _Colours_setup@GOTPAGE
Lloh17:
	ldr	x22, [x22, _Colours_setup@GOTPAGEOFF]
Lloh18:
	adrp	x23, _presets@GOTPAGE
Lloh19:
	ldr	x23, [x23, _presets@GOTPAGEOFF]
	mov	x24, #43516
	movk	x24, #54001, lsl #16
	movk	x24, #25165, lsl #32
	movk	x24, #16208, lsl #48
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	add	x19, x19, #1
	ldrsw	x8, [x20]
	add	x21, x21, #40
	cmp	x19, x8
	b.ge	LBB0_15
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22]
	ldr	w0, [x8, #32]
	ldr	x8, [x23]
	add	x8, x8, x21
	ldr	w1, [x8, #32]
	fmov	d0, x24
	bl	_Util_almostequal
	cbz	x0, LBB0_7
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	x8, [x22]
	ldr	w0, [x8, #28]
	ldr	x8, [x23]
	add	x8, x8, x21
	ldr	w1, [x8, #28]
	fmov	d0, x24
	bl	_Util_almostequal
	cbz	x0, LBB0_7
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	x8, [x22]
	ldr	w0, [x8, #24]
	ldr	x8, [x23]
	add	x8, x8, x21
	ldr	w1, [x8, #24]
	fmov	d0, x24
	bl	_Util_almostequal
	cbz	x0, LBB0_7
; %bb.11:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	x8, [x22]
	ldr	w0, [x8, #20]
	ldr	x8, [x23]
	add	x8, x8, x21
	ldr	w1, [x8, #20]
	fmov	d0, x24
	bl	_Util_almostequal
	cbz	x0, LBB0_7
; %bb.12:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	x8, [x22]
	ldr	w0, [x8, #16]
	ldr	x8, [x23]
	add	x8, x8, x21
	ldr	w1, [x8, #16]
	fmov	d0, x24
	bl	_Util_almostequal
	cbz	x0, LBB0_7
; %bb.13:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	x8, [x22]
	ldr	x10, [x8]
	ldr	x9, [x23]
	ldr	x11, [x9, x21]
	cmp	x10, x11
	b.ne	LBB0_7
; %bb.14:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	x8, [x8, #8]
	add	x9, x9, x21
	ldr	x9, [x9, #8]
	cmp	x8, x9
	b.ne	LBB0_7
	b	LBB0_16
LBB0_15:
Lloh20:
	adrp	x8, _COLOURS_PRESET_CUSTOM@GOTPAGE
Lloh21:
	ldr	x8, [x8, _COLOURS_PRESET_CUSTOM@GOTPAGEOFF]
Lloh22:
	ldr	w19, [x8]
LBB0_16:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_Atari800_tv_mode,8,3           ; @Atari800_tv_mode
	.comm	_Atari800_TV_NTSC,8,3           ; @Atari800_TV_NTSC
	.comm	_COLOURS_PRESET_STANDARD,8,3    ; @COLOURS_PRESET_STANDARD
	.comm	_Atari800_TV_PAL,8,3            ; @Atari800_TV_PAL
	.comm	_COLOURS_PRESET_CUSTOM,4,2      ; @COLOURS_PRESET_CUSTOM
	.comm	_COLOURS_PRESET_SIZE,4,2        ; @COLOURS_PRESET_SIZE
	.comm	_Colours_setup,8,3              ; @Colours_setup
	.comm	_presets,8,3                    ; @presets
.subsections_via_symbols
