	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ym2612_read_local_68k
_ym2612_read_local_68k:                 ## @ym2612_read_local_68k
	.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	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	xorl	%eax, %eax
	callq	_z80_cycles_from_68k
	movl	%eax, %ebx
	xorl	%eax, %eax
	callq	_ym2612_read_local
	movq	_EL_YMTIMER@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_ym2612@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	movq	_timer_a_next_oflow@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	sarl	$8, %ecx
	movq	_timer_b_next_oflow@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	sarl	$8, %r8d
	shll	$8, %ebx
	sarl	$8, %ebx
	movslq	%ebx, %r9
	imulq	$-1883757585, %r9, %rax         ## imm = 0x8FB823EF
	shrq	$32, %rax
	addl	%r9d, %eax
	movl	%eax, %esi
	shrl	$31, %esi
	sarl	$7, %eax
	addl	%esi, %eax
	movl	%eax, (%rsp)
	leaq	L_.str(%rip), %rsi
                                        ## kill: def $r9d killed $r9d killed $r9
	callq	_elprintf
	movl	(%r14), %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EL_YMTIMER,4,2                 ## @EL_YMTIMER
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"timer 68k read %i, sched %i, %i @ %i|%i"

	.comm	_ym2612,4,2                     ## @ym2612
	.comm	_timer_a_next_oflow,4,2         ## @timer_a_next_oflow
	.comm	_timer_b_next_oflow,4,2         ## @timer_b_next_oflow
	.no_dead_strip	_ym2612_read_local_68k
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ym2612_read_local_68k
_ym2612_read_local_68k:                 ; @ym2612_read_local_68k
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	bl	_z80_cycles_from_68k
	mov	x19, x0
	bl	_ym2612_read_local
Lloh0:
	adrp	x8, _EL_YMTIMER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EL_YMTIMER@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x20, _ym2612@GOTPAGE
Lloh4:
	ldr	x20, [x20, _ym2612@GOTPAGEOFF]
	ldr	w2, [x20]
Lloh5:
	adrp	x8, _timer_a_next_oflow@GOTPAGE
Lloh6:
	ldr	x8, [x8, _timer_a_next_oflow@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	asr	w3, w8, #8
Lloh8:
	adrp	x8, _timer_b_next_oflow@GOTPAGE
Lloh9:
	ldr	x8, [x8, _timer_b_next_oflow@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	asr	w4, w8, #8
	sbfx	w5, w19, #0, #24
	mov	w8, #9199
	movk	w8, #36792, lsl #16
	smull	x8, w5, w8
	lsr	x8, x8, #32
	add	w8, w8, w5
	asr	w9, w8, #7
	add	w6, w9, w8, lsr #31
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	bl	_elprintf
	ldr	w0, [x20]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EL_YMTIMER,4,2                 ; @EL_YMTIMER
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"timer 68k read %i, sched %i, %i @ %i|%i"

	.comm	_ym2612,4,2                     ; @ym2612
	.comm	_timer_a_next_oflow,4,2         ; @timer_a_next_oflow
	.comm	_timer_b_next_oflow,4,2         ; @timer_b_next_oflow
	.no_dead_strip	_ym2612_read_local_68k
.subsections_via_symbols
