	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ARTIFACT_Initialise            ## -- Begin function ARTIFACT_Initialise
	.p2align	4, 0x90
_ARTIFACT_Initialise:                   ## @ARTIFACT_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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movl	(%rdi), %r12d
	movl	$1, -44(%rbp)                   ## 4-byte Folded Spill
	cmpl	$2, %r12d
	jl	LBB0_22
## %bb.1:
	movl	$1, %r15d
	movq	_FALSE@GOTPCREL(%rip), %rbx
	movl	$1, -44(%rbp)                   ## 4-byte Folded Spill
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	leal	1(%r15), %r14d
	movl	(%rbx), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movslq	%r15d, %r13
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	(%rbx,%r13,8), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_3
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	(%rbx,%r13,8), %rdi
	leaq	L_.str.2(%rip), %rsi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_10
## %bb.15:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	(%rbx,%r13,8), %rdi
	leaq	L_.str.4(%rip), %rsi
	callq	_strcmp
	testq	%rax, %rax
	jne	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_2 Depth=1
	leaq	L_.str.5(%rip), %rdi
	xorl	%eax, %eax
	callq	_Log_print
	leaq	L_.str.6(%rip), %rdi
	xorl	%eax, %eax
	callq	_Log_print
	leaq	L_.str.7(%rip), %rdi
	xorl	%eax, %eax
	callq	_Log_print
	leaq	L_.str.8(%rip), %rdi
	xorl	%eax, %eax
	callq	_Log_print
LBB0_17:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	(%rbx,%r13,8), %rax
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movslq	%edx, %rcx
	incl	%edx
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movq	%rax, (%rbx,%rcx,8)
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_2 Depth=1
	cmpl	%r12d, %r14d
	jge	LBB0_14
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movslq	%r14d, %rax
	movq	(%rbx,%rax,8), %rdi
	movq	_mode_cfg_strings@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_ARTIFACT_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_CFG_MatchTextParameter
	testl	%eax, %eax
	js	LBB0_5
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_mode_ntsc@GOTPCREL(%rip), %rcx
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	cmpl	%r12d, %r14d
	jge	LBB0_14
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=1
	movslq	%r14d, %rax
	movq	(%rbx,%rax,8), %rdi
	movq	_mode_cfg_strings@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_ARTIFACT_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_CFG_MatchTextParameter
	testl	%eax, %eax
	js	LBB0_12
## %bb.13:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	_mode_pal@GOTPCREL(%rip), %rcx
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	%eax, (%rcx)
	movl	%r14d, %r15d
LBB0_18:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_FALSE@GOTPCREL(%rip), %rbx
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	testl	%eax, %eax
	je	LBB0_21
	jmp	LBB0_20
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_TRUE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_FALSE@GOTPCREL(%rip), %rbx
	testl	%eax, %eax
	jne	LBB0_20
LBB0_21:                                ##   in Loop: Header=BB0_2 Depth=1
	incl	%r15d
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %r12d
	cmpl	%r12d, %r15d
	jl	LBB0_2
LBB0_22:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	%ecx, (%rax)
	movq	_Atari800_tv_mode@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_UpdateFromTVMode
	movq	_ARTIFACT_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_FALSE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_UpdateMode
	movq	_TRUE@GOTPCREL(%rip), %rbx
	jmp	LBB0_23
LBB0_20:
	movslq	%r15d, %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx,%rax,8), %rsi
	leaq	L_.str.9(%rip), %rdi
	xorl	%eax, %eax
	callq	_Log_print
	jmp	LBB0_23
LBB0_5:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_6
LBB0_12:
	leaq	L_.str.3(%rip), %rdi
LBB0_6:
	xorl	%eax, %eax
	callq	_Log_print
	movq	_FALSE@GOTPCREL(%rip), %rbx
LBB0_23:
	movl	(%rbx), %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FALSE,4,2                      ## @FALSE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"-ntsc-artif"

	.comm	_mode_cfg_strings,4,2           ## @mode_cfg_strings
	.comm	_ARTIFACT_SIZE,4,2              ## @ARTIFACT_SIZE
L_.str.1:                               ## @.str.1
	.asciz	"Invalid value for -ntsc-artif"

	.comm	_mode_ntsc,4,2                  ## @mode_ntsc
	.comm	_TRUE,4,2                       ## @TRUE
