	.file	"extr_img_format.c_mp_get_regular_imgfmt.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	mp_get_regular_imgfmt
	.type	mp_get_regular_imgfmt, @function
mp_get_regular_imgfmt:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	pxor	xmm0, xmm0
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13d, esi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rdi
	mov	edi, esi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 72
	.cfi_def_cfa_offset 128
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 56[rsp], rax
	xor	eax, eax
	movaps	XMMWORD PTR 16[rsp], xmm0
	mov	QWORD PTR 48[rsp], 0
	movaps	XMMWORD PTR 32[rsp], xmm0
	call	imgfmt2pixfmt@PLT
	mov	edi, eax
	call	av_pix_fmt_desc_get@PLT
	test	rax, rax
	je	.L4
	mov	rbp, rax
	mov	eax, DWORD PTR AV_PIX_FMT_FLAG_BITSTREAM[rip]
	or	eax, DWORD PTR AV_PIX_FMT_FLAG_HWACCEL[rip]
	or	eax, DWORD PTR AV_PIX_FMT_FLAG_PAL[rip]
	and	eax, DWORD PTR 0[rbp]
	mov	ebx, eax
	jne	.L4
	mov	eax, DWORD PTR 4[rbp]
	test	eax, eax
	jle	.L4
	cmp	eax, DWORD PTR MP_NUM_COMPONENTS[rip]
	jg	.L4
	mov	rdi, rbp
	call	is_native_endian@PLT
	test	eax, eax
	jne	.L47
	.p2align 4,,10
	.p2align 3
.L4:
	xor	eax, eax
