	.file	"extr_snowenc.c_get_block_bits.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	get_block_bits, @function
get_block_bits:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r8d, ecx
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 24
	.cfi_def_cfa_offset 64
	mov	ecx, DWORD PTR 4[rdi]
	mov	r10d, DWORD PTR [rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	r11d, DWORD PTR 8[rdi]
	mov	r12, QWORD PTR 16[rdi]
	sal	r10d, cl
	mov	eax, r10d
	sal	r11d, cl
	imul	eax, edx
	add	eax, esi
	movsx	rcx, eax
	lea	rbp, [rcx+rcx*4]
	sal	rbp, 3
	test	esi, esi
	je	.L2
	lea	rbx, -40[r12+rbp]
	test	edx, edx
	je	.L14
	mov	ecx, eax
	sub	ecx, r10d
	movsx	rcx, ecx
	lea	rcx, [rcx+rcx*4]
	sal	rcx, 3
	lea	r9, [r12+rcx]
	lea	r13, -40[r12+rcx]
.L8:
	lea	ecx, [rsi+r8]
	cmp	ecx, r10d
	jl	.L15
.L5:
	cmp	r10d, esi
	setle	cl
	cmp	r11d, edx
	setle	al
	or	cl, al
	jne	.L11
	test	esi, esi
	js	.L11
	add	rbp, r12
	mov	eax, DWORD PTR 0[rbp]
	test	DWORD PTR BLOCK_INTRA[rip], eax
	je	.L7
	mov	rdx, QWORD PTR 8[rbx]
	mov	rax, QWORD PTR 8[rbp]
	mov	edi, DWORD PTR [rdx]
	sub	edi, DWORD PTR [rax]
	call	FFABS@PLT
	lea	edi, [rax+rax]
	call	av_log2@PLT
	mov	rdx, QWORD PTR 8[rbx]
	mov	r12d, eax
	mov	rax, QWORD PTR 8[rbp]
	mov	edi, DWORD PTR 4[rdx]
	sub	edi, DWORD PTR 4[rax]
	call	FFABS@PLT
	lea	edi, [rax+rax]
	call	av_log2@PLT
	mov	rdx, QWORD PTR 8[rbx]
	add	r12d, eax
	mov	rax, QWORD PTR 8[rbp]
	mov	edi, DWORD PTR 8[rdx]
	sub	edi, DWORD PTR 8[rax]
	call	FFABS@PLT
	lea	edi, [rax+rax]
	call	av_log2@PLT
	add	r12d, eax
	lea	eax, 3[r12+r12]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L11:
	xor	eax, eax
.L1:
	mov	rbx, QWORD PTR 8[rsp]
	xor	rbx, QWORD PTR fs:40
	jne	.L16
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L15:
	.cfi_restore_state
	sub	eax, r10d
	add	r8d, eax
	movsx	r8, r8d
	lea	rax, [r8+r8*4]
	lea	r13, [r12+rax*8]
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L2:
	test	edx, edx
	jne	.L9
	lea	r13, null_block[rip]
.L4:
	mov	rbx, r13
	lea	r9, null_block[rip]
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L7:
	lea	rdx, 4[rsp]
	mov	rsi, rsp
	sub	rsp, 8
	.cfi_def_cfa_offset 72
	mov	ecx, DWORD PTR 16[rbp]
	push	r13
	.cfi_def_cfa_offset 80
	mov	r8, rbx
	call	pred_mv@PLT
	mov	edi, DWORD PTR 16[rsp]
	sub	edi, DWORD PTR 32[rbp]
	mov	DWORD PTR 16[rsp], edi
	mov	rax, QWORD PTR 24[rbp]
	sub	DWORD PTR 20[rsp], eax
	call	FFABS@PLT
	lea	edi, [rax+rax]
	call	av_log2@PLT
	mov	edi, DWORD PTR 20[rsp]
	mov	ebx, eax
	call	FFABS@PLT
	lea	edi, [rax+rax]
	call	av_log2@PLT
	mov	edi, DWORD PTR 16[rbp]
	lea	ebx, 1[rbx+rax]
	add	edi, edi
	call	av_log2@PLT
	pop	rdx
	.cfi_def_cfa_offset 72
	pop	rcx
	.cfi_def_cfa_offset 64
	add	eax, ebx
	add	eax, eax
	jmp	.L1
.L16:
	call	__stack_chk_fail@PLT
.L14:
	mov	r13, rbx
	jmp	.L4
.L9:
	mov	r9d, eax
	lea	rbx, null_block[rip]
	sub	r9d, r10d
	mov	r13, rbx
	movsx	r9, r9d
	imul	r9, r9, 40
	add	r9, r12
	jmp	.L8
	.cfi_endproc
.LFE0:
	.size	get_block_bits, .-get_block_bits
	.comm	null_block,40,32
	.comm	BLOCK_INTRA,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_snowenc.c_get_block_bits.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	get_block_bits, %function
get_block_bits:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r5, [r0, #4]
	ldr	lr, [r0]
	ldr	r6, [r0, #8]
	lsl	lr, lr, r5
	mla	ip, r2, lr, r1
	ldr	r7, .L16
	sub	sp, sp, #32
	add	r4, ip, ip, lsl #2
	cmp	r1, #0
	lsl	r9, r6, r5
	ldr	r7, [r7]
	str	r7, [sp, #28]
	mov	r7,#0
	ldr	r5, [r0, #12]
	lsl	r4, r4, #2
	beq	.L2
	sub	r6, r4, #20
	cmp	r2, #0
	add	r6, r5, r6
	moveq	r7, r6
	beq	.L4
	sub	ip, ip, lr
	add	r8, ip, ip, lsl #2
	add	r7, r5, r8, lsl #2
	sub	r7, r7, #20
	add	r8, r5, r8, lsl #2
.L8:
	add	r10, r1, r3
	cmp	r10, lr
	addlt	ip, ip, r3
	addlt	ip, ip, ip, lsl #2
	addlt	r7, r5, ip, lsl #2
.L5:
	cmp	r9, r2
	cmpgt	lr, r1
	movle	lr, #1
	movgt	lr, #0
	orrs	r3, lr, r1, lsr #31
	movne	r0, #0
	beq	.L14
.L1:
	ldr	r3, .L16
	ldr	r2, [r3]
	ldr	r3, [sp, #28]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L15
	add	sp, sp, #32
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L2:
	cmp	r2, #0
	bne	.L9
	ldr	r7, .L16+4
.L4:
	mov	r6, r7
	ldr	r8, .L16+4
	b	.L5
.L14:
	ldr	r3, .L16+8
	ldr	r2, [r5, r4]
	ldr	r3, [r3]
	add	r5, r5, r4
	tst	r2, r3
	beq	.L7
	ldr	r2, [r6, #4]
	ldr	r3, [r5, #4]
	ldr	r0, [r2]
	ldr	r3, [r3]
	sub	r0, r0, r3
	bl	FFABS
	lsl	r0, r0, #1
	bl	av_log2
	ldr	r2, [r6, #4]
	ldr	r3, [r5, #4]
	ldr	r2, [r2, #4]
	ldr	r3, [r3, #4]
	mov	r4, r0
	sub	r0, r2, r3
	bl	FFABS
	lsl	r0, r0, #1
	bl	av_log2
	ldr	r2, [r6, #4]
	ldr	r3, [r5, #4]
	ldr	r2, [r2, #8]
	ldr	r3, [r3, #8]
	add	r4, r4, r0
	sub	r0, r2, r3
	bl	FFABS
	lsl	r0, r0, #1
	bl	av_log2
	add	r0, r4, r0
	lsl	r0, r0, #1
	add	r0, r0, #3
	b	.L1
.L7:
	ldr	r3, [r5, #8]
	add	r2, sp, #24
	add	r1, sp, #20
	stm	sp, {r6, r8}
	str	r7, [sp, #8]
	bl	pred_mv
	ldr	r1, [r5, #16]
	ldr	r2, [r5, #12]
	ldr	r0, [sp, #20]
	ldr	r3, [sp, #24]
	sub	r0, r0, r1
	sub	r3, r3, r2
	str	r3, [sp, #24]
	str	r0, [sp, #20]
	bl	FFABS
	lsl	r0, r0, #1
	bl	av_log2
	mov	r4, r0
	ldr	r0, [sp, #24]
	bl	FFABS
	lsl	r0, r0, #1
	bl	av_log2
	mov	r3, r0
	ldr	r0, [r5, #8]
	add	r4, r4, #1
	lsl	r0, r0, #1
	add	r4, r4, r3
	bl	av_log2
	add	r0, r4, r0
	lsl	r0, r0, #1
	b	.L1
.L15:
	bl	__stack_chk_fail
.L9:
	mov	r8, #20
	ldr	r6, .L16+4
	sub	ip, ip, lr
	mov	r7, r6
	mla	r8, ip, r8, r5
	b	.L8
.L17:
	.align	2
.L16:
	.word	.LC0
	.word	null_block
	.word	BLOCK_INTRA
	.size	get_block_bits, .-get_block_bits
	.comm	null_block,20,4
	.comm	BLOCK_INTRA,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
