	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sdl_sync_timer_callback
_sdl_sync_timer_callback:               ## @sdl_sync_timer_callback
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$112, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%edi, %r14d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -24(%rbp)
	movq	_sdl_sync@GOTPCREL(%rip), %rbx
	movl	4(%rbx), %edi
	callq	_SDL_SemPost
	movl	(%rbx), %eax
	incl	%eax
	movl	%eax, (%rbx)
	movq	_vdp_pal@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	testq	%rcx, %rcx
	movl	$20, %edx
	movl	$50, %esi
	cmovel	%edx, %esi
	cmpl	%esi, %eax
	jne	LBB0_4
## %bb.1:
	movq	_sdl_video@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	testq	%rcx, %rcx
	je	LBB0_3
## %bb.2:
	movslq	%edx, %rcx
	imulq	$1431655766, %rcx, %rdx         ## imm = 0x55555556
	movq	%rdx, %rcx
	shrq	$63, %rcx
	shrq	$32, %rdx
	addl	%ecx, %edx
LBB0_3:
	movl	$0, (%rax)
	movl	$0, (%rbx)
	movq	_rominfo@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	leaq	L_.str(%rip), %rsi
	leaq	-128(%rbp), %rbx
	movq	%rbx, %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_sprintf
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_SDL_WM_SetCaption
LBB0_4:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-24(%rbp), %rax
	jne	LBB0_6
## %bb.5:
	movl	%r14d, %eax
	addq	$112, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_6:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_sdl_sync,8,2                   ## @sdl_sync
	.comm	_vdp_pal,8,3                    ## @vdp_pal
	.comm	_sdl_video,4,2                  ## @sdl_video
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%d fps - %s "

	.comm	_rominfo,8,3                    ## @rominfo
	.no_dead_strip	_sdl_sync_timer_callback
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sdl_sync_timer_callback
_sdl_sync_timer_callback:               ; @sdl_sync_timer_callback
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-24]
Lloh3:
	adrp	x20, _sdl_sync@GOTPAGE
Lloh4:
	ldr	x20, [x20, _sdl_sync@GOTPAGEOFF]
	ldr	w0, [x20, #4]
	bl	_SDL_SemPost
	ldr	w8, [x20]
	add	w9, w8, #1
	str	w9, [x20]
Lloh5:
	adrp	x8, _vdp_pal@GOTPAGE
Lloh6:
	ldr	x8, [x8, _vdp_pal@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	cmp	x8, #0
	mov	w10, #50
	mov	w11, #20
	csel	w10, w11, w10, eq
	cmp	w9, w10
	b.ne	LBB0_2
; %bb.1:
Lloh8:
	adrp	x9, _sdl_video@GOTPAGE
Lloh9:
	ldr	x9, [x9, _sdl_video@GOTPAGEOFF]
	ldrsw	x10, [x9]
	mov	w11, #21846
	movk	w11, #21845, lsl #16
	mul	x11, x10, x11
	lsr	x12, x11, #63
	lsr	x11, x11, #32
	add	w11, w11, w12
	cmp	x8, #0
	csel	w2, w10, w11, eq
	str	wzr, [x9]
	str	wzr, [x20]
Lloh10:
	adrp	x8, _rominfo@GOTPAGE
Lloh11:
	ldr	x8, [x8, _rominfo@GOTPAGEOFF]
Lloh12:
	ldr	x3, [x8]
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	add	x0, sp, #4
	bl	_sprintf
	add	x0, sp, #4
	mov	x1, #0
	bl	_SDL_WM_SetCaption
LBB0_2:
	ldur	x8, [x29, #-24]
Lloh15:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh16:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_4
; %bb.3:
	mov	x0, x19
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_4:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_sdl_sync,8,2                   ; @sdl_sync
	.comm	_vdp_pal,8,3                    ; @vdp_pal
	.comm	_sdl_video,4,2                  ; @sdl_video
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%d fps - %s "

	.comm	_rominfo,8,3                    ; @rominfo
	.no_dead_strip	_sdl_sync_timer_callback
.subsections_via_symbols
