	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_h261_encode_mb              ## -- Begin function ff_h261_encode_mb
	.p2align	4, 0x90
_ff_h261_encode_mb:                     ## @ff_h261_encode_mb
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r12d
	movl	%edx, %r15d
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movl	$0, (%rdi)
	cmpl	$0, 40(%rdi)
	je	LBB0_6
## %bb.1:
	movl	$63, -44(%rbp)                  ## 4-byte Folded Spill
	xorl	%r13d, %r13d
	jmp	LBB0_2
LBB0_6:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_get_cbp
	movl	%r12d, %r13d
	orl	%r15d, %r13d
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	orl	%r13d, %eax
	je	LBB0_7
LBB0_2:
	movl	%r12d, -48(%rbp)                ## 4-byte Spill
	leaq	24(%rbx), %r12
	movq	_ff_h261_mba_bits@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rbx), %rcx
	movl	(%rax,%rcx,4), %esi
	movq	_ff_h261_mba_code@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%rcx,4), %edx
	movq	%r12, %rdi
	callq	_put_bits
	movq	$0, (%rbx)
	cmpl	$0, 40(%rbx)
	jne	LBB0_14
## %bb.3:
	movl	$1, (%rbx)
	movq	32(%rbx), %rax
	testl	%r13d, %r13d
	je	LBB0_4
## %bb.8:
	movl	$4, (%rbx)
	testq	%rax, %rax
	jne	LBB0_10
## %bb.9:
	movl	$4, %eax
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_12
	jmp	LBB0_13
LBB0_7:
	incl	44(%rbx)
	incq	(%rbx)
	movq	8(%rbx), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movq	$0, (%rax)
	movl	20(%rbx), %eax
	subl	%eax, 16(%rbx)
	jmp	LBB0_26
LBB0_4:
	testq	%rax, %rax
	je	LBB0_5
LBB0_10:
	movl	$7, (%rbx)
	movl	$7, %eax
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_13
LBB0_12:
	incl	%eax
	movl	%eax, (%rbx)
LBB0_13:
	xorl	%edi, %edi
	cmpl	$2, %eax
	setae	%dil
	callq	_av_assert1
LBB0_14:
	movl	20(%rbx), %eax
	testl	%eax, %eax
	je	LBB0_17
## %bb.15:
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_17
## %bb.16:
	movl	(%rbx), %eax
	incl	%eax
	movl	%eax, (%rbx)
	jmp	LBB0_18
LBB0_17:
	subl	%eax, 16(%rbx)
	movl	(%rbx), %eax
LBB0_18:
	movq	_ff_h261_mtype_bits@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cltq
	movl	(%rcx,%rax,4), %esi
	movq	_ff_h261_mtype_code@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rcx,%rax,4), %edx
	movq	%r12, %rdi
	callq	_put_bits
	movq	_ff_h261_mtype_map@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	(%rbx), %rcx
	movq	(%rax,%rcx,8), %rax
	movl	%eax, (%rbx)
	movslq	%eax, %rdi
	callq	_IS_QUANT
	testq	%rax, %rax
	je	LBB0_20
## %bb.19:
	movl	20(%rbx), %esi
	addl	16(%rbx), %esi
	movq	%rbx, %rdi
	callq	_ff_set_qscale
	movl	16(%rbx), %edx
	movq	%r12, %rdi
	movl	$5, %esi
	callq	_put_bits
LBB0_20:
	movslq	(%rbx), %rdi
	callq	_IS_16X16
	testq	%rax, %rax
	je	LBB0_22
## %bb.21:
	sarl	%r15d
	movq	8(%rbx), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movl	%r15d, %esi
	subl	(%rax), %esi
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	sarl	%ecx
	movl	%ecx, %r13d
	subl	4(%rax), %r13d
	movl	%r15d, (%rax)
	movl	%ecx, 4(%rax)
	movq	%rbx, %rdi
	callq	_h261_encode_motion
	movq	%rbx, %rdi
	movl	%r13d, %esi
	callq	_h261_encode_motion
LBB0_22:
	movslq	(%rbx), %rdi
	callq	_HAS_CBP
	testq	%rax, %rax
	je	LBB0_24
