	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function h261_encode_block
_h261_encode_block:                     ## @h261_encode_block
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %eax
	movq	%rdi, %rbx
	cmpq	$0, 24(%rdi)
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movl	(%rsi), %edx
	movslq	%eax, %r14
	je	LBB0_8
## %bb.1:
	movl	$254, %eax
	cmpl	$254, %edx
	jg	LBB0_4
## %bb.2:
	testl	%edx, %edx
	jle	LBB0_3
## %bb.6:
	cmpl	$128, %edx
	jne	LBB0_5
## %bb.7:
	leaq	8(%rbx), %rdi
	movl	$8, %esi
	movl	$255, %edx
	jmp	LBB0_12
LBB0_8:
	xorl	%eax, %eax
	cmpl	$1, %edx
	je	LBB0_10
## %bb.9:
	cmpl	$-1, %edx
	jne	LBB0_13
LBB0_10:
	movq	(%rbx), %rcx
	cmpl	$0, (%rcx,%r14,4)
	js	LBB0_13
## %bb.11:
	leaq	8(%rbx), %rdi
	xorl	%eax, %eax
	testl	%edx, %edx
	setg	%al
	xorl	$3, %eax
	movl	$2, %esi
	movl	%eax, %edx
	jmp	LBB0_12
LBB0_3:
	movl	$1, %eax
LBB0_4:
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	movl	%eax, %edx
LBB0_5:
	leaq	8(%rbx), %rdi
	movl	$8, %esi
LBB0_12:
	callq	_put_bits
	movl	$1, %eax
LBB0_13:
	movq	(%rbx), %rcx
	movl	(%rcx,%r14,4), %ecx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	cmpl	%ecx, %eax
	jle	LBB0_14
LBB0_21:
	cmpl	$0, -48(%rbp)                   ## 4-byte Folded Reload
	js	LBB0_22
## %bb.23:
	addq	$8, %rbx
	movq	_ff_h261_rl_tcoeff@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movl	(%rax), %edx
	movl	4(%rax), %esi
	movq	%rbx, %rdi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_put_bits                       ## TAILCALL
LBB0_14:
	leaq	8(%rbx), %r15
	movl	%eax, %r12d
	decl	%eax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	incl	%ecx
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_15 Depth=1
	shrl	$31, %r14d
	movq	%r15, %rdi
	movl	$1, %esi
	movl	%r14d, %edx
	callq	_put_bits
LBB0_19:                                ##   in Loop: Header=BB0_15 Depth=1
	movl	%r12d, %eax
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
LBB0_20:                                ##   in Loop: Header=BB0_15 Depth=1
	incq	%r12
	cmpq	%r12, -80(%rbp)                 ## 8-byte Folded Reload
	je	LBB0_21
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movq	16(%rbx), %rcx
	movslq	(%rcx,%r12,4), %rcx
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movl	(%rdx,%rcx,4), %r14d
	testl	%r14d, %r14d
	je	LBB0_20
## %bb.16:                              ##   in Loop: Header=BB0_15 Depth=1
	movl	%eax, %ecx
	negl	%ecx
	leaq	(%r12,%rcx), %rdx
	decq	%rdx
	movl	%r12d, %r13d
	subl	%eax, %r13d
	movl	%r14d, %ebx
	negl	%ebx
	cmovsl	%r14d, %ebx
	movq	_ff_h261_rl_tcoeff@GOTPCREL(%rip), %rdi
	xorl	%esi, %esi
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
                                        ## kill: def $edx killed $edx killed $rdx
	movl	%ebx, %ecx
	callq	_get_rl_index
	cmpl	$1, %r13d
	sete	%cl
	cmpl	$16, %ebx
	setb	%dl
	andb	%cl, %dl
	movzbl	%dl, %ecx
	addl	%eax, %ecx
	movq	_ff_h261_rl_tcoeff@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%ecx, %r13
	movq	(%rax,%r13,8), %rax
	movl	(%rax), %edx
	movl	4(%rax), %esi
	movq	%r15, %rdi
	callq	_put_bits
	movq	_ff_h261_rl_tcoeff@GOTPCREL(%rip), %rax
	cmpl	8(%rax), %r13d
	jne	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_15 Depth=1
	movq	%r15, %rdi
	movl	$6, %esi
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_put_bits
	movl	$1, %edi
	callq	_av_assert1
	xorl	%edi, %edi
	cmpl	$128, %ebx
	setb	%dil
	callq	_av_assert1
	movq	%r15, %rdi
	movl	$8, %esi
	movl	%r14d, %edx
	callq	_put_sbits
	jmp	LBB0_19
