	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function init_syncsound
_init_syncsound:                        ## @init_syncsound
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_POKEYSND_playback_freq@GOTPCREL(%rip), %rax
	cvtsi2sdq	(%rax), %xmm0
	movq	_Atari800_tv_mode@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_Atari800_TV_PAL@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_1
## %bb.2:
	movq	_Atari800_FPS_PAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_3
LBB0_1:
	movq	_Atari800_FPS_NTSC@GOTPCREL(%rip), %rcx
LBB0_3:
	divsd	(%rcx), %xmm0
	imull	$114, %eax, %eax
	cvtsi2sd	%rax, %xmm1
	divsd	%xmm0, %xmm1
	movq	_ticks_per_sample@GOTPCREL(%rip), %rax
	movsd	%xmm1, (%rax)
	movq	_samp_pos@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	movq	_generate_sync@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_POKEYSND_GenerateSync@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_POKEYSND_playback_freq,8,3     ## @POKEYSND_playback_freq
	.comm	_Atari800_tv_mode,4,2           ## @Atari800_tv_mode
	.comm	_Atari800_TV_PAL,4,2            ## @Atari800_TV_PAL
	.comm	_Atari800_FPS_PAL,8,3           ## @Atari800_FPS_PAL
	.comm	_Atari800_FPS_NTSC,8,3          ## @Atari800_FPS_NTSC
	.comm	_ticks_per_sample,8,3           ## @ticks_per_sample
	.comm	_samp_pos,8,3                   ## @samp_pos
	.comm	_generate_sync,4,2              ## @generate_sync
	.comm	_POKEYSND_GenerateSync,4,2      ## @POKEYSND_GenerateSync
	.no_dead_strip	_init_syncsound
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function init_syncsound
_init_syncsound:                        ; @init_syncsound
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _POKEYSND_playback_freq@GOTPAGE
Lloh1:
	ldr	x8, [x8, _POKEYSND_playback_freq@GOTPAGEOFF]
Lloh2:
	ldr	d0, [x8]
Lloh3:
	adrp	x8, _Atari800_tv_mode@GOTPAGE
Lloh4:
	ldr	x8, [x8, _Atari800_tv_mode@GOTPAGEOFF]
	scvtf	d0, d0
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _Atari800_TV_PAL@GOTPAGE
Lloh7:
	ldr	x9, [x9, _Atari800_TV_PAL@GOTPAGEOFF]
Lloh8:
	adrp	x10, _Atari800_FPS_PAL@GOTPAGE
Lloh9:
	ldr	x10, [x10, _Atari800_FPS_PAL@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
Lloh11:
	adrp	x11, _Atari800_FPS_NTSC@GOTPAGE
Lloh12:
	ldr	x11, [x11, _Atari800_FPS_NTSC@GOTPAGEOFF]
	cmp	w8, w9
	csel	x9, x10, x11, eq
	ldr	d1, [x9]
	fdiv	d0, d0, d1
	mov	w9, #114
	mul	w8, w8, w9
	ucvtf	d1, w8
	fdiv	d0, d1, d0
Lloh13:
	adrp	x8, _ticks_per_sample@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ticks_per_sample@GOTPAGEOFF]
Lloh15:
	str	d0, [x8]
Lloh16:
	adrp	x8, _samp_pos@GOTPAGE
Lloh17:
	ldr	x8, [x8, _samp_pos@GOTPAGEOFF]
Lloh18:
	str	xzr, [x8]
Lloh19:
	adrp	x8, _generate_sync@GOTPAGE
Lloh20:
	ldr	x8, [x8, _generate_sync@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
Lloh22:
	adrp	x9, _POKEYSND_GenerateSync@GOTPAGE
Lloh23:
	ldr	x9, [x9, _POKEYSND_GenerateSync@GOTPAGEOFF]
Lloh24:
	str	w8, [x9]
	ret
	.loh AdrpLdrGotStr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotStr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotStr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh10
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_POKEYSND_playback_freq,8,3     ; @POKEYSND_playback_freq
	.comm	_Atari800_tv_mode,4,2           ; @Atari800_tv_mode
	.comm	_Atari800_TV_PAL,4,2            ; @Atari800_TV_PAL
	.comm	_Atari800_FPS_PAL,8,3           ; @Atari800_FPS_PAL
	.comm	_Atari800_FPS_NTSC,8,3          ; @Atari800_FPS_NTSC
	.comm	_ticks_per_sample,8,3           ; @ticks_per_sample
	.comm	_samp_pos,8,3                   ; @samp_pos
	.comm	_generate_sync,4,2              ; @generate_sync
	.comm	_POKEYSND_GenerateSync,4,2      ; @POKEYSND_GenerateSync
	.no_dead_strip	_init_syncsound
.subsections_via_symbols
