	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_Colours_Initialise             ## -- Begin function Colours_Initialise
	.p2align	4, 0x90
_Colours_Initialise:                    ## @Colours_Initialise
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movq	%rdi, %rbx
	movl	(%rdi), %r14d
	movl	$1, -68(%rbp)                   ## 4-byte Folded Spill
	cmpl	$2, %r14d
	jl	LBB0_28
## %bb.1:
	movl	$1, %r15d
	movq	_FALSE@GOTPCREL(%rip), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movl	$1, -68(%rbp)                   ## 4-byte Folded Spill
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_26:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_TRUE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	testl	%eax, %eax
	jne	LBB0_31
LBB0_27:                                ##   in Loop: Header=BB0_2 Depth=1
	incl	%r15d
	movl	(%rbx), %r14d
	cmpl	%r14d, %r15d
	jge	LBB0_28
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	leal	1(%r15), %ebx
	movq	_FALSE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movslq	%r15d, %r12
	movq	(%r13,%r12,8), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_11
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r13,%r12,8), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_13
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r13,%r12,8), %rdi
	leaq	L_.str.2(%rip), %rsi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_15
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r13,%r12,8), %rdi
	leaq	L_.str.3(%rip), %rsi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_17
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r13,%r12,8), %rdi
	leaq	L_.str.4(%rip), %rsi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_19
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r13,%r12,8), %rdi
	leaq	L_.str.5(%rip), %rsi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_21
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r13,%r12,8), %rdi
	leaq	L_.str.7(%rip), %rsi
	callq	_strcmp
	testq	%rax, %rax
	jne	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	L_.str.8(%rip), %rdi
	xorl	%eax, %eax
	callq	_Log_print
	leaq	L_.str.9(%rip), %rdi
	xorl	%eax, %eax
	callq	_Log_print
	leaq	L_.str.10(%rip), %rdi
	xorl	%eax, %eax
	callq	_Log_print
	leaq	L_.str.11(%rip), %rdi
	xorl	%eax, %eax
	callq	_Log_print
	leaq	L_.str.12(%rip), %rdi
	xorl	%eax, %eax
	callq	_Log_print
	leaq	L_.str.13(%rip), %rdi
	xorl	%eax, %eax
	callq	_Log_print
	leaq	L_.str.14(%rip), %rdi
	xorl	%eax, %eax
	callq	_Log_print
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r13,%r12,8), %rax
	movl	-68(%rbp), %edx                 ## 4-byte Reload
	movslq	%edx, %rcx
	incl	%edx
	movl	%edx, -68(%rbp)                 ## 4-byte Spill
	movq	%rax, (%r13,%rcx,8)
	jmp	LBB0_25
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	cmpl	%r14d, %ebx
	jge	LBB0_26
## %bb.12:                              ##   in Loop: Header=BB0_2 Depth=1
	movslq	%ebx, %rax
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx,%rax,8), %rdi
	callq	_atof
	movq	_COLOURS_PAL_setup@GOTPCREL(%rip), %rcx
	movq	%rax, 32(%rcx)
	movq	_COLOURS_NTSC_setup@GOTPCREL(%rip), %rcx
	movq	%rax, 32(%rcx)
	jmp	LBB0_24
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=1
	cmpl	%r14d, %ebx
	jge	LBB0_26
## %bb.14:                              ##   in Loop: Header=BB0_2 Depth=1
	movslq	%ebx, %rax
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx,%rax,8), %rdi
	callq	_atof
	movq	_COLOURS_PAL_setup@GOTPCREL(%rip), %rcx
	movq	%rax, 24(%rcx)
	movq	_COLOURS_NTSC_setup@GOTPCREL(%rip), %rcx
	movq	%rax, 24(%rcx)
	jmp	LBB0_24
LBB0_15:                                ##   in Loop: Header=BB0_2 Depth=1
	cmpl	%r14d, %ebx
	jge	LBB0_26
## %bb.16:                              ##   in Loop: Header=BB0_2 Depth=1
	movslq	%ebx, %rax
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx,%rax,8), %rdi
	callq	_atof
	movq	_COLOURS_PAL_setup@GOTPCREL(%rip), %rcx
	movq	%rax, 16(%rcx)
	movq	_COLOURS_NTSC_setup@GOTPCREL(%rip), %rcx
	movq	%rax, 16(%rcx)
	jmp	LBB0_24
