	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function encode_video
_encode_video:                          ## @encode_video
	.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	%rdx, %r15
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movl	$0, -28(%rbp)
	movq	%rsi, %rdi
	callq	_av_init_packet
	movl	24(%r14), %eax
	movl	%eax, 32(%rbx)
	movq	16(%r14), %rax
	movq	%rax, 24(%rbx)
	movq	8(%r14), %rdi
	leaq	-28(%rbp), %rcx
	movq	%rbx, %rsi
	movq	%r15, %rdx
	callq	_avcodec_encode_video2
	testq	%rax, %rax
	js	LBB0_1
## %bb.2:
	cmpl	$0, -28(%rbp)
	je	LBB0_3
## %bb.4:
	movq	(%rbx), %rdi
	movq	_AV_NOPTS_VALUE@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	cmpq	%rax, %rdi
	je	LBB0_6
## %bb.5:
	movq	(%r14), %rax
	movq	8(%r14), %rcx
	movl	(%rcx), %esi
	movl	4(%rax), %edx
	callq	_av_rescale_q
	movq	%rax, (%rbx)
	movq	(%r15), %rax
LBB0_6:
	movq	8(%rbx), %rdi
	cmpq	%rax, %rdi
	je	LBB0_8
## %bb.7:
	movq	(%r14), %rax
	movq	8(%r14), %rcx
	movl	(%rcx), %esi
	movl	4(%rax), %edx
	callq	_av_rescale_q
	movq	%rax, 8(%rbx)
LBB0_8:
	movq	(%r14), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	jmp	LBB0_9
LBB0_1:
	xorl	%eax, %eax
	jmp	LBB0_10
LBB0_3:
	movq	$0, 24(%rbx)
	movq	_AV_NOPTS_VALUE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%rbx)
	movq	%rax, 8(%rbx)
LBB0_9:
	movl	$1, %eax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_NOPTS_VALUE,8,3             ## @AV_NOPTS_VALUE
	.no_dead_strip	_encode_video
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function encode_video
_encode_video:                          ; @encode_video
	.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	x21, x2
	mov	x19, x1
	mov	x20, x0
	str	wzr, [sp, #12]
	mov	x0, x1
	bl	_av_init_packet
	ldr	w8, [x20, #24]
	str	w8, [x19, #32]
	ldp	x0, x8, [x20, #8]
	str	x8, [x19, #24]
	add	x3, sp, #12
	mov	x1, x19
	mov	x2, x21
	bl	_avcodec_encode_video2
	tbnz	x0, #63, LBB0_7
; %bb.1:
	ldr	w8, [sp, #12]
	cbz	w8, LBB0_8
; %bb.2:
	ldr	x0, [x19]
Lloh0:
	adrp	x21, _AV_NOPTS_VALUE@GOTPAGE
Lloh1:
	ldr	x21, [x21, _AV_NOPTS_VALUE@GOTPAGEOFF]
	ldr	x8, [x21]
	cmp	x0, x8
	b.eq	LBB0_4
; %bb.3:
	ldp	x9, x8, [x20]
	ldr	w1, [x8]
	ldr	w2, [x9, #4]
	bl	_av_rescale_q
	str	x0, [x19]
	ldr	x8, [x21]
LBB0_4:
	ldr	x0, [x19, #8]
	cmp	x0, x8
	b.eq	LBB0_6
; %bb.5:
	ldp	x9, x8, [x20]
	ldr	w1, [x8]
	ldr	w2, [x9, #4]
	bl	_av_rescale_q
	str	x0, [x19, #8]
LBB0_6:
	ldr	x8, [x20]
	ldr	w8, [x8]
	str	w8, [x19, #16]
	b	LBB0_9
LBB0_7:
	mov	w0, #0
	b	LBB0_10
LBB0_8:
	str	xzr, [x19, #24]
Lloh2:
	adrp	x8, _AV_NOPTS_VALUE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AV_NOPTS_VALUE@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	stp	x8, x8, [x19]
LBB0_9:
	mov	w0, #1
LBB0_10:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_NOPTS_VALUE,8,3             ; @AV_NOPTS_VALUE
	.no_dead_strip	_encode_video
.subsections_via_symbols
