	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_audio_update                   ## -- Begin function audio_update
	.p2align	4, 0x90
_audio_update:                          ## @audio_update
	.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
	movq	%rdi, %r12
	movq	_mcycles_vdp@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_sound_update
	movl	%eax, %ebx
	movq	_system_hw@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_SYSTEM_MCD@GOTPCREL(%rip), %r13
	cmpq	(%r13), %rax
	jne	LBB0_2
## %bb.1:
	movl	%ebx, %edi
	callq	_pcm_update
	movl	%ebx, %edi
	callq	_cdd_read_audio
LBB0_2:
	movq	_snd@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	movq	(%rax), %rax
	movl	(%rax), %edi
	leaq	4(%r12), %r15
	movq	%r15, %rsi
	movl	%ebx, %edx
	callq	_blip_read_samples
	movq	(%r14), %rax
	movq	(%rax), %rax
	movl	4(%rax), %edi
	movq	%r12, %rsi
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movl	%ebx, %edx
	callq	_blip_read_samples
	movq	_system_hw@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	(%r13), %rax
	jne	LBB0_4
## %bb.3:
	movq	(%r14), %rax
	movq	8(%rax), %rax
	movl	(%rax), %edi
	movq	%r15, %rsi
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movl	%ebx, %edx
	callq	_blip_mix_samples
	movq	(%r14), %rax
	movq	8(%rax), %rax
	movl	4(%rax), %edi
	movq	%r12, %rsi
	movl	%ebx, %edx
	callq	_blip_mix_samples
	movq	(%r14), %rax
	movq	16(%rax), %rax
	movl	(%rax), %edi
	movq	%r15, %rsi
	movl	%ebx, %edx
	callq	_blip_mix_samples
	movq	(%r14), %rax
	movq	16(%rax), %rax
	movl	4(%rax), %edi
	movq	%r12, %rsi
	movl	%ebx, %edx
	callq	_blip_mix_samples
LBB0_4:
	movq	_config@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	je	LBB0_22
## %bb.5:
	testb	$1, %al
	jne	LBB0_6
## %bb.13:
	testb	$2, %al
	je	LBB0_22
## %bb.14:
	movl	-48(%rbp), %r13d                ## 4-byte Reload
	xorl	%r14d, %r14d
	movq	_eq@GOTPCREL(%rip), %r15
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_15 Depth=1
	movl	%ebx, (%r12,%r14,8)
	movl	%eax, 4(%r12,%r14,8)
	incq	%r14
	cmpl	%r14d, %r13d
	je	LBB0_22
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r12,%r14,8), %esi
	movq	%r15, %rdi
	callq	_do_3band
	movl	%eax, %ebx
	movl	4(%r12,%r14,8), %esi
	movq	%r15, %rdi
	callq	_do_3band
	cmpl	$-32767, %ebx                   ## imm = 0x8001
	movl	$-32768, %ecx                   ## imm = 0x8000
	cmovll	%ecx, %ebx
	cmpl	$32767, %ebx                    ## imm = 0x7FFF
	jge	LBB0_16
## %bb.17:                              ##   in Loop: Header=BB0_15 Depth=1
	cmpl	$-32767, %eax                   ## imm = 0x8001
	jl	LBB0_18
LBB0_19:                                ##   in Loop: Header=BB0_15 Depth=1
	cmpl	$32767, %eax                    ## imm = 0x7FFF
	jl	LBB0_21
	jmp	LBB0_20
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_15 Depth=1
	movl	$32767, %ebx                    ## imm = 0x7FFF
	cmpl	$-32767, %eax                   ## imm = 0x8001
	jge	LBB0_19
LBB0_18:                                ##   in Loop: Header=BB0_15 Depth=1
	movl	$-32768, %eax                   ## imm = 0x8000
	cmpl	$32767, %eax                    ## imm = 0x7FFF
	jl	LBB0_21
LBB0_20:                                ##   in Loop: Header=BB0_15 Depth=1
	movl	$32767, %eax                    ## imm = 0x7FFF
	jmp	LBB0_21
