	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_PicoSyncZ80                    ## -- Begin function PicoSyncZ80
	.p2align	4, 0x90
_PicoSyncZ80:                           ## @PicoSyncZ80
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r14d
	movq	_last_z80_sync@GOTPCREL(%rip), %r12
	subl	(%r12), %edi
	callq	_cycles_68k_to_z80
	movq	%rax, %rbx
	movq	_z80_cycle_aim@GOTPCREL(%rip), %r13
	addl	(%r13), %ebx
	movl	%ebx, (%r13)
	movq	_z80_cycle_cnt@GOTPCREL(%rip), %r15
	movl	%r14d, (%r12)
	movq	_z80@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	movl	(%r15), %r12d
	callq	_pprof_start
	movq	_EL_BUSREQ@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movslq	(%r15), %rcx
	imulq	$954437177, %rcx, %r8           ## imm = 0x38E38E39
	movq	%r8, %rax
	shrq	$63, %rax
	sarq	$38, %r8
	addl	%eax, %r8d
	movslq	(%r13), %r9
	imulq	$954437177, %r9, %rax           ## imm = 0x38E38E39
	movq	%rax, %rdx
	shrq	$63, %rdx
	sarq	$38, %rax
	addl	%edx, %eax
	movl	%eax, (%rsp)
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	subl	%r12d, %edx
                                        ## kill: def $ecx killed $ecx killed $rcx
                                        ## kill: def $r8d killed $r8d killed $r8
                                        ## kill: def $r9d killed $r9d killed $r9
	callq	_elprintf
	subl	%r12d, %ebx
	jle	LBB0_2
## %bb.1:
	movl	%ebx, %edi
	callq	_z80_run
	addl	%eax, (%r15)
LBB0_2:
	movl	(%r14), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pprof_end                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_last_z80_sync,4,2              ## @last_z80_sync
	.comm	_z80_cycle_aim,4,2              ## @z80_cycle_aim
	.comm	_z80_cycle_cnt,4,2              ## @z80_cycle_cnt
	.comm	_z80,4,2                        ## @z80
	.comm	_EL_BUSREQ,4,2                  ## @EL_BUSREQ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"z80 sync %i (%u|%u -> %u|%u)"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_PicoSyncZ80                    ; -- Begin function PicoSyncZ80
	.p2align	2
_PicoSyncZ80:                           ; @PicoSyncZ80
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x0
Lloh0:
	adrp	x22, _last_z80_sync@GOTPAGE
Lloh1:
	ldr	x22, [x22, _last_z80_sync@GOTPAGEOFF]
	ldr	w8, [x22]
	sub	w0, w0, w8
	bl	_cycles_68k_to_z80
Lloh2:
	adrp	x23, _z80_cycle_aim@GOTPAGE
Lloh3:
	ldr	x23, [x23, _z80_cycle_aim@GOTPAGEOFF]
	ldr	w8, [x23]
Lloh4:
	adrp	x21, _z80_cycle_cnt@GOTPAGE
Lloh5:
	ldr	x21, [x21, _z80_cycle_cnt@GOTPAGEOFF]
	ldr	w9, [x21]
	add	w8, w8, w0
	sub	w19, w8, w9
	str	w8, [x23]
	str	w20, [x22]
Lloh6:
	adrp	x20, _z80@GOTPAGE
Lloh7:
	ldr	x20, [x20, _z80@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_pprof_start
Lloh8:
	adrp	x8, _EL_BUSREQ@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EL_BUSREQ@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	ldrsw	x3, [x21]
	mov	w8, #36409
	movk	w8, #14563, lsl #16
	mul	x9, x3, x8
	lsr	x10, x9, #63
	asr	x9, x9, #38
	add	w4, w9, w10
	ldrsw	x5, [x23]
	mul	x8, x5, x8
	lsr	x9, x8, #63
	asr	x8, x8, #38
	add	w6, w8, w9
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
                                        ; kill: def $w3 killed $w3 killed $x3
                                        ; kill: def $w5 killed $w5 killed $x5
	bl	_elprintf
	cmp	w19, #1
	b.lt	LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_z80_run
	ldr	w8, [x21]
	add	w8, w8, w0
	str	w8, [x21]
LBB0_2:
	ldr	w0, [x20]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_pprof_end
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_last_z80_sync,4,2              ; @last_z80_sync
	.comm	_z80_cycle_aim,4,2              ; @z80_cycle_aim
	.comm	_z80_cycle_cnt,4,2              ; @z80_cycle_cnt
	.comm	_z80,4,2                        ; @z80
	.comm	_EL_BUSREQ,4,2                  ; @EL_BUSREQ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"z80 sync %i (%u|%u -> %u|%u)"

.subsections_via_symbols
