	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mp3_get_bitrate                ## -- Begin function mp3_get_bitrate
	.p2align	4, 0x90
_mp3_get_bitrate:                       ## @mp3_get_bitrate
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_thread_busy_sem@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	testq	%rdi, %rdi
	js	LBB0_2
## %bb.1:
	callq	_psp_sem_lock
LBB0_2:
	movq	_mp3_handle@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	testl	%edi, %edi
	js	LBB0_4
## %bb.3:
	callq	_sceIoClose
LBB0_4:
	movq	_PSP_O_RDONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	$511, %edx                      ## imm = 0x1FF
	callq	_sceIoOpen
	movl	%eax, (%r12)
	testl	%eax, %eax
	js	LBB0_5
## %bb.6:
	movq	_mp3_src_pos@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	xorl	%edi, %edi
	callq	_read_next_frame
	testl	%eax, %eax
	jle	LBB0_7
## %bb.8:
	movq	_mp3_src_buffer@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movl	8(%rax), %eax
	testb	$12, %al
	je	LBB0_10
## %bb.9:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_12
LBB0_5:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_12
LBB0_7:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_12
LBB0_10:
	sarl	$4, %eax
	movq	_bitrates@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cltq
	movl	(%rcx,%rax,4), %ebx
	testl	%ebx, %ebx
	jne	LBB0_13
## %bb.11:
	leaq	L_.str.3(%rip), %rdi
LBB0_12:
	movq	%r14, %rsi
	callq	_lprintf
	movl	$-1, %ebx
LBB0_13:
	movl	(%r12), %edi
	testl	%edi, %edi
	js	LBB0_15
## %bb.14:
	callq	_sceIoClose
LBB0_15:
	movl	$-1, (%r12)
	movq	_mp3_fname@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	movq	(%r15), %rdi
	testq	%rdi, %rdi
	js	LBB0_17
## %bb.16:
	callq	_psp_sem_unlock
LBB0_17:
	testl	%ebx, %ebx
	jns	LBB0_19
## %bb.18:
	movq	_mp3_last_error@GOTPCREL(%rip), %rax
	movl	$-1, (%rax)
LBB0_19:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_thread_busy_sem,8,3            ## @thread_busy_sem
	.comm	_mp3_handle,4,2                 ## @mp3_handle
	.comm	_PSP_O_RDONLY,4,2               ## @PSP_O_RDONLY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"sceIoOpen(%s) failed\n"

	.comm	_mp3_src_pos,8,3                ## @mp3_src_pos
L_.str.1:                               ## @.str.1
	.asciz	"read_next_frame() failed (%s)\n"

	.comm	_mp3_src_buffer,8,3             ## @mp3_src_buffer
L_.str.2:                               ## @.str.2
	.asciz	"unsupported samplerate (%s)\n"

	.comm	_bitrates,8,3                   ## @bitrates
L_.str.3:                               ## @.str.3
	.asciz	"unsupported bitrate (%s)\n"

	.comm	_mp3_fname,8,3                  ## @mp3_fname
	.comm	_mp3_last_error,4,2             ## @mp3_last_error
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mp3_get_bitrate                ; -- Begin function mp3_get_bitrate
	.p2align	2
_mp3_get_bitrate:                       ; @mp3_get_bitrate
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
Lloh0:
	adrp	x21, _thread_busy_sem@GOTPAGE
Lloh1:
	ldr	x21, [x21, _thread_busy_sem@GOTPAGEOFF]
	ldr	x0, [x21]
	tbnz	x0, #63, LBB0_2
; %bb.1:
	bl	_psp_sem_lock
LBB0_2:
Lloh2:
	adrp	x22, _mp3_handle@GOTPAGE
Lloh3:
	ldr	x22, [x22, _mp3_handle@GOTPAGEOFF]
	ldr	w0, [x22]
	tbnz	w0, #31, LBB0_4