L_.str.2:                               ## @.str.2
	.asciz	"-pal-artif"

L_.str.3:                               ## @.str.3
	.asciz	"Invalid value for -pal-artif"

	.comm	_mode_pal,4,2                   ## @mode_pal
L_.str.4:                               ## @.str.4
	.asciz	"-help"

L_.str.5:                               ## @.str.5
	.asciz	"\t-ntsc-artif none|ntsc-old|ntsc-new|ntsc-full"

L_.str.6:                               ## @.str.6
	.asciz	"\t                 Select video artifacts for NTSC"

L_.str.7:                               ## @.str.7
	.asciz	"\t-pal-artif none|pal-simple|pal-accu"

L_.str.8:                               ## @.str.8
	.asciz	"\t                 Select video artifacts for PAL"

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

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

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ARTIFACT_Initialise            ; -- Begin function ARTIFACT_Initialise
	.p2align	2
_ARTIFACT_Initialise:                   ; @ARTIFACT_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, x0
	ldr	w23, [x0]
Lloh0:
	adrp	x28, _FALSE@GOTPAGE
Lloh1:
	ldr	x28, [x28, _FALSE@GOTPAGEOFF]
	cmp	w23, #2
	b.lt	LBB0_17
; %bb.1:
	mov	x20, x1
Lloh2:
	adrp	x21, l_.str@PAGE