LBB0_6:
	movq	_config@GOTPCREL(%rip), %rax
	movl	4(%rax), %r15d
	movl	$65536, %r13d                   ## imm = 0x10000
	subl	%r15d, %r13d
	movq	_llp@GOTPCREL(%rip), %r8
	movl	(%r8), %r14d
	movq	_rrp@GOTPCREL(%rip), %r9
	movl	(%r9), %r11d
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	testb	$1, %al
	jne	LBB0_8
## %bb.7:
                                        ## implicit-def: $edi
                                        ## implicit-def: $ecx
	movq	%r12, %rbx
	movl	%eax, %esi
	cmpl	$1, %eax
	jne	LBB0_10
	jmp	LBB0_12
LBB0_8:
	imull	%r15d, %r14d
	movl	(%r12), %edi
	imull	%r13d, %edi
	addl	%r14d, %edi
	imull	%r15d, %r11d
	movl	4(%r12), %ecx
	imull	%r13d, %ecx
	addl	%r11d, %ecx
	sarl	$16, %edi
	sarl	$16, %ecx
	movl	%edi, (%r12)
	leaq	8(%r12), %rbx
	movl	%ecx, 4(%r12)
	leal	-1(%rax), %esi
	movl	%edi, %r14d
	movl	%ecx, %r11d
	cmpl	$1, %eax
	je	LBB0_12
LBB0_10:
	movl	%esi, %r10d
	xorl	%esi, %esi
	movl	%r14d, %edi
	movl	%r11d, %ecx
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	imull	%r15d, %edi
	movl	(%rbx,%rsi,8), %eax
	imull	%r13d, %eax
	addl	%edi, %eax
	imull	%r15d, %ecx
	movl	4(%rbx,%rsi,8), %edx
	imull	%r13d, %edx
	addl	%ecx, %edx
	sarl	$16, %eax
	sarl	$16, %edx
	movl	%eax, (%rbx,%rsi,8)
	movl	%edx, 4(%rbx,%rsi,8)
	imull	%r15d, %eax
	movl	8(%rbx,%rsi,8), %edi
	imull	%r13d, %edi
	addl	%eax, %edi
	imull	%r15d, %edx
	movl	12(%rbx,%rsi,8), %ecx
	imull	%r13d, %ecx
	addl	%edx, %ecx
	sarl	$16, %edi
	sarl	$16, %ecx
	movl	%edi, 8(%rbx,%rsi,8)
	movl	%ecx, 12(%rbx,%rsi,8)
	addq	$2, %rsi
	cmpl	%esi, %r10d
	jne	LBB0_11
LBB0_12:
	movl	%edi, (%r8)
	movl	%ecx, (%r9)
LBB0_22:
	movq	_config@GOTPCREL(%rip), %rax
	cmpq	$0, 8(%rax)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	je	LBB0_35
## %bb.23:
	movl	%eax, %ecx
	decl	%ecx
	je	LBB0_24
## %bb.25:
	incq	%rcx
	movq	%rcx, %rbx
	andq	$-2, %rbx
	leaq	-2(%rbx), %rdx
	movq	%rdx, %rsi
	shrq	%rsi
	incq	%rsi
	testq	%rdx, %rdx
	je	LBB0_26
## %bb.27:
	movq	%rsi, %rdi
	andq	$-2, %rdi
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_28:                                ## =>This Inner Loop Header: Depth=1
	movdqu	(%r12,%rdx,4), %xmm0
	phaddd	%xmm0, %xmm0
	movdqu	16(%r12,%rdx,4), %xmm1
	movdqa	%xmm0, %xmm2
	psrld	$31, %xmm2
	paddd	%xmm0, %xmm2
	psrad	$1, %xmm2
	pshufd	$80, %xmm2, %xmm0               ## xmm0 = xmm2[0,0,1,1]
	phaddd	%xmm1, %xmm1
	movdqu	%xmm0, (%r12,%rdx,4)
	movdqa	%xmm1, %xmm0
	psrld	$31, %xmm0
	paddd	%xmm1, %xmm0
	psrad	$1, %xmm0
	pshufd	$80, %xmm0, %xmm0               ## xmm0 = xmm0[0,0,1,1]
	movdqu	%xmm0, 16(%r12,%rdx,4)
	addq	$8, %rdx
	addq	$-2, %rdi
	jne	LBB0_28
## %bb.29:
	testb	$1, %sil
	je	LBB0_31
