	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal4,4byte_literals
	.p2align	2                               ## -- Begin function mp3_start_play
LCPI0_0:
	.long	0x447fc000                      ## float 1023
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_mp3_start_play
	.p2align	4, 0x90
_mp3_start_play:                        ## @mp3_start_play
	.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	_initialized@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_8
## %bb.1:
	movl	%esi, %r14d
	movq	%rdi, %rbx
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %rsi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_lprintf
	movq	_thread_busy_sem@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	callq	_psp_sem_lock
	movq	_mp3_fname@GOTPCREL(%rip), %r13
	movq	_mp3_handle@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	cmpq	%rbx, (%r13)
	jne	LBB0_3
## %bb.2:
	testq	%rdi, %rdi
	jns	LBB0_7
LBB0_3:
	testq	%rdi, %rdi
	js	LBB0_5
## %bb.4:
	callq	_sceIoClose
LBB0_5:
	movq	_PSP_O_RDONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$511, %edx                      ## imm = 0x1FF
	callq	_sceIoOpen
	movq	%rax, (%r12)
	testq	%rax, %rax
	js	LBB0_9
## %bb.6:
	movq	_PSP_SEEK_END@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%rax, %rdi
	xorl	%esi, %esi
	callq	_sceIoLseek32
	movq	_mp3_src_size@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	movq	%rbx, (%r13)
LBB0_7:
	movq	_mp3_codec_struct@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$4098, %esi                     ## imm = 0x1002
	callq	_sceAudiocodecInit
	cvtsi2ss	%r14d, %xmm0
	divss	LCPI0_0(%rip), %xmm0
	movq	_mp3_src_size@GOTPCREL(%rip), %r13
	cvtsi2ssq	(%r13), %xmm1
	mulss	%xmm0, %xmm1
	cvttss2si	%xmm1, %esi
	movq	_mp3_src_pos@GOTPCREL(%rip), %rbx
	movl	%esi, (%rbx)
	movq	(%r12), %rdi
	movq	_PSP_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_sceIoLseek32
	movl	(%rbx), %edx
	movq	(%r13), %rcx
	leaq	L_.str.2(%rip), %rdi
	movl	%r14d, %esi
	xorl	%eax, %eax
	callq	_lprintf
	movq	_mp3_job_started@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
	movq	_mp3_play_bufsel@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	movq	_mp3_buffer_offs@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	movq	_mp3_samples_ready@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	movq	_working_buf@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	movl	(%r15), %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
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	leaq	L_.str.1(%rip), %rdi
	movq	%rbx, %rsi
	xorl	%eax, %eax
	callq	_lprintf
	movl	(%r15), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_psp_sem_unlock                 ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_initialized,4,2                ## @initialized
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"mp3_start_play(%s) @ %i\n"

	.comm	_thread_busy_sem,4,2            ## @thread_busy_sem
	.comm	_mp3_fname,8,3                  ## @mp3_fname
	.comm	_mp3_handle,8,3                 ## @mp3_handle
	.comm	_PSP_O_RDONLY,4,2               ## @PSP_O_RDONLY
L_.str.1:                               ## @.str.1
	.asciz	"sceIoOpen(%s) failed\n"

	.comm	_PSP_SEEK_END,4,2               ## @PSP_SEEK_END
	.comm	_mp3_src_size,8,3               ## @mp3_src_size
	.comm	_mp3_codec_struct,4,2           ## @mp3_codec_struct
	.comm	_mp3_src_pos,4,2                ## @mp3_src_pos
	.comm	_PSP_SEEK_SET,4,2               ## @PSP_SEEK_SET
L_.str.2:                               ## @.str.2
	.asciz	"seek %i: %i/%i\n"

	.comm	_mp3_job_started,4,2            ## @mp3_job_started
	.comm	_mp3_play_bufsel,8,3            ## @mp3_play_bufsel
	.comm	_mp3_buffer_offs,8,3            ## @mp3_buffer_offs
	.comm	_mp3_samples_ready,8,3          ## @mp3_samples_ready
	.comm	_working_buf,8,3                ## @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_start_play                 ; -- Begin function mp3_start_play
	.p2align	2
_mp3_start_play:                        ; @mp3_start_play
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
Lloh0:
	adrp	x8, _initialized@GOTPAGE
