	.file	"extr_mp_image.c_mp_image_alloc_planes.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	mp_image_alloc_planes, @function
mp_image_alloc_planes:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rax, QWORD PTR 24[rdi]
	mov	rbx, rdi
	xor	edi, edi
	mov	eax, DWORD PTR [rax]
	test	eax, eax
	sete	dil
	call	assert@PLT
	mov	rax, QWORD PTR [rbx]
	xor	edi, edi
	cmp	QWORD PTR [rax], 0
	sete	dil
	call	assert@PLT
	mov	r12d, DWORD PTR MP_IMAGE_BYTE_ALIGN[rip]
	mov	edx, DWORD PTR 8[rbx]
	mov	esi, DWORD PTR 12[rbx]
	mov	edi, DWORD PTR 16[rbx]
	mov	ecx, r12d
	call	mp_image_get_alloc_size@PLT
	test	eax, eax
	js	.L4
	mov	rbp, QWORD PTR [rbx]
	lea	edi, [r12+rax]
	call	av_buffer_alloc@PLT
	mov	QWORD PTR 0[rbp], rax
	mov	rax, QWORD PTR [rbx]
	mov	rax, QWORD PTR [rax]
	test	rax, rax
	je	.L4
	mov	edx, DWORD PTR 4[rax]
	mov	ecx, DWORD PTR [rax]
	mov	esi, r12d
	mov	rdi, rbx
	call	mp_image_fill_alloc@PLT
	mov	r12d, eax
	test	eax, eax
	je	.L11
	mov	r12d, 1
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	mov	eax, r12d
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	xor	r12d, r12d
.L1:
	mov	eax, r12d
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	mov	rdi, QWORD PTR [rbx]
	call	av_buffer_unref@PLT
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	mp_image_alloc_planes, .-mp_image_alloc_planes
	.comm	MP_IMAGE_BYTE_ALIGN,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_mp_image.c_mp_image_alloc_planes.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	mp_image_alloc_planes, %function
mp_image_alloc_planes:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, [r0, #16]
	push	{r4, r5, r6, lr}
	mov	r4, r0
	ldr	r0, [r3]
	clz	r0, r0
	lsr	r0, r0, #5
	bl	assert
	ldr	r3, [r4]
	ldr	r0, [r3]
	clz	r0, r0
	lsr	r0, r0, #5
	bl	assert
	ldr	r3, .L11
	ldr	r2, [r4, #4]
	ldr	r5, [r3]
	ldr	r1, [r4, #8]
	mov	r3, r5
	ldr	r0, [r4, #12]
	bl	mp_image_get_alloc_size
	cmp	r0, #0
	blt	.L4
	add	r0, r5, r0
	ldr	r6, [r4]
	bl	av_buffer_alloc
	ldr	r3, [r4]
	str	r0, [r6]
	ldr	r2, [r3]
	cmp	r2, #0
	beq	.L4
	mov	r1, r5
	ldr	r3, [r2]
	mov	r0, r4
	ldr	r2, [r2, #4]
	bl	mp_image_fill_alloc
	subs	r5, r0, #0
	movne	r5, #1
	bne	.L1
	ldr	r0, [r4]
	bl	av_buffer_unref
	b	.L1
.L4:
	mov	r5, #0
.L1:
	mov	r0, r5
	pop	{r4, r5, r6, pc}
.L12:
	.align	2
.L11:
	.word	MP_IMAGE_BYTE_ALIGN
	.size	mp_image_alloc_planes, .-mp_image_alloc_planes
	.comm	MP_IMAGE_BYTE_ALIGN,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
