	.file	"extr_osd.c_mpgl_osd_generate.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	mpgl_osd_generate
	.type	mpgl_osd_generate, @function
mpgl_osd_generate:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12d, ecx
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	ebp, edx
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rbx, rdi
	sub	rsp, 16
	.cfi_def_cfa_offset 48
	mov	edx, DWORD PTR MAX_OSD_PARTS[rip]
	test	edx, edx
	jle	.L2
	mov	rax, QWORD PTR 8[rdi]
	sub	edx, 1
	lea	rcx, 8[rax+rdx*8]
	.p2align 4,,10
	.p2align 3
.L3:
	mov	rdx, QWORD PTR [rax]
	add	rax, 8
	mov	QWORD PTR [rdx], 0
	cmp	rax, rcx
	jne	.L3
.L2:
	mov	edx, ebp
	mov	rdi, rbx
	movsd	QWORD PTR 8[rsp], xmm0
	call	set_res@PLT
	mov	ecx, DWORD PTR 16[rbx]
	mov	esi, DWORD PTR 20[rbx]
	mov	edx, r12d
	mov	edi, DWORD PTR 24[rbx]
	mov	r8d, DWORD PTR gen_osd_cb[rip]
	mov	r9, rbx
	movsd	xmm0, QWORD PTR 8[rsp]
	call	osd_draw@PLT
	mov	edx, DWORD PTR MAX_OSD_PARTS[rip]
	mov	DWORD PTR [rbx], ebp
	test	edx, edx
	jle	.L1
	mov	rax, QWORD PTR 8[rbx]
	sub	edx, 1
	lea	rsi, 8[rax+rdx*8]
	.p2align 4,,10
	.p2align 3
.L6:
	mov	rdx, QWORD PTR [rax]
	mov	rcx, QWORD PTR [rdx]
	cmp	rcx, QWORD PTR 8[rdx]
	je	.L5
	mov	DWORD PTR 4[rbx], 1
.L5:
	add	rax, 8
	mov	QWORD PTR 8[rdx], rcx
	cmp	rax, rsi
	jne	.L6
.L1:
	add	rsp, 16
	.cfi_def_cfa_offset 32
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	mpgl_osd_generate, .-mpgl_osd_generate
	.comm	gen_osd_cb,4,4
	.comm	MAX_OSD_PARTS,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_osd.c_mpgl_osd_generate.c"
	.text
	.align	2
	.global	mpgl_osd_generate
	.syntax unified
	.arm
	.fpu softvfp
	.type	mpgl_osd_generate, %function
mpgl_osd_generate:
	@ args = 8, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	ldr	r8, .L11
	mov	r4, r0
	ldr	r0, [r8]
	sub	sp, sp, #20
	cmp	r0, #0
	mov	r6, r2
	mov	r7, r3
	ldr	r5, [sp, #48]
	ldr	r9, [sp, #52]
	ble	.L2
	mov	ip, #0
	ldr	r3, [r4, #8]
	add	r0, r3, r0, lsl #2
	sub	r0, r0, #4
	sub	r3, r3, #4
.L3:
	ldr	r2, [r3, #4]!
	cmp	r3, r0
	str	ip, [r2]
	bne	.L3
.L2:
	mov	r2, r5
	mov	r0, r4
	bl	set_res
	ldr	r3, .L11+4
	ldr	r1, [r4, #12]
	ldr	r0, [r3]
	str	r4, [sp, #12]
	str	r9, [sp]
	str	r0, [sp, #8]
	str	r1, [sp, #4]
	mov	r2, r6
	mov	r3, r7
	ldr	r1, [r4, #16]
	ldr	r0, [r4, #20]
	bl	osd_draw
	ldr	r0, [r8]
	str	r5, [r4]
	cmp	r0, #0
	ble	.L1
	mov	lr, #1
	ldr	r2, [r4, #8]
	add	r0, r2, r0, lsl #2
	sub	r0, r0, #4
	sub	r2, r2, #4
.L6:
	ldr	r3, [r2, #4]!
	ldm	r3, {r1, ip}
	cmp	r1, ip
	strne	lr, [r4, #4]
	cmp	r0, r2
	str	r1, [r3, #4]
	bne	.L6
.L1:
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L12:
	.align	2
.L11:
	.word	MAX_OSD_PARTS
	.word	gen_osd_cb
	.size	mpgl_osd_generate, .-mpgl_osd_generate
	.comm	gen_osd_cb,4,4
	.comm	MAX_OSD_PARTS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
