	.file	"extr_cvmx-helper-util.c_cvmx_helper_get_interface_index_num.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"cvmx_helper_get_interface_index_num: Illegal IPD port number %d\n"
	.align 8
.LC1:
	.string	"cvmx_helper_get_interface_index_num: Illegal IPD port number\n"
	.text
	.p2align 4
	.globl	cvmx_helper_get_interface_index_num
	.type	cvmx_helper_get_interface_index_num, @function
cvmx_helper_get_interface_index_num:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	ebp, edi
	mov	edi, DWORD PTR OCTEON_FEATURE_PKND[rip]
	call	octeon_has_feature@PLT
	test	rax, rax
	je	.L2
	lea	eax, -2048[rbp]
	cmp	eax, 1279
	jbe	.L14
	lea	eax, -1024[rbp]
	cmp	eax, 511
	jbe	.L7
	lea	eax, -256[rbp]
	cmp	eax, 31
	jbe	.L7
	cmp	ebp, 7
	jg	.L15
	mov	eax, ebp
.L1:
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	eax, ebp
	and	eax, 15
	cmp	ebp, 31
	jle	.L1
	mov	eax, ebp
	and	eax, 3
	cmp	ebp, 39
	jle	.L1
	mov	eax, ebp
	and	eax, 1
	cmp	ebp, 45
	jle	.L1
	lea	rdi, .LC1[rip]
	xor	eax, eax
	call	cvmx_dprintf@PLT
	mov	eax, -1
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L14:
	.cfi_restore_state
	mov	edx, ebp
	sar	ebp, 4
	sar	edx, 6
	and	ebp, 15
	and	edx, 3
	lea	eax, -1[rdx]
	test	edx, edx
	cmove	eax, ebp
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L7:
	.cfi_restore_state
	movzx	eax, bpl
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L15:
	.cfi_restore_state
	mov	esi, ebp
	lea	rdi, .LC0[rip]
	xor	eax, eax
	call	cvmx_dprintf@PLT
	mov	eax, -1
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	cvmx_helper_get_interface_index_num, .-cvmx_helper_get_interface_index_num
	.comm	OCTEON_FEATURE_PKND,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_get_interface_index_num.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"cvmx_helper_get_interface_index_num: Illegal IPD po"
	.ascii	"rt number %d\012\000"
	.align	2
.LC1:
	.ascii	"cvmx_helper_get_interface_index_num: Illegal IPD po"
	.ascii	"rt number\012\000"
	.text
	.align	2
	.global	cvmx_helper_get_interface_index_num
	.syntax unified
	.arm
	.fpu softvfp
	.type	cvmx_helper_get_interface_index_num, %function
cvmx_helper_get_interface_index_num:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L19
	push	{r4, lr}
	mov	r4, r0
	ldr	r0, [r3]
	bl	octeon_has_feature
	cmp	r0, #0
	beq	.L2
	sub	r3, r4, #2048
	cmp	r3, #1280
	bcc	.L14
	sub	r3, r4, #1024
	cmp	r3, #512
	bcc	.L7
	sub	r3, r4, #256
	cmp	r3, #31
	bls	.L7
	cmp	r4, #7
	bgt	.L15
	mov	r0, r4
	pop	{r4, pc}
.L2:
	cmp	r4, #31
	ble	.L16
	cmp	r4, #39
	ble	.L17
	cmp	r4, #45
	ble	.L18
	ldr	r0, .L19+4
	bl	cvmx_dprintf
	mvn	r0, #0
	pop	{r4, pc}
.L18:
	and	r0, r4, #1
	pop	{r4, pc}
.L14:
	asr	r0, r4, #6
	ands	r0, r0, #3
	asreq	r4, r4, #4
	subne	r0, r0, #1
	andeq	r0, r4, #15
	pop	{r4, pc}
.L7:
	and	r0, r4, #255
	pop	{r4, pc}
.L16:
	and	r0, r4, #15
	pop	{r4, pc}
.L17:
	and	r0, r4, #3
	pop	{r4, pc}
.L15:
	mov	r1, r4
	ldr	r0, .L19+8
	bl	cvmx_dprintf
	mvn	r0, #0
	pop	{r4, pc}
.L20:
	.align	2
.L19:
	.word	OCTEON_FEATURE_PKND
	.word	.LC1
	.word	.LC0
	.size	cvmx_helper_get_interface_index_num, .-cvmx_helper_get_interface_index_num
	.comm	OCTEON_FEATURE_PKND,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
