	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function encode_mb
_encode_mb:                             ## @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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	addq	$8, %rdi
	movl	8(%r15), %ebx
	movl	12(%r15), %r12d
	callq	_put_bits_count
	sarl	$3, %eax
	addl	%r12d, %eax
	subl	%eax, %ebx
	movq	_MAX_MB_SIZE@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpl	(%rax), %ebx
	setge	%dil
	callq	_av_assert0
	movq	(%r15), %rax
	movq	(%rax), %rax
	movq	_AV_CODEC_ID_ASV1@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.2:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_asv1_encode_block
	leaq	256(%r14), %rsi
	movq	%r15, %rdi
	callq	_asv1_encode_block
	leaq	512(%r14), %rsi
	movq	%r15, %rdi
	callq	_asv1_encode_block
	leaq	768(%r14), %rsi
	movq	%r15, %rdi
	callq	_asv1_encode_block
	leaq	1024(%r14), %rsi
	movq	%r15, %rdi
	callq	_asv1_encode_block
	addq	$1280, %r14                     ## imm = 0x500
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_asv1_encode_block
	jmp	LBB0_3
LBB0_1:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_asv2_encode_block
	leaq	256(%r14), %rsi
	movq	%r15, %rdi
	callq	_asv2_encode_block
	leaq	512(%r14), %rsi
	movq	%r15, %rdi
	callq	_asv2_encode_block
	leaq	768(%r14), %rsi
	movq	%r15, %rdi
	callq	_asv2_encode_block
	leaq	1024(%r14), %rsi
	movq	%r15, %rdi
	callq	_asv2_encode_block
	addq	$1280, %r14                     ## imm = 0x500
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_asv2_encode_block
LBB0_3:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_MB_SIZE,4,2                ## @MAX_MB_SIZE
	.comm	_AV_CODEC_ID_ASV1,8,3           ## @AV_CODEC_ID_ASV1
	.no_dead_strip	_encode_mb
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function encode_mb
_encode_mb:                             ; @encode_mb
	.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, x1
	mov	x19, x0
	ldr	w21, [x0, #8]!
	ldr	w22, [x19, #12]
	bl	_put_bits_count
	add	w8, w22, w0, asr #3
Lloh0:
	adrp	x9, _MAX_MB_SIZE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MAX_MB_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	sub	w8, w21, w8
	cmp	w8, w9
	cset	w0, ge
	bl	_av_assert0
	ldr	x8, [x19]
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _AV_CODEC_ID_ASV1@GOTPAGE
Lloh4:
	ldr	x9, [x9, _AV_CODEC_ID_ASV1@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	mov	x0, x19
	mov	x1, x20
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	bl	_asv1_encode_block
	add	x1, x20, #256
	mov	x0, x19
	bl	_asv1_encode_block
	add	x1, x20, #512
	mov	x0, x19
	bl	_asv1_encode_block
	add	x1, x20, #768
	mov	x0, x19
	bl	_asv1_encode_block
	add	x1, x20, #1024
	mov	x0, x19
	bl	_asv1_encode_block
	add	x1, x20, #1280
	mov	x0, x19
	bl	_asv1_encode_block
	b	LBB0_3
LBB0_2:
	bl	_asv2_encode_block
	add	x1, x20, #256
	mov	x0, x19
	bl	_asv2_encode_block
	add	x1, x20, #512
	mov	x0, x19
	bl	_asv2_encode_block
	add	x1, x20, #768
	mov	x0, x19
	bl	_asv2_encode_block
	add	x1, x20, #1024
	mov	x0, x19
	bl	_asv2_encode_block
	add	x1, x20, #1280
	mov	x0, x19
	bl	_asv2_encode_block
LBB0_3:
	mov	w0, #0
	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
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_MB_SIZE,4,2                ; @MAX_MB_SIZE
	.comm	_AV_CODEC_ID_ASV1,8,3           ; @AV_CODEC_ID_ASV1
	.no_dead_strip	_encode_mb
.subsections_via_symbols
