	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_av_write_frame                 ## -- Begin function av_write_frame
	.p2align	4, 0x90
_av_write_frame:                        ## @av_write_frame
	.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	%rdi, %r14
	callq	_prepare_input_packet
	testl	%eax, %eax
	js	LBB0_12
## %bb.1:
	testq	%r15, %r15
	je	LBB0_2
## %bb.7:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_do_packet_auto_bsf
	testl	%eax, %eax
	jle	LBB0_12
## %bb.8:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_write_packet
	testl	%eax, %eax
	js	LBB0_12
## %bb.9:
	movq	8(%r14), %rcx
	testq	%rcx, %rcx
	je	LBB0_11
## %bb.10:
	movl	(%rcx), %ebx
	testl	%ebx, %ebx
	js	LBB0_13
LBB0_11:
	movq	(%r14), %rcx
	movq	(%r15), %rdx
	movq	(%rcx,%rdx,8), %rcx
	incl	(%rcx)
LBB0_12:
	movl	%eax, %ebx
LBB0_13:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	16(%r14), %rcx
	movq	_AVFMT_ALLOW_FLUSH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rcx)
	je	LBB0_3
## %bb.4:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	*8(%rcx)
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_flush_if_needed
	testl	%ebx, %ebx
	js	LBB0_13
## %bb.5:
	movq	8(%r14), %rax
	testq	%rax, %rax
	je	LBB0_13
## %bb.6:
	movl	(%rax), %eax
	testl	%eax, %eax
	cmovsl	%eax, %ebx
	jmp	LBB0_13
LBB0_3:
	movl	$1, %ebx
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_AVFMT_ALLOW_FLUSH,4,2          ## @AVFMT_ALLOW_FLUSH
	.comm	_AVFMT_NOTIMESTAMPS,4,2         ## @AVFMT_NOTIMESTAMPS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_av_write_frame                 ; -- Begin function av_write_frame
	.p2align	2
_av_write_frame:                        ; @av_write_frame
	.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	x21, x1
	mov	x20, x0
	bl	_prepare_input_packet
	tbnz	w0, #31, LBB0_7
; %bb.1:
	cbz	x21, LBB0_9
; %bb.2:
	mov	x0, x20
	mov	x1, x21
	bl	_do_packet_auto_bsf
	cmp	w0, #1
	b.lt	LBB0_7
; %bb.3:
	mov	x0, x20
	mov	x1, x21
	bl	_write_packet
	mov	x19, x0
	tbnz	w0, #31, LBB0_8
; %bb.4:
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_6
; %bb.5:
	ldr	w8, [x8]
	tbnz	w8, #31, LBB0_14
LBB0_6:
	ldr	x8, [x20]
	ldr	x9, [x21]
	ldr	x8, [x8, x9, lsl #3]
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
	b	LBB0_8
LBB0_7:
	mov	x19, x0
LBB0_8:
	mov	x0, x19
	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
LBB0_9:
	ldr	x8, [x20, #16]
	ldr	w9, [x8]
Lloh0:
	adrp	x10, _AVFMT_ALLOW_FLUSH@GOTPAGE
Lloh1:
	ldr	x10, [x10, _AVFMT_ALLOW_FLUSH@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_13
; %bb.10:
	ldr	x8, [x8, #8]
	mov	x0, x20
	mov	x1, #0
	blr	x8
	mov	x19, x0
	mov	x0, x20
	bl	_flush_if_needed
	tbnz	w19, #31, LBB0_8
; %bb.11:
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_8
; %bb.12:
	ldr	w8, [x8]
	cmp	w8, #0
	csel	w19, w8, w19, lt
	b	LBB0_8
LBB0_13:
	mov	w19, #1
	b	LBB0_8
LBB0_14:
	mov	x19, x8
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_AVFMT_ALLOW_FLUSH,4,2          ; @AVFMT_ALLOW_FLUSH
	.comm	_AVFMT_NOTIMESTAMPS,4,2         ; @AVFMT_NOTIMESTAMPS
.subsections_via_symbols
