	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fifo_thread_write_packet
_fifo_thread_write_packet:              ## @fifo_thread_write_packet
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	8(%rdi), %rbx
	movq	8(%rbx), %rax
	movq	(%rax), %r14
	cmpq	$0, (%rdi)
	je	LBB0_3
## %bb.1:
	movq	_AV_PKT_FLAG_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r15)
	je	LBB0_6
## %bb.2:
	movq	$0, (%rdi)
	movq	_AV_LOG_VERBOSE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%rbx, %rdi
	callq	_av_log
LBB0_3:
	movslq	4(%r15), %rax
	movq	(%rbx), %rcx
	movq	(%rcx,%rax,8), %rcx
	movl	(%rcx), %esi
	movq	(%r14), %rcx
	movq	(%rcx,%rax,8), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_av_packet_rescale_ts
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_av_write_frame
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_4
	jmp	LBB0_5
LBB0_6:
	movq	_AV_LOG_VERBOSE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%rbx, %rdi
	callq	_av_log
	xorl	%ebx, %ebx
LBB0_4:
	movq	%r15, %rdi
	callq	_av_packet_unref
LBB0_5:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_PKT_FLAG_KEY,4,2            ## @AV_PKT_FLAG_KEY
	.comm	_AV_LOG_VERBOSE,4,2             ## @AV_LOG_VERBOSE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Keyframe received, recovering...\n"

L_.str.1:                               ## @.str.1
	.asciz	"Dropping non-keyframe packet\n"

	.no_dead_strip	_fifo_thread_write_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fifo_thread_write_packet
_fifo_thread_write_packet:              ; @fifo_thread_write_packet
	.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, x1
	ldp	x8, x21, [x0]
	ldr	x9, [x21, #8]
	ldr	x20, [x9]
	cbz	x8, LBB0_3
; %bb.1:
	ldr	w8, [x19]
Lloh0:
	adrp	x9, _AV_PKT_FLAG_KEY@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AV_PKT_FLAG_KEY@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.2:
	str	xzr, [x0]
Lloh3:
	adrp	x8, _AV_LOG_VERBOSE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AV_LOG_VERBOSE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x21
	bl	_av_log
LBB0_3:
	ldrsw	x8, [x19, #4]
	ldr	x9, [x21]
	lsl	x8, x8, #3
	ldr	x9, [x9, x8]
	ldr	w1, [x9]
	ldr	x9, [x20]
	ldr	x8, [x9, x8]
	ldr	w2, [x8]
	mov	x0, x19
	bl	_av_packet_rescale_ts
	mov	x0, x20
	mov	x1, x19
	bl	_av_write_frame
	mov	x20, x0
	tbz	w0, #31, LBB0_5
	b	LBB0_6
LBB0_4:
Lloh8:
	adrp	x8, _AV_LOG_VERBOSE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _AV_LOG_VERBOSE@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x2, l_.str.1@PAGE
Lloh12:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_av_log
	mov	w20, #0
LBB0_5:
	mov	x0, x19
	bl	_av_packet_unref
LBB0_6:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_PKT_FLAG_KEY,4,2            ; @AV_PKT_FLAG_KEY
	.comm	_AV_LOG_VERBOSE,4,2             ; @AV_LOG_VERBOSE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Keyframe received, recovering...\n"

l_.str.1:                               ; @.str.1
	.asciz	"Dropping non-keyframe packet\n"

	.no_dead_strip	_fifo_thread_write_packet
.subsections_via_symbols
