	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function PsndRender
_PsndRender:                            ## @PsndRender
	.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	%esi, %r15d
	movq	_PsndBuffer@GOTPCREL(%rip), %rax
	movslq	%edi, %rbx
	leaq	(,%rbx,4), %r14
	movq	_PicoOpt@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r13d
	shrl	$3, %r13d
	andl	$1, %r13d
	movl	%r13d, %ecx
	shll	%cl, %ebx
	addq	(%rax), %r14
	movq	_sound@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_pprof_start
	testl	%ebx, %ebx
	jne	LBB0_3
## %bb.1:
	movq	_PsndLen_exc_add@GOTPCREL(%rip), %rdx
	movq	_PsndLen_exc_cnt@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	addl	(%rdx), %ecx
	movl	%ecx, (%rax)
	cmpl	$65536, %ecx                    ## imm = 0x10000
	jl	LBB0_3
## %bb.2:
	addl	$-65536, %ecx                   ## imm = 0xFFFF0000
	movl	%ecx, (%rax)
	incl	%r15d
LBB0_3:
	movq	_POPT_EN_PSG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movslq	%ebx, %r12
	movq	_PicoOpt@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_5
## %bb.4:
	movq	_PsndOut@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	%r12, %rdi
	movl	%r15d, %esi
	movl	%r13d, %edx
	callq	_SN76496Update
LBB0_5:
	movq	_PicoAHW@GOTPCREL(%rip), %rcx
	movq	_PAHW_PICO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rcx)
	je	LBB0_7
## %bb.6:
	movq	_PsndOut@GOTPCREL(%rip), %rax
	addq	(%rax), %r12
	movq	%r12, %rdi
	movl	%r15d, %esi
	movl	%r13d, %edx
	callq	_PicoPicoPCMUpdate
	jmp	LBB0_23
LBB0_7:
	movq	_POPT_EN_FM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_PicoOpt@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_9
## %bb.8:
	movq	%r14, %rdi
	movl	%r15d, %esi
	movl	%r13d, %edx
	movl	$1, %ecx
	callq	_YM2612UpdateOne
	jmp	LBB0_10
LBB0_9:
	movl	%r15d, %edx
	movl	%r13d, %ecx
	shll	%cl, %edx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_memset32
LBB0_10:
	movq	_PAHW_MCD@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	movq	_PicoAHW@GOTPCREL(%rip), %rdx
	testl	%eax, (%rdx)
	je	LBB0_19
## %bb.11:
	movq	%r14, %rdi
	movl	%r15d, %esi
	movl	%r13d, %edx
	callq	_pcd_pcm_update
	movq	_PicoAHW@GOTPCREL(%rip), %rdx
	movl	(%rbx), %eax
	testl	%eax, (%rdx)
	je	LBB0_19
## %bb.12:
	movq	_POPT_EN_MCD_CDDA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_PicoOpt@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_19
## %bb.13:
	movq	_Pico_mcd@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	$0, 16(%rax)
	je	LBB0_19
## %bb.14:
	movq	(%rax), %rcx
	testb	$1, 216(%rcx)
	jne	LBB0_19
## %bb.15:
	movq	8(%rax), %rax
	movq	_CT_MP3@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_17
## %bb.16:
	movq	%r14, %rdi
	movl	%r15d, %esi
	movl	%r13d, %edx
	callq	_mp3_update
	jmp	LBB0_18
LBB0_17:
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_cdda_raw_update
LBB0_18:
	movq	_PicoAHW@GOTPCREL(%rip), %rdx
LBB0_19:
	movq	_PAHW_32X@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdx)
	je	LBB0_22
## %bb.20:
	movq	_POPT_EN_PWM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_PicoOpt@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_22
## %bb.21:
	movq	%r14, %rdi
	movl	%r15d, %esi
	movl	%r13d, %edx
	callq	_p32x_pwm_update
LBB0_22:
	movq	_PsndOut@GOTPCREL(%rip), %rax
	addq	(%rax), %r12
	movq	%r12, %rdi
	movq	%r14, %rsi
	movl	%r15d, %edx
	callq	_PsndMix_32_to_16l
	movq	_sound@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_pprof_end
