	.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	_mp3_handle@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	js	LBB0_23
## %bb.1:
	movq	_mp3_src_pos@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_mp3_src_size@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_23
## %bb.2:
	movl	%esi, %r13d
	movq	%rdi, %r14
	movq	_PsndRate@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	cmpl	$11025, %eax                    ## imm = 0x2B11
	je	LBB0_5
## %bb.3:
	movl	%r13d, %r12d
	cmpl	$22050, %eax                    ## imm = 0x5622
	jne	LBB0_6
## %bb.4:
	leal	(%r13,%r13), %r12d
	jmp	LBB0_6
LBB0_5:
	leal	(,%r13,4), %r12d
LBB0_6:
	movq	_mp3_job_started@GOTPCREL(%rip), %rdx
	movl	(%rdx), %eax
	movq	_mp3_samples_ready@GOTPCREL(%rip), %rdi
	movl	(%rdi), %ecx
	testl	%eax, %eax
	je	LBB0_9
## %bb.7:
	cmpl	%r12d, %ecx
	jge	LBB0_9
## %bb.8:
	movq	_thread_busy_sem@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_psp_sem_lock
	movl	(%rbx), %edi
	callq	_psp_sem_unlock
	movq	_mp3_samples_ready@GOTPCREL(%rip), %rdi
	movq	_mp3_job_started@GOTPCREL(%rip), %rdx
	movl	$0, (%rdx)
	movl	$1152, %ecx                     ## imm = 0x480
	addl	(%rdi), %ecx
	movl	%ecx, (%rdi)
	xorl	%eax, %eax
LBB0_9:
	cmpl	%r12d, %ecx
	jl	LBB0_22
## %bb.10:
	movl	(%r15), %eax
	cmpl	$22050, %eax                    ## imm = 0x5622
	je	LBB0_11
## %bb.12:
	cmpl	$11025, %eax                    ## imm = 0x2B11
	jne	LBB0_14
## %bb.13:
	movq	_mix_16h_to_32_s2@GOTPCREL(%rip), %r8
	movl	$2, %ecx
	jmp	LBB0_15
LBB0_11:
	movq	_mix_16h_to_32_s1@GOTPCREL(%rip), %r8
	movl	$1, %ecx
	jmp	LBB0_15
LBB0_14:
	movq	_mix_16h_to_32@GOTPCREL(%rip), %r8
	xorl	%ecx, %ecx
LBB0_15:
	movq	_mp3_buffer_offs@GOTPCREL(%rip), %r9
	movslq	(%r9), %rsi
	movl	$1152, %ebx                     ## imm = 0x480
	subl	%esi, %ebx
	movl	%r12d, %r15d
	subl	%ebx, %r15d
	jle	LBB0_16
## %bb.17:
	movq	_mp3_play_bufsel@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	movq	_mp3_mix_buffer@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	je	LBB0_18
## %bb.19:
	shlq	$2, %rsi
	addq	8(%rax), %rsi
	sarl	%cl, %ebx
	addl	%ebx, %ebx
	movq	%r14, %rdi
	movl	%ebx, %edx
	movq	%r8, %r13
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	callq	*%r8
	movq	_mp3_buffer_offs@GOTPCREL(%rip), %rax
	movl	%r15d, (%rax)
	movslq	%ebx, %rax
	leaq	(%r14,%rax,4), %rdi
	movq	_mp3_mix_buffer@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax), %rsi
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
                                        ## kill: def $cl killed $cl killed $ecx
	sarl	%cl, %r15d
	addl	%r15d, %r15d
	movl	%r15d, %edx
	callq	*%r13
	movq	_mp3_play_bufsel@GOTPCREL(%rip), %rsi
	movq	_mp3_samples_ready@GOTPCREL(%rip), %rcx
	movq	_mp3_job_started@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	jmp	LBB0_20
LBB0_16:
	movq	_mp3_mix_buffer@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_mp3_play_bufsel@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	shlq	$2, %rsi
	addq	(%rax,%rcx,8), %rsi
	addl	%r13d, %r13d
	movq	%rdi, %r15
	movq	%r14, %rdi
	movq	%rdx, %rbx
	movl	%r13d, %edx
	callq	*%r8
	movq	%r15, %rcx
	movq	%rbx, %rdx
	movq	_mp3_buffer_offs@GOTPCREL(%rip), %rax
	addl	%r12d, (%rax)
	jmp	LBB0_21
LBB0_18:
	addl	%esi, %esi
	movslq	%esi, %rsi
	addq	%rsi, %rsi
	addq	(%rax), %rsi
	addl	%r13d, %r13d
	movq	%r14, %rdi
	movq	%rdx, %rbx
	movl	%r13d, %edx
	movq	%r9, %r14
	callq	*%r8
	movq	_mp3_play_bufsel@GOTPCREL(%rip), %rsi
	movq	_mp3_samples_ready@GOTPCREL(%rip), %rcx
	movq	%rbx, %rdx
	movl	%r15d, (%r14)
	movl	$1, %eax
