	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_FILTER_NTSC_Update             ## -- Begin function FILTER_NTSC_Update
	.p2align	4, 0x90
_FILTER_NTSC_Update:                    ## @FILTER_NTSC_Update
	.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	%rbx
	pushq	%rax
	movl	$6152, %eax                     ## imm = 0x1808
	callq	____chkstk_darwin
	subq	%rax, %rsp
	popq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movq	_FILTER_NTSC_setup@GOTPCREL(%rip), %rbx
	movq	_M_PI@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	imull	(%rbx), %esi
	leaq	-6176(%rbp), %r15
	movq	%r15, %rdi
	callq	_COLOURS_NTSC_GetYIQ
	movq	_COLOURS_NTSC_external@GOTPCREL(%rip), %rax
	cmpq	$0, 8(%rax)
	je	LBB0_3
## %bb.1:
	cmpl	$0, (%rax)
	jne	LBB0_3
## %bb.2:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 8(%rbx)
	movq	$0, 24(%rbx)
	xorps	%xmm0, %xmm0
	jmp	LBB0_4
LBB0_3:
	movq	_COLOURS_NTSC_setup@GOTPCREL(%rip), %rax
	movups	(%rax), %xmm0
	movups	%xmm0, 8(%rbx)
	movsd	16(%rax), %xmm0                 ## xmm0 = mem[0],zero
	movsd	%xmm0, 24(%rbx)
	movsd	24(%rax), %xmm0                 ## xmm0 = mem[0],zero
LBB0_4:
	movsd	%xmm0, 32(%rbx)
	movq	%r15, 40(%rbx)
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_atari_ntsc_init
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_6
## %bb.5:
	addq	$6152, %rsp                     ## imm = 0x1808
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_FILTER_NTSC_setup,48,3         ## @FILTER_NTSC_setup
	.comm	_M_PI,4,2                       ## @M_PI
	.comm	_COLOURS_NTSC_external,16,3     ## @COLOURS_NTSC_external
	.comm	_COLOURS_NTSC_setup,32,3        ## @COLOURS_NTSC_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_FILTER_NTSC_Update             ; -- Begin function FILTER_NTSC_Update
	.p2align	2
_FILTER_NTSC_Update:                    ; @FILTER_NTSC_Update
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w27, -40
	.cfi_offset w28, -48
	mov	w9, #6160
Lloh0:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh1:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	sub	sp, sp, #1, lsl #12             ; =4096
	sub	sp, sp, #2064
	mov	x19, x0
Lloh2:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh3:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
Lloh5:
	adrp	x20, _FILTER_NTSC_setup@GOTPAGE
Lloh6:
	ldr	x20, [x20, _FILTER_NTSC_setup@GOTPAGEOFF]
	stur	x8, [x29, #-40]
	ldr	w8, [x20]
Lloh7:
	adrp	x9, _M_PI@GOTPAGE
Lloh8:
	ldr	x9, [x9, _M_PI@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	mul	w1, w9, w8
	add	x0, sp, #8
	bl	_COLOURS_NTSC_GetYIQ
Lloh10:
	adrp	x8, _COLOURS_NTSC_external@GOTPAGE
Lloh11:
	ldr	x8, [x8, _COLOURS_NTSC_external@GOTPAGEOFF]
	ldr	x9, [x8, #8]
	ldr	w8, [x8]
	cmp	x9, #0
	ccmp	w8, #0, #0, ne
	b.eq	LBB0_2
; %bb.1:
Lloh12:
	adrp	x8, _COLOURS_NTSC_setup@GOTPAGE
Lloh13:
	ldr	x8, [x8, _COLOURS_NTSC_setup@GOTPAGEOFF]
	ldr	q0, [x8]
	stur	q0, [x20, #8]
	ldp	d1, d0, [x8, #16]
	str	d1, [x20, #24]
	b	LBB0_3
LBB0_2:
	stp	xzr, xzr, [x20, #8]
	movi	d0, #0000000000000000
	str	xzr, [x20, #24]
LBB0_3:
	str	d0, [x20, #32]
	add	x8, sp, #8
	str	x8, [x20, #40]
	mov	x0, x19
	mov	x1, x20
	bl	_atari_ntsc_init
	ldur	x8, [x29, #-40]
Lloh14:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh15:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_5
; %bb.4:
	add	sp, sp, #1, lsl #12             ; =4096
	add	sp, sp, #2064
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_5:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_FILTER_NTSC_setup,48,3         ; @FILTER_NTSC_setup
	.comm	_M_PI,4,2                       ; @M_PI
	.comm	_COLOURS_NTSC_external,16,3     ; @COLOURS_NTSC_external
	.comm	_COLOURS_NTSC_setup,32,3        ; @COLOURS_NTSC_setup
.subsections_via_symbols