LBB0_23:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PsndBuffer,8,3                 ## @PsndBuffer
	.comm	_PicoOpt,4,2                    ## @PicoOpt
	.comm	_sound,4,2                      ## @sound
	.comm	_PsndLen_exc_add,8,3            ## @PsndLen_exc_add
	.comm	_PsndLen_exc_cnt,4,2            ## @PsndLen_exc_cnt
	.comm	_POPT_EN_PSG,4,2                ## @POPT_EN_PSG
	.comm	_PsndOut,8,3                    ## @PsndOut
	.comm	_PicoAHW,4,2                    ## @PicoAHW
	.comm	_PAHW_PICO,4,2                  ## @PAHW_PICO
	.comm	_POPT_EN_FM,4,2                 ## @POPT_EN_FM
	.comm	_PAHW_MCD,4,2                   ## @PAHW_MCD
	.comm	_POPT_EN_MCD_CDDA,4,2           ## @POPT_EN_MCD_CDDA
	.comm	_Pico_mcd,8,3                   ## @Pico_mcd
	.comm	_CT_MP3,8,3                     ## @CT_MP3
	.comm	_PAHW_32X,4,2                   ## @PAHW_32X
	.comm	_POPT_EN_PWM,4,2                ## @POPT_EN_PWM
	.no_dead_strip	_PsndRender
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function PsndRender
_PsndRender:                            ; @PsndRender
	.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	x19, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _PsndBuffer@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PsndBuffer@GOTPAGEOFF]
Lloh2:
	ldr	x27, [x8]
Lloh3:
	adrp	x24, _PicoOpt@GOTPAGE
Lloh4:
	ldr	x24, [x24, _PicoOpt@GOTPAGEOFF]
	ldr	w8, [x24]
	ubfx	w20, w8, #3, #1
	lsl	w23, w0, w20
Lloh5:
	adrp	x22, _sound@GOTPAGE
Lloh6:
	ldr	x22, [x22, _sound@GOTPAGEOFF]
	ldr	w0, [x22]
	bl	_pprof_start
	cbnz	w23, LBB0_3
; %bb.1:
Lloh7:
	adrp	x8, _PsndLen_exc_add@GOTPAGE
Lloh8:
	ldr	x8, [x8, _PsndLen_exc_add@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x8]
Lloh10:
	adrp	x8, _PsndLen_exc_cnt@GOTPAGE
Lloh11:
	ldr	x8, [x8, _PsndLen_exc_cnt@GOTPAGEOFF]
	ldr	w10, [x8]
	add	w9, w10, w9
	str	w9, [x8]
	subs	w9, w9, #16, lsl #12            ; =65536
	b.lt	LBB0_3
; %bb.2:
	str	w9, [x8]
	add	w19, w19, #1
LBB0_3:
	ldr	w8, [x24]
Lloh12:
	adrp	x9, _POPT_EN_PSG@GOTPAGE
