	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mp3_update                     ## -- Begin function mp3_update
	.p2align	4, 0x90
_mp3_update:                            ## @mp3_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, %r15
	movq	_mp3_current_file@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	testq	%rdi, %rdi
	je	LBB0_14
## %bb.1:
	movq	_mp3_file_pos@GOTPCREL(%rip), %rcx
	movq	_mp3_file_len@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	cmpq	%rdx, (%rcx)
	jge	LBB0_14
## %bb.2:
	movq	_decoder_active@GOTPCREL(%rip), %rcx
	cmpl	$0, (%rcx)
	je	LBB0_14
## %bb.3:
	movl	%esi, %eax
	movq	_PsndRate@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpl	$11125, %ecx                    ## imm = 0x2B75
	jg	LBB0_5
## %bb.4:
	leal	(,%rax,4), %r13d
	movl	$2, %r8d
	movq	_mix_16h_to_32_s2@GOTPCREL(%rip), %r10
	jmp	LBB0_8
LBB0_5:
	cmpl	$22150, %ecx                    ## imm = 0x5686
	ja	LBB0_6
## %bb.7:
	leal	(%rax,%rax), %r13d
	movl	$1, %r8d
	movq	_mix_16h_to_32_s1@GOTPCREL(%rip), %r10
	jmp	LBB0_8
LBB0_6:
	xorl	%r8d, %r8d
	movq	_mix_16h_to_32@GOTPCREL(%rip), %r10
	movl	%eax, %r13d
LBB0_8:
	movq	_cdda_out_pos@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rsi
	movl	$1152, %r14d                    ## imm = 0x480
	subl	%esi, %r14d
	movl	%r13d, %ebx
	subl	%r14d, %ebx
	jle	LBB0_9
## %bb.10:
	movl	%r8d, %r13d
	movq	%r10, -48(%rbp)                 ## 8-byte Spill
	cmpl	$1151, %esi                     ## imm = 0x47F
	jg	LBB0_12
## %bb.11:
	movq	_cdda_out_buffer@GOTPCREL(%rip), %rax
	addl	%esi, %esi
	movslq	%esi, %rsi
	addq	%rsi, %rsi
	addq	(%rax), %rsi
	movl	%r14d, %edx
	movl	%r13d, %ecx
	sarl	%cl, %edx
	addl	%edx, %edx
	movq	%r15, %rdi
	callq	*-48(%rbp)                      ## 8-byte Folded Reload
	movq	(%r12), %rdi
	movq	_mp3_file_len@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
LBB0_12:
	movq	_mp3_file_pos@GOTPCREL(%rip), %rsi
	callq	_mp3dec_decode
	testl	%eax, %eax
	je	LBB0_15
## %bb.13:
	movq	_cdda_out_pos@GOTPCREL(%rip), %rax
	movl	$0, (%rax)
	jmp	LBB0_14
LBB0_9:
	movq	_cdda_out_buffer@GOTPCREL(%rip), %rdx
	shlq	$2, %rsi
	addq	(%rdx), %rsi
	addl	%eax, %eax
	movq	%r15, %rdi
	movl	%eax, %edx
	movq	%rcx, %rbx
	callq	*%r10
	addl	%r13d, (%rbx)
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	movq	_cdda_out_pos@GOTPCREL(%rip), %rax
	movl	%ebx, (%rax)
	movl	%r13d, %ecx
	sarl	%cl, %r14d
	addl	%r14d, %r14d
	movslq	%r14d, %rax
	leaq	(%r15,%rax,4), %rdi
	movq	_cdda_out_buffer@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	sarl	%cl, %ebx
	addl	%ebx, %ebx
	movl	%ebx, %edx
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmpq	*%rax                           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_mp3_current_file,8,3           ## @mp3_current_file
	.comm	_mp3_file_pos,8,3               ## @mp3_file_pos
	.comm	_mp3_file_len,8,3               ## @mp3_file_len
	.comm	_decoder_active,4,2             ## @decoder_active
	.comm	_PsndRate,4,2                   ## @PsndRate
	.comm	_cdda_out_pos,4,2               ## @cdda_out_pos
	.comm	_cdda_out_buffer,8,3            ## @cdda_out_buffer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mp3_update                     ; -- Begin function mp3_update
	.p2align	2
_mp3_update:                            ; @mp3_update
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x19, x0
Lloh0:
	adrp	x21, _mp3_current_file@GOTPAGE
Lloh1:
	ldr	x21, [x21, _mp3_current_file@GOTPAGEOFF]
	ldr	x0, [x21]
	cbz	x0, LBB0_8
; %bb.1:
Lloh2:
	adrp	x8, _mp3_file_pos@GOTPAGE
