	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_block_bits
_get_block_bits:                        ## @get_block_bits
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %eax
                                        ## kill: def $esi killed $esi def $rsi
	movl	(%rdi), %r15d
	movb	4(%rdi), %cl
	shll	%cl, %r15d
	movl	8(%rdi), %r8d
	shll	%cl, %r8d
	movl	%r15d, %ecx
	imull	%edx, %ecx
	leal	(%rcx,%rsi), %r11d
	movq	16(%rdi), %r12
	testl	%esi, %esi
	leal	-1(%rcx,%rsi), %ecx
	movslq	%ecx, %rcx
	leaq	(%rcx,%rcx,4), %rcx
	leaq	(%r12,%rcx,8), %r14
	movq	_null_block@GOTPCREL(%rip), %r9
	cmoveq	%r9, %r14
	movq	%r14, %r10
	testl	%edx, %edx
	je	LBB0_6
## %bb.1:
	movl	%r11d, %ecx
	subl	%r15d, %ecx
	movslq	%ecx, %rcx
	leaq	(%rcx,%rcx,4), %rcx
	testl	%esi, %esi
	jne	LBB0_2
## %bb.3:
	movq	_null_block@GOTPCREL(%rip), %r10
	jmp	LBB0_4
LBB0_2:
	movl	%r15d, %ebx
	notl	%ebx
	addl	%r11d, %ebx
	movslq	%ebx, %rbx
	leaq	(%rbx,%rbx,4), %rbx
	leaq	(%r12,%rbx,8), %r10
LBB0_4:
	leaq	(%r12,%rcx,8), %r9
	leal	(%rax,%rsi), %ecx
	cmpl	%r15d, %ecx
	jge	LBB0_6
## %bb.5:
	subl	%r15d, %eax
	addl	%r11d, %eax
	cltq
	leaq	(%rax,%rax,4), %rax
	leaq	(%r12,%rax,8), %r10
LBB0_6:
	xorl	%eax, %eax
	testl	%esi, %esi
	js	LBB0_12
## %bb.7:
	cmpl	%esi, %r15d
	jle	LBB0_12
## %bb.8:
	cmpl	%edx, %r8d
	jle	LBB0_12
## %bb.9:
	movslq	%r11d, %rax
	leaq	(%rax,%rax,4), %r13
	movq	_BLOCK_INTRA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r12,%r13,8)
	je	LBB0_11
## %bb.10:
	movq	8(%r14), %rax
	movl	(%rax), %edi
	movq	8(%r12,%r13,8), %rax
	subl	(%rax), %edi
	callq	_FFABS
                                        ## kill: def $eax killed $eax def $rax
	leal	(%rax,%rax), %edi
	callq	_av_log2
	movl	%eax, %ebx
	movq	8(%r14), %rax
	movl	4(%rax), %edi
	movq	8(%r12,%r13,8), %rax
	subl	4(%rax), %edi
	callq	_FFABS
                                        ## kill: def $eax killed $eax def $rax
	leal	(%rax,%rax), %edi
	callq	_av_log2
	movl	%eax, %r15d
	addl	%ebx, %r15d
	movq	8(%r14), %rax
	movl	8(%rax), %edi
	movq	8(%r12,%r13,8), %rax
	subl	8(%rax), %edi
	callq	_FFABS
                                        ## kill: def $eax killed $eax def $rax
	leal	(%rax,%rax), %edi
	callq	_av_log2
                                        ## kill: def $eax killed $eax def $rax
	addl	%r15d, %eax
	addl	%eax, %eax
	addl	$3, %eax
	jmp	LBB0_12
LBB0_11:
	movl	16(%r12,%r13,8), %ecx
	movq	%r10, (%rsp)
	leaq	-48(%rbp), %rsi
	leaq	-44(%rbp), %rdx
	movq	%r14, %r8
	callq	_pred_mv
	movl	-48(%rbp), %edi
	subl	32(%r12,%r13,8), %edi
	movl	%edi, -48(%rbp)
	movl	24(%r12,%r13,8), %eax
	subl	%eax, -44(%rbp)
	callq	_FFABS
                                        ## kill: def $eax killed $eax def $rax
	leal	(%rax,%rax), %edi
	callq	_av_log2
	movl	%eax, %r14d
	movl	-44(%rbp), %edi
	callq	_FFABS
                                        ## kill: def $eax killed $eax def $rax
	leal	(%rax,%rax), %edi
	callq	_av_log2
	movl	%eax, %ebx
	addl	%r14d, %ebx
	movl	16(%r12,%r13,8), %edi
	addl	%edi, %edi
	callq	_av_log2
                                        ## kill: def $eax killed $eax def $rax
	addl	%ebx, %eax
	addl	%eax, %eax
	addl	$2, %eax
