	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function decode_audio
_decode_audio:                          ## @decode_audio
	.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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -88(%rbp)                  ## 8-byte Spill
	movq	%r8, -72(%rbp)                  ## 8-byte Spill
	movq	%rcx, %r14
	movq	%rdx, %rbx
	movq	%rcx, -56(%rbp)
	movq	(%rsi), %rax
	movq	%rax, -64(%rbp)
	movl	$0, -44(%rbp)
	leaq	-44(%rbp), %rdx
	leaq	-64(%rbp), %rcx
	movq	%rdi, -80(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rsi
	callq	_avcodec_decode_audio4
	testl	%eax, %eax
	js	LBB0_15
## %bb.1:
	movq	_fifo_lock@GOTPCREL(%rip), %r12
	movq	_decode_thread_dead@GOTPCREL(%rip), %r15
	jmp	LBB0_2
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_RETRO_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_log_cb
	movq	_audio_decode_fifo@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_fifo_clear
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_fctx@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movq	_audio_streams@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	_audio_streams_ptr@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	(%rcx,%rdx,8), %rcx
	movq	(%rax,%rcx,8), %rax
	movl	(%rax), %edi
	callq	_av_q2d
	imull	%r14d, %eax
	movq	_decode_last_audio_time@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	cmpl	$0, (%r15)
	je	LBB0_12
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_fifo_cond@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_scond_signal
	movl	(%r12), %edi
	callq	_slock_unlock
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rsi
	leaq	-44(%rbp), %rdx
	leaq	-64(%rbp), %rcx
	callq	_avcodec_decode_audio4
	testl	%eax, %eax
	js	LBB0_14
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_7 Depth 2
	addl	%eax, -64(%rbp)
	subl	%eax, -60(%rbp)
	cmpl	$0, -44(%rbp)
	je	LBB0_14
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movslq	(%rbx), %rdx
	movq	%rdx, %r13
	shlq	$3, %r13
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	cmpq	(%rax), %r13
	jbe	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %rdi
	movq	%r13, %rsi
	callq	_av_realloc
	movq	%rax, -56(%rbp)
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	%r13, (%rax)
	movl	(%rbx), %edx
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%rbx), %rcx
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	leaq	-56(%rbp), %rsi
	movl	%edx, %r8d
	callq	_swr_convert
	movq	%rbx, %rdi
	callq	_av_frame_get_best_effort_timestamp
	movl	%eax, %r14d
	movl	(%r12), %edi
	callq	_slock_lock
	cmpl	$0, (%r15)
	jne	LBB0_11
LBB0_7:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	_audio_decode_fifo@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_fifo_write_avail
	cmpq	%r13, %rax
	jae	LBB0_11
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=2
	movq	_main_sleeping@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jne	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=2
	movq	_fifo_decode_cond@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r12), %esi
	callq	_scond_wait
	cmpl	$0, (%r15)
	je	LBB0_7
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_audio_decode_fifo@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	-56(%rbp), %rsi
	movq	%r13, %rdx
	callq	_fifo_write
	jmp	LBB0_13
LBB0_14:
	movq	-56(%rbp), %r14