Lloh3:
	ldr	x8, [x8, _mp3_file_pos@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
Lloh5:
	adrp	x23, _mp3_file_len@GOTPAGE
Lloh6:
	ldr	x23, [x23, _mp3_file_len@GOTPAGEOFF]
	ldr	x2, [x23]
Lloh7:
	adrp	x9, _decoder_active@GOTPAGE
Lloh8:
	ldr	x9, [x9, _decoder_active@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	cmp	x8, x2
	ccmp	w9, #0, #4, lt
	b.eq	LBB0_8
; %bb.2:
Lloh10:
	adrp	x8, _PsndRate@GOTPAGE
Lloh11:
	ldr	x8, [x8, _PsndRate@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x8]
Lloh13:
	adrp	x10, _mix_16h_to_32@GOTPAGE
Lloh14:
	ldr	x10, [x10, _mix_16h_to_32@GOTPAGEOFF]
	mov	w11, #11125
	mov	w12, #22150
	lsl	w8, w1, #1
	mov	w13, #1
Lloh15:
	adrp	x14, _mix_16h_to_32_s1@GOTPAGE
Lloh16:
	ldr	x14, [x14, _mix_16h_to_32_s1@GOTPAGEOFF]
	cmp	w9, w12
	csel	w12, wzr, w13, hi
	csel	x3, x10, x14, hi
	csel	w10, w1, w8, hi
	lsl	w13, w1, #2
	mov	w14, #2
Lloh17:
	adrp	x15, _mix_16h_to_32_s2@GOTPAGE
Lloh18:
	ldr	x15, [x15, _mix_16h_to_32_s2@GOTPAGEOFF]
	cmp	w9, w11
	csel	w22, w12, w14, gt
	csel	x3, x3, x15, gt
	csel	w26, w10, w13, gt
Lloh19:
	adrp	x20, _cdda_out_pos@GOTPAGE
Lloh20:
	ldr	x20, [x20, _cdda_out_pos@GOTPAGEOFF]
	ldrsw	x9, [x20]
	mov	w10, #1152
	sub	w25, w10, w9
	subs	w24, w26, w25
	b.le	LBB0_7
; %bb.3:
	cmp	w9, #1151
	str	x3, [sp, #8]                    ; 8-byte Folded Spill
	b.gt	LBB0_5
; %bb.4:
Lloh21:
	adrp	x8, _cdda_out_buffer@GOTPAGE
Lloh22:
	ldr	x8, [x8, _cdda_out_buffer@GOTPAGEOFF]
	lsl	w9, w9, #1
Lloh23:
	ldr	x8, [x8]
	add	x1, x8, w9, sxtw #1
	asr	w8, w25, w22
	lsl	w2, w8, #1
	mov	x0, x19
	blr	x3
	ldr	x0, [x21]
	ldr	x2, [x23]
LBB0_5:
Lloh24:
	adrp	x1, _mp3_file_pos@GOTPAGE
Lloh25:
	ldr	x1, [x1, _mp3_file_pos@GOTPAGEOFF]
	bl	_mp3dec_decode
	cbz	w0, LBB0_9
; %bb.6:
	str	wzr, [x20]
	b	LBB0_8
LBB0_7:
Lloh26:
	adrp	x10, _cdda_out_buffer@GOTPAGE
Lloh27:
	ldr	x10, [x10, _cdda_out_buffer@GOTPAGEOFF]
Lloh28:
	ldr	x10, [x10]
	add	x1, x10, x9, lsl #2
	mov	x0, x19
	mov	x2, x8
	blr	x3
	ldr	w8, [x20]
	add	w8, w8, w26
	str	w8, [x20]
LBB0_8:
	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
	add	sp, sp, #96
	ret
LBB0_9:
	str	w24, [x20]
	asr	w8, w25, w22
	lsl	w8, w8, #1
	add	x0, x19, w8, sxtw #2
Lloh29:
	adrp	x8, _cdda_out_buffer@GOTPAGE
Lloh30:
	ldr	x8, [x8, _cdda_out_buffer@GOTPAGEOFF]
Lloh31:
	ldr	x1, [x8]
	asr	w8, w24, w22
	lsl	w2, w8, #1
	ldr	x3, [sp, #8]                    ; 8-byte Folded Reload
	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
	add	sp, sp, #96
	br	x3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_mp3_current_file,8,3           ; @mp3_current_file
	.comm	_mp3_file_pos,8,3               ; @mp3_file_pos
	.comm	_mp3_file_len,8,3               ; @mp3_file_len
	.comm	_decoder_active,4,2             ; @decoder_active
	.comm	_PsndRate,4,2                   ; @PsndRate
	.comm	_cdda_out_pos,4,2               ; @cdda_out_pos
	.comm	_cdda_out_buffer,8,3            ; @cdda_out_buffer
.subsections_via_symbols
