	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function encode_write
_encode_write:                          ## @encode_write
	.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
	subq	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %rbx
	movq	%rdi, %r15
	leaq	-64(%rbp), %rdi
	callq	_av_init_packet
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -64(%rbp)
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_avcodec_send_frame
	testl	%eax, %eax
	js	LBB0_6
## %bb.1:
	leaq	-64(%rbp), %rsi
	movq	%r15, %rdi
	callq	_avcodec_receive_packet
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_5
## %bb.2:
	leaq	-64(%rbp), %r12
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	$0, -48(%rbp)
	movq	-64(%rbp), %rsi
	movq	-56(%rbp), %rdi
	movl	$1, %edx
	movq	%r14, %rcx
	callq	_fwrite
	movq	%r12, %rdi
	callq	_av_packet_unref
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_avcodec_receive_packet
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	movl	%eax, %ebx
	jmp	LBB0_5
LBB0_6:
	movl	%eax, %ebx
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	%ebx, %edi
	callq	_av_err2str
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edi
	movq	%rax, %rdx
	callq	_fprintf
LBB0_5:
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	xorl	%ecx, %ecx
	cmpl	%eax, %ebx
	setne	%cl
	negl	%ecx
	movl	%ecx, %eax
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error code: %s\n"

	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.no_dead_strip	_encode_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function encode_write
_encode_write:                          ; @encode_write
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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, x2
	mov	x21, x1
	mov	x20, x0
	add	x0, sp, #8
	bl	_av_init_packet
	stp	xzr, xzr, [sp, #8]
	mov	x0, x20
	mov	x1, x21
	bl	_avcodec_send_frame
	tbnz	w0, #31, LBB0_4
; %bb.1:
	add	x1, sp, #8
	mov	x0, x20
	bl	_avcodec_receive_packet
	mov	x21, x0
	cbnz	w0, LBB0_5
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	str	xzr, [sp, #24]
	ldp	x1, x0, [sp, #8]
	mov	w2, #1
	mov	x3, x19
	bl	_fwrite
	add	x0, sp, #8
	bl	_av_packet_unref
	add	x1, sp, #8
	mov	x0, x20
	bl	_avcodec_receive_packet
	cbz	w0, LBB0_2
; %bb.3:
	mov	x21, x0
	b	LBB0_5
LBB0_4:
	mov	x21, x0
Lloh0:
	adrp	x8, _stderr@GOTPAGE
Lloh1:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh2:
	ldr	w19, [x8]
	bl	_av_err2str
	mov	x2, x0
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_fprintf
LBB0_5:
Lloh5:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	bl	_AVERROR
	cmp	w21, w0
	csetm	w0, ne
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error code: %s\n"

	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.no_dead_strip	_encode_write
.subsections_via_symbols