LBB0_12:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_null_block,40,3                ## @null_block
	.comm	_BLOCK_INTRA,4,2                ## @BLOCK_INTRA
	.no_dead_strip	_get_block_bits
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_block_bits
_get_block_bits:                        ; @get_block_bits
	.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	w8, #0
	ldp	w9, w11, [x0]
	lsl	w12, w9, w11
	madd	w13, w12, w2, w1
	ldr	x9, [x0, #16]
	sxtw	x10, w13
	mov	w14, #40
	smaddl	x13, w13, w14, x9
	sub	x13, x13, #40
	sub	w15, w10, w12
	smaddl	x15, w15, w14, x9
	mvn	w16, w12
	add	w16, w10, w16
	smaddl	x16, w16, w14, x9
	sub	w17, w3, w12
	add	w17, w17, w10
	smaddl	x14, w17, w14, x9
Lloh0:
	adrp	x17, _null_block@GOTPAGE
Lloh1:
	ldr	x17, [x17, _null_block@GOTPAGEOFF]
	cmp	w1, #0
	csel	x19, x17, x13, eq
	cmp	w1, #0
	csel	x13, x17, x16, eq
	add	w16, w3, w1
	cmp	w16, w12
	csel	x13, x13, x14, ge
	cmp	w2, #0
	csel	x5, x17, x15, eq
	csel	x6, x19, x13, eq
	tbnz	w1, #31, LBB0_5
; %bb.1:
	ldr	w13, [x0, #8]
	lsl	w11, w13, w11
	cmp	w12, w1
	ccmp	w11, w2, #4, gt
	b.le	LBB0_5
; %bb.2:
	mov	w8, #40
	mul	x8, x10, x8
	ldr	w8, [x9, x8]
Lloh2:
	adrp	x11, _BLOCK_INTRA@GOTPAGE
Lloh3:
	ldr	x11, [x11, _BLOCK_INTRA@GOTPAGEOFF]
Lloh4:
	ldr	w11, [x11]
	tst	w11, w8
	b.eq	LBB0_4
; %bb.3:
	ldr	x8, [x19, #8]
	ldr	w8, [x8]
	mov	w11, #40
	madd	x21, x10, x11, x9
	ldr	x9, [x21, #8]
	ldr	w9, [x9]
	sub	w0, w8, w9
	bl	_FFABS
	lsl	w0, w0, #1
	bl	_av_log2
	mov	x20, x0
	ldr	x8, [x19, #8]
	ldr	w8, [x8, #4]
	ldr	x9, [x21, #8]
	ldr	w9, [x9, #4]
	sub	w0, w8, w9
	bl	_FFABS
	lsl	w0, w0, #1
	bl	_av_log2
	add	w20, w0, w20
	ldr	x8, [x19, #8]
	ldr	w8, [x8, #8]
	ldr	x9, [x21, #8]
	ldr	w9, [x9, #8]
	sub	w0, w8, w9
	bl	_FFABS
	lsl	w0, w0, #1
	bl	_av_log2
	add	w8, w20, w0
	lsl	w8, w8, #1
	add	w8, w8, #3
	b	LBB0_5
LBB0_4:
	mov	w8, #40
	madd	x20, x10, x8, x9
	ldr	w3, [x20, #16]
	add	x1, sp, #12
	add	x2, sp, #8
	mov	x4, x19
	bl	_pred_mv
	ldr	w8, [x20, #32]
	ldr	w9, [sp, #12]
	sub	w0, w9, w8
	str	w0, [sp, #12]
	ldr	w8, [x20, #24]
	ldr	w9, [sp, #8]
	sub	w8, w9, w8
	str	w8, [sp, #8]
	bl	_FFABS
	lsl	w0, w0, #1
	bl	_av_log2
	mov	x19, x0
	ldr	w0, [sp, #8]
	bl	_FFABS
	lsl	w0, w0, #1
	bl	_av_log2
	add	w19, w19, w0
	ldr	w8, [x20, #16]
	lsl	w0, w8, #1
	bl	_av_log2
	add	w8, w19, w0
	lsl	w8, w8, #1
	add	w8, w8, #2
LBB0_5:
	mov	x0, x8
	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	_null_block,40,3                ; @null_block
	.comm	_BLOCK_INTRA,4,2                ; @BLOCK_INTRA
	.no_dead_strip	_get_block_bits
.subsections_via_symbols
