	.file	"extr_proresenc_kostya.c_encode_alpha_plane.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	encode_alpha_plane, @function
encode_alpha_plane:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	sal	edx, 8
	mov	r15, rsi
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13d, edx
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rcx
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	ebx, 1
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	r14d, DWORD PTR [rdi]
	mov	rdi, rsi
	call	put_bits_count@PLT
	mov	ebp, DWORD PTR [r12]
	mov	edx, 1
	mov	rdi, r15
	mov	ecx, r14d
	mov	DWORD PTR 12[rsp], eax
	sal	edx, cl
	mov	esi, ebp
	mov	ecx, r14d
	sub	edx, 1
	call	put_alpha_diff@PLT
	xor	esi, esi
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L13:
	mov	rdi, r15
	add	rbx, 1
	call	put_alpha_run@PLT
	mov	edx, DWORD PTR 8[rsp]
	mov	esi, ebp
	mov	ecx, r14d
	mov	rdi, r15
	call	put_alpha_diff@PLT
	xor	esi, esi
	cmp	r13d, ebx
	jle	.L12
.L4:
	mov	edx, ebp
	mov	ebp, DWORD PTR [r12+rbx*4]
	mov	DWORD PTR 8[rsp], edx
	cmp	edx, ebp
	jne	.L13
	add	rbx, 1
	add	esi, 1
	cmp	r13d, ebx
	jg	.L4
.L12:
	test	esi, esi
	jne	.L14
.L5:
	mov	rdi, r15
	call	flush_put_bits@PLT
	mov	rdi, r15
	call	put_bits_count@PLT
	sub	eax, DWORD PTR 12[rsp]
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	sar	eax, 3
	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
.L14:
	.cfi_restore_state
	mov	rdi, r15
	call	put_alpha_run@PLT
	jmp	.L5
	.cfi_endproc
.LFE0:
	.size	encode_alpha_plane, .-encode_alpha_plane
	.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_proresenc_kostya.c_encode_alpha_plane.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	encode_alpha_plane, %function
encode_alpha_plane:
	@ args = 4, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r8, r1
	mov	r1, r0
	mov	r6, r3
	mov	r5, #1
	mov	r0, r8
	ldr	r10, [r1]
	lsl	r9, r2, #8
	bl	put_bits_count
	ldr	r4, [r6]
	lsl	r2, r5, r10
	mov	r1, r4
	mov	fp, r0
	mov	r3, r10
	mov	r0, r8
	sub	r2, r2, #1
	bl	put_alpha_diff
	mov	r1, #0
.L4:
	mov	r7, r4
	ldr	r4, [r6, #4]!
	add	r5, r5, #1
	cmp	r7, r4
	addeq	r1, r1, #1
	beq	.L3
	mov	r0, r8
	bl	put_alpha_run
	mov	r1, r4
	mov	r3, r10
	mov	r2, r7
	mov	r0, r8
	bl	put_alpha_diff
	mov	r1, #0
.L3:
	cmp	r9, r5
	bgt	.L4
	cmp	r1, #0
	bne	.L12
.L5:
	mov	r0, r8
	bl	flush_put_bits
	mov	r0, r8
	bl	put_bits_count
	sub	r0, r0, fp
	asr	r0, r0, #3
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L12:
	mov	r0, r8
	bl	put_alpha_run
	b	.L5
	.size	encode_alpha_plane, .-encode_alpha_plane
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
