	.file	"extr_pvrusb2-encoder.c_pvr2_encoder_write_words.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	pvr2_encoder_write_words, @function
pvr2_encoder_write_words:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15d, esi
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdi
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	QWORD PTR 8[rsp], rdx
	mov	DWORD PTR 24[rsp], ecx
	test	ecx, ecx
	je	.L7
	.p2align 4,,10
	.p2align 3
.L2:
	mov	eax, DWORD PTR 24[rsp]
	cmp	eax, 7
	ja	.L8
	lea	r14d, 0[0+rax*8]
	mov	DWORD PTR 20[rsp], eax
	sub	r14d, eax
	lea	ecx, 1[r14]
	mov	DWORD PTR 28[rsp], ecx
.L4:
	mov	rdi, QWORD PTR [rbx]
	mov	edx, 8
	xor	esi, esi
	mov	r13d, 28
	mov	r14d, 1
	call	memset@PLT
	mov	eax, DWORD PTR FX2CMD_MEM_WRITE_DWORD[rip]
	mov	rdi, QWORD PTR [rbx]
	mov	r12, QWORD PTR 8[rsp]
	mov	DWORD PTR [rdi], eax
	mov	eax, DWORD PTR 20[rsp]
	lea	ebp, [rax+r15]
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L14:
	mov	rdi, QWORD PTR [rbx]
.L6:
	movzx	eax, r15b
	mov	esi, r14d
	add	r12, 4
	add	r14d, 7
	mov	DWORD PTR [rdi+r13], eax
	mov	eax, r15d
	movzx	eax, ah
	mov	DWORD PTR -4[rdi+r13], eax
	mov	eax, r15d
	add	r15d, 1
	shr	eax, 16
	and	eax, 255
	mov	DWORD PTR -8[rdi+r13], eax
	mov	edx, DWORD PTR -4[r12]
	add	r13, 28
	call	PVR2_DECOMPOSE_LE@PLT
	cmp	ebp, r15d
	jne	.L14
	mov	edx, DWORD PTR 28[rsp]
	mov	rsi, QWORD PTR [rbx]
	xor	r8d, r8d
	xor	ecx, ecx
	mov	rdi, rbx
	call	pvr2_send_request@PLT
	test	eax, eax
	jne	.L1
	mov	eax, DWORD PTR 20[rsp]
	mov	rdx, QWORD PTR 8[rsp]
	mov	rcx, rax
	sub	DWORD PTR 24[rsp], ecx
	lea	rax, [rdx+rax*4]
	mov	QWORD PTR 8[rsp], rax
	jne	.L2
.L7:
	xor	eax, eax
.L1:
	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
.L8:
	.cfi_restore_state
	mov	DWORD PTR 28[rsp], 57
	mov	DWORD PTR 20[rsp], 8
	jmp	.L4
	.cfi_endproc
.LFE0:
	.size	pvr2_encoder_write_words, .-pvr2_encoder_write_words
	.comm	FX2CMD_MEM_WRITE_DWORD,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_pvrusb2-encoder.c_pvr2_encoder_write_words.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	pvr2_encoder_write_words, %function
pvr2_encoder_write_words:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	subs	r8, r3, #0
	sub	sp, sp, #28
	str	r2, [sp, #12]
	beq	.L7
	mov	r6, r0
	mov	r4, r1
	mov	r9, #0
.L2:
	cmp	r8, #7
	movhi	r3, #57
	strhi	r3, [sp, #20]
	movhi	r3, #8
	rsbls	fp, r8, r8, lsl #3
	addls	r3, fp, #1
	strhi	r3, [sp, #16]
	strls	r3, [sp, #20]
	ldr	r3, [sp, #12]
	ldr	r2, [r6]
	sub	r5, r3, #4
	ldr	r3, .L15
	strb	r9, [r2]
	strb	r9, [r2, #1]
	strb	r9, [r2, #2]
	strb	r9, [r2, #3]
	strls	r8, [sp, #16]
	ldr	r2, [r3]
	ldr	r0, [r6]
	ldr	r3, [sp, #16]
	mov	r10, #28
	mov	fp, #1
	add	r7, r3, r4
	str	r2, [r0]
	b	.L6
.L14:
	ldr	r0, [r6]
.L6:
	mov	r3, r0
	and	r2, r4, #255
	str	r2, [r3, r10]!
	lsr	r1, r4, #8
	lsr	r2, r4, #16
	and	r1, r1, #255
	and	r2, r2, #255
	str	r1, [r3, #-4]
	str	r2, [r3, #-8]
	mov	r1, fp
	ldr	r2, [r5, #4]!
	add	r4, r4, #1
	bl	PVR2_DECOMPOSE_LE
	cmp	r7, r4
	add	r10, r10, #28
	add	fp, fp, #7
	bne	.L14
	str	r9, [sp]
	mov	r3, #0
	mov	r0, r6
	ldr	r2, [sp, #20]
	ldr	r1, [r6]
	bl	pvr2_send_request
	cmp	r0, #0
	bne	.L1
	ldr	r3, [sp, #16]
	ldr	r2, [sp, #12]
	subs	r8, r8, r3
	add	r3, r2, r3, lsl #2
	str	r3, [sp, #12]
	bne	.L2
.L7:
	mov	r0, #0
.L1:
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L16:
	.align	2
.L15:
	.word	FX2CMD_MEM_WRITE_DWORD
	.size	pvr2_encoder_write_words, .-pvr2_encoder_write_words
	.comm	FX2CMD_MEM_WRITE_DWORD,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
