	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fifo_consumer_thread
_fifo_consumer_thread:                  ## @fifo_consumer_thread
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	(%rdi), %r15
	movq	24(%r15), %r12
	movq	_FIFO_WRITE_HEADER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	movl	$0, -44(%rbp)
	leaq	-72(%rbp), %rdi
	xorl	%esi, %esi
	movl	$24, %edx
	callq	_memset
	movq	%r14, -56(%rbp)
	leaq	4(%r15), %rbx
	leaq	-48(%rbp), %r13
                                        ## implicit-def: $eax
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	%rbx, %rdi
	callq	_pthread_mutex_unlock
LBB0_11:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	%r12, %rdi
	movq	%r13, %rsi
	xorl	%edx, %edx
	callq	_av_thread_message_queue_recv
	testl	%eax, %eax
	js	LBB0_12
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	-72(%rbp), %rcx
	testq	%rcx, %rcx
	je	LBB0_2
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	testl	%eax, %eax
	jns	LBB0_4
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_1 Depth=1
	leaq	-72(%rbp), %rdi
	movq	%r13, %rsi
	callq	_fifo_thread_dispatch_message
	movq	-72(%rbp), %rcx
	testl	%eax, %eax
	js	LBB0_5
LBB0_4:                                 ##   in Loop: Header=BB0_1 Depth=1
	testq	%rcx, %rcx
	jle	LBB0_6
LBB0_5:                                 ##   in Loop: Header=BB0_1 Depth=1
	leaq	-72(%rbp), %rdi
	movq	%r13, %rsi
	movl	%eax, %edx
	callq	_fifo_thread_recover
	testl	%eax, %eax
	js	LBB0_12
LBB0_6:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	%rbx, %rdi
	callq	_pthread_mutex_lock
	cmpq	$0, 8(%r15)
	je	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%r12, %rdi
	callq	_av_thread_message_flush
	cmpq	$0, 16(%r15)
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$1, -64(%rbp)
LBB0_9:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	$0, 8(%r15)
	movq	%rbx, %rdi
	callq	_pthread_mutex_unlock
	movq	_AV_LOG_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	leaq	L_.str(%rip), %rdx
	callq	_av_log
	jmp	LBB0_11
LBB0_12:
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_av_thread_message_queue_set_err_send
	leaq	-72(%rbp), %rdi
	callq	_fifo_thread_write_trailer
	movl	%eax, (%r15)
	xorl	%eax, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FIFO_WRITE_HEADER,4,2          ## @FIFO_WRITE_HEADER
	.comm	_AV_LOG_INFO,4,2                ## @AV_LOG_INFO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"FIFO queue flushed\n"

	.no_dead_strip	_fifo_consumer_thread
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fifo_consumer_thread
_fifo_consumer_thread:                  ; @fifo_consumer_thread
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x20, x0
	ldr	x23, [x0]
	ldr	x19, [x23, #24]
Lloh0:
	adrp	x8, _FIFO_WRITE_HEADER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FIFO_WRITE_HEADER@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	stp	w8, wzr, [sp, #24]
	mov	x0, sp
	mov	w1, #0
	mov	w2, #24
	bl	_memset
	str	x20, [sp, #16]
	add	x21, x23, #4
Lloh3:
	adrp	x24, _AV_LOG_INFO@GOTPAGE
Lloh4:
	ldr	x24, [x24, _AV_LOG_INFO@GOTPAGEOFF]
	mov	w25, #1
                                        ; implicit-def: $w2
Lloh5:
	adrp	x22, l_.str@PAGE
Lloh6:
	add	x22, x22, l_.str@PAGEOFF
	b	LBB0_3
LBB0_1:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x21
	bl	_pthread_mutex_unlock
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x1, sp, #24
	mov	x0, x19
	mov	w2, #0
	bl	_av_thread_message_queue_recv
	mov	x2, x0
	tbnz	w0, #31, LBB0_13
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [sp]
	cbz	x8, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	tbz	w2, #31, LBB0_6
	b	LBB0_7
LBB0_5:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, sp
	add	x1, sp, #24
	bl	_fifo_thread_dispatch_message
	mov	x2, x0
	ldr	x8, [sp]
	tbnz	w2, #31, LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_3 Depth=1
	cmp	x8, #1
	b.lt	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, sp
	add	x1, sp, #24
	bl	_fifo_thread_recover
	tbnz	w0, #31, LBB0_12
LBB0_8:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x21
	bl	_pthread_mutex_lock
	ldr	x8, [x23, #8]
	cbz	x8, LBB0_1
; %bb.9:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x19
	bl	_av_thread_message_flush
	ldr	x8, [x23, #16]
	cbz	x8, LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_3 Depth=1
	str	w25, [sp, #8]
LBB0_11:                                ;   in Loop: Header=BB0_3 Depth=1
	str	xzr, [x23, #8]
	mov	x0, x21
	bl	_pthread_mutex_unlock
	ldr	w1, [x24]
	mov	x0, x20
	mov	x2, x22
	bl	_av_log
	b	LBB0_2
LBB0_12:
	mov	x2, x0
LBB0_13:
	mov	x0, x19
	mov	x1, x2
	bl	_av_thread_message_queue_set_err_send
	mov	x0, sp
	bl	_fifo_thread_write_trailer
	str	w0, [x23]
	mov	x0, #0
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_FIFO_WRITE_HEADER,4,2          ; @FIFO_WRITE_HEADER
	.comm	_AV_LOG_INFO,4,2                ; @AV_LOG_INFO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"FIFO queue flushed\n"

	.no_dead_strip	_fifo_consumer_thread
.subsections_via_symbols