LBB0_17:                                ##   in Loop: Header=BB0_2 Depth=1
	cmpl	%r14d, %ebx
	jge	LBB0_26
## %bb.18:                              ##   in Loop: Header=BB0_2 Depth=1
	movslq	%ebx, %rax
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx,%rax,8), %rdi
	callq	_atof
	movq	_COLOURS_PAL_setup@GOTPCREL(%rip), %rcx
	movq	%rax, 8(%rcx)
	movq	_COLOURS_NTSC_setup@GOTPCREL(%rip), %rcx
	movq	%rax, 8(%rcx)
	jmp	LBB0_24
LBB0_19:                                ##   in Loop: Header=BB0_2 Depth=1
	cmpl	%r14d, %ebx
	jge	LBB0_26
## %bb.20:                              ##   in Loop: Header=BB0_2 Depth=1
	movslq	%ebx, %rax
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx,%rax,8), %rdi
	callq	_atof
	movq	_COLOURS_PAL_setup@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	movq	_COLOURS_NTSC_setup@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	jmp	LBB0_24
LBB0_21:                                ##   in Loop: Header=BB0_2 Depth=1
	cmpl	%r14d, %ebx
	jge	LBB0_26
## %bb.22:                              ##   in Loop: Header=BB0_2 Depth=1
	movslq	%ebx, %rax
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx,%rax,8), %rdi
	movq	_preset_cfg_strings@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_COLOURS_PRESET_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_CFG_MatchTextParameter
	testl	%eax, %eax
	js	LBB0_33
## %bb.23:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	_presets@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	%eax, %eax
	leaq	(%rax,%rax,4), %rax
	movups	(%rcx,%rax,8), %xmm0
	movups	16(%rcx,%rax,8), %xmm1
	movq	_COLOURS_PAL_setup@GOTPCREL(%rip), %rsi
	movups	%xmm0, (%rsi)
	movups	%xmm1, 16(%rsi)
	movq	32(%rcx,%rax,8), %rdx
	movq	%rdx, 32(%rsi)
	movq	32(%rcx,%rax,8), %rdx
	movups	(%rcx,%rax,8), %xmm0
	movups	16(%rcx,%rax,8), %xmm1
	movq	_COLOURS_NTSC_setup@GOTPCREL(%rip), %rax
	movups	%xmm0, (%rax)
	movups	%xmm1, 16(%rax)
	movq	%rdx, 32(%rax)
	xorl	%eax, %eax
	callq	_COLOURS_NTSC_RestoreDefaults
	xorl	%eax, %eax
	callq	_COLOURS_PAL_RestoreDefaults
	.p2align	4, 0x90
LBB0_24:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	%ebx, %r15d
LBB0_25:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	testl	%eax, %eax
	je	LBB0_27
LBB0_31:
	movslq	%r15d, %rax
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx,%rax,8), %rsi
	leaq	L_.str.15(%rip), %rdi
	xorl	%eax, %eax
	callq	_Log_print
	jmp	LBB0_32
LBB0_28:
	movl	-68(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%rbx)
	movq	%rbx, %rdi
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rsi
	callq	_COLOURS_NTSC_Initialise
	movq	_FALSE@GOTPCREL(%rip), %rcx
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	testl	%eax, %eax
	je	LBB0_32
## %bb.29:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_COLOURS_PAL_Initialise
	testl	%eax, %eax
	je	LBB0_32
## %bb.30:
	movq	_Atari800_tv_mode@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_UpdateModeDependentPointers
	xorl	%eax, %eax
	callq	_UpdatePalette
	movq	_TRUE@GOTPCREL(%rip), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
LBB0_32:
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_33:
	leaq	L_.str.6(%rip), %rdi
	xorl	%eax, %eax
	callq	_Log_print
	jmp	LBB0_32
	.cfi_endproc
                                        ## -- End function
	.comm	_FALSE,4,2                      ## @FALSE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"-saturation"

	.comm	_COLOURS_PAL_setup,40,3         ## @COLOURS_PAL_setup
	.comm	_COLOURS_NTSC_setup,40,3        ## @COLOURS_NTSC_setup
	.comm	_TRUE,4,2                       ## @TRUE
