	.file	"extr_cvmx-helper-util.c_cvmx_helper_setup_red.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	cvmx_helper_setup_red
	.type	cvmx_helper_setup_red, @function
cvmx_helper_setup_red:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r13d, esi
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12d, edi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	xor	ebp, ebp
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	sub	rsp, 24
	.cfi_def_cfa_offset 64
.L4:
	mov	edi, ebp
	call	cvmx_helper_get_first_ipd_port@PLT
	mov	ebx, eax
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L3:
	mov	edi, ebx
	add	ebx, 1
	call	CVMX_IPD_PORTX_BP_PAGE_CNT@PLT
	mov	esi, 100
	mov	edi, eax
	call	cvmx_write_csr@PLT
.L2:
	mov	edi, ebp
	call	cvmx_helper_get_last_ipd_port@PLT
	cmp	eax, ebx
	jg	.L3
	cmp	ebp, 1
	jne	.L6
	xor	ebx, ebx
	.p2align 4,,10
	.p2align 3
.L5:
	mov	edi, ebx
	mov	edx, r13d
	mov	esi, r12d
	add	ebx, 1
	call	cvmx_helper_setup_red_queue@PLT
	cmp	ebx, 8
	jne	.L5
	mov	edi, DWORD PTR CVMX_IPD_BP_PRT_RED_END[rip]
	xor	esi, esi
	call	cvmx_write_csr@PLT
	mov	edi, DWORD PTR CVMX_IPD_RED_PORT_ENABLE[rip]
	movabs	rsi, 42953967927295
	call	cvmx_write_csr@PLT
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
	mov	ebp, 1
	jmp	.L4
	.cfi_endproc
.LFE0:
	.size	cvmx_helper_setup_red, .-cvmx_helper_setup_red
	.comm	CVMX_IPD_RED_PORT_ENABLE,4,4
	.comm	CVMX_IPD_BP_PRT_RED_END,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_cvmx-helper-util.c_cvmx_helper_setup_red.c"
	.text
	.align	2
	.global	cvmx_helper_setup_red
	.syntax unified
	.arm
	.fpu softvfp
	.type	cvmx_helper_setup_red, %function
cvmx_helper_setup_red:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r6, r0
	mov	r7, r1
	mov	r5, #0
.L4:
	mov	r0, r5
	bl	cvmx_helper_get_first_ipd_port
	mov	r4, r0
	b	.L2
.L3:
	mov	r0, r4
	bl	CVMX_IPD_PORTX_BP_PAGE_CNT
	mov	r1, #100
	bl	cvmx_write_csr
	add	r4, r4, #1
.L2:
	mov	r0, r5
	bl	cvmx_helper_get_last_ipd_port
	cmp	r0, r4
	bgt	.L3
	cmp	r5, #1
	bne	.L6
	mov	r4, #0
.L5:
	mov	r0, r4
	mov	r2, r7
	mov	r1, r6
	add	r4, r4, #1
	bl	cvmx_helper_setup_red_queue
	cmp	r4, #8
	bne	.L5
	ldr	r3, .L10
	mov	r1, #0
	ldr	r0, [r3]
	bl	cvmx_write_csr
	ldr	r3, .L10+4
	mvn	r1, #0
	ldr	r0, [r3]
	bl	cvmx_write_csr
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L6:
	mov	r5, #1
	b	.L4
.L11:
	.align	2
.L10:
	.word	CVMX_IPD_BP_PRT_RED_END
	.word	CVMX_IPD_RED_PORT_ENABLE
	.size	cvmx_helper_setup_red, .-cvmx_helper_setup_red
	.comm	CVMX_IPD_RED_PORT_ENABLE,4,4
	.comm	CVMX_IPD_BP_PRT_RED_END,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