## %bb.23:
	xorl	%edi, %edi
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	testl	%r15d, %r15d
	setg	%dil
	callq	_av_assert1
	movq	_ff_h261_cbp_tab@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%r15d, %rcx
	movq	-8(%rax,%rcx,8), %rax
	movl	(%rax), %edx
	movl	4(%rax), %esi
	movq	%r12, %rdi
	callq	_put_bits
LBB0_24:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	xorl	%edx, %edx
	callq	_h261_encode_block
	leaq	256(%r14), %rsi
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_h261_encode_block
	leaq	512(%r14), %rsi
	movq	%rbx, %rdi
	movl	$2, %edx
	callq	_h261_encode_block
	leaq	768(%r14), %rsi
	movq	%rbx, %rdi
	movl	$3, %edx
	callq	_h261_encode_block
	leaq	1024(%r14), %rsi
	movq	%rbx, %rdi
	movl	$4, %edx
	callq	_h261_encode_block
	addq	$1280, %r14                     ## imm = 0x500
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movl	$5, %edx
	callq	_h261_encode_block
	movslq	(%rbx), %rdi
	callq	_IS_16X16
	testq	%rax, %rax
	jne	LBB0_26
## %bb.25:
	movq	8(%rbx), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movq	$0, (%rax)
LBB0_26:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movl	$1, %eax
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_12
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_ff_h261_mba_bits,8,3           ## @ff_h261_mba_bits
	.comm	_ff_h261_mba_code,8,3           ## @ff_h261_mba_code
	.comm	_ff_h261_mtype_bits,8,3         ## @ff_h261_mtype_bits
	.comm	_ff_h261_mtype_code,8,3         ## @ff_h261_mtype_code
	.comm	_ff_h261_mtype_map,8,3          ## @ff_h261_mtype_map
	.comm	_ff_h261_cbp_tab,8,3            ## @ff_h261_cbp_tab
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_h261_encode_mb              ; -- Begin function ff_h261_encode_mb
	.p2align	2