L_.str.1:                               ## @.str.1
	.asciz	"-contrast"

L_.str.2:                               ## @.str.2
	.asciz	"-brightness"

L_.str.3:                               ## @.str.3
	.asciz	"-gamma"

L_.str.4:                               ## @.str.4
	.asciz	"-tint"

L_.str.5:                               ## @.str.5
	.asciz	"-colors-preset"

	.comm	_preset_cfg_strings,4,2         ## @preset_cfg_strings
	.comm	_COLOURS_PRESET_SIZE,4,2        ## @COLOURS_PRESET_SIZE
L_.str.6:                               ## @.str.6
	.asciz	"Invalid value for -colors-preset"

	.comm	_presets,8,3                    ## @presets
L_.str.7:                               ## @.str.7
	.asciz	"-help"

L_.str.8:                               ## @.str.8
	.asciz	"\t-colors-preset standard|deep-black|vibrant"

L_.str.9:                               ## @.str.9
	.asciz	"\t                       Use one of predefined color adjustments"

L_.str.10:                              ## @.str.10
	.asciz	"\t-saturation <num>      Set color saturation"

L_.str.11:                              ## @.str.11
	.asciz	"\t-contrast <num>        Set contrast"

L_.str.12:                              ## @.str.12
	.asciz	"\t-brightness <num>      Set brightness"

L_.str.13:                              ## @.str.13
	.asciz	"\t-gamma <num>           Set color gamma factor"

L_.str.14:                              ## @.str.14
	.asciz	"\t-tint <num>            Set tint"

L_.str.15:                              ## @.str.15
	.asciz	"Missing argument for '%s'"

	.comm	_Atari800_tv_mode,4,2           ## @Atari800_tv_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_Colours_Initialise             ; -- Begin function Colours_Initialise
	.p2align	2
_Colours_Initialise:                    ; @Colours_Initialise
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x1
	mov	x20, x0
	ldr	w26, [x0]
	cmp	w26, #2
	b.lt	LBB0_27
; %bb.1:
Lloh0:
	adrp	x28, _FALSE@GOTPAGE
Lloh1:
	ldr	x28, [x28, _FALSE@GOTPAGEOFF]
	mov	w25, #1
Lloh2:
	adrp	x21, l_.str@PAGE