LBB0_30:
	movdqu	(%r12,%rdx,4), %xmm0
	phaddd	%xmm0, %xmm0
	movdqa	%xmm0, %xmm1
	psrld	$31, %xmm1
	paddd	%xmm0, %xmm1
	psrad	$1, %xmm1
	pshufd	$80, %xmm1, %xmm0               ## xmm0 = xmm1[0,0,1,1]
	movdqu	%xmm0, (%r12,%rdx,4)
LBB0_31:
	cmpq	%rbx, %rcx
	je	LBB0_35
## %bb.32:
	leaq	(%r12,%rbx,8), %r12
	movl	%eax, %ecx
	subl	%ebx, %ecx
	jmp	LBB0_33
LBB0_24:
	movl	%eax, %ecx
LBB0_33:
	movl	%ecx, %edi
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_34:                                ## =>This Inner Loop Header: Depth=1
	movl	4(%r12,%rcx,8), %edx
	addl	(%r12,%rcx,8), %edx
	movl	%edx, %esi
	shrl	$31, %esi
	addl	%edx, %esi
	sarl	%esi
	movl	%esi, (%r12,%rcx,8)
	movl	%esi, 4(%r12,%rcx,8)
	incq	%rcx
	cmpl	%ecx, %edi
	jne	LBB0_34
LBB0_35:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_26:
	xorl	%edx, %edx
	testb	$1, %sil
	jne	LBB0_30
	jmp	LBB0_31
	.cfi_endproc
                                        ## -- End function
	.comm	_mcycles_vdp,4,2                ## @mcycles_vdp
	.comm	_system_hw,8,3                  ## @system_hw
	.comm	_SYSTEM_MCD,8,3                 ## @SYSTEM_MCD
	.comm	_snd,8,3                        ## @snd
	.comm	_config,16,3                    ## @config
	.comm	_llp,4,2                        ## @llp
	.comm	_rrp,4,2                        ## @rrp
	.comm	_eq,4,2                         ## @eq
	.comm	_ALIGN_SND,4,2                  ## @ALIGN_SND
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_audio_update                   ; -- Begin function audio_update
	.p2align	2
_audio_update:                          ; @audio_update
	.cfi_startproc
