	.file	"extr_rtsx_pcr.c_rtsx_pci_write_ppbuf.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	rtsx_pci_write_ppbuf
	.type	rtsx_pci_write_ppbuf, @function
rtsx_pci_write_ppbuf:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	eax, edx
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14, rdi
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	cmp	edx, 512
	mov	edx, 512
	mov	ebx, DWORD PTR PPBUF_BASE2[rip]
	mov	esi, edx
	cmovle	esi, eax
	test	esi, esi
	lea	r15d, 255[rsi]
	mov	DWORD PTR 12[rsp], esi
	cmovns	r15d, esi
	sar	r15d, 8
	mov	DWORD PTR 8[rsp], r15d
	cmp	eax, 255
	jle	.L2
	lea	ebp, 256[rbx]
	xor	r13d, r13d
.L5:
	mov	rdi, r14
	lea	ebx, -256[rbp]
	mov	r15, r12
	call	rtsx_pci_init_cmd@PLT
	.p2align 4,,10
	.p2align 3
.L3:
	mov	r8d, DWORD PTR [r15]
	mov	esi, DWORD PTR WRITE_REG_CMD[rip]
	mov	edx, ebx
	mov	ecx, 255
	mov	rdi, r14
	add	ebx, 1
	add	r15, 4
	call	rtsx_pci_add_cmd@PLT
	cmp	ebp, ebx
	jne	.L3
	mov	esi, 250
	mov	rdi, r14
	add	r12, 1024
	call	rtsx_pci_send_cmd@PLT
	test	eax, eax
	js	.L1
	lea	eax, 1[r13]
	add	ebp, 256
	mov	r13d, 1
	cmp	eax, DWORD PTR 8[rsp]
	jl	.L5
.L2:
	xor	eax, eax
	cmp	BYTE PTR 12[rsp], 0
	jne	.L15
.L1:
	add	rsp, 24
	.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
.L15:
	.cfi_restore_state
	mov	rdi, r14
	call	rtsx_pci_init_cmd@PLT
	mov	eax, DWORD PTR 12[rsp]
	mov	edx, eax
	sar	edx, 31
	shr	edx, 24
	add	eax, edx
	movzx	eax, al
	sub	eax, edx
	test	eax, eax
	jle	.L6
	lea	ebp, [rbx+rax]
.L7:
	mov	r8d, DWORD PTR [r12]
	mov	esi, DWORD PTR WRITE_REG_CMD[rip]
	mov	edx, ebx
	mov	rdi, r14
	mov	ecx, 255
	add	ebx, 1
	add	r12, 4
	call	rtsx_pci_add_cmd@PLT
	cmp	ebp, ebx
	jne	.L7
.L6:
	mov	rdi, r14
	mov	esi, 250
	call	rtsx_pci_send_cmd@PLT
	mov	edx, 0
	test	eax, eax
	cmovg	eax, edx
	add	rsp, 24
	.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
	.cfi_endproc
.LFE0:
	.size	rtsx_pci_write_ppbuf, .-rtsx_pci_write_ppbuf
	.comm	WRITE_REG_CMD,4,4
	.comm	PPBUF_BASE2,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_rtsx_pcr.c_rtsx_pci_write_ppbuf.c"
	.text
	.align	2
	.global	rtsx_pci_write_ppbuf
	.syntax unified
	.arm
	.fpu softvfp
	.type	rtsx_pci_write_ppbuf, %function
rtsx_pci_write_ppbuf:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	cmp	r2, #512
	movge	ip, #512
	movlt	ip, r2
	mov	r3, r2
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	cmp	ip, #0
	sub	sp, sp, #20
	add	r2, ip, #255
	str	ip, [sp, #12]
	movge	r2, ip
	ldr	ip, .L16
	cmp	r3, #255
	mov	r7, r0
	mov	r9, r1
	ldr	r4, [ip]
	ble	.L2
	mov	r10, #0
	ldr	r8, .L16+4
	asr	fp, r2, #8
	add	r6, r4, #256
.L5:
	mov	r0, r7
	bl	rtsx_pci_init_cmd
	mov	r5, r9
	sub	r4, r6, #256
.L3:
	ldr	r3, [r5], #4
	mov	r2, r4
	str	r3, [sp]
	mov	r0, r7
	mov	r3, #255
	ldr	r1, [r8]
	add	r4, r4, #1
	bl	rtsx_pci_add_cmd
	cmp	r6, r4
	bne	.L3
	mov	r1, #250
	mov	r0, r7
	bl	rtsx_pci_send_cmd
	cmp	r0, #0
	add	r9, r9, #1024
	blt	.L1
	add	r10, r10, #1
	cmp	r10, fp
	add	r6, r6, #256
	mov	r10, #1
	blt	.L5
.L2:
	ldr	r3, [sp, #12]
	ands	r5, r3, #255
	moveq	r0, r5
	bne	.L15
.L1:
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L15:
	mov	r0, r7
	bl	rtsx_pci_init_cmd
	mov	r0, r5
	ldr	r3, [sp, #12]
	rsbs	r3, r3, #0
	and	r3, r3, #255
	rsbpl	r0, r3, #0
	cmp	r0, #0
	ble	.L6
	ldr	r8, .L16+4
	add	r5, r9, r0, lsl #2
.L7:
	ldr	r3, [r9], #4
	mov	r2, r4
	str	r3, [sp]
	mov	r0, r7
	mov	r3, #255
	ldr	r1, [r8]
	bl	rtsx_pci_add_cmd
	cmp	r5, r9
	add	r4, r4, #1
	bne	.L7
.L6:
	mov	r0, r7
	mov	r1, #250
	bl	rtsx_pci_send_cmd
	and	r0, r0, r0, asr #31
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L17:
	.align	2
.L16:
	.word	PPBUF_BASE2
	.word	WRITE_REG_CMD
	.size	rtsx_pci_write_ppbuf, .-rtsx_pci_write_ppbuf
	.comm	WRITE_REG_CMD,4,4
	.comm	PPBUF_BASE2,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
