	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function encode_frame
_encode_frame:                          ## @encode_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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -48(%rbp)
	leaq	-48(%rbp), %rdi
	callq	_av_init_packet
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_avcodec_send_frame
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	leaq	-48(%rbp), %rsi
	movq	%r14, %rdi
	callq	_avcodec_receive_packet
	testl	%eax, %eax
	js	LBB0_3
## %bb.6:
	xorl	%ebx, %ebx
	leaq	-48(%rbp), %r15
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	addl	-48(%rbp), %ebx
	movq	%r15, %rdi
	callq	_av_packet_unref
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_avcodec_receive_packet
	testl	%eax, %eax
	jns	LBB0_7
## %bb.8:
	movl	%eax, %r12d
	jmp	LBB0_4
LBB0_1:
	movl	%eax, %ecx
	jmp	LBB0_5
LBB0_3:
	movl	%eax, %r12d
	xorl	%ebx, %ebx
LBB0_4:
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	movq	_AVERROR_EOF@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %r12d
	movl	%r12d, %ecx
	cmovel	%ebx, %ecx
	cmpl	%eax, %r12d
	cmovel	%ebx, %ecx
LBB0_5:
	movl	%ecx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_AVERROR_EOF,4,2                ## @AVERROR_EOF
	.no_dead_strip	_encode_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function encode_frame
_encode_frame:                          ; @encode_frame
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x20, x1
	mov	x19, x0
	stp	xzr, xzr, [sp]
	mov	x0, sp
	bl	_av_init_packet
	mov	x0, x19
	mov	x1, x20
	bl	_avcodec_send_frame
	tbnz	w0, #31, LBB0_7
; %bb.1:
	mov	x1, sp
	mov	x0, x19
	bl	_avcodec_receive_packet
	tbnz	w0, #31, LBB0_5
; %bb.2:
	mov	w21, #0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [sp]
	add	w21, w21, w8
	mov	x0, sp
	bl	_av_packet_unref
	mov	x1, sp
	mov	x0, x19
	bl	_avcodec_receive_packet
	tbz	w0, #31, LBB0_3
; %bb.4:
	mov	x20, x0
	b	LBB0_6
LBB0_5:
	mov	x20, x0
	mov	w21, #0
LBB0_6:
Lloh0:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_AVERROR
Lloh3:
	adrp	x8, _AVERROR_EOF@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AVERROR_EOF@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w20, w8
	ccmp	w20, w0, #4, ne
	csel	w0, w21, w20, eq
LBB0_7:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_AVERROR_EOF,4,2                ; @AVERROR_EOF
	.no_dead_strip	_encode_frame
.subsections_via_symbols