; %bb.0:
	stp	d9, d8, [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 b8, -88
	.cfi_offset b9, -96
	mov	x20, x0
Lloh0:
	adrp	x8, _mcycles_vdp@GOTPAGE
Lloh1:
	ldr	x8, [x8, _mcycles_vdp@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_sound_update
	mov	x19, x0
Lloh3:
	adrp	x23, _system_hw@GOTPAGE
Lloh4:
	ldr	x23, [x23, _system_hw@GOTPAGEOFF]
	ldr	x8, [x23]
Lloh5:
	adrp	x24, _SYSTEM_MCD@GOTPAGE
Lloh6:
	ldr	x24, [x24, _SYSTEM_MCD@GOTPAGEOFF]
	ldr	x9, [x24]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_pcm_update
	mov	x0, x19
	bl	_cdd_read_audio
LBB0_2:
Lloh7:
	adrp	x22, _snd@GOTPAGE
Lloh8:
	ldr	x22, [x22, _snd@GOTPAGEOFF]
	ldr	x8, [x22]
	ldr	x8, [x8]
	ldr	w0, [x8]
	add	x21, x20, #4
	mov	x1, x21
	mov	x2, x19
	bl	_blip_read_samples
	ldr	x8, [x22]
	ldr	x8, [x8]
	ldr	w0, [x8, #4]
	mov	x1, x20
	mov	x2, x19
	bl	_blip_read_samples
	ldr	x8, [x23]
	ldr	x9, [x24]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.3:
	ldr	x8, [x22]
	ldr	x8, [x8, #8]
	ldr	w0, [x8]
	mov	x1, x21
	mov	x2, x19
	bl	_blip_mix_samples
	ldr	x8, [x22]
	ldr	x8, [x8, #8]
	ldr	w0, [x8, #4]
	mov	x1, x20
	mov	x2, x19
	bl	_blip_mix_samples
	ldr	x8, [x22]
	ldr	x8, [x8, #16]
	ldr	w0, [x8]
	mov	x1, x21
	mov	x2, x19
	bl	_blip_mix_samples
	ldr	x8, [x22]
	ldr	x8, [x8, #16]
	ldr	w0, [x8, #4]
	mov	x1, x20
	mov	x2, x19
	bl	_blip_mix_samples
LBB0_4:
Lloh9:
	adrp	x23, _config@GOTPAGE
Lloh10:
	ldr	x23, [x23, _config@GOTPAGEOFF]
	ldr	w8, [x23]
	cbz	w8, LBB0_12
; %bb.5:
	tbnz	w8, #0, LBB0_9
; %bb.6:
	tbz	w8, #1, LBB0_12
; %bb.7:
Lloh11:
	adrp	x21, _eq@GOTPAGE
Lloh12:
	ldr	x21, [x21, _eq@GOTPAGEOFF]
	mvni.2s	v8, #127, msl #8
	movi.2s	v9, #127, msl #8
	mov	x24, x20
	mov	x25, x19
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x24]
	mov	x0, x21
	bl	_do_3band
	mov	x22, x0
	ldr	w1, [x24, #4]
	mov	x0, x21
	bl	_do_3band
	fmov	s0, w22
	mov.s	v0[1], w0
	smax.2s	v0, v0, v8
	smin.2s	v0, v0, v9
	str	d0, [x24], #8
	subs	w25, w25, #1
	b.ne	LBB0_8
	b	LBB0_12
LBB0_9:
	ldr	w8, [x23, #4]
	mov	w9, #65536
	sub	w10, w9, w8
Lloh13:
	adrp	x9, _llp@GOTPAGE
Lloh14:
	ldr	x9, [x9, _llp@GOTPAGEOFF]
	ldr	w13, [x9]
Lloh15:
	adrp	x11, _rrp@GOTPAGE
Lloh16:
	ldr	x11, [x11, _rrp@GOTPAGEOFF]
	ldr	w12, [x11]
	mov	x14, x20
	mov	x15, x19
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	mul	w13, w13, w8
	ldp	w16, w17, [x14]
	madd	w13, w16, w10, w13
	mul	w12, w12, w8
	madd	w12, w17, w10, w12
	asr	w13, w13, #16
	asr	w12, w12, #16
	stp	w13, w12, [x14], #8
	subs	w15, w15, #1
	b.ne	LBB0_10
; %bb.11:
	str	w13, [x9]
	str	w12, [x11]
LBB0_12:
	ldr	x8, [x23, #8]
	cbz	x8, LBB0_19
; %bb.13:
	sub	w8, w19, #1
	cmp	w8, #3
	b.hs	LBB0_15
; %bb.14:
	mov	x8, x20
	mov	x9, x19
	b	LBB0_18
LBB0_15:
	add	x10, x8, #1
	and	x11, x10, #0x1fffffffc
	add	x8, x20, x11, lsl #3
	sub	w9, w19, w11
	mov	x12, x11
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	ld2.4s	{ v0, v1 }, [x20]
	add.4s	v0, v1, v0
	usra.4s	v0, v0, #31
	sshr.4s	v0, v0, #1
	mov.16b	v1, v0
	st2.4s	{ v0, v1 }, [x20], #32
	subs	x12, x12, #4
	b.ne	LBB0_16
; %bb.17:
	cmp	x10, x11
	b.eq	LBB0_19
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	ldp	w10, w11, [x8]
	add	w10, w11, w10
	cmp	w10, #0
	cinc	w10, w10, lt
	asr	w10, w10, #1
	stp	w10, w10, [x8], #8
	subs	w9, w9, #1
	b.ne	LBB0_18
LBB0_19:
	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	d9, d8, [sp], #96               ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_mcycles_vdp,4,2                ; @mcycles_vdp
	.comm	_system_hw,8,3                  ; @system_hw
	.comm	_SYSTEM_MCD,8,3                 ; @SYSTEM_MCD
	.comm	_snd,8,3                        ; @snd
	.comm	_config,16,3                    ; @config
	.comm	_llp,4,2                        ; @llp
	.comm	_rrp,4,2                        ; @rrp
	.comm	_eq,4,2                         ; @eq
	.comm	_ALIGN_SND,4,2                  ; @ALIGN_SND
.subsections_via_symbols