Lloh13:
	ldr	x9, [x9, _POPT_EN_PSG@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
Lloh15:
	adrp	x25, _PsndOut@GOTPAGE
Lloh16:
	ldr	x25, [x25, _PsndOut@GOTPAGEOFF]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.4:
	ldr	x8, [x25]
	add	x0, x8, w23, sxtw
	mov	x1, x19
	mov	x2, x20
	bl	_SN76496Update
LBB0_5:
Lloh17:
	adrp	x26, _PicoAHW@GOTPAGE
Lloh18:
	ldr	x26, [x26, _PicoAHW@GOTPAGEOFF]
	ldr	w8, [x26]
Lloh19:
	adrp	x9, _PAHW_PICO@GOTPAGE
Lloh20:
	ldr	x9, [x9, _PAHW_PICO@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.6:
	ldr	x8, [x25]
	add	x0, x8, w23, sxtw
	mov	x1, x19
	mov	x2, x20
	bl	_PicoPicoPCMUpdate
	b	LBB0_22
LBB0_7:
	add	x21, x27, w21, sxtw #2
	ldr	w8, [x24]
Lloh22:
	adrp	x9, _POPT_EN_FM@GOTPAGE
Lloh23:
	ldr	x9, [x9, _POPT_EN_FM@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.8:
	mov	x0, x21
	mov	x1, x19
	mov	x2, x20
	mov	w3, #1
	bl	_YM2612UpdateOne
	b	LBB0_10
LBB0_9:
	lsl	w2, w19, w20
	mov	x0, x21
	mov	w1, #0
	bl	_memset32
LBB0_10:
	ldr	w8, [x26]
Lloh25:
	adrp	x27, _PAHW_MCD@GOTPAGE
Lloh26:
	ldr	x27, [x27, _PAHW_MCD@GOTPAGEOFF]
	ldr	w9, [x27]
	tst	w9, w8
	b.eq	LBB0_18
; %bb.11:
	mov	x0, x21
	mov	x1, x19
	mov	x2, x20
	bl	_pcd_pcm_update
	ldr	w8, [x26]
	ldr	w9, [x27]
	tst	w9, w8
	b.eq	LBB0_18
; %bb.12:
	ldr	w8, [x24]
Lloh27:
	adrp	x9, _POPT_EN_MCD_CDDA@GOTPAGE
Lloh28:
	ldr	x9, [x9, _POPT_EN_MCD_CDDA@GOTPAGEOFF]
Lloh29:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_18
; %bb.13:
Lloh30:
	adrp	x8, _Pico_mcd@GOTPAGE
Lloh31:
	ldr	x8, [x8, _Pico_mcd@GOTPAGEOFF]
Lloh32:
	ldr	x8, [x8]
	ldr	x9, [x8, #16]
	cbz	x9, LBB0_18
; %bb.14:
	ldr	x9, [x8]
	ldrb	w9, [x9, #216]
	tbnz	w9, #0, LBB0_18
; %bb.15:
	ldr	x8, [x8, #8]
Lloh33:
	adrp	x9, _CT_MP3@GOTPAGE
Lloh34:
	ldr	x9, [x9, _CT_MP3@GOTPAGEOFF]
Lloh35:
	ldr	x9, [x9]
	mov	x0, x21
	mov	x1, x19
	cmp	x8, x9
	b.ne	LBB0_17
; %bb.16:
	mov	x2, x20
	bl	_mp3_update
	b	LBB0_18
LBB0_17:
	bl	_cdda_raw_update
LBB0_18:
	ldr	w8, [x26]
Lloh36:
	adrp	x9, _PAHW_32X@GOTPAGE
Lloh37:
	ldr	x9, [x9, _PAHW_32X@GOTPAGEOFF]
Lloh38:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_21
; %bb.19:
	ldr	w8, [x24]
Lloh39:
	adrp	x9, _POPT_EN_PWM@GOTPAGE
Lloh40:
	ldr	x9, [x9, _POPT_EN_PWM@GOTPAGEOFF]
Lloh41:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_21
; %bb.20:
	mov	x0, x21
	mov	x1, x19
	mov	x2, x20
	bl	_p32x_pwm_update
LBB0_21:
	ldr	x8, [x25]
	add	x0, x8, w23, sxtw
	mov	x1, x21
	mov	x2, x19
	bl	_PsndMix_32_to_16l
	ldr	w0, [x22]
	bl	_pprof_end
LBB0_22:
	mov	x0, x19
	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	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.cfi_endproc
                                        ; -- End function
	.comm	_PsndBuffer,8,3                 ; @PsndBuffer
	.comm	_PicoOpt,4,2                    ; @PicoOpt
	.comm	_sound,4,2                      ; @sound
	.comm	_PsndLen_exc_add,8,3            ; @PsndLen_exc_add
	.comm	_PsndLen_exc_cnt,4,2            ; @PsndLen_exc_cnt
	.comm	_POPT_EN_PSG,4,2                ; @POPT_EN_PSG
	.comm	_PsndOut,8,3                    ; @PsndOut
	.comm	_PicoAHW,4,2                    ; @PicoAHW
	.comm	_PAHW_PICO,4,2                  ; @PAHW_PICO
	.comm	_POPT_EN_FM,4,2                 ; @POPT_EN_FM
	.comm	_PAHW_MCD,4,2                   ; @PAHW_MCD
	.comm	_POPT_EN_MCD_CDDA,4,2           ; @POPT_EN_MCD_CDDA
	.comm	_Pico_mcd,8,3                   ; @Pico_mcd
	.comm	_CT_MP3,8,3                     ; @CT_MP3
	.comm	_PAHW_32X,4,2                   ; @PAHW_32X
	.comm	_POPT_EN_PWM,4,2                ; @POPT_EN_PWM
	.no_dead_strip	_PsndRender
.subsections_via_symbols