Lloh1:
	ldr	x8, [x8, _initialized@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cbz	w8, LBB0_8
; %bb.1:
	mov	x19, x1
	mov	x20, x0
	stp	x0, x19, [sp]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_lprintf
Lloh5:
	adrp	x21, _thread_busy_sem@GOTPAGE
Lloh6:
	ldr	x21, [x21, _thread_busy_sem@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_psp_sem_lock
Lloh7:
	adrp	x24, _mp3_fname@GOTPAGE
Lloh8:
	ldr	x24, [x24, _mp3_fname@GOTPAGEOFF]
	ldr	x8, [x24]
Lloh9:
	adrp	x23, _mp3_handle@GOTPAGE
Lloh10:
	ldr	x23, [x23, _mp3_handle@GOTPAGEOFF]
	ldr	x0, [x23]
Lloh11:
	adrp	x22, _mp3_src_size@GOTPAGE
Lloh12:
	ldr	x22, [x22, _mp3_src_size@GOTPAGEOFF]
	cmp	x8, x20
	b.ne	LBB0_3
; %bb.2:
	tbz	x0, #63, LBB0_7
LBB0_3:
	tbnz	x0, #63, LBB0_5
; %bb.4:
	bl	_sceIoClose
LBB0_5:
Lloh13:
	adrp	x8, _PSP_O_RDONLY@GOTPAGE
Lloh14:
	ldr	x8, [x8, _PSP_O_RDONLY@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #511
	bl	_sceIoOpen
	str	x0, [x23]
	tbnz	x0, #63, LBB0_9
; %bb.6:
Lloh16:
	adrp	x8, _PSP_SEEK_END@GOTPAGE
Lloh17:
	ldr	x8, [x8, _PSP_SEEK_END@GOTPAGEOFF]
Lloh18:
	ldr	w2, [x8]
	mov	w1, #0
	bl	_sceIoLseek32
	str	x0, [x22]
	str	x20, [x24]
LBB0_7:
Lloh19:
	adrp	x8, _mp3_codec_struct@GOTPAGE
Lloh20:
	ldr	x8, [x8, _mp3_codec_struct@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
	mov	w1, #4098
	bl	_sceAudiocodecInit
	scvtf	s0, w19
	mov	w8, #49152
	movk	w8, #17535, lsl #16
	fmov	s1, w8
	ldr	x8, [x22]
	scvtf	s2, x8
	fdiv	s0, s0, s1
	fmul	s0, s0, s2
	fcvtzs	w1, s0
Lloh22:
	adrp	x20, _mp3_src_pos@GOTPAGE
Lloh23:
	ldr	x20, [x20, _mp3_src_pos@GOTPAGEOFF]
	str	w1, [x20]
	ldr	x0, [x23]
Lloh24:
	adrp	x8, _PSP_SEEK_SET@GOTPAGE
Lloh25:
	ldr	x8, [x8, _PSP_SEEK_SET@GOTPAGEOFF]
Lloh26:
	ldr	w2, [x8]
	bl	_sceIoLseek32
	ldr	x8, [x22]
	ldr	w9, [x20]
	stp	x9, x8, [sp, #8]
                                        ; kill: def $w19 killed $w19 killed $x19 def $x19
	str	x19, [sp]
Lloh27:
	adrp	x0, l_.str.2@PAGE
Lloh28:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_lprintf
Lloh29:
	adrp	x8, _mp3_job_started@GOTPAGE
Lloh30:
	ldr	x8, [x8, _mp3_job_started@GOTPAGEOFF]
	mov	w9, #1
Lloh31:
	adrp	x10, _mp3_play_bufsel@GOTPAGE
Lloh32:
	ldr	x10, [x10, _mp3_play_bufsel@GOTPAGEOFF]
Lloh33:
	str	w9, [x8]
Lloh34:
	str	xzr, [x10]
Lloh35:
	adrp	x8, _mp3_buffer_offs@GOTPAGE
Lloh36:
	ldr	x8, [x8, _mp3_buffer_offs@GOTPAGEOFF]
Lloh37:
	adrp	x9, _mp3_samples_ready@GOTPAGE
Lloh38:
	ldr	x9, [x9, _mp3_samples_ready@GOTPAGEOFF]
Lloh39:
	str	xzr, [x8]
Lloh40:
	str	xzr, [x9]
Lloh41:
	adrp	x8, _working_buf@GOTPAGE
Lloh42:
	ldr	x8, [x8, _working_buf@GOTPAGEOFF]
Lloh43:
	str	xzr, [x8]
	ldr	w0, [x21]
	bl	_psp_sem_unlock
Lloh44:
	adrp	x8, _thread_job_sem@GOTPAGE
Lloh45:
	ldr	x8, [x8, _thread_job_sem@GOTPAGEOFF]
Lloh46:
	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
	add	sp, sp, #96
	b	_sceKernelDelayThread
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
	add	sp, sp, #96
	ret
LBB0_9:
	str	x20, [sp]
Lloh47:
	adrp	x0, l_.str.1@PAGE
Lloh48:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_lprintf
	ldr	w0, [x21]
	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
	add	sp, sp, #96
	b	_psp_sem_unlock
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotStr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotStr	Lloh37, Lloh38, Lloh40
	.loh AdrpLdrGotStr	Lloh35, Lloh36, Lloh39
	.loh AdrpLdrGotStr	Lloh31, Lloh32, Lloh34
	.loh AdrpLdrGotStr	Lloh29, Lloh30, Lloh33
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh47, Lloh48
	.cfi_endproc
                                        ; -- End function
	.comm	_initialized,4,2                ; @initialized
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"mp3_start_play(%s) @ %i\n"

	.comm	_thread_busy_sem,4,2            ; @thread_busy_sem
	.comm	_mp3_fname,8,3                  ; @mp3_fname
	.comm	_mp3_handle,8,3                 ; @mp3_handle
	.comm	_PSP_O_RDONLY,4,2               ; @PSP_O_RDONLY
l_.str.1:                               ; @.str.1
	.asciz	"sceIoOpen(%s) failed\n"

	.comm	_PSP_SEEK_END,4,2               ; @PSP_SEEK_END
	.comm	_mp3_src_size,8,3               ; @mp3_src_size
	.comm	_mp3_codec_struct,4,2           ; @mp3_codec_struct
	.comm	_mp3_src_pos,4,2                ; @mp3_src_pos
	.comm	_PSP_SEEK_SET,4,2               ; @PSP_SEEK_SET
l_.str.2:                               ; @.str.2
	.asciz	"seek %i: %i/%i\n"

	.comm	_mp3_job_started,4,2            ; @mp3_job_started
	.comm	_mp3_play_bufsel,8,3            ; @mp3_play_bufsel
	.comm	_mp3_buffer_offs,8,3            ; @mp3_buffer_offs
	.comm	_mp3_samples_ready,8,3          ; @mp3_samples_ready
	.comm	_working_buf,8,3                ; @working_buf
	.comm	_thread_job_sem,4,2             ; @thread_job_sem
.subsections_via_symbols
