	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function chan_render
_chan_render:                           ## @chan_render
	.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	%edx, %r14d
	movl	%esi, %edx
	movq	%rdi, %r8
	movq	_ym2612@GOTPCREL(%rip), %r9
	movq	16(%r9), %rsi
	movslq	%r14d, %rax
	leaq	(%rax,%rax,4), %rdi
	leaq	(%rsi,%rdi,8), %rax
	movq	_crct@GOTPCREL(%rip), %r12
	movq	%rax, 48(%r12)
	movl	32(%rsi,%rdi,8), %ebx
	movl	%ebx, 68(%r12)
	movl	12(%r9), %ebx
	movl	%ebx, 96(%r12)
	andl	$53, %ecx
	cmpq	$0, 88(%r12)
	je	LBB0_4
## %bb.1:
	movq	_g_lfo_ampm@GOTPCREL(%rip), %rbx
	movl	(%rbx), %ebx
	shll	$16, %ebx
	orl	%ecx, %ebx
	movl	(%rax), %ecx
	shll	$8, %ecx
	orl	%ebx, %ecx
	orl	$8, %ecx
	movl	4(%rsi,%rdi,8), %eax
	cmpl	$8, %eax
	jne	LBB0_3
## %bb.2:
	andl	$-4035, %ecx                    ## imm = 0xF03D
	jmp	LBB0_4
LBB0_3:
	shll	$6, %eax
	movzbl	%al, %eax
	orl	%eax, %ecx
LBB0_4:
	movl	8(%rsi,%rdi,8), %eax
	shll	$12, %eax
	movzwl	%ax, %eax
	orl	%ecx, %eax
	movl	%eax, (%r12)
	movq	4(%r9), %rax
	movq	%rax, 76(%r12)
	movq	24(%rsi,%rdi,8), %rax
	movq	_SLOT1@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rbx
	leaq	(%rbx,%rbx,4), %r15
	movl	28(%rax,%r15,8), %ebx
	movl	%ebx, 64(%r12)
	movq	_SLOT2@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rbx
	leaq	(%rbx,%rbx,4), %r11
	movl	28(%rax,%r11,8), %ebx
	movl	%ebx, 60(%r12)
	movq	_SLOT3@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rbx
	leaq	(%rbx,%rbx,4), %r10
	movl	28(%rax,%r10,8), %ebx
	movl	%ebx, 56(%r12)
	movq	_SLOT4@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rbx
	leaq	(%rbx,%rbx,4), %r9
	movl	28(%rax,%r9,8), %ebx
	movl	%ebx, 40(%r12)
	movl	(%rax,%r15,8), %ebx
	addl	32(%rax,%r15,8), %ebx
	movl	%ebx, 4(%r12)
	movl	(%rax,%r11,8), %ebx
	addl	32(%rax,%r11,8), %ebx
	movl	%ebx, 8(%r12)
	movl	(%rax,%r10,8), %ebx
	addl	32(%rax,%r10,8), %ebx
	movl	%ebx, 12(%r12)
	movl	(%rax,%r9,8), %ebx
	addl	32(%rax,%r9,8), %ebx
	movl	%ebx, 16(%r12)
	movl	36(%rsi,%rdi,8), %ebx
	movl	%ebx, 72(%r12)
	movl	12(%rsi,%rdi,8), %ebx
	andl	$7, %ebx
	movl	%ebx, 20(%r12)
	movl	16(%rsi,%rdi,8), %r13d
	testl	%r13d, %r13d
	je	LBB0_7
## %bb.5:
	movl	20(%rsi,%rdi,8), %esi
	movl	%esi, %edi
	shll	$4, %edi
	andl	$32512, %edi                    ## imm = 0x7F00
	movq	_lfo_pm_table@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rbx
	shrl	$16, %ecx
	movzbl	%cl, %ecx
	addl	%ecx, %r13d
	addl	%edi, %r13d
	movslq	%r13d, %rcx
	movl	(%rbx,%rcx,4), %ecx
	testl	%ecx, %ecx
	je	LBB0_7
