	.file	"extr_h265_profile_level.c_ff_h265_guess_level.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	ff_h265_guess_level
	.type	ff_h265_guess_level, @function
ff_h265_guess_level:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13d, ecx
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12d, edx
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	imul	r12d, ecx
	mov	ebp, edx
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	DWORD PTR 20[rsp], esi
	mov	DWORD PTR 8[rsp], r8d
	mov	DWORD PTR 16[rsp], r9d
	test	rdi, rdi
	je	.L2
	mov	QWORD PTR [rsp], rdi
	call	ff_h265_get_profile@PLT
	mov	rdi, QWORD PTR [rsp]
	test	rax, rax
	mov	r15, rax
	je	.L3
.L16:
	mov	ebx, DWORD PTR [rdi]
	mov	edx, DWORD PTR 4[rdi]
.L17:
	mov	eax, DWORD PTR 8[r15]
	mov	DWORD PTR [rsp], 1
	sub	eax, 1
	cmp	eax, 1
	jbe	.L4
	cmp	QWORD PTR 32[r15], 0
	je	.L5
	cmp	QWORD PTR 24[r15], 0
	mov	DWORD PTR [rsp], 6
	jne	.L29
	.p2align 4,,10
	.p2align 3
.L4:
	mov	rdi, QWORD PTR h265_levels[rip]
	xor	r14d, r14d
	imul	ebp, ebp
	mov	QWORD PTR 24[rsp], r15
	imul	r13d, r13d
	mov	r15, r14
	mov	r14d, DWORD PTR 8[rsp]
	call	FF_ARRAY_ELEMS@PLT
	cmp	eax, r15d
	jle	.L30
	.p2align 4,,10
	.p2align 3
.L15:
	mov	rdi, QWORD PTR h265_levels[rip]
	lea	rax, [r15+r15*2]
	lea	r8, [rdi+rax*8]
	test	ebx, ebx
	je	.L7
	mov	eax, DWORD PTR [r8]
	test	eax, eax
	je	.L8
.L7:
	mov	ecx, DWORD PTR 4[r8]
	cmp	ecx, r12d
	jl	.L8
	lea	eax, 0[0+rcx*8]
	cmp	ebp, eax
	jg	.L8
	cmp	eax, r13d
	jl	.L8
	cmp	DWORD PTR 8[r8], r14d
	jl	.L8
	mov	eax, DWORD PTR 16[rsp]
	cmp	DWORD PTR 12[r8], eax
	jl	.L8
	mov	eax, DWORD PTR 96[rsp]
	cmp	DWORD PTR 16[r8], eax
	jl	.L8
	test	ebx, ebx
	jne	.L31
	mov	esi, DWORD PTR 20[r8]
.L10:
	test	esi, esi
	je	.L8
	mov	rdx, QWORD PTR 24[rsp]
	mov	eax, DWORD PTR [rsp]
	imul	eax, DWORD PTR 16[rdx]
	imul	eax, esi
	cmp	eax, DWORD PTR 20[rsp]
	jl	.L8
	mov	esi, ecx
	mov	eax, DWORD PTR 12[rdx]
	sar	esi, 2
	cmp	esi, r12d
	jge	.L32
	mov	esi, ecx
	sar	esi
	cmp	esi, r12d
	jge	.L33
	lea	ecx, [rcx+rcx*2]
	sar	ecx, 2
	cmp	ecx, r12d
	jge	.L34
.L12:
	cmp	eax, DWORD PTR 104[rsp]
	jge	.L1
	mov	rdi, QWORD PTR h265_levels[rip]
	.p2align 4,,10
	.p2align 3
.L8:
	add	r15, 1
	call	FF_ARRAY_ELEMS@PLT
	cmp	eax, r15d
	jg	.L15
.L30:
	xor	r8d, r8d
.L1:
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rax, r8
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L31:
	.cfi_restore_state
	mov	esi, DWORD PTR [r8]
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L5:
	mov	eax, 2
	sub	eax, edx
	mov	DWORD PTR [rsp], eax
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L2:
	mov	rax, QWORD PTR h265_profiles[rip]
	xor	edx, edx
	cmp	QWORD PTR 120[rax], 0
	lea	r15, 120[rax]
	setg	dl
	xor	ebx, ebx
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L3:
	mov	rax, QWORD PTR h265_profiles[rip]
	lea	r15, 120[rax]
	jmp	.L16
	.p2align 4,,10
	.p2align 3
.L29:
	lea	eax, 0[0+rdx*4]
	sub	edx, eax
	lea	eax, 24[0+rdx*4]
	mov	DWORD PTR [rsp], eax
	jmp	.L4
.L33:
	lea	edi, [rax+rax]
	mov	esi, 16
	mov	QWORD PTR 8[rsp], r8
	call	FFMIN@PLT
	mov	r8, QWORD PTR 8[rsp]
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L32:
	lea	edi, 0[0+rax*4]
	mov	esi, 16
	mov	QWORD PTR 8[rsp], r8
	call	FFMIN@PLT
	mov	r8, QWORD PTR 8[rsp]
	jmp	.L12
.L34:
	sal	eax, 2
	mov	esi, 16
	mov	QWORD PTR 8[rsp], r8
	movsx	rdi, eax
	sar	eax, 31
	imul	rdi, rdi, 1431655766
	shr	rdi, 32
	sub	edi, eax
	call	FFMIN@PLT
	mov	r8, QWORD PTR 8[rsp]
	jmp	.L12
	.cfi_endproc