Lloh3:
	add	x21, x21, l_.str@PAGEOFF
	mov	w25, #1
	mov	w27, #1
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	sxtw	x22, w25
	add	x26, x22, #1
	ldr	w24, [x28]
	ldr	x0, [x20, w25, sxtw #3]
	mov	x1, x21
	bl	_strcmp
	cbz	x0, LBB0_7
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x0, [x20, x22, lsl #3]
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_strcmp
	cbz	x0, LBB0_10
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x0, [x20, x22, lsl #3]
Lloh6:
	adrp	x1, l_.str.4@PAGE
Lloh7:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_strcmp
	cbnz	x0, LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
Lloh8:
	adrp	x0, l_.str.5@PAGE
Lloh9:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_Log_print
Lloh10:
	adrp	x0, l_.str.6@PAGE
Lloh11:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_Log_print
Lloh12:
	adrp	x0, l_.str.7@PAGE
Lloh13:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_Log_print
Lloh14:
	adrp	x0, l_.str.8@PAGE
Lloh15:
	add	x0, x0, l_.str.8@PAGEOFF
	bl	_Log_print
LBB0_6:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x20, x22, lsl #3]
	str	x8, [x20, w27, sxtw #3]
	add	w27, w27, #1
	b	LBB0_15
LBB0_7:                                 ;   in Loop: Header=BB0_2 Depth=1
	cmp	w26, w23
	b.ge	LBB0_14
; %bb.8:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x0, [x20, x26, lsl #3]
Lloh16:
	adrp	x8, _mode_cfg_strings@GOTPAGE
Lloh17:
	ldr	x8, [x8, _mode_cfg_strings@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
Lloh19:
	adrp	x8, _ARTIFACT_SIZE@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ARTIFACT_SIZE@GOTPAGEOFF]
Lloh21:
	ldr	w2, [x8]
	bl	_CFG_MatchTextParameter
	tbnz	w0, #31, LBB0_22
; %bb.9:                                ;   in Loop: Header=BB0_2 Depth=1
Lloh22:
	adrp	x8, _mode_ntsc@GOTPAGE
Lloh23:
	ldr	x8, [x8, _mode_ntsc@GOTPAGEOFF]
	b	LBB0_13
LBB0_10:                                ;   in Loop: Header=BB0_2 Depth=1
	cmp	w26, w23
	b.ge	LBB0_14
; %bb.11:                               ;   in Loop: Header=BB0_2 Depth=1
	ldr	x0, [x20, w26, sxtw #3]
Lloh24:
	adrp	x8, _mode_cfg_strings@GOTPAGE
Lloh25:
	ldr	x8, [x8, _mode_cfg_strings@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
Lloh27:
	adrp	x8, _ARTIFACT_SIZE@GOTPAGE
Lloh28:
	ldr	x8, [x8, _ARTIFACT_SIZE@GOTPAGEOFF]
Lloh29:
	ldr	w2, [x8]
	bl	_CFG_MatchTextParameter
	tbnz	w0, #31, LBB0_23
; %bb.12:                               ;   in Loop: Header=BB0_2 Depth=1
Lloh30:
	adrp	x8, _mode_pal@GOTPAGE
Lloh31:
	ldr	x8, [x8, _mode_pal@GOTPAGEOFF]
LBB0_13:                                ;   in Loop: Header=BB0_2 Depth=1
	str	w0, [x8]
	mov	x25, x26
	b	LBB0_15
LBB0_14:                                ;   in Loop: Header=BB0_2 Depth=1
Lloh32:
	adrp	x8, _TRUE@GOTPAGE
Lloh33:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
Lloh34:
	ldr	w24, [x8]
LBB0_15:                                ;   in Loop: Header=BB0_2 Depth=1
	cbnz	w24, LBB0_19
; %bb.16:                               ;   in Loop: Header=BB0_2 Depth=1
	add	w25, w25, #1
	ldr	w23, [x19]
	cmp	w25, w23
	b.lt	LBB0_2
	b	LBB0_18
LBB0_17:
	mov	w27, #1
LBB0_18:
	str	w27, [x19]
Lloh35:
	adrp	x8, _Atari800_tv_mode@GOTPAGE
Lloh36:
	ldr	x8, [x8, _Atari800_tv_mode@GOTPAGEOFF]
Lloh37:
	ldr	w0, [x8]
	bl	_UpdateFromTVMode
Lloh38:
	adrp	x8, _ARTIFACT_NONE@GOTPAGE
Lloh39:
	ldr	x8, [x8, _ARTIFACT_NONE@GOTPAGEOFF]
Lloh40:
	ldr	w0, [x8]
	ldr	w1, [x28]
	bl	_UpdateMode
Lloh41:
	adrp	x8, _TRUE@GOTPAGE
Lloh42:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
	b	LBB0_21
LBB0_19:
	ldr	x8, [x20, w25, sxtw #3]
	str	x8, [sp]
Lloh43:
	adrp	x0, l_.str.9@PAGE
Lloh44:
	add	x0, x0, l_.str.9@PAGEOFF
LBB0_20:
	bl	_Log_print
Lloh45:
	adrp	x8, _FALSE@GOTPAGE
Lloh46:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
LBB0_21:
	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_22:
Lloh47:
	adrp	x0, l_.str.1@PAGE
Lloh48:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_20
LBB0_23:
Lloh49:
	adrp	x0, l_.str.3@PAGE
Lloh50:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_20
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpAdd	Lloh43, Lloh44
	.loh AdrpLdrGot	Lloh45, Lloh46
	.loh AdrpAdd	Lloh47, Lloh48
	.loh AdrpAdd	Lloh49, Lloh50
	.cfi_endproc
                                        ; -- End function
	.comm	_FALSE,4,2                      ; @FALSE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"-ntsc-artif"

	.comm	_mode_cfg_strings,4,2           ; @mode_cfg_strings
	.comm	_ARTIFACT_SIZE,4,2              ; @ARTIFACT_SIZE
l_.str.1:                               ; @.str.1
	.asciz	"Invalid value for -ntsc-artif"

	.comm	_mode_ntsc,4,2                  ; @mode_ntsc
	.comm	_TRUE,4,2                       ; @TRUE
l_.str.2:                               ; @.str.2
	.asciz	"-pal-artif"

l_.str.3:                               ; @.str.3
	.asciz	"Invalid value for -pal-artif"

	.comm	_mode_pal,4,2                   ; @mode_pal
l_.str.4:                               ; @.str.4
	.asciz	"-help"

l_.str.5:                               ; @.str.5
	.asciz	"\t-ntsc-artif none|ntsc-old|ntsc-new|ntsc-full"

l_.str.6:                               ; @.str.6
	.asciz	"\t                 Select video artifacts for NTSC"

l_.str.7:                               ; @.str.7
	.asciz	"\t-pal-artif none|pal-simple|pal-accu"

l_.str.8:                               ; @.str.8
	.asciz	"\t                 Select video artifacts for PAL"

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

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