## %bb.6:
	movl	%esi, %edi
	sarl	$11, %edi
	leal	(%rcx,%rsi,2), %ecx
	andl	$4095, %ecx                     ## imm = 0xFFF
	movslq	%edi, %rbx
	leaq	(,%rbx,4), %r13
	movq	_opn_fktable@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rdi
	movq	_fn_table@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rsi
	movl	(%rsi,%rcx,4), %esi
                                        ## kill: def $ecx killed $ecx killed $rcx def $rcx
	shrl	$8, %ecx
	movslq	(%rdi,%rcx,4), %rdi
	orq	%r13, %rdi
	movb	$7, %cl
	subb	%bl, %cl
	sarl	%cl, %esi
	movq	8(%rax,%r15,8), %rcx
	movl	(%rcx,%rdi,4), %ecx
	addl	%esi, %ecx
	imull	16(%rax,%r15,8), %ecx
	sarl	%ecx
	movl	%ecx, 24(%r12)
	movq	8(%rax,%r11,8), %rcx
	movl	(%rcx,%rdi,4), %ecx
	addl	%esi, %ecx
	imull	16(%rax,%r11,8), %ecx
	sarl	%ecx
	movl	%ecx, 28(%r12)
	movq	8(%rax,%r10,8), %rcx
	movl	(%rcx,%rdi,4), %ecx
	addl	%esi, %ecx
	imull	16(%rax,%r10,8), %ecx
	sarl	%ecx
	movl	%ecx, 32(%r12)
	movq	8(%rax,%r9,8), %rcx
	addl	(%rcx,%rdi,4), %esi
	imull	16(%rax,%r9,8), %esi
	sarl	%esi
	jmp	LBB0_8
LBB0_7:
	movl	20(%rax,%r15,8), %ecx
	movl	%ecx, 24(%r12)
	movl	20(%rax,%r11,8), %ecx
	movl	%ecx, 28(%r12)
	movl	20(%rax,%r10,8), %ecx
	movl	%ecx, 32(%r12)
	movl	20(%rax,%r9,8), %esi
LBB0_8:
	movq	_SLOT1@GOTPCREL(%rip), %rbx
	movq	_SLOT2@GOTPCREL(%rip), %r15
	movq	_SLOT3@GOTPCREL(%rip), %r13
	movl	%esi, 36(%r12)
	movq	%r12, %rdi
	movq	%r8, %rsi
	callq	_chan_render_loop
	movl	72(%r12), %eax
	movq	48(%r12), %rcx
	movl	%eax, 36(%rcx)
	movl	68(%r12), %eax
	movl	%eax, 32(%rcx)
	movq	24(%rcx), %rax
	movq	(%rbx), %rcx
	leaq	(%rcx,%rcx,4), %rcx
	movq	(%r15), %rdx
	leaq	(%rdx,%rdx,4), %rdx
	movl	24(%rax,%rdx,8), %ebx
	orl	24(%rax,%rcx,8), %ebx
	movq	(%r13), %rsi
	leaq	(%rsi,%rsi,4), %rsi
	orl	24(%rax,%rsi,8), %ebx
	movq	_SLOT4@GOTPCREL(%rip), %rdi
	movq	(%rdi), %rdi
	leaq	(%rdi,%rdi,4), %rdi
	orl	24(%rax,%rdi,8), %ebx
	je	LBB0_10
## %bb.9:
	movl	64(%r12), %ebx
	movl	%ebx, 28(%rax,%rcx,8)
	movl	60(%r12), %ecx
	movl	%ecx, 28(%rax,%rdx,8)
	movl	56(%r12), %ecx
	movl	%ecx, 28(%rax,%rsi,8)
	movl	40(%r12), %ecx
	movl	%ecx, 28(%rax,%rdi,8)
	jmp	LBB0_11
LBB0_10:
	shll	$2, %r14d
	movl	$15, %eax
	movl	%r14d, %ecx
	shll	%cl, %eax
	notl	%eax
	movq	_ym2612@GOTPCREL(%rip), %rcx
	andl	%eax, (%rcx)
LBB0_11:
	movl	20(%r12), %eax
	shrl	$3, %eax
	andl	$1, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ym2612,24,3                    ## @ym2612
	.comm	_crct,104,3                     ## @crct
	.comm	_g_lfo_ampm,4,2                 ## @g_lfo_ampm
	.comm	_SLOT1,8,3                      ## @SLOT1
	.comm	_SLOT2,8,3                      ## @SLOT2
	.comm	_SLOT3,8,3                      ## @SLOT3
	.comm	_SLOT4,8,3                      ## @SLOT4
	.comm	_lfo_pm_table,8,3               ## @lfo_pm_table
	.comm	_opn_fktable,8,3                ## @opn_fktable
	.comm	_fn_table,8,3                   ## @fn_table
	.no_dead_strip	_chan_render
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function chan_render
_chan_render:                           ; @chan_render
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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, x2
	mov	x2, x1
	mov	x1, x0
Lloh0:
	adrp	x21, _ym2612@GOTPAGE