.L1:
	mov	rcx, QWORD PTR 56[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L48
	add	rsp, 72
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
.L47:
	.cfi_restore_state
	mov	edi, r13d
	call	mp_imgfmt_get_component_type@PLT
	mov	DWORD PTR 48[rsp], eax
	test	eax, eax
	je	.L4
	mov	r15, QWORD PTR 16[rbp]
	mov	ecx, DWORD PTR [r15]
	mov	edx, DWORD PTR 4[r15]
	mov	QWORD PTR 8[rsp], r15
	lea	eax, [rcx+rdx]
	lea	esi, -1[rax]
	cmp	esi, 63
	ja	.L4
	add	eax, 7
	mov	esi, DWORD PTR 4[rbp]
	sar	eax, 3
	mov	DWORD PTR 16[rsp], eax
	test	esi, esi
	jle	.L5
	xor	r14d, r14d
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L50:
	mov	edi, DWORD PTR 20[rsp]
	add	rsi, 1
	call	MPMAX@PLT
	mov	DWORD PTR 20[rsp], eax
	mov	rax, QWORD PTR 8[rsp]
	mov	rax, QWORD PTR [rax]
	cmp	QWORD PTR [r15], rax
	jne	.L4
	mov	esi, DWORD PTR 16[r15]
	mov	r9d, DWORD PTR 16[rsp]
	mov	eax, esi
	cdq
	idiv	r9d
	mov	edi, eax
	test	eax, eax
	je	.L4
	mov	eax, r9d
	imul	eax, edi
	cmp	esi, eax
	jne	.L4
	mov	rsi, QWORD PTR 8[r15]
	mov	r8, QWORD PTR 40[rsp]
	sal	rsi, 4
	add	rsi, r8
	mov	eax, DWORD PTR [rsi]
	cmp	eax, edi
	je	.L17
	test	eax, eax
	jne	.L4
.L17:
	mov	eax, DWORD PTR 20[r15]
	mov	DWORD PTR [rsi], edi
	cdq
	idiv	r9d
	test	eax, eax
	js	.L4
	cmp	edi, eax
	jle	.L4
	cmp	DWORD PTR MP_NUM_COMPONENTS[rip], edi
	jl	.L4
	mov	rdx, QWORD PTR 8[rsi]
	cdqe
	lea	rax, [rdx+rax*4]
	mov	edx, DWORD PTR [rax]
	test	edx, edx
	jne	.L4
	add	ebx, 1
	add	r14, 24
	mov	DWORD PTR [rax], ebx
	mov	eax, DWORD PTR 4[rbp]
	cmp	ebx, eax
	jge	.L49
	mov	r15, QWORD PTR 16[rbp]
.L9:
	add	r15, r14
	mov	rsi, QWORD PTR 8[r15]
	cmp	rsi, QWORD PTR MP_MAX_PLANES[rip]
	jb	.L50
	jmp	.L4
.L49:
	cmp	eax, 2
	je	.L8
.L45:
	mov	rax, QWORD PTR 8[rsp]
	mov	ecx, DWORD PTR [rax]
	mov	edx, DWORD PTR 4[rax]
.L5:
	mov	eax, DWORD PTR 16[rsp]
	mov	esi, ecx
	sal	eax, 3
	sub	esi, eax
	mov	DWORD PTR 24[rsp], esi
	test	edx, edx
	je	.L15
	add	edx, ecx
	cmp	eax, edx
	jne	.L4
	sub	eax, ecx
	mov	DWORD PTR 24[rsp], eax
.L15:
	mov	ecx, DWORD PTR 8[rbp]
	mov	eax, 1
	mov	edi, r13d
	mov	edx, eax
	sal	edx, cl
	mov	ecx, DWORD PTR 12[rbp]
	mov	DWORD PTR 28[rsp], edx
	sal	eax, cl
	mov	DWORD PTR 32[rsp], eax
	call	mp_imgfmt_get_forced_csp@PLT
	lea	rdi, 16[rsp]
	mov	DWORD PTR 36[rsp], eax
	call	validate_regular_imgfmt@PLT
	test	eax, eax
	je	.L4
	mov	rax, QWORD PTR 48[rsp]
	movdqa	xmm1, XMMWORD PTR 16[rsp]
	movdqa	xmm2, XMMWORD PTR 32[rsp]
	mov	QWORD PTR 32[r12], rax
	mov	eax, 1
	movups	XMMWORD PTR [r12], xmm1
	movups	XMMWORD PTR 16[r12], xmm2
	jmp	.L1
.L8:
	mov	eax, DWORD PTR 0[rbp]
	test	DWORD PTR AV_PIX_FMT_FLAG_ALPHA[rip], eax
	je	.L45
	cmp	DWORD PTR 20[rsp], 0
	jle	.L45
.L10:
	mov	eax, DWORD PTR [r8]
	test	eax, eax
	jle	.L14
	mov	rcx, QWORD PTR 8[r8]
	xor	eax, eax
	.p2align 4,,10
	.p2align 3
.L12:
	cmp	DWORD PTR [rcx+rax*4], 2
	jne	.L11
	mov	DWORD PTR [rcx+rax*4], 4
.L11:
	add	rax, 1
	cmp	DWORD PTR [r8], eax
	jg	.L12
.L14:
	add	edx, 1
	add	r8, 16
	cmp	DWORD PTR 20[rsp], edx
	jg	.L10
	jmp	.L45
.L48:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	mp_get_regular_imgfmt, .-mp_get_regular_imgfmt
	.comm	MP_NUM_COMPONENTS,4,4
	.comm	MP_MAX_PLANES,8,8
	.comm	AV_PIX_FMT_FLAG_PAL,4,4
	.comm	AV_PIX_FMT_FLAG_HWACCEL,4,4
	.comm	AV_PIX_FMT_FLAG_BITSTREAM,4,4
	.comm	AV_PIX_FMT_FLAG_BAYER,4,4
	.comm	AV_PIX_FMT_FLAG_ALPHA,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_img_format.c_mp_get_regular_imgfmt.c"
	.text
	.global	__aeabi_idiv
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	mp_get_regular_imgfmt
	.syntax unified
	.arm
	.fpu softvfp
	.type	mp_get_regular_imgfmt, %function
mp_get_regular_imgfmt:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r6, r1
	sub	sp, sp, #52
	ldr	r3, .L46
	mov	r2, #36
	mov	r1, #0
	mov	r7, r0
	add	r0, sp, #8
	ldr	r3, [r3]
	str	r3, [sp, #44]
	mov	r3,#0
	bl	memset
	mov	r0, r6
	bl	imgfmt2pixfmt
	bl	av_pix_fmt_desc_get
	subs	r5, r0, #0
	beq	.L4
	ldr	r1, .L46+4
	ldr	r3, .L46+8
	ldr	r2, .L46+12
	ldr	r3, [r3]
	ldr	r4, [r1]
	ldr	r2, [r2]
	orr	r4, r4, r3
	ldr	r3, [r5]
	orr	r4, r4, r2
	ands	r4, r4, r3
	bne	.L4
	ldr	r3, [r5, #4]
	cmp	r3, #0
	ble	.L4
	ldr	r9, .L46+16
	ldr	r2, [r9]
	cmp	r3, r2
	bgt	.L4
	bl	is_native_endian
	cmp	r0, #0
	bne	.L42
.L4:
	mov	r4, #0
.L1:
	ldr	r3, .L46
	ldr	r2, [r3]
	ldr	r3, [sp, #44]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L43
	mov	r0, r4
	add	sp, sp, #52
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L42:
	mov	r0, r6
	bl	mp_imgfmt_get_component_type
	cmp	r0, #0
	str	r0, [sp, #36]
	beq	.L4
	ldr	r10, [r5, #16]
	ldm	r10, {r1, r2}
	add	r3, r1, r2
	sub	r0, r3, #1
	cmp	r0, #63
	bhi	.L4
	ldr	r0, [r5, #4]
	add	r3, r3, #7
	asr	r3, r3, #3
	cmp	r0, #0
	str	r3, [sp, #8]
	ble	.L5
	mov	r2, r10
	b	.L8
.L45:
	add	r1, r1, #1
	ldr	r0, [sp, #12]
	bl	MPMAX
	ldr	r2, [sp]
	ldr	r1, [r2, r8, lsl #2]
	ldr	r2, [r10]
	str	r0, [sp, #12]
	cmp	r1, r2
	bne	.L4
	ldr	r1, [fp, #4]
	ldr	r2, [r10, #4]
	cmp	r1, r2
	bne	.L4
	ldr	r2, [fp, #12]
	ldr	r1, [sp, #8]
	mov	r0, r2
	stm	sp, {r1, r2}
	bl	__aeabi_idiv
	subs	r8, r0, #0
	beq	.L4
	ldr	r1, [sp]
	ldr	r2, [sp, #4]
	mul	r0, r8, r1
	cmp	r2, r0
	bne	.L4
	ldr	r0, [fp, #8]
	ldr	r2, [sp, #32]
	ldr	ip, [r2, r0, lsl #3]
	add	r3, r2, r0, lsl #3
	cmp	ip, r8
	cmpne	ip, #0
	str	r3, [sp]
	bne	.L4
	str	r8, [r2, r0, lsl #3]
	ldr	r0, [fp, #16]
	str	r2, [sp, #4]
	bl	__aeabi_idiv
	cmp	r8, r0
	movgt	r3, #0
	movle	r3, #1
	orrs	r2, r3, r0, lsr #31
	bne	.L4
	ldr	r3, [r9]
	cmp	r3, r8
	blt	.L4
	ldr	r3, [sp]
	ldr	r3, [r3, #4]
	ldr	r1, [r3, r0, lsl #2]
	cmp	r1, #0
	bne	.L4
	add	r4, r4, #1
	str	r4, [r3, r0, lsl #2]
	ldr	r3, [r5, #4]
	ldr	r2, [sp, #4]
	cmp	r4, r3
	bge	.L44
	ldr	r2, [r5, #16]
.L8:
	ldr	r3, .L46+20
	add	r8, r4, r4, lsl #2
	add	fp, r2, r8, lsl #2
	ldr	r1, [fp, #8]
	ldr	r0, [r3]
	str	r2, [sp]
	cmp	r1, r0
	bcc	.L45
	b	.L4
.L44:
	cmp	r3, #2
	beq	.L7
.L40:
	ldm	r10, {r1, r2}
.L5:
	ldr	r3, [sp, #8]
	cmp	r2, #0
	sub	r0, r1, r3, lsl #3
	str	r0, [sp, #16]
	lsl	r3, r3, #3
	beq	.L14
	add	r2, r1, r2
	cmp	r3, r2
	bne	.L4
	sub	r3, r3, r1
	str	r3, [sp, #16]
.L14:
	mov	r4, #1
	ldr	r2, [r5, #8]
	ldr	r3, [r5, #12]
	lsl	r2, r4, r2
	lsl	r3, r4, r3
	mov	r0, r6
	str	r2, [sp, #20]
	str	r3, [sp, #24]
	bl	mp_imgfmt_get_forced_csp
	mov	r3, r0
	add	r0, sp, #8
	str	r3, [sp, #28]
	bl	validate_regular_imgfmt
	cmp	r0, #0
	beq	.L4
	add	ip, sp, #8
	ldmia	ip!, {r0, r1, r2, r3}
	stmia	r7!, {r0, r1, r2, r3}
	ldmia	ip!, {r0, r1, r2, r3}
	stmia	r7!, {r0, r1, r2, r3}
	ldr	r3, [ip]
	str	r3, [r7]
	b	.L1
.L7:
	ldr	r3, .L46+24
	ldr	r1, [r5]
	ldr	r3, [r3]
	tst	r1, r3
	beq	.L40
	ldr	r3, [sp, #12]
	cmp	r3, #0
	addgt	r2, r2, #4
	movgt	lr, r2
	movgt	r4, #0
	movgt	r8, #4
	ble	.L40
.L9:
	ldr	ip, [lr, #-4]
	cmp	ip, #0
	ble	.L13
	mov	r3, #0
	ldr	r1, [r2, r4, lsl #3]
	sub	r1, r1, #4
.L11:
	ldr	r0, [r1, #4]!
	add	r3, r3, #1
	cmp	r0, #2
	streq	r8, [r1]
	ldreq	ip, [lr, #-4]
	cmp	ip, r3
	bgt	.L11
	ldr	r3, [sp, #12]
.L13:
	add	r4, r4, #1
	cmp	r3, r4
	add	lr, lr, #8
	bgt	.L9
	b	.L40
.L43:
	bl	__stack_chk_fail
.L47:
	.align	2
.L46:
	.word	.LC0
	.word	AV_PIX_FMT_FLAG_BITSTREAM
	.word	AV_PIX_FMT_FLAG_HWACCEL
	.word	AV_PIX_FMT_FLAG_PAL
	.word	MP_NUM_COMPONENTS
	.word	MP_MAX_PLANES
	.word	AV_PIX_FMT_FLAG_ALPHA
	.size	mp_get_regular_imgfmt, .-mp_get_regular_imgfmt
	.comm	MP_NUM_COMPONENTS,4,4
	.comm	MP_MAX_PLANES,4,4
	.comm	AV_PIX_FMT_FLAG_PAL,4,4
	.comm	AV_PIX_FMT_FLAG_HWACCEL,4,4
	.comm	AV_PIX_FMT_FLAG_BITSTREAM,4,4
	.comm	AV_PIX_FMT_FLAG_BAYER,4,4
	.comm	AV_PIX_FMT_FLAG_ALPHA,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
