	.file	"extr_gif.c_gif_encode_frame.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	gif_encode_frame, @function
gif_encode_frame:
.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
	mov	r14, rsi
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rcx
	xor	ecx, ecx
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdx
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	edx, DWORD PTR [rdi]
	imul	edx, DWORD PTR 4[rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	mov	rbx, QWORD PTR 24[rdi]
	lea	eax, 0[0+rdx*8]
	sub	eax, edx
	movsx	rdx, eax
	sar	eax, 31
	imul	rdx, rdx, 1717986919
	sar	rdx, 33
	sub	edx, eax
	movsx	rdx, edx
	add	rdx, QWORD PTR AV_INPUT_BUFFER_MIN_SIZE[rip]
	call	ff_alloc_packet2@PLT
	test	eax, eax
	js	.L1
	mov	rax, QWORD PTR 8[r14]
	movsx	rdx, DWORD PTR [r14]
	xor	r15d, r15d
	mov	rcx, QWORD PTR AV_PIX_FMT_PAL8[rip]
	mov	QWORD PTR 16[rsp], rax
	lea	r10, [rax+rdx*4]
	mov	rax, QWORD PTR 8[rbp]
	cmp	QWORD PTR 8[r13], rcx
	je	.L14
.L3:
	mov	rdx, QWORD PTR 0[rbp]
	lea	rsi, 16[rsp]
	sub	rsp, 8
	.cfi_def_cfa_offset 104
	mov	r8, QWORD PTR [rax]
	push	r14
	.cfi_def_cfa_offset 112
	mov	rcx, r15
	mov	rdi, r13
	mov	r9d, DWORD PTR [rdx]
	mov	rdx, r10
	call	gif_image_write_image@PLT
	cmp	QWORD PTR 16[rbx], 0
	pop	rdx
	.cfi_def_cfa_offset 104
	pop	rcx
	.cfi_def_cfa_offset 96
	jne	.L6
	cmp	QWORD PTR 8[rbx], 0
	je	.L15
.L7:
	mov	rax, QWORD PTR 16[rsp]
	sub	rax, QWORD PTR 8[r14]
	sar	rax, 2
	mov	DWORD PTR [r14], eax
.L8:
	mov	eax, DWORD PTR AV_PKT_FLAG_KEY[rip]
	or	DWORD PTR 4[r14], eax
.L9:
	mov	DWORD PTR [r12], 1
	xor	eax, eax
.L1:
	mov	rbx, QWORD PTR 24[rsp]
	xor	rbx, QWORD PTR fs:40
	jne	.L16
	add	rsp, 40
	.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
.L15:
	.cfi_restore_state
	xor	eax, eax
	call	av_frame_alloc@PLT
	mov	QWORD PTR 16[rbx], rax
	test	rax, rax
	je	.L17
.L6:
	cmp	QWORD PTR 8[rbx], 0
	jne	.L7
	mov	rdi, QWORD PTR 16[rbx]
	call	av_frame_unref@PLT
	mov	rdi, QWORD PTR 16[rbx]
	mov	rsi, rbp
	call	av_frame_ref@PLT
	test	eax, eax
	js	.L1
	mov	rdx, QWORD PTR 8[rbx]
	mov	rax, QWORD PTR 16[rsp]
	sub	rax, QWORD PTR 8[r14]
	sar	rax, 2
	mov	DWORD PTR [r14], eax
	test	rdx, rdx
	jne	.L8
	mov	eax, DWORD PTR 16[r13]
	test	eax, eax
	jne	.L9
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L14:
	mov	esi, DWORD PTR [rbx]
	mov	r15, QWORD PTR 8[rax]
	mov	QWORD PTR 8[rsp], r10
	mov	edx, DWORD PTR AVPALETTE_SIZE[rip]
	mov	edi, DWORD PTR 24[rbx]
	test	esi, esi
	mov	rsi, r15
	je	.L18
	call	memcmp@PLT
	mov	r10, QWORD PTR 8[rsp]
	test	eax, eax
	mov	rax, QWORD PTR 8[rbp]
	jne	.L3
	xor	r15d, r15d
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L18:
	call	memcpy@PLT
	mov	rdi, r15
	call	get_palette_transparency_index@PLT
	mov	DWORD PTR [rbx], 1
	mov	r10, QWORD PTR 8[rsp]
	mov	DWORD PTR 28[rbx], eax
	mov	rax, QWORD PTR 8[rbp]
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L17:
	mov	edi, DWORD PTR ENOMEM[rip]
	call	AVERROR@PLT
	jmp	.L1
.L16:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	gif_encode_frame, .-gif_encode_frame
	.comm	ENOMEM,4,4
	.comm	AV_PKT_FLAG_KEY,4,4
	.comm	AV_PIX_FMT_PAL8,8,8
	.comm	AV_INPUT_BUFFER_MIN_SIZE,8,8
	.comm	AVPALETTE_SIZE,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_gif.c_gif_encode_frame.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	gif_encode_frame, %function
gif_encode_frame:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r6, r2
	mov	r8, r3
	ldr	r2, [r0, #4]
	ldr	r3, [r0]
	ldr	ip, .L19
	mul	r3, r2, r3
	rsb	r3, r3, r3, lsl #3
	smull	r2, ip, r3, ip
	ldr	r2, .L19+4
	asr	r3, r3, #31
	ldr	r2, [r2]
	rsb	r3, r3, ip, asr #1
	ldr	ip, .L19+8
	sub	sp, sp, #24
	add	r2, r3, r2
	mov	r3, #0
	mov	r4, r0
	ldr	ip, [ip]
	str	ip, [sp, #20]
	mov	ip,#0
	mov	r5, r1
	ldr	r7, [r0, #16]
	bl	ff_alloc_packet2
	cmp	r0, #0
	blt	.L1
	ldr	r3, .L19+12
	ldr	r1, [r4, #8]
	ldr	r2, [r3]
	ldr	r9, [r5]
	ldr	r3, [r5, #8]
	cmp	r1, r2
	movne	r10, #0
	ldr	r2, [r6, #4]
	str	r3, [sp, #16]
	add	r9, r3, r9, lsl #2
	beq	.L15
.L3:
	ldr	r3, [r6]
	str	r5, [sp, #8]
	ldr	r1, [r3]
	mov	r0, r4
	str	r1, [sp, #4]
	ldr	r1, [r2]
	mov	r3, r10
	str	r1, [sp]
	mov	r2, r9
	add	r1, sp, #16
	bl	gif_image_write_image
	ldr	r3, [r7, #8]
	cmp	r3, #0
	bne	.L6
	ldr	r3, [r7, #4]
	cmp	r3, #0
	beq	.L16
.L7:
	ldr	r3, [sp, #16]
	ldr	r2, [r5, #8]
	sub	r3, r3, r2
	asr	r3, r3, #2
	str	r3, [r5]
.L8:
	ldr	r2, .L19+16
	ldr	r3, [r5, #4]
	ldr	r2, [r2]
	orr	r3, r3, r2
	str	r3, [r5, #4]
.L9:
	mov	r3, #1
	mov	r0, #0
	str	r3, [r8]
.L1:
	ldr	r3, .L19+8
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L17
	add	sp, sp, #24
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L16:
	bl	av_frame_alloc
	cmp	r0, #0
	str	r0, [r7, #8]
	beq	.L18
.L6:
	ldr	r3, [r7, #4]
	cmp	r3, #0
	bne	.L7
	ldr	r0, [r7, #8]
	bl	av_frame_unref
	mov	r1, r6
	ldr	r0, [r7, #8]
	bl	av_frame_ref
	cmp	r0, #0
	blt	.L1
	ldr	r3, [sp, #16]
	ldr	r1, [r5, #8]
	ldr	r2, [r7, #4]
	sub	r3, r3, r1
	asr	r3, r3, #2
	cmp	r2, #0
	str	r3, [r5]
	bne	.L8
	ldr	r3, [r4, #12]
	cmp	r3, #0
	bne	.L9
	b	.L8
.L15:
	ldr	r1, [r7]
	ldr	r10, [r2, #4]
	ldr	r3, .L19+20
	cmp	r1, #0
	ldr	r2, [r3]
	mov	r1, r10
	ldr	r0, [r7, #12]
	bne	.L4
	bl	memcpy
	mov	r0, r10
	bl	get_palette_transparency_index
	mov	r3, #1
	ldr	r2, [r6, #4]
	str	r0, [r7, #16]
	str	r3, [r7]
	b	.L3
.L4:
	bl	memcmp
	cmp	r0, #0
	moveq	r10, r0
	ldr	r2, [r6, #4]
	b	.L3
.L18:
	ldr	r3, .L19+24
	ldr	r0, [r3]
	bl	AVERROR
	b	.L1
.L17:
	bl	__stack_chk_fail
.L20:
	.align	2
.L19:
	.word	1717986919
	.word	AV_INPUT_BUFFER_MIN_SIZE
	.word	.LC0
	.word	AV_PIX_FMT_PAL8
	.word	AV_PKT_FLAG_KEY
	.word	AVPALETTE_SIZE
	.word	ENOMEM
	.size	gif_encode_frame, .-gif_encode_frame
	.comm	ENOMEM,4,4
	.comm	AV_PKT_FLAG_KEY,4,4
	.comm	AV_PIX_FMT_PAL8,4,4
	.comm	AV_INPUT_BUFFER_MIN_SIZE,4,4
	.comm	AVPALETTE_SIZE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
