	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function Generate_sync_rf
_Generate_sync_rf:                      ## @Generate_sync_rf
	.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	_POKEYSND_process_buffer@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	movq	_POKEYSND_process_buffer_fill@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	leaq	(%r15,%rax,4), %rbx
	movq	_POKEYSND_process_buffer_length@GOTPCREL(%rip), %rax
	movslq	(%rax), %r13
	movq	_samp_pos@GOTPCREL(%rip), %r12
	movq	_ticks_per_sample@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	(%r12), %eax
	cvtsi2sd	%rax, %xmm0
	leaq	-48(%rbp), %rdi
	callq	_modf
	cvttsd2si	-48(%rbp), %rax
	cmpl	%r14d, %eax
	jbe	LBB0_1
LBB0_7:
	subl	%r14d, (%r12)
LBB0_8:
	movq	_POKEYSND_process_buffer@GOTPCREL(%rip), %rax
	subq	(%rax), %rbx
	shrq	$2, %rbx
	movq	_POKEYSND_process_buffer_fill@GOTPCREL(%rip), %rax
	movl	%ebx, (%rax)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	leaq	(%r15,%r13,4), %r13
	leaq	-48(%rbp), %r15
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_pokeysnd_process_8
	movq	_POKEYSND_num_pokeys@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	cltq
	leaq	(%rbx,%rax,4), %rbx
	movq	_ticks_per_sample@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	(%r12), %eax
	xorps	%xmm0, %xmm0
	cvtsi2sd	%rax, %xmm0
	movq	%r15, %rdi
	callq	_modf
	cvttsd2si	-48(%rbp), %rax
	cmpl	%eax, %r14d
	jb	LBB0_7
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%r13, %rbx
	jae	LBB0_8
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cvttsd2si	%xmm0, %rcx
	movl	%ecx, (%r12)
	subl	%eax, %r14d
	movq	_POKEYSND_BIT16@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_POKEYSND_snd_flags@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_pokeysnd_process_16
	movq	_POKEYSND_num_pokeys@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%eax, %eax
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_POKEYSND_process_buffer,8,3    ## @POKEYSND_process_buffer
	.comm	_POKEYSND_process_buffer_fill,4,2 ## @POKEYSND_process_buffer_fill
	.comm	_POKEYSND_process_buffer_length,4,2 ## @POKEYSND_process_buffer_length
	.comm	_samp_pos,4,2                   ## @samp_pos
	.comm	_ticks_per_sample,4,2           ## @ticks_per_sample
	.comm	_POKEYSND_snd_flags,4,2         ## @POKEYSND_snd_flags
	.comm	_POKEYSND_BIT16,4,2             ## @POKEYSND_BIT16
	.comm	_POKEYSND_num_pokeys,4,2        ## @POKEYSND_num_pokeys
	.no_dead_strip	_Generate_sync_rf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function Generate_sync_rf
_Generate_sync_rf:                      ; @Generate_sync_rf
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x0
Lloh0:
	adrp	x22, _POKEYSND_process_buffer@GOTPAGE
Lloh1:
	ldr	x22, [x22, _POKEYSND_process_buffer@GOTPAGEOFF]
	ldr	x25, [x22]
Lloh2:
	adrp	x21, _POKEYSND_process_buffer_fill@GOTPAGE
Lloh3:
	ldr	x21, [x21, _POKEYSND_process_buffer_fill@GOTPAGEOFF]
	ldrsw	x8, [x21]
	add	x19, x25, x8, lsl #2
Lloh4:
	adrp	x8, _POKEYSND_process_buffer_length@GOTPAGE
Lloh5:
	ldr	x8, [x8, _POKEYSND_process_buffer_length@GOTPAGEOFF]
Lloh6:
	ldrsw	x26, [x8]
Lloh7:
	adrp	x23, _samp_pos@GOTPAGE
Lloh8:
	ldr	x23, [x23, _samp_pos@GOTPAGEOFF]
	ldr	w8, [x23]
Lloh9:
	adrp	x24, _ticks_per_sample@GOTPAGE
Lloh10:
	ldr	x24, [x24, _ticks_per_sample@GOTPAGEOFF]
	ldr	w9, [x24]
	add	w8, w9, w8
	ucvtf	d0, w8
	add	x0, sp, #8
	bl	_modf
	ldr	d1, [sp, #8]
	fcvtzu	w8, d1
	cmp	w8, w20
	b.ls	LBB0_3
LBB0_1:
	ldr	w8, [x23]
	sub	w8, w8, w20
	str	w8, [x23]
LBB0_2:
	ldr	x8, [x22]
	sub	x8, x19, x8
	lsr	x8, x8, #2
	str	w8, [x21]
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_3:
	add	x25, x25, x26, lsl #2
Lloh11:
	adrp	x26, _POKEYSND_snd_flags@GOTPAGE
Lloh12:
	ldr	x26, [x26, _POKEYSND_snd_flags@GOTPAGEOFF]
Lloh13:
	adrp	x27, _POKEYSND_BIT16@GOTPAGE
Lloh14:
	ldr	x27, [x27, _POKEYSND_BIT16@GOTPAGEOFF]
Lloh15:
	adrp	x28, _POKEYSND_num_pokeys@GOTPAGE
Lloh16:
	ldr	x28, [x28, _POKEYSND_num_pokeys@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	bl	_pokeysnd_process_8
	ldr	w8, [x28]
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x19, x19, w8, sxtw #2
	ldr	w8, [x23]
	ldr	w9, [x24]
	add	w8, w9, w8
	ucvtf	d0, w8
	add	x0, sp, #8
	bl	_modf
	ldr	d1, [sp, #8]
	fcvtzu	w8, d1
	cmp	w20, w8
	b.lo	LBB0_1
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	cmp	x19, x25
	b.hs	LBB0_2
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	fcvtzu	w9, d0
	str	w9, [x23]
	sub	w20, w20, w8
	ldr	w8, [x26]
	ldr	w9, [x27]
	mov	x0, x19
	mov	w1, #1
	tst	w9, w8
	b.eq	LBB0_4
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	bl	_pokeysnd_process_16
	ldr	w8, [x28]
	lsl	w8, w8, #1
	b	LBB0_5
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_POKEYSND_process_buffer,8,3    ; @POKEYSND_process_buffer
	.comm	_POKEYSND_process_buffer_fill,4,2 ; @POKEYSND_process_buffer_fill
	.comm	_POKEYSND_process_buffer_length,4,2 ; @POKEYSND_process_buffer_length
	.comm	_samp_pos,4,2                   ; @samp_pos
	.comm	_ticks_per_sample,4,2           ; @ticks_per_sample
	.comm	_POKEYSND_snd_flags,4,2         ; @POKEYSND_snd_flags
	.comm	_POKEYSND_BIT16,4,2             ; @POKEYSND_BIT16
	.comm	_POKEYSND_num_pokeys,4,2        ; @POKEYSND_num_pokeys
	.no_dead_strip	_Generate_sync_rf
.subsections_via_symbols