LBB0_20:
	movq	%rax, (%rsi)
LBB0_21:
	subl	%r12d, (%rcx)
	movl	(%rdx), %eax
LBB0_22:
	testl	%eax, %eax
	je	LBB0_24
LBB0_23:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_24:
	movq	_working_buf@GOTPCREL(%rip), %rax
	xorb	$1, (%rax)
	movl	$1, (%rdx)
	movq	_thread_busy_sem@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_psp_sem_lock
	movl	(%rbx), %edi
	callq	_psp_sem_unlock
	movq	_thread_job_sem@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_psp_sem_unlock
	movl	$1, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_sceKernelDelayThread           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_mp3_handle,8,3                 ## @mp3_handle
	.comm	_mp3_src_pos,8,3                ## @mp3_src_pos
	.comm	_mp3_src_size,8,3               ## @mp3_src_size
	.comm	_PsndRate,4,2                   ## @PsndRate
	.comm	_mp3_job_started,4,2            ## @mp3_job_started
	.comm	_mp3_samples_ready,4,2          ## @mp3_samples_ready
	.comm	_thread_busy_sem,4,2            ## @thread_busy_sem
	.comm	_mp3_buffer_offs,4,2            ## @mp3_buffer_offs
	.comm	_mp3_mix_buffer,8,3             ## @mp3_mix_buffer
	.comm	_mp3_play_bufsel,8,3            ## @mp3_play_bufsel
	.comm	_working_buf,4,2                ## @working_buf
	.comm	_thread_job_sem,4,2             ## @thread_job_sem
.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:
	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
Lloh0:
	adrp	x8, _mp3_handle@GOTPAGE