Lloh1:
	ldr	x21, [x21, _ym2612@GOTPAGEOFF]
	ldr	x9, [x21, #16]
	sxtw	x10, w20
	mov	w8, #40
	smaddl	x8, w20, w8, x9
Lloh2:
	adrp	x19, _crct@GOTPAGE
Lloh3:
	ldr	x19, [x19, _crct@GOTPAGEOFF]
	str	x8, [x19, #48]
	ldr	w11, [x8, #32]
	str	w11, [x19, #68]
	ldr	w11, [x21, #12]
	str	w11, [x19, #96]
	mov	w11, #53
	and	w13, w3, w11
	ldr	x11, [x19, #88]
	cbz	x11, LBB0_4
; %bb.1:
Lloh4:
	adrp	x11, _g_lfo_ampm@GOTPAGE
Lloh5:
	ldr	x11, [x11, _g_lfo_ampm@GOTPAGEOFF]
Lloh6:
	ldr	w11, [x11]
	bfi	w13, w11, #16, #16
	ldr	w8, [x8]
	orr	w8, w13, w8, lsl #8
	orr	w8, w8, #0x8
	mov	w11, #40
	madd	x11, x10, x11, x9
	ldr	w11, [x11, #4]
	cmp	w11, #8
	b.ne	LBB0_3
; %bb.2:
	mov	w11, #-4035
	and	w13, w8, w11
	b	LBB0_4
LBB0_3:
	ubfiz	w11, w11, #6, #2
	orr	w13, w8, w11
LBB0_4:
	mov	w16, #40
	madd	x17, x10, x16, x9
	ldr	w0, [x17, #8]
	ldur	d0, [x21, #4]
	stur	d0, [x19, #76]
Lloh7:
	adrp	x22, _SLOT1@GOTPAGE
Lloh8:
	ldr	x22, [x22, _SLOT1@GOTPAGEOFF]
	ldr	x8, [x17, #24]
	ldr	x14, [x22]
	madd	x3, x14, x16, x8
	ldp	w11, w4, [x3, #28]
	str	w11, [x19, #64]
Lloh9:
	adrp	x24, _SLOT2@GOTPAGE
Lloh10:
	ldr	x24, [x24, _SLOT2@GOTPAGEOFF]
	ldr	x15, [x24]
	madd	x5, x15, x16, x8
Lloh11:
	adrp	x23, _SLOT3@GOTPAGE
Lloh12:
	ldr	x23, [x23, _SLOT3@GOTPAGEOFF]
	ldr	x12, [x23]
	madd	x6, x12, x16, x8
	ldp	w11, w7, [x5, #28]
	ldp	w25, w26, [x6, #28]
	stp	w25, w11, [x19, #56]
Lloh13:
	adrp	x25, _SLOT4@GOTPAGE
Lloh14:
	ldr	x25, [x25, _SLOT4@GOTPAGEOFF]
	ldr	x11, [x25]
	madd	x16, x11, x16, x8
	ldp	w27, w28, [x16, #28]
	str	w27, [x19, #40]
	ldr	w3, [x3]
	add	w3, w3, w4
	ubfiz	w0, w0, #12, #4
	orr	w0, w0, w13
	stp	w0, w3, [x19]
	ldr	w0, [x5]
	add	w0, w0, w7
	ldr	w3, [x6]
	add	w3, w3, w26
	stp	w0, w3, [x19, #8]
	ldr	w16, [x16]
	add	w0, w16, w28
	ldr	w16, [x17, #36]
	str	w16, [x19, #72]
	ldp	w3, w16, [x17, #12]
	and	w17, w3, #0x7
	stp	w0, w17, [x19, #16]
	cbz	w16, LBB0_7
; %bb.5:
	mov	w17, #40
	madd	x9, x10, x17, x9
	ldr	w9, [x9, #20]
	lsl	w10, w9, #4
	and	w10, w10, #0x7f00
Lloh15:
	adrp	x17, _lfo_pm_table@GOTPAGE
Lloh16:
	ldr	x17, [x17, _lfo_pm_table@GOTPAGEOFF]
Lloh17:
	ldr	x17, [x17]
	lsr	w13, w13, #16
	add	w13, w16, w13, uxtb
	add	w10, w13, w10
	ldr	w10, [x17, w10, sxtw #2]
	cbz	w10, LBB0_7
; %bb.6:
	asr	w13, w9, #11
	add	w9, w10, w9, lsl #1
	and	w10, w9, #0xfff
Lloh18:
	adrp	x16, _opn_fktable@GOTPAGE
Lloh19:
	ldr	x16, [x16, _opn_fktable@GOTPAGEOFF]
Lloh20:
	ldr	x16, [x16]
	ubfx	w9, w9, #8, #4
	ldr	w9, [x16, w9, uxtw #2]
	orr	w9, w9, w13, lsl #2
Lloh21:
	adrp	x16, _fn_table@GOTPAGE
Lloh22:
	ldr	x16, [x16, _fn_table@GOTPAGEOFF]
Lloh23:
	ldr	x16, [x16]
	ldr	w10, [x16, w10, uxtw #2]
	mov	w16, #7
	sub	w13, w16, w13
	asr	w10, w10, w13
	mov	w13, #40
	madd	x14, x14, x13, x8
	ldr	x16, [x14, #8]
	sbfiz	x9, x9, #2, #32
	ldr	w16, [x16, x9]
	add	w16, w16, w10
	ldr	w14, [x14, #16]
	mul	w14, w16, w14
	asr	w14, w14, #1
	str	w14, [x19, #24]
	madd	x14, x15, x13, x8
	ldr	x15, [x14, #8]
	ldr	w15, [x15, x9]
	add	w15, w15, w10
	ldr	w14, [x14, #16]
	mul	w14, w15, w14
	asr	w14, w14, #1
	str	w14, [x19, #28]
	madd	x12, x12, x13, x8
	ldr	x14, [x12, #8]
	ldr	w14, [x14, x9]
	add	w14, w14, w10
	ldr	w12, [x12, #16]
	mul	w12, w14, w12
	asr	w12, w12, #1
	str	w12, [x19, #32]
	madd	x8, x11, x13, x8
	ldr	x11, [x8, #8]
	ldr	w9, [x11, x9]
	add	w9, w9, w10
	ldr	w8, [x8, #16]
	mul	w8, w9, w8
	asr	w8, w8, #1
	b	LBB0_8
LBB0_7:
	mov	w9, #40
	madd	x10, x14, x9, x8
	ldr	w10, [x10, #20]
	madd	x13, x15, x9, x8
	ldr	w13, [x13, #20]
	stp	w10, w13, [x19, #24]
	madd	x10, x12, x9, x8
	ldr	w10, [x10, #20]
	str	w10, [x19, #32]
	madd	x8, x11, x9, x8
	ldr	w8, [x8, #20]
LBB0_8:
	str	w8, [x19, #36]
	mov	x0, x19
	bl	_chan_render_loop
	ldr	x8, [x19, #48]
	ldur	d0, [x19, #68]
	str	d0, [x8, #32]
	ldr	x8, [x8, #24]
	ldr	x9, [x22]
	mov	w13, #40
	madd	x10, x9, x13, x8
	ldr	w11, [x10, #24]
	ldr	x10, [x24]
	madd	x12, x10, x13, x8
	ldr	w12, [x12, #24]
	orr	w12, w12, w11
	ldr	x11, [x23]
	madd	x14, x11, x13, x8
	ldr	w14, [x14, #24]
	orr	w14, w12, w14
	ldr	x12, [x25]
	madd	x13, x12, x13, x8
	ldr	w13, [x13, #24]
	orr	w13, w14, w13
	cbz	w13, LBB0_10
; %bb.9:
	ldr	w13, [x19, #64]
	mov	w14, #40
	madd	x9, x9, x14, x8
	str	w13, [x9, #28]
	madd	x9, x10, x14, x8
	ldp	w13, w10, [x19, #56]
	str	w10, [x9, #28]
	madd	x9, x11, x14, x8
	str	w13, [x9, #28]
	ldr	w9, [x19, #40]
	madd	x8, x12, x14, x8
	str	w9, [x8, #28]
	b	LBB0_11
LBB0_10:
	lsl	w8, w20, #2
	mov	w9, #15
	lsl	w8, w9, w8
	ldr	w9, [x21]
	bic	w8, w9, w8
	str	w8, [x21]
LBB0_11:
	ldr	w8, [x19, #20]
	ubfx	w0, w8, #3, #1
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_ym2612,24,3                    ; @ym2612
	.comm	_crct,104,3                     ; @crct
	.comm	_g_lfo_ampm,4,2                 ; @g_lfo_ampm
	.comm	_SLOT1,8,3                      ; @SLOT1
	.comm	_SLOT2,8,3                      ; @SLOT2
	.comm	_SLOT3,8,3                      ; @SLOT3
	.comm	_SLOT4,8,3                      ; @SLOT4
	.comm	_lfo_pm_table,8,3               ; @lfo_pm_table
	.comm	_opn_fktable,8,3                ; @opn_fktable
	.comm	_fn_table,8,3                   ; @fn_table
	.no_dead_strip	_chan_render
.subsections_via_symbols