; %bb.3:
	bl	_sceIoClose
LBB0_4:
Lloh4:
	adrp	x8, _PSP_O_RDONLY@GOTPAGE
Lloh5:
	ldr	x8, [x8, _PSP_O_RDONLY@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #511
	bl	_sceIoOpen
	str	w0, [x22]
	tbnz	w0, #31, LBB0_8
; %bb.5:
Lloh7:
	adrp	x8, _mp3_src_pos@GOTPAGE
Lloh8:
	ldr	x8, [x8, _mp3_src_pos@GOTPAGEOFF]
Lloh9:
	str	xzr, [x8]
	mov	w0, #0
	bl	_read_next_frame
	cmp	w0, #1
	b.lt	LBB0_9
; %bb.6:
Lloh10:
	adrp	x8, _mp3_src_buffer@GOTPAGE
Lloh11:
	ldr	x8, [x8, _mp3_src_buffer@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	ldr	x8, [x8]
	ldr	w8, [x8, #8]
	tst	w8, #0xc
	b.eq	LBB0_10
; %bb.7:
Lloh13:
	adrp	x0, l_.str.2@PAGE
Lloh14:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_12
LBB0_8:
Lloh15:
	adrp	x0, l_.str@PAGE
Lloh16:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_12
LBB0_9:
Lloh17:
	adrp	x0, l_.str.1@PAGE
Lloh18:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_12
LBB0_10:
	asr	w8, w8, #4
Lloh19:
	adrp	x9, _bitrates@GOTPAGE
Lloh20:
	ldr	x9, [x9, _bitrates@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	ldr	w20, [x9, w8, sxtw #2]
	cbnz	w20, LBB0_13
; %bb.11:
Lloh22:
	adrp	x0, l_.str.3@PAGE
Lloh23:
	add	x0, x0, l_.str.3@PAGEOFF
LBB0_12:
	mov	x1, x19
	bl	_lprintf
	mov	w20, #-1
LBB0_13:
	ldr	w0, [x22]
	tbnz	w0, #31, LBB0_15
; %bb.14:
	bl	_sceIoClose
LBB0_15:
	mov	w8, #-1
	str	w8, [x22]
Lloh24:
	adrp	x8, _mp3_fname@GOTPAGE
Lloh25:
	ldr	x8, [x8, _mp3_fname@GOTPAGEOFF]
Lloh26:
	str	xzr, [x8]
	ldr	x0, [x21]
	tbnz	x0, #63, LBB0_17
; %bb.16:
	bl	_psp_sem_unlock
LBB0_17:
	tbz	w20, #31, LBB0_19
; %bb.18:
Lloh27:
	adrp	x8, _mp3_last_error@GOTPAGE
Lloh28:
	ldr	x8, [x8, _mp3_last_error@GOTPAGEOFF]
	mov	w9, #-1
Lloh29:
	str	w9, [x8]
LBB0_19:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotStr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotStr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotStr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_thread_busy_sem,8,3            ; @thread_busy_sem
	.comm	_mp3_handle,4,2                 ; @mp3_handle
	.comm	_PSP_O_RDONLY,4,2               ; @PSP_O_RDONLY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"sceIoOpen(%s) failed\n"

	.comm	_mp3_src_pos,8,3                ; @mp3_src_pos
l_.str.1:                               ; @.str.1
	.asciz	"read_next_frame() failed (%s)\n"

	.comm	_mp3_src_buffer,8,3             ; @mp3_src_buffer
l_.str.2:                               ; @.str.2
	.asciz	"unsupported samplerate (%s)\n"

	.comm	_bitrates,8,3                   ; @bitrates
l_.str.3:                               ; @.str.3
	.asciz	"unsupported bitrate (%s)\n"

	.comm	_mp3_fname,8,3                  ; @mp3_fname
	.comm	_mp3_last_error,4,2             ; @mp3_last_error
.subsections_via_symbols
