	.file	"extr_cvmx-mgmt-port.c_cvmx_mgmt_port_disable.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	cvmx_mgmt_port_disable
	.type	cvmx_mgmt_port_disable, @function
cvmx_mgmt_port_disable:
.LFB0:
	.cfi_startproc
	endbr64
	test	edi, edi
	js	.L9
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	xor	eax, eax
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	ebp, edi
	call	__cvmx_mgmt_port_num_ports@PLT
	cmp	eax, ebp
	jg	.L10
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	eax, DWORD PTR CVMX_MGMT_PORT_INVALID_PARAM[rip]
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	mov	rax, QWORD PTR cvmx_mgmt_port_state_ptr[rip]
	movsx	rdx, ebp
	lea	r13, [rax+rdx*4]
	mov	rdi, r13
	call	cvmx_spinlock_lock@PLT
	mov	edi, ebp
	call	CVMX_AGL_GMX_PRTX_CFG@PLT
	mov	edi, eax
	call	cvmx_read_csr@PLT
	mov	edi, ebp
	mov	r12d, eax
	call	CVMX_AGL_GMX_PRTX_CFG@PLT
	mov	esi, r12d
	mov	edi, eax
	call	cvmx_write_csr@PLT
	mov	rdi, r13
	call	cvmx_spinlock_unlock@PLT
	pop	rbp
	.cfi_def_cfa_offset 24
	mov	eax, DWORD PTR CVMX_MGMT_PORT_SUCCESS[rip]
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	mov	eax, DWORD PTR CVMX_MGMT_PORT_INVALID_PARAM[rip]
	ret
	.cfi_endproc
.LFE0:
	.size	cvmx_mgmt_port_disable, .-cvmx_mgmt_port_disable
	.comm	cvmx_mgmt_port_state_ptr,8,8
	.comm	CVMX_MGMT_PORT_SUCCESS,4,4
	.comm	CVMX_MGMT_PORT_INVALID_PARAM,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-mgmt-port.c_cvmx_mgmt_port_disable.c"
	.text
	.align	2
	.global	cvmx_mgmt_port_disable
	.syntax unified
	.arm
	.fpu softvfp
	.type	cvmx_mgmt_port_disable, %function
cvmx_mgmt_port_disable:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	subs	r4, r0, #0
	blt	.L4
	bl	__cvmx_mgmt_port_num_ports
	cmp	r0, r4
	bgt	.L7
.L4:
	ldr	r3, .L8
	ldr	r0, [r3]
	pop	{r4, r5, r6, pc}
.L7:
	ldr	r3, .L8+4
	ldr	r5, [r3]
	add	r5, r5, r4, lsl #2
	mov	r0, r5
	bl	cvmx_spinlock_lock
	mov	r0, r4
	bl	CVMX_AGL_GMX_PRTX_CFG
	bl	cvmx_read_csr
	mov	r1, r0
	mov	r0, r4
	mov	r4, r1
	bl	CVMX_AGL_GMX_PRTX_CFG
	mov	r1, r4
	bl	cvmx_write_csr
	mov	r0, r5
	bl	cvmx_spinlock_unlock
	ldr	r3, .L8+8
	ldr	r0, [r3]
	pop	{r4, r5, r6, pc}
.L9:
	.align	2
.L8:
	.word	CVMX_MGMT_PORT_INVALID_PARAM
	.word	cvmx_mgmt_port_state_ptr
	.word	CVMX_MGMT_PORT_SUCCESS
	.size	cvmx_mgmt_port_disable, .-cvmx_mgmt_port_disable
	.comm	cvmx_mgmt_port_state_ptr,4,4
	.comm	CVMX_MGMT_PORT_SUCCESS,4,4
	.comm	CVMX_MGMT_PORT_INVALID_PARAM,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