LBB0_15:
	movq	%r14, %rax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_fifo_lock,4,2                  ## @fifo_lock
	.comm	_decode_thread_dead,4,2         ## @decode_thread_dead
	.comm	_audio_decode_fifo,4,2          ## @audio_decode_fifo
	.comm	_main_sleeping,4,2              ## @main_sleeping
	.comm	_fifo_decode_cond,4,2           ## @fifo_decode_cond
	.comm	_RETRO_LOG_ERROR,4,2            ## @RETRO_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Thread: Audio deadlock detected ...\n"

	.comm	_fctx,8,3                       ## @fctx
	.comm	_audio_streams,8,3              ## @audio_streams
	.comm	_audio_streams_ptr,8,3          ## @audio_streams_ptr
	.comm	_decode_last_audio_time,4,2     ## @decode_last_audio_time
	.comm	_fifo_cond,4,2                  ## @fifo_cond
	.no_dead_strip	_decode_audio
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function decode_audio
_decode_audio:                          ; @decode_audio
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	str	x5, [sp]                        ; 8-byte Folded Spill
	mov	x20, x4
	mov	x23, x3
	mov	x21, x2
	mov	x22, x0
	ldr	x8, [x1]
	stp	x8, x3, [sp, #16]
	str	wzr, [sp, #12]
	add	x2, sp, #12
	add	x3, sp, #16
	mov	x1, x21
	bl	_avcodec_decode_audio4
	tbnz	w0, #31, LBB0_14
; %bb.1:
Lloh0:
	adrp	x26, _fifo_lock@GOTPAGE
Lloh1:
	ldr	x26, [x26, _fifo_lock@GOTPAGEOFF]
Lloh2:
	adrp	x27, _decode_thread_dead@GOTPAGE
Lloh3:
	ldr	x27, [x27, _decode_thread_dead@GOTPAGEOFF]
Lloh4:
	adrp	x28, _audio_decode_fifo@GOTPAGE
Lloh5:
	ldr	x28, [x28, _audio_decode_fifo@GOTPAGEOFF]
Lloh6:
	adrp	x23, _main_sleeping@GOTPAGE
Lloh7:
	ldr	x23, [x23, _main_sleeping@GOTPAGEOFF]
Lloh8:
	adrp	x19, _fifo_decode_cond@GOTPAGE
Lloh9:
	ldr	x19, [x19, _fifo_decode_cond@GOTPAGEOFF]
	b	LBB0_5
LBB0_2:                                 ;   in Loop: Header=BB0_5 Depth=1
Lloh10:
	adrp	x8, _RETRO_LOG_ERROR@GOTPAGE
Lloh11:
	ldr	x8, [x8, _RETRO_LOG_ERROR@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	bl	_log_cb
	ldr	w0, [x28]
	bl	_fifo_clear
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
Lloh15:
	adrp	x8, _fctx@GOTPAGE
Lloh16:
	ldr	x8, [x8, _fctx@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
	ldr	x8, [x8]
Lloh18:
	adrp	x9, _audio_streams@GOTPAGE
Lloh19:
	ldr	x9, [x9, _audio_streams@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
Lloh21:
	adrp	x10, _audio_streams_ptr@GOTPAGE
Lloh22:
	ldr	x10, [x10, _audio_streams_ptr@GOTPAGEOFF]
Lloh23:
	ldr	x10, [x10]
	ldr	x9, [x9, x10, lsl #3]
	ldr	x8, [x8, x9, lsl #3]
	ldr	w0, [x8]
	bl	_av_q2d
	mul	w8, w0, w25
Lloh24:
	adrp	x9, _decode_last_audio_time@GOTPAGE
Lloh25:
	ldr	x9, [x9, _decode_last_audio_time@GOTPAGEOFF]
Lloh26:
	str	w8, [x9]
	ldr	w8, [x27]
	cbz	w8, LBB0_12
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
Lloh27:
	adrp	x8, _fifo_cond@GOTPAGE
Lloh28:
	ldr	x8, [x8, _fifo_cond@GOTPAGEOFF]
Lloh29:
	ldr	w0, [x8]
	bl	_scond_signal
	ldr	w0, [x26]
	bl	_slock_unlock
	add	x2, sp, #12
	add	x3, sp, #16
	mov	x0, x22
	mov	x1, x21
	bl	_avcodec_decode_audio4
	tbnz	w0, #31, LBB0_13
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_9 Depth 2
	ldp	w8, w9, [sp, #16]
	add	w8, w8, w0
	sub	w9, w9, w0
	stp	w8, w9, [sp, #16]
	ldr	w8, [sp, #12]
	cbz	w8, LBB0_13
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldrsw	x2, [x21]
	lsl	x24, x2, #3
	ldr	x8, [x20]
	cmp	x24, x8
	b.ls	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x0, [sp, #24]
	mov	x1, x24
	bl	_av_realloc
	str	x0, [sp, #24]
	str	x24, [x20]
	ldr	w2, [x21]
LBB0_8:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x3, [x21, #8]
	add	x1, sp, #24
	ldr	x0, [sp]                        ; 8-byte Folded Reload
	mov	x4, x2
	bl	_swr_convert
	mov	x0, x21
	bl	_av_frame_get_best_effort_timestamp
	mov	x25, x0
	ldr	w0, [x26]
	bl	_slock_lock
	ldr	w8, [x27]
	cbnz	w8, LBB0_3
LBB0_9:                                 ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w0, [x28]
	bl	_fifo_write_avail
	cmp	x0, x24
	b.hs	LBB0_3
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=2
	ldr	w8, [x23]
	cbnz	w8, LBB0_2
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=2
	ldr	w0, [x19]
	ldr	w1, [x26]
	bl	_scond_wait
	ldr	w8, [x27]
	cbz	w8, LBB0_9
	b	LBB0_3
LBB0_12:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [x28]
	ldr	x1, [sp, #24]
	mov	x2, x24
	bl	_fifo_write
	b	LBB0_4
LBB0_13:
	ldr	x23, [sp, #24]
LBB0_14:
	mov	x0, x23
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotStr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_fifo_lock,4,2                  ; @fifo_lock
	.comm	_decode_thread_dead,4,2         ; @decode_thread_dead
	.comm	_audio_decode_fifo,4,2          ; @audio_decode_fifo
	.comm	_main_sleeping,4,2              ; @main_sleeping
	.comm	_fifo_decode_cond,4,2           ; @fifo_decode_cond
	.comm	_RETRO_LOG_ERROR,4,2            ; @RETRO_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Thread: Audio deadlock detected ...\n"

	.comm	_fctx,8,3                       ; @fctx
	.comm	_audio_streams,8,3              ; @audio_streams
	.comm	_audio_streams_ptr,8,3          ; @audio_streams_ptr
	.comm	_decode_last_audio_time,4,2     ; @decode_last_audio_time
	.comm	_fifo_cond,4,2                  ; @fifo_cond
	.no_dead_strip	_decode_audio
.subsections_via_symbols