LBB0_22:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ff_h261_rl_tcoeff,16,3         ## @ff_h261_rl_tcoeff
	.no_dead_strip	_h261_encode_block
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function h261_encode_block
_h261_encode_block:                     ; @h261_encode_block
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
	ldr	x8, [x0, #24]
	ldr	w2, [x1]
	cbz	x8, LBB0_3
; %bb.1:
	cmp	w2, #254
	b.le	LBB0_6
; %bb.2:
	mov	w2, #254
	b	LBB0_11
LBB0_3:
	cmp	w2, #1
	ccmn	w2, #1, #4, ne
	b.ne	LBB0_9
; %bb.4:
	ldr	x8, [x19]
	ldr	w8, [x8, w21, sxtw #2]
	tbnz	w8, #31, LBB0_9
; %bb.5:
	add	x0, x19, #8
	cmp	w2, #0
	mov	w8, #2
	cinc	w2, w8, le
	mov	w1, #2
	b	LBB0_13
LBB0_6:
	cmp	w2, #1
	b.lt	LBB0_10
; %bb.7:
	cmp	w2, #128
	b.ne	LBB0_12
; %bb.8:
	add	x0, x19, #8
	mov	w1, #8
	mov	w2, #255
	b	LBB0_13
LBB0_9:
	mov	w9, #0
	b	LBB0_14
LBB0_10:
	mov	w2, #1
LBB0_11:
	str	w2, [x20]
LBB0_12:
	add	x0, x19, #8
	mov	w1, #8
LBB0_13:
	bl	_put_bits
	mov	w9, #1
LBB0_14:
	ldr	x8, [x19]
	ldr	w8, [x8, w21, sxtw #2]
Lloh0:
	adrp	x21, _ff_h261_rl_tcoeff@GOTPAGE
Lloh1:
	ldr	x21, [x21, _ff_h261_rl_tcoeff@GOTPAGEOFF]
	str	w8, [sp, #12]                   ; 4-byte Folded Spill
	cmp	w9, w8
	b.le	LBB0_17
LBB0_15:
	ldr	w8, [sp, #12]                   ; 4-byte Folded Reload
	tbnz	w8, #31, LBB0_24
; %bb.16:
	add	x0, x19, #8
	ldr	x8, [x21]
	ldr	x8, [x8]
	ldp	w2, w1, [x8]
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_put_bits
LBB0_17:
	sub	w8, w9, #1
	add	x22, x19, #8
	ldr	w10, [sp, #12]                  ; 4-byte Folded Reload
	add	w27, w10, #1
	mov	w28, w9
	b	LBB0_21
LBB0_18:                                ;   in Loop: Header=BB0_21 Depth=1
	lsr	w2, w23, #31
	mov	x0, x22
	mov	w1, #1
	bl	_put_bits
LBB0_19:                                ;   in Loop: Header=BB0_21 Depth=1
	mov	x8, x28
LBB0_20:                                ;   in Loop: Header=BB0_21 Depth=1
	add	x28, x28, #1
	cmp	x27, x28
	b.eq	LBB0_15
LBB0_21:                                ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x19, #16]
	ldrsw	x9, [x9, x28, lsl #2]
	ldr	w23, [x20, x9, lsl #2]
	cbz	w23, LBB0_20
; %bb.22:                               ;   in Loop: Header=BB0_21 Depth=1
	neg	w9, w8
	add	x9, x28, x9
	sub	x25, x9, #1
	sub	w26, w28, w8
	cmp	w23, #0
	cneg	w24, w23, mi
	mov	x0, x21
	mov	w1, #0
	mov	x2, x25
	mov	x3, x24
	bl	_get_rl_index
	cmp	w26, #1
	ccmp	w24, #16, #2, eq
	cinc	w26, w0, lo
	ldr	x8, [x21]
	ldr	x8, [x8, w26, sxtw #3]
	ldp	w2, w1, [x8]
	mov	x0, x22
	bl	_put_bits
	ldr	w8, [x21, #8]
	cmp	w26, w8
	b.ne	LBB0_18
; %bb.23:                               ;   in Loop: Header=BB0_21 Depth=1
	mov	x0, x22
	mov	w1, #6
	mov	x2, x25
	bl	_put_bits
	mov	w0, #1
	bl	_av_assert1
	cmp	w24, #128
	cset	w0, lo
	bl	_av_assert1
	mov	x0, x22
	mov	w1, #8
	mov	x2, x23
	bl	_put_sbits
	b	LBB0_19
LBB0_24:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_ff_h261_rl_tcoeff,16,3         ; @ff_h261_rl_tcoeff
	.no_dead_strip	_h261_encode_block
.subsections_via_symbols