Lloh1:
	ldr	x8, [x8, _mp3_handle@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	tbnz	x8, #63, LBB0_5
; %bb.1:
Lloh3:
	adrp	x8, _mp3_src_pos@GOTPAGE
Lloh4:
	ldr	x8, [x8, _mp3_src_pos@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
Lloh6:
	adrp	x9, _mp3_src_size@GOTPAGE
Lloh7:
	ldr	x9, [x9, _mp3_src_size@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ge	LBB0_5
; %bb.2:
	mov	x19, x0
Lloh9:
	adrp	x24, _PsndRate@GOTPAGE
Lloh10:
	ldr	x24, [x24, _PsndRate@GOTPAGEOFF]
	ldr	w8, [x24]
	mov	w9, #11025
	lsl	w10, w1, #2
	mov	w11, #22050
	lsl	w20, w1, #1
	cmp	w8, w11
	csel	w11, w1, w20, ne
	cmp	w8, w9
	csel	w22, w10, w11, eq
Lloh11:
	adrp	x21, _mp3_job_started@GOTPAGE
Lloh12:
	ldr	x21, [x21, _mp3_job_started@GOTPAGEOFF]
	ldr	w8, [x21]
Lloh13:
	adrp	x23, _mp3_samples_ready@GOTPAGE
Lloh14:
	ldr	x23, [x23, _mp3_samples_ready@GOTPAGEOFF]
	ldr	w9, [x23]
	cmp	w8, #0
	ccmp	w9, w22, #0, ne
	b.lt	LBB0_6
; %bb.3:
	cmp	w9, w22
	b.ge	LBB0_7
LBB0_4:
	cbz	w8, LBB0_19
LBB0_5:
	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
LBB0_6:
Lloh15:
	adrp	x25, _thread_busy_sem@GOTPAGE
Lloh16:
	ldr	x25, [x25, _thread_busy_sem@GOTPAGEOFF]
	ldr	w0, [x25]
	bl	_psp_sem_lock
	ldr	w0, [x25]
	bl	_psp_sem_unlock
	mov	w8, #0
	str	wzr, [x21]
	ldr	w9, [x23]
	add	w9, w9, #1152
	str	w9, [x23]
	cmp	w9, w22
	b.lt	LBB0_4
LBB0_7:
	ldr	w8, [x24]
	mov	w9, #22050
	cmp	w8, w9
	b.eq	LBB0_10
; %bb.8:
	mov	w9, #11025
	cmp	w8, w9
	b.ne	LBB0_11
; %bb.9:
Lloh17:
	adrp	x24, _mix_16h_to_32_s2@GOTPAGE
Lloh18:
	ldr	x24, [x24, _mix_16h_to_32_s2@GOTPAGEOFF]
	mov	w27, #2
	b	LBB0_12
LBB0_10:
Lloh19:
	adrp	x24, _mix_16h_to_32_s1@GOTPAGE
Lloh20:
	ldr	x24, [x24, _mix_16h_to_32_s1@GOTPAGEOFF]
	mov	w27, #1
	b	LBB0_12
LBB0_11:
	mov	w27, #0
Lloh21:
	adrp	x24, _mix_16h_to_32@GOTPAGE
Lloh22:
	ldr	x24, [x24, _mix_16h_to_32@GOTPAGEOFF]
LBB0_12:
Lloh23:
	adrp	x25, _mp3_buffer_offs@GOTPAGE
Lloh24:
	ldr	x25, [x25, _mp3_buffer_offs@GOTPAGEOFF]
	ldrsw	x8, [x25]
	mov	w9, #1152
	sub	w9, w9, w8
	subs	w28, w22, w9
	b.le	LBB0_15
; %bb.13:
Lloh25:
	adrp	x12, _mp3_play_bufsel@GOTPAGE
Lloh26:
	ldr	x12, [x12, _mp3_play_bufsel@GOTPAGEOFF]
	ldr	x11, [x12]
Lloh27:
	adrp	x26, _mp3_mix_buffer@GOTPAGE
Lloh28:
	ldr	x26, [x26, _mp3_mix_buffer@GOTPAGEOFF]
	ldr	x10, [x26]
	cbz	x11, LBB0_16
; %bb.14:
	ldr	x10, [x10, #8]
	add	x1, x10, x8, lsl #2
	asr	w8, w9, w27
	lsl	w20, w8, #1
	mov	x0, x19
	mov	x2, x20
	blr	x24
	str	w28, [x25]
	add	x0, x19, w20, sxtw #2
	ldr	x8, [x26]
	ldr	x1, [x8]
	asr	w8, w28, w27
	lsl	w2, w8, #1
	blr	x24
Lloh29:
	adrp	x9, _mp3_play_bufsel@GOTPAGE
Lloh30:
	ldr	x9, [x9, _mp3_play_bufsel@GOTPAGEOFF]
	mov	x8, #0
	b	LBB0_17
LBB0_15:
Lloh31:
	adrp	x9, _mp3_mix_buffer@GOTPAGE
Lloh32:
	ldr	x9, [x9, _mp3_mix_buffer@GOTPAGEOFF]
Lloh33:
	ldr	x9, [x9]
Lloh34:
	adrp	x10, _mp3_play_bufsel@GOTPAGE
Lloh35:
	ldr	x10, [x10, _mp3_play_bufsel@GOTPAGEOFF]
Lloh36:
	ldr	x10, [x10]
	ldr	x9, [x9, x10, lsl #3]
	add	x1, x9, x8, lsl #2
	mov	x0, x19
	mov	x2, x20
	blr	x24
	ldr	w8, [x25]
	add	w8, w8, w22
	str	w8, [x25]
	b	LBB0_18
LBB0_16:
	ldr	x9, [x10]
	lsl	w8, w8, #1
	add	x1, x9, w8, sxtw #1
	mov	x0, x19
	mov	x2, x20
	mov	x19, x12
	blr	x24
	mov	x9, x19
	str	w28, [x25]
	mov	w8, #1
LBB0_17:
	str	x8, [x9]
LBB0_18:
	ldr	w8, [x23]
	sub	w8, w8, w22
	str	w8, [x23]
	ldr	w8, [x21]
	cbnz	w8, LBB0_5
LBB0_19:
	mov	w8, #1
	str	w8, [x21]
Lloh37:
	adrp	x8, _working_buf@GOTPAGE
Lloh38:
	ldr	x8, [x8, _working_buf@GOTPAGEOFF]
	ldr	w9, [x8]
	eor	w9, w9, #0x1
	str	w9, [x8]
Lloh39:
	adrp	x19, _thread_busy_sem@GOTPAGE
Lloh40:
	ldr	x19, [x19, _thread_busy_sem@GOTPAGEOFF]
	ldr	w0, [x19]
	bl	_psp_sem_lock
	ldr	w0, [x19]
	bl	_psp_sem_unlock
Lloh41:
	adrp	x8, _thread_job_sem@GOTPAGE
Lloh42:
	ldr	x8, [x8, _thread_job_sem@GOTPAGEOFF]
Lloh43:
	ldr	w0, [x8]
	bl	_psp_sem_unlock
	mov	w0, #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
	b	_sceKernelDelayThread
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGot	Lloh39, Lloh40
	.loh AdrpLdrGot	Lloh37, Lloh38
	.cfi_endproc
                                        ; -- End function
	.comm	_mp3_handle,8,3                 ; @mp3_handle
	.comm	_mp3_src_pos,8,3                ; @mp3_src_pos
	.comm	_mp3_src_size,8,3               ; @mp3_src_size
	.comm	_PsndRate,4,2                   ; @PsndRate
	.comm	_mp3_job_started,4,2            ; @mp3_job_started
	.comm	_mp3_samples_ready,4,2          ; @mp3_samples_ready
	.comm	_thread_busy_sem,4,2            ; @thread_busy_sem
	.comm	_mp3_buffer_offs,4,2            ; @mp3_buffer_offs
	.comm	_mp3_mix_buffer,8,3             ; @mp3_mix_buffer
	.comm	_mp3_play_bufsel,8,3            ; @mp3_play_bufsel
	.comm	_working_buf,4,2                ; @working_buf
	.comm	_thread_job_sem,4,2             ; @thread_job_sem
.subsections_via_symbols
