	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_msmpeg4_encode_ext_header   ## -- Begin function ff_msmpeg4_encode_ext_header
	.p2align	4, 0x90
_ff_msmpeg4_encode_ext_header:          ## @ff_msmpeg4_encode_ext_header
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	24(%rdi), %rcx
	movl	(%rcx), %edi
	movl	4(%rcx), %eax
	xorl	%edx, %edx
	divl	8(%rcx)
	movl	%eax, %r14d
	movl	$1, %esi
	callq	_FFMAX
	movl	%eax, %ecx
	movl	%r14d, %eax
	xorl	%edx, %edx
	divl	%ecx
	leaq	16(%rbx), %r14
	movl	%eax, %edi
	movl	$31, %esi
	callq	_FFMIN
	movq	%r14, %rdi
	movl	$5, %esi
	movq	%rax, %rdx
	callq	_put_bits
	movl	(%rbx), %eax
	leal	1023(%rax), %edi
	testl	%eax, %eax
	cmovnsl	%eax, %edi
	sarl	$10, %edi
	movl	$2047, %esi                     ## imm = 0x7FF
	callq	_FFMIN
	movq	%r14, %rdi
	movl	$11, %esi
	movq	%rax, %rdx
	callq	_put_bits
	cmpl	$3, 4(%rbx)
	movq	8(%rbx), %rdx
	jl	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	movl	$1, %esi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_put_bits                       ## TAILCALL
LBB0_2:
	xorl	%edi, %edi
	testq	%rdx, %rdx
	sete	%dil
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_av_assert0                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_msmpeg4_encode_ext_header   ; -- Begin function ff_msmpeg4_encode_ext_header
	.p2align	2
_ff_msmpeg4_encode_ext_header:          ; @ff_msmpeg4_encode_ext_header
	.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	x20, x0
	ldr	x8, [x0, #24]
	ldp	w10, w9, [x8, #4]
	ldr	w0, [x8]
	udiv	w21, w10, w9
	mov	w1, #1
	bl	_FFMAX
	add	x19, x20, #16
	udiv	w0, w21, w0
	mov	w1, #31
	bl	_FFMIN
	mov	x2, x0
	mov	x0, x19
	mov	w1, #5
	bl	_put_bits
	ldr	w8, [x20]
	add	w9, w8, #1023
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w0, w8, #10
	mov	w1, #2047
	bl	_FFMIN
	mov	x2, x0
	mov	x0, x19
	mov	w1, #11
	bl	_put_bits
	ldr	w8, [x20, #4]
	ldr	x2, [x20, #8]
	cmp	w8, #3
	b.lt	LBB0_2
; %bb.1:
	mov	x0, x19
	mov	w1, #1
	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
	b	_put_bits
LBB0_2:
	cmp	x2, #0
	cset	w0, eq
	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
	b	_av_assert0
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