Lloh3:
	add	x21, x21, l_.str@PAGEOFF
	mov	w24, #1
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	sxtw	x22, w25
	add	x27, x22, #1
	ldr	w23, [x28]
	ldr	x0, [x19, w25, sxtw #3]
	mov	x1, x21
	bl	_strcmp
	cbz	x0, LBB0_11
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x0, [x19, x22, lsl #3]
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_strcmp
	cbz	x0, LBB0_13
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x0, [x19, x22, lsl #3]
Lloh6:
	adrp	x1, l_.str.2@PAGE
Lloh7:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_strcmp
	cbz	x0, LBB0_15
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x0, [x19, x22, lsl #3]
Lloh8:
	adrp	x1, l_.str.3@PAGE
Lloh9:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_strcmp
	cbz	x0, LBB0_17
; %bb.6:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x0, [x19, x22, lsl #3]
Lloh10:
	adrp	x1, l_.str.4@PAGE
Lloh11:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_strcmp
	cbz	x0, LBB0_19
; %bb.7:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x0, [x19, x22, lsl #3]
Lloh12:
	adrp	x1, l_.str.5@PAGE
Lloh13:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_strcmp
	cbz	x0, LBB0_21
; %bb.8:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x0, [x19, x22, lsl #3]
Lloh14:
	adrp	x1, l_.str.7@PAGE
Lloh15:
	add	x1, x1, l_.str.7@PAGEOFF
	bl	_strcmp
	cbnz	x0, LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_2 Depth=1
Lloh16:
	adrp	x0, l_.str.8@PAGE
Lloh17:
	add	x0, x0, l_.str.8@PAGEOFF
	bl	_Log_print
Lloh18:
	adrp	x0, l_.str.9@PAGE
Lloh19:
	add	x0, x0, l_.str.9@PAGEOFF
	bl	_Log_print
Lloh20:
	adrp	x0, l_.str.10@PAGE
Lloh21:
	add	x0, x0, l_.str.10@PAGEOFF
	bl	_Log_print
Lloh22:
	adrp	x0, l_.str.11@PAGE
Lloh23:
	add	x0, x0, l_.str.11@PAGEOFF
	bl	_Log_print
Lloh24:
	adrp	x0, l_.str.12@PAGE
Lloh25:
	add	x0, x0, l_.str.12@PAGEOFF
	bl	_Log_print
Lloh26:
	adrp	x0, l_.str.13@PAGE
Lloh27:
	add	x0, x0, l_.str.13@PAGEOFF
	bl	_Log_print
Lloh28:
	adrp	x0, l_.str.14@PAGE
Lloh29:
	add	x0, x0, l_.str.14@PAGEOFF
	bl	_Log_print
LBB0_10:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x19, x22, lsl #3]
	str	x8, [x19, w24, sxtw #3]
	add	w24, w24, #1
	b	LBB0_25
LBB0_11:                                ;   in Loop: Header=BB0_2 Depth=1
	cmp	w27, w26
	b.ge	LBB0_24
; %bb.12:                               ;   in Loop: Header=BB0_2 Depth=1
	ldr	x0, [x19, x27, lsl #3]
	bl	_atof
Lloh30:
	adrp	x8, _COLOURS_PAL_setup@GOTPAGE
Lloh31:
	ldr	x8, [x8, _COLOURS_PAL_setup@GOTPAGEOFF]
Lloh32:
	str	x0, [x8, #32]
Lloh33:
	adrp	x8, _COLOURS_NTSC_setup@GOTPAGE
Lloh34:
	ldr	x8, [x8, _COLOURS_NTSC_setup@GOTPAGEOFF]
Lloh35:
	str	x0, [x8, #32]
	mov	x25, x27
	b	LBB0_25
LBB0_13:                                ;   in Loop: Header=BB0_2 Depth=1
	cmp	w27, w26
	b.ge	LBB0_24
; %bb.14:                               ;   in Loop: Header=BB0_2 Depth=1
	ldr	x0, [x19, w27, sxtw #3]
	bl	_atof
Lloh36:
	adrp	x8, _COLOURS_PAL_setup@GOTPAGE
Lloh37:
	ldr	x8, [x8, _COLOURS_PAL_setup@GOTPAGEOFF]
Lloh38:
	str	x0, [x8, #24]
Lloh39:
	adrp	x8, _COLOURS_NTSC_setup@GOTPAGE
Lloh40:
	ldr	x8, [x8, _COLOURS_NTSC_setup@GOTPAGEOFF]
Lloh41:
	str	x0, [x8, #24]
	mov	x25, x27
	b	LBB0_25
LBB0_15:                                ;   in Loop: Header=BB0_2 Depth=1
	cmp	w27, w26
	b.ge	LBB0_24
; %bb.16:                               ;   in Loop: Header=BB0_2 Depth=1
	ldr	x0, [x19, w27, sxtw #3]
	bl	_atof
Lloh42:
	adrp	x8, _COLOURS_PAL_setup@GOTPAGE
Lloh43:
	ldr	x8, [x8, _COLOURS_PAL_setup@GOTPAGEOFF]
Lloh44:
	str	x0, [x8, #16]
Lloh45:
	adrp	x8, _COLOURS_NTSC_setup@GOTPAGE
Lloh46:
	ldr	x8, [x8, _COLOURS_NTSC_setup@GOTPAGEOFF]
Lloh47:
	str	x0, [x8, #16]
	mov	x25, x27
	b	LBB0_25
LBB0_17:                                ;   in Loop: Header=BB0_2 Depth=1
	cmp	w27, w26
	b.ge	LBB0_24
; %bb.18:                               ;   in Loop: Header=BB0_2 Depth=1
	ldr	x0, [x19, w27, sxtw #3]
	bl	_atof
Lloh48:
	adrp	x8, _COLOURS_PAL_setup@GOTPAGE
Lloh49:
	ldr	x8, [x8, _COLOURS_PAL_setup@GOTPAGEOFF]
Lloh50:
	str	x0, [x8, #8]
Lloh51:
	adrp	x8, _COLOURS_NTSC_setup@GOTPAGE
Lloh52:
	ldr	x8, [x8, _COLOURS_NTSC_setup@GOTPAGEOFF]
Lloh53:
	str	x0, [x8, #8]
	mov	x25, x27
	b	LBB0_25
LBB0_19:                                ;   in Loop: Header=BB0_2 Depth=1
	cmp	w27, w26
	b.ge	LBB0_24
; %bb.20:                               ;   in Loop: Header=BB0_2 Depth=1
	ldr	x0, [x19, w27, sxtw #3]
	bl	_atof
Lloh54:
	adrp	x8, _COLOURS_PAL_setup@GOTPAGE
Lloh55:
	ldr	x8, [x8, _COLOURS_PAL_setup@GOTPAGEOFF]
Lloh56:
	str	x0, [x8]
Lloh57:
	adrp	x8, _COLOURS_NTSC_setup@GOTPAGE
Lloh58:
	ldr	x8, [x8, _COLOURS_NTSC_setup@GOTPAGEOFF]
Lloh59:
	str	x0, [x8]
	mov	x25, x27
	b	LBB0_25
LBB0_21:                                ;   in Loop: Header=BB0_2 Depth=1
	cmp	w27, w26
	b.ge	LBB0_24
; %bb.22:                               ;   in Loop: Header=BB0_2 Depth=1
	ldr	x0, [x19, w27, sxtw #3]
Lloh60:
	adrp	x8, _preset_cfg_strings@GOTPAGE
Lloh61:
	ldr	x8, [x8, _preset_cfg_strings@GOTPAGEOFF]
Lloh62:
	ldr	w1, [x8]
Lloh63:
	adrp	x8, _COLOURS_PRESET_SIZE@GOTPAGE
Lloh64:
	ldr	x8, [x8, _COLOURS_PRESET_SIZE@GOTPAGEOFF]
Lloh65:
	ldr	w2, [x8]
	bl	_CFG_MatchTextParameter
	tbnz	w0, #31, LBB0_35
; %bb.23:                               ;   in Loop: Header=BB0_2 Depth=1
Lloh66:
	adrp	x8, _presets@GOTPAGE
Lloh67:
	ldr	x8, [x8, _presets@GOTPAGEOFF]
Lloh68:
	ldr	x8, [x8]
	mov	w9, #40
	umaddl	x8, w0, w9, x8
	ldr	x9, [x8, #32]
	ldp	q1, q0, [x8]
Lloh69:
	adrp	x10, _COLOURS_PAL_setup@GOTPAGE
Lloh70:
	ldr	x10, [x10, _COLOURS_PAL_setup@GOTPAGEOFF]
	stp	q1, q0, [x10]
	str	x9, [x10, #32]
	ldp	q1, q0, [x8]
	ldr	x8, [x8, #32]
Lloh71:
	adrp	x9, _COLOURS_NTSC_setup@GOTPAGE
Lloh72:
	ldr	x9, [x9, _COLOURS_NTSC_setup@GOTPAGEOFF]
	str	x8, [x9, #32]
	stp	q1, q0, [x9]
	bl	_COLOURS_NTSC_RestoreDefaults
	bl	_COLOURS_PAL_RestoreDefaults
	mov	x25, x27
	b	LBB0_25
LBB0_24:                                ;   in Loop: Header=BB0_2 Depth=1
Lloh73:
	adrp	x8, _TRUE@GOTPAGE
Lloh74:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
Lloh75:
	ldr	w23, [x8]
LBB0_25:                                ;   in Loop: Header=BB0_2 Depth=1
	cbnz	w23, LBB0_31
; %bb.26:                               ;   in Loop: Header=BB0_2 Depth=1
	add	w25, w25, #1
	ldr	w26, [x20]
	cmp	w25, w26
	b.lt	LBB0_2
	b	LBB0_28
LBB0_27:
	mov	w24, #1
LBB0_28:
	str	w24, [x20]
	mov	x0, x20
	mov	x1, x19
	bl	_COLOURS_NTSC_Initialise
	cbz	w0, LBB0_33
; %bb.29:
	mov	x0, x20
	mov	x1, x19
	bl	_COLOURS_PAL_Initialise
	cbz	w0, LBB0_33
; %bb.30:
Lloh76:
	adrp	x8, _Atari800_tv_mode@GOTPAGE
Lloh77:
	ldr	x8, [x8, _Atari800_tv_mode@GOTPAGEOFF]
Lloh78:
	ldr	w0, [x8]
	bl	_UpdateModeDependentPointers
	bl	_UpdatePalette
Lloh79:
	adrp	x8, _TRUE@GOTPAGE
Lloh80:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
	b	LBB0_34
LBB0_31:
	ldr	x8, [x19, w25, sxtw #3]
	str	x8, [sp]
Lloh81:
	adrp	x0, l_.str.15@PAGE
Lloh82:
	add	x0, x0, l_.str.15@PAGEOFF
LBB0_32:
	bl	_Log_print
LBB0_33:
Lloh83:
	adrp	x8, _FALSE@GOTPAGE
Lloh84:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
LBB0_34:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_35:
Lloh85:
	adrp	x0, l_.str.6@PAGE
Lloh86:
	add	x0, x0, l_.str.6@PAGEOFF
	b	LBB0_32
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotStr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotStr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotStr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotStr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotStr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotStr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotStr	Lloh51, Lloh52, Lloh53
	.loh AdrpLdrGotStr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGotStr	Lloh57, Lloh58, Lloh59
	.loh AdrpLdrGotStr	Lloh54, Lloh55, Lloh56
	.loh AdrpLdrGotLdr	Lloh63, Lloh64, Lloh65
	.loh AdrpLdrGotLdr	Lloh60, Lloh61, Lloh62
	.loh AdrpLdrGot	Lloh71, Lloh72
	.loh AdrpLdrGot	Lloh69, Lloh70
	.loh AdrpLdrGotLdr	Lloh66, Lloh67, Lloh68
	.loh AdrpLdrGotLdr	Lloh73, Lloh74, Lloh75
	.loh AdrpLdrGot	Lloh79, Lloh80
	.loh AdrpLdrGotLdr	Lloh76, Lloh77, Lloh78
	.loh AdrpAdd	Lloh81, Lloh82
	.loh AdrpLdrGot	Lloh83, Lloh84
	.loh AdrpAdd	Lloh85, Lloh86
	.cfi_endproc
                                        ; -- End function
	.comm	_FALSE,4,2                      ; @FALSE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"-saturation"

	.comm	_COLOURS_PAL_setup,40,3         ; @COLOURS_PAL_setup
	.comm	_COLOURS_NTSC_setup,40,3        ; @COLOURS_NTSC_setup
	.comm	_TRUE,4,2                       ; @TRUE
l_.str.1:                               ; @.str.1
	.asciz	"-contrast"

l_.str.2:                               ; @.str.2
	.asciz	"-brightness"

l_.str.3:                               ; @.str.3
	.asciz	"-gamma"

l_.str.4:                               ; @.str.4
	.asciz	"-tint"

l_.str.5:                               ; @.str.5
	.asciz	"-colors-preset"

	.comm	_preset_cfg_strings,4,2         ; @preset_cfg_strings
	.comm	_COLOURS_PRESET_SIZE,4,2        ; @COLOURS_PRESET_SIZE
l_.str.6:                               ; @.str.6
	.asciz	"Invalid value for -colors-preset"

	.comm	_presets,8,3                    ; @presets
l_.str.7:                               ; @.str.7
	.asciz	"-help"

l_.str.8:                               ; @.str.8
	.asciz	"\t-colors-preset standard|deep-black|vibrant"

l_.str.9:                               ; @.str.9
	.asciz	"\t                       Use one of predefined color adjustments"

l_.str.10:                              ; @.str.10
	.asciz	"\t-saturation <num>      Set color saturation"

l_.str.11:                              ; @.str.11
	.asciz	"\t-contrast <num>        Set contrast"

l_.str.12:                              ; @.str.12
	.asciz	"\t-brightness <num>      Set brightness"

l_.str.13:                              ; @.str.13
	.asciz	"\t-gamma <num>           Set color gamma factor"

l_.str.14:                              ; @.str.14
	.asciz	"\t-tint <num>            Set tint"

l_.str.15:                              ; @.str.15
	.asciz	"Missing argument for '%s'"

	.comm	_Atari800_tv_mode,4,2           ; @Atari800_tv_mode
.subsections_via_symbols