.LFE0:
	.size	ff_h265_guess_level, .-ff_h265_guess_level
	.comm	h265_profiles,8,8
	.comm	h265_levels,8,8
	.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_h265_profile_level.c_ff_h265_guess_level.c"
	.text
	.align	2
	.global	ff_h265_guess_level
	.syntax unified
	.arm
	.fpu softvfp
	.type	ff_h265_guess_level, %function
ff_h265_guess_level:
	@ args = 16, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	subs	r4, r0, #0
	sub	sp, sp, #20
	mov	r6, r2
	mov	r8, r3
	mul	r7, r3, r2
	ldr	r10, [sp, #56]
	str	r1, [sp, #4]
	beq	.L2
	bl	ff_h265_get_profile
	subs	r9, r0, #0
	beq	.L3
.L16:
	ldr	r5, [r4]
	ldr	r3, [r4, #4]
.L17:
	ldr	r2, [r9, #4]
	sub	r2, r2, #1
	cmp	r2, #1
	movls	r3, #1
	strls	r3, [sp, #8]
	bls	.L4
	ldr	r2, [r9, #20]
	cmp	r2, #0
	rsbeq	r3, r3, #2
	streq	r3, [sp, #8]
	bne	.L32
.L4:
	mov	r3, r6
	mul	r3, r6, r3
	mov	r6, r3
	mov	r3, r8
	mul	r3, r8, r3
	mov	fp, #0
	mov	r8, r3
	mov	r3, r9
	ldr	r4, .L37
	mov	r9, fp
	ldr	r0, [r4]
	mov	fp, r3
	bl	FF_ARRAY_ELEMS
	cmp	r0, r9
	ble	.L33
.L15:
	ldr	r0, [r4]
	add	r1, r9, r9, lsl #1
	cmp	r5, #0
	add	r2, r0, r1, lsl #3
	beq	.L7
	ldr	r1, [r0, r1, lsl #3]
	cmp	r1, #0
	beq	.L8
.L7:
	ldr	r1, [r2, #4]
	cmp	r1, r7
	blt	.L8
	cmp	r6, r1, lsl #3
	lsl	ip, r1, #3
	bgt	.L8
	cmp	ip, r8
	blt	.L8
	ldr	ip, [r2, #8]
	cmp	ip, r10
	blt	.L8
	ldr	ip, [r2, #12]
	ldr	r3, [sp, #60]
	cmp	ip, r3
	blt	.L8
	ldr	ip, [r2, #16]
	ldr	r3, [sp, #64]
	cmp	ip, r3
	blt	.L8
	cmp	r5, #0
	ldrne	lr, [r2]
	ldreq	lr, [r2, #20]
	cmp	lr, #0
	beq	.L8
	ldr	ip, [fp, #12]
	ldr	r3, [sp, #8]
	mul	r3, ip, r3
	mov	ip, r3
	mul	ip, lr, ip
	ldr	r3, [sp, #4]
	cmp	ip, r3
	blt	.L8
	cmp	r7, r1, asr #2
	ldr	r0, [fp, #8]
	ble	.L34
	cmp	r7, r1, asr #1
	ble	.L35
	add	r1, r1, r1, lsl #1
	cmp	r7, r1, asr #2
	ble	.L36
.L12:
	ldr	r3, [sp, #68]
	cmp	r0, r3
	bge	.L1
	ldr	r0, [r4]
.L8:
	bl	FF_ARRAY_ELEMS
	add	r9, r9, #1
	cmp	r0, r9
	bgt	.L15
.L33:
	mov	r2, #0
.L1:
	mov	r0, r2
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L32:
	ldr	r2, [r9, #16]
	cmp	r2, #0
	moveq	r3, #6
	subne	r3, r3, r3, lsl #2
	lslne	r3, r3, #2
	addne	r3, r3, #24
	streq	r3, [sp, #8]
	strne	r3, [sp, #8]
	b	.L4
.L2:
	ldr	r3, .L37+4
	mov	r5, r4
	ldr	r9, [r3]
	ldr	r3, [r9, #72]
	add	r9, r9, #72
	cmp	r3, #0
	movle	r3, #0
	movgt	r3, #1
	b	.L17
.L3:
	ldr	r3, .L37+4
	ldr	r9, [r3]
	add	r9, r9, #72
	b	.L16
.L35:
	mov	r1, #16
	lsl	r0, r0, #1
	str	r2, [sp, #12]
	bl	FFMIN
	ldr	r2, [sp, #12]
	b	.L12
.L34:
	mov	r1, #16
	lsl	r0, r0, #2
	str	r2, [sp, #12]
	bl	FFMIN
	ldr	r2, [sp, #12]
	b	.L12
.L36:
	ldr	r1, .L37+8
	lsl	r0, r0, #2
	smull	r3, r1, r0, r1
	sub	r0, r1, r0, asr #31
	mov	r1, #16
	str	r2, [sp, #12]
	bl	FFMIN
	ldr	r2, [sp, #12]
	b	.L12
.L38:
	.align	2
.L37:
	.word	h265_levels
	.word	h265_profiles
	.word	1431655766
	.size	ff_h265_guess_level, .-ff_h265_guess_level
	.comm	h265_profiles,4,4
	.comm	h265_levels,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