_ff_h261_encode_mb:                     ; @ff_h261_encode_mb
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x22, x3
	mov	x24, x2
	mov	x20, x1
	mov	x19, x0
	str	wzr, [x0]
	ldr	w8, [x0, #40]
	cbz	w8, LBB0_2
; %bb.1:
	mov	w25, #0
	mov	w21, #63
	b	LBB0_4
LBB0_2:
	mov	x0, x19
	mov	x1, x20
	bl	_get_cbp
	orr	w25, w22, w24
	orr	w8, w0, w25
	cbz	w8, LBB0_8
; %bb.3:
	mov	x21, x0
LBB0_4:
Lloh0:
	adrp	x8, _ff_h261_mba_bits@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ff_h261_mba_bits@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	x9, [x19]
	lsl	x9, x9, #2
	ldr	w1, [x8, x9]
	add	x23, x19, #24
Lloh3:
	adrp	x8, _ff_h261_mba_code@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ff_h261_mba_code@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	ldr	w2, [x8, x9]
	mov	x0, x23
	bl	_put_bits
	str	xzr, [x19]
	ldr	w8, [x19, #40]
	cbz	w8, LBB0_6
; %bb.5:
	ldr	w8, [x19, #20]
	cbnz	w8, LBB0_14
	b	LBB0_16
LBB0_6:
	mov	w8, #1
	str	w8, [x19]
	ldr	x9, [x19, #32]
	cbz	w25, LBB0_9
; %bb.7:
	mov	w8, #4
	str	w8, [x19]
	cbnz	x9, LBB0_10
	b	LBB0_11
LBB0_8:
	ldr	w8, [x19, #44]
	add	w8, w8, #1
	str	w8, [x19, #44]
	ldp	x8, x9, [x19]
	add	x8, x8, #1
	str	x8, [x19]
	ldr	x8, [x9]
	ldr	x8, [x8]
	str	xzr, [x8]
	ldp	w9, w8, [x19, #16]
	sub	w8, w9, w8
	str	w8, [x19, #16]
	b	LBB0_25
LBB0_9:
	cbz	x9, LBB0_26
LBB0_10:
	mov	w8, #7
	str	w8, [x19]
LBB0_11:
	cbz	w21, LBB0_13
LBB0_12:
	add	w8, w8, #1
	str	w8, [x19]
LBB0_13:
	cmp	w8, #1
	cset	w0, hi
	bl	_av_assert1
	ldr	w8, [x19, #20]
	cbz	w8, LBB0_16
LBB0_14:
	cbz	w21, LBB0_16
; %bb.15:
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
	b	LBB0_17
LBB0_16:
	ldr	w9, [x19, #16]
	sub	w8, w9, w8
	str	w8, [x19, #16]
	ldr	w8, [x19]
LBB0_17:
Lloh6:
	adrp	x9, _ff_h261_mtype_bits@GOTPAGE
Lloh7:
	ldr	x9, [x9, _ff_h261_mtype_bits@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	sbfiz	x8, x8, #2, #32
	ldr	w1, [x9, x8]
Lloh9:
	adrp	x9, _ff_h261_mtype_code@GOTPAGE
Lloh10:
	ldr	x9, [x9, _ff_h261_mtype_code@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	ldr	w2, [x9, x8]
	mov	x0, x23
	bl	_put_bits
Lloh12:
	adrp	x8, _ff_h261_mtype_map@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ff_h261_mtype_map@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	ldrsw	x9, [x19]
	ldr	x8, [x8, x9, lsl #3]
	str	w8, [x19]
	sxtw	x0, w8
	bl	_IS_QUANT
	cbz	x0, LBB0_19
; %bb.18:
	ldp	w8, w9, [x19, #16]
	add	w1, w9, w8
	mov	x0, x19
	bl	_ff_set_qscale
	ldr	w2, [x19, #16]
	mov	x0, x23
	mov	w1, #5
	bl	_put_bits
LBB0_19:
	ldrsw	x0, [x19]
	bl	_IS_16X16
	cbz	x0, LBB0_21
; %bb.20:
	asr	w8, w24, #1
	ldr	x9, [x19, #8]
	ldr	x9, [x9]
	ldr	x9, [x9]
	ldp	w10, w11, [x9]
	sub	w1, w8, w10
	asr	w10, w22, #1
	sub	w22, w10, w11
	stp	w8, w10, [x9]
	mov	x0, x19
	bl	_h261_encode_motion
	mov	x0, x19
	mov	x1, x22
	bl	_h261_encode_motion
LBB0_21:
	ldrsw	x0, [x19]
	bl	_HAS_CBP
	cbz	x0, LBB0_23
; %bb.22:
	cmp	w21, #0
	cset	w0, gt
	bl	_av_assert1
Lloh15:
	adrp	x8, _ff_h261_cbp_tab@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ff_h261_cbp_tab@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
	sub	w9, w21, #1
	ldr	x8, [x8, w9, sxtw #3]
	ldp	w2, w1, [x8]
	mov	x0, x23
	bl	_put_bits
LBB0_23:
	mov	x0, x19
	mov	x1, x20
	mov	w2, #0
	bl	_h261_encode_block
	add	x1, x20, #256
	mov	x0, x19
	mov	w2, #1
	bl	_h261_encode_block
	add	x1, x20, #512
	mov	x0, x19
	mov	w2, #2
	bl	_h261_encode_block
	add	x1, x20, #768
	mov	x0, x19
	mov	w2, #3
	bl	_h261_encode_block
	add	x1, x20, #1024
	mov	x0, x19
	mov	w2, #4
	bl	_h261_encode_block
	add	x1, x20, #1280
	mov	x0, x19
	mov	w2, #5
	bl	_h261_encode_block
	ldrsw	x0, [x19]
	bl	_IS_16X16
	cbnz	x0, LBB0_25
; %bb.24:
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	ldr	x8, [x8]
	str	xzr, [x8]
LBB0_25:
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_26:
	mov	w8, #1
	cbnz	w21, LBB0_12
	b	LBB0_13
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_ff_h261_mba_bits,8,3           ; @ff_h261_mba_bits
	.comm	_ff_h261_mba_code,8,3           ; @ff_h261_mba_code
	.comm	_ff_h261_mtype_bits,8,3         ; @ff_h261_mtype_bits
	.comm	_ff_h261_mtype_code,8,3         ; @ff_h261_mtype_code
	.comm	_ff_h261_mtype_map,8,3          ; @ff_h261_mtype_map
	.comm	_ff_h261_cbp_tab,8,3            ; @ff_h261_cbp_tab
.subsections_via_symbols
