	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nfp_eth_port_translate
_nfp_eth_port_translate:                ## @nfp_eth_port_translate
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movl	%edx, %r12d
	movq	%rsi, %rbx
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r13
	movl	(%rsi), %edi
	callq	_le64_to_cpu
	movl	%eax, %r15d
	movl	(%rbx), %edi
	callq	_le64_to_cpu
	movl	%eax, %ebx
	movq	_NSP_ETH_PORT_INDEX@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r15d, %esi
	callq	_FIELD_GET
	movl	%eax, (%r14)
	movl	%r12d, 4(%r14)
	movq	_NSP_ETH_NBI_PORT_COUNT@GOTPCREL(%rip), %rcx
	movl	%r12d, %eax
	xorl	%edx, %edx
	divl	(%rcx)
	movl	%eax, 8(%r14)
	movl	%edx, 12(%r14)
	movq	_NSP_ETH_PORT_LANES@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r15d, %esi
	callq	_FIELD_GET
	movl	%eax, 16(%r14)
	movq	_NSP_ETH_STATE_ENABLED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%ebx, %esi
	callq	_FIELD_GET
	movl	%eax, 20(%r14)
	movq	_NSP_ETH_STATE_TX_ENABLED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%ebx, %esi
	callq	_FIELD_GET
	movl	%eax, 24(%r14)
	movq	_NSP_ETH_STATE_RX_ENABLED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%ebx, %esi
	callq	_FIELD_GET
	movl	%eax, 28(%r14)
	movq	_NSP_ETH_STATE_RATE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%ebx, %esi
	callq	_FIELD_GET
	movl	%eax, %edi
	callq	_nfp_eth_rate2speed
	imull	16(%r14), %eax
	movl	%eax, 32(%r14)
	movq	_NSP_ETH_STATE_INTERFACE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%ebx, %esi
	callq	_FIELD_GET
	movl	%eax, 36(%r14)
	movq	_NSP_ETH_STATE_MEDIA@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%ebx, %esi
	callq	_FIELD_GET
	movl	%eax, 40(%r14)
	movl	68(%r14), %edi
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %esi
	callq	_nfp_eth_copy_mac_reverse
	movq	_NSP_ETH_PORT_PHYLABEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r15d, %esi
	callq	_FIELD_GET
	movl	%eax, 44(%r14)
	movq	_NSP_ETH_PORT_LABEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r15d, %esi
	callq	_FIELD_GET
	movl	%eax, 48(%r14)
	movq	%r13, %rdi
	callq	_nfp_nsp_get_abi_ver_minor
	cmpl	$17, %eax
	jl	LBB0_5
## %bb.1:
	movq	_NSP_ETH_STATE_OVRD_CHNG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%ebx, %esi
	callq	_FIELD_GET
	movl	%eax, 52(%r14)
	movq	_NSP_ETH_STATE_ANEG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%ebx, %esi
	callq	_FIELD_GET
	movl	%eax, 56(%r14)
	movq	%r13, %rdi
	callq	_nfp_nsp_get_abi_ver_minor
	cmpl	$22, %eax
	jl	LBB0_5
## %bb.2:
	movq	_NSP_ETH_PORT_FEC_SUPP_BASER@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r15d, %esi
	callq	_FIELD_GET
	movq	_NFP_FEC_BASER_BIT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	orl	%eax, 60(%r14)
	movq	_NSP_ETH_PORT_FEC_SUPP_RS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r15d, %esi
	callq	_FIELD_GET
	movq	_NFP_FEC_REED_SOLOMON_BIT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	orl	60(%r14), %eax
	movl	%eax, 60(%r14)
	je	LBB0_4
## %bb.3:
	movq	_NFP_FEC_AUTO@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_NFP_FEC_DISABLED@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, 60(%r14)
LBB0_4:
	movq	_NSP_ETH_STATE_FEC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%ebx, %esi
	callq	_FIELD_GET
	movl	$1, %edx
	movl	%eax, %ecx
	shll	%cl, %edx
	movl	%edx, 64(%r14)
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NSP_ETH_PORT_INDEX,4,2         ## @NSP_ETH_PORT_INDEX
	.comm	_NSP_ETH_NBI_PORT_COUNT,4,2     ## @NSP_ETH_NBI_PORT_COUNT
	.comm	_NSP_ETH_PORT_LANES,4,2         ## @NSP_ETH_PORT_LANES
	.comm	_NSP_ETH_STATE_ENABLED,4,2      ## @NSP_ETH_STATE_ENABLED
	.comm	_NSP_ETH_STATE_TX_ENABLED,4,2   ## @NSP_ETH_STATE_TX_ENABLED
	.comm	_NSP_ETH_STATE_RX_ENABLED,4,2   ## @NSP_ETH_STATE_RX_ENABLED
	.comm	_NSP_ETH_STATE_RATE,4,2         ## @NSP_ETH_STATE_RATE
	.comm	_NSP_ETH_STATE_INTERFACE,4,2    ## @NSP_ETH_STATE_INTERFACE
	.comm	_NSP_ETH_STATE_MEDIA,4,2        ## @NSP_ETH_STATE_MEDIA
	.comm	_NSP_ETH_PORT_PHYLABEL,4,2      ## @NSP_ETH_PORT_PHYLABEL
	.comm	_NSP_ETH_PORT_LABEL,4,2         ## @NSP_ETH_PORT_LABEL
	.comm	_NSP_ETH_STATE_OVRD_CHNG,4,2    ## @NSP_ETH_STATE_OVRD_CHNG
	.comm	_NSP_ETH_STATE_ANEG,4,2         ## @NSP_ETH_STATE_ANEG
	.comm	_NSP_ETH_PORT_FEC_SUPP_BASER,4,2 ## @NSP_ETH_PORT_FEC_SUPP_BASER
	.comm	_NFP_FEC_BASER_BIT,4,2          ## @NFP_FEC_BASER_BIT
	.comm	_NSP_ETH_PORT_FEC_SUPP_RS,4,2   ## @NSP_ETH_PORT_FEC_SUPP_RS
	.comm	_NFP_FEC_REED_SOLOMON_BIT,4,2   ## @NFP_FEC_REED_SOLOMON_BIT
	.comm	_NFP_FEC_AUTO,4,2               ## @NFP_FEC_AUTO
	.comm	_NFP_FEC_DISABLED,4,2           ## @NFP_FEC_DISABLED
	.comm	_NSP_ETH_STATE_FEC,4,2          ## @NSP_ETH_STATE_FEC
	.no_dead_strip	_nfp_eth_port_translate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nfp_eth_port_translate
_nfp_eth_port_translate:                ; @nfp_eth_port_translate
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x3
	mov	x24, x2
	mov	x23, x1
	mov	x22, x0
	ldr	w0, [x1]
	bl	_le64_to_cpu
	mov	x21, x0
	ldr	w0, [x23]
	bl	_le64_to_cpu
	mov	x20, x0
Lloh0:
	adrp	x8, _NSP_ETH_PORT_INDEX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NSP_ETH_PORT_INDEX@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	mov	x1, x21
	bl	_FIELD_GET
	stp	w0, w24, [x19]
Lloh3:
	adrp	x8, _NSP_ETH_NBI_PORT_COUNT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NSP_ETH_NBI_PORT_COUNT@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	udiv	w9, w24, w8
	msub	w8, w9, w8, w24
	stp	w9, w8, [x19, #8]
Lloh6:
	adrp	x8, _NSP_ETH_PORT_LANES@GOTPAGE
Lloh7:
	ldr	x8, [x8, _NSP_ETH_PORT_LANES@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	mov	x1, x21
	bl	_FIELD_GET
	str	w0, [x19, #16]
Lloh9:
	adrp	x8, _NSP_ETH_STATE_ENABLED@GOTPAGE
Lloh10:
	ldr	x8, [x8, _NSP_ETH_STATE_ENABLED@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_FIELD_GET
	str	w0, [x19, #20]
Lloh12:
	adrp	x8, _NSP_ETH_STATE_TX_ENABLED@GOTPAGE
Lloh13:
	ldr	x8, [x8, _NSP_ETH_STATE_TX_ENABLED@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_FIELD_GET
	str	w0, [x19, #24]
Lloh15:
	adrp	x8, _NSP_ETH_STATE_RX_ENABLED@GOTPAGE
Lloh16:
	ldr	x8, [x8, _NSP_ETH_STATE_RX_ENABLED@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_FIELD_GET
	str	w0, [x19, #28]
Lloh18:
	adrp	x8, _NSP_ETH_STATE_RATE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _NSP_ETH_STATE_RATE@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_FIELD_GET
	bl	_nfp_eth_rate2speed
	ldr	w8, [x19, #16]
	mul	w8, w8, w0
	str	w8, [x19, #32]
Lloh21:
	adrp	x8, _NSP_ETH_STATE_INTERFACE@GOTPAGE
Lloh22:
	ldr	x8, [x8, _NSP_ETH_STATE_INTERFACE@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_FIELD_GET
	str	w0, [x19, #36]
Lloh24:
	adrp	x8, _NSP_ETH_STATE_MEDIA@GOTPAGE
Lloh25:
	ldr	x8, [x8, _NSP_ETH_STATE_MEDIA@GOTPAGEOFF]
Lloh26:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_FIELD_GET
	str	w0, [x19, #40]
	ldr	w0, [x19, #68]
	ldr	w1, [x23]
	bl	_nfp_eth_copy_mac_reverse
Lloh27:
	adrp	x8, _NSP_ETH_PORT_PHYLABEL@GOTPAGE
Lloh28:
	ldr	x8, [x8, _NSP_ETH_PORT_PHYLABEL@GOTPAGEOFF]
Lloh29:
	ldr	w0, [x8]
	mov	x1, x21
	bl	_FIELD_GET
	str	w0, [x19, #44]
Lloh30:
	adrp	x8, _NSP_ETH_PORT_LABEL@GOTPAGE
Lloh31:
	ldr	x8, [x8, _NSP_ETH_PORT_LABEL@GOTPAGEOFF]
Lloh32:
	ldr	w0, [x8]
	mov	x1, x21
	bl	_FIELD_GET
	str	w0, [x19, #48]
	mov	x0, x22
	bl	_nfp_nsp_get_abi_ver_minor
	cmp	w0, #17
	b.lt	LBB0_5
; %bb.1:
Lloh33:
	adrp	x8, _NSP_ETH_STATE_OVRD_CHNG@GOTPAGE
Lloh34:
	ldr	x8, [x8, _NSP_ETH_STATE_OVRD_CHNG@GOTPAGEOFF]
Lloh35:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_FIELD_GET
	str	w0, [x19, #52]
Lloh36:
	adrp	x8, _NSP_ETH_STATE_ANEG@GOTPAGE
Lloh37:
	ldr	x8, [x8, _NSP_ETH_STATE_ANEG@GOTPAGEOFF]
Lloh38:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_FIELD_GET
	str	w0, [x19, #56]
	mov	x0, x22
	bl	_nfp_nsp_get_abi_ver_minor
	cmp	w0, #22
	b.lt	LBB0_5
; %bb.2:
Lloh39:
	adrp	x8, _NSP_ETH_PORT_FEC_SUPP_BASER@GOTPAGE
Lloh40:
	ldr	x8, [x8, _NSP_ETH_PORT_FEC_SUPP_BASER@GOTPAGEOFF]
Lloh41:
	ldr	w0, [x8]
	mov	x1, x21
	bl	_FIELD_GET
Lloh42:
	adrp	x8, _NFP_FEC_BASER_BIT@GOTPAGE
Lloh43:
	ldr	x8, [x8, _NFP_FEC_BASER_BIT@GOTPAGEOFF]
Lloh44:
	ldr	w8, [x8]
	lsl	w8, w0, w8
	ldr	w9, [x19, #60]
	orr	w8, w9, w8
	str	w8, [x19, #60]
Lloh45:
	adrp	x8, _NSP_ETH_PORT_FEC_SUPP_RS@GOTPAGE
Lloh46:
	ldr	x8, [x8, _NSP_ETH_PORT_FEC_SUPP_RS@GOTPAGEOFF]
Lloh47:
	ldr	w0, [x8]
	mov	x1, x21
	bl	_FIELD_GET
Lloh48:
	adrp	x8, _NFP_FEC_REED_SOLOMON_BIT@GOTPAGE
Lloh49:
	ldr	x8, [x8, _NFP_FEC_REED_SOLOMON_BIT@GOTPAGEOFF]
Lloh50:
	ldr	w8, [x8]
	lsl	w8, w0, w8
	ldr	w9, [x19, #60]
	orr	w8, w9, w8
	str	w8, [x19, #60]
	cbz	w8, LBB0_4
; %bb.3:
Lloh51:
	adrp	x9, _NFP_FEC_AUTO@GOTPAGE
Lloh52:
	ldr	x9, [x9, _NFP_FEC_AUTO@GOTPAGEOFF]
Lloh53:
	ldr	w9, [x9]
Lloh54:
	adrp	x10, _NFP_FEC_DISABLED@GOTPAGE
Lloh55:
	ldr	x10, [x10, _NFP_FEC_DISABLED@GOTPAGEOFF]
Lloh56:
	ldr	w10, [x10]
	orr	w8, w9, w8
	orr	w8, w8, w10
	str	w8, [x19, #60]
LBB0_4:
Lloh57:
	adrp	x8, _NSP_ETH_STATE_FEC@GOTPAGE
Lloh58:
	ldr	x8, [x8, _NSP_ETH_STATE_FEC@GOTPAGEOFF]
Lloh59:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_FIELD_GET
	mov	w8, #1
	lsl	w8, w8, w0
	str	w8, [x19, #64]
LBB0_5:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh54, Lloh55, Lloh56
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh57, Lloh58, Lloh59
	.cfi_endproc
                                        ; -- End function
	.comm	_NSP_ETH_PORT_INDEX,4,2         ; @NSP_ETH_PORT_INDEX
	.comm	_NSP_ETH_NBI_PORT_COUNT,4,2     ; @NSP_ETH_NBI_PORT_COUNT
	.comm	_NSP_ETH_PORT_LANES,4,2         ; @NSP_ETH_PORT_LANES
	.comm	_NSP_ETH_STATE_ENABLED,4,2      ; @NSP_ETH_STATE_ENABLED
	.comm	_NSP_ETH_STATE_TX_ENABLED,4,2   ; @NSP_ETH_STATE_TX_ENABLED
	.comm	_NSP_ETH_STATE_RX_ENABLED,4,2   ; @NSP_ETH_STATE_RX_ENABLED
	.comm	_NSP_ETH_STATE_RATE,4,2         ; @NSP_ETH_STATE_RATE
	.comm	_NSP_ETH_STATE_INTERFACE,4,2    ; @NSP_ETH_STATE_INTERFACE
	.comm	_NSP_ETH_STATE_MEDIA,4,2        ; @NSP_ETH_STATE_MEDIA
	.comm	_NSP_ETH_PORT_PHYLABEL,4,2      ; @NSP_ETH_PORT_PHYLABEL
	.comm	_NSP_ETH_PORT_LABEL,4,2         ; @NSP_ETH_PORT_LABEL
	.comm	_NSP_ETH_STATE_OVRD_CHNG,4,2    ; @NSP_ETH_STATE_OVRD_CHNG
	.comm	_NSP_ETH_STATE_ANEG,4,2         ; @NSP_ETH_STATE_ANEG
	.comm	_NSP_ETH_PORT_FEC_SUPP_BASER,4,2 ; @NSP_ETH_PORT_FEC_SUPP_BASER
	.comm	_NFP_FEC_BASER_BIT,4,2          ; @NFP_FEC_BASER_BIT
	.comm	_NSP_ETH_PORT_FEC_SUPP_RS,4,2   ; @NSP_ETH_PORT_FEC_SUPP_RS
	.comm	_NFP_FEC_REED_SOLOMON_BIT,4,2   ; @NFP_FEC_REED_SOLOMON_BIT
	.comm	_NFP_FEC_AUTO,4,2               ; @NFP_FEC_AUTO
	.comm	_NFP_FEC_DISABLED,4,2           ; @NFP_FEC_DISABLED
	.comm	_NSP_ETH_STATE_FEC,4,2          ; @NSP_ETH_STATE_FEC
	.no_dead_strip	_nfp_eth_port_translate
.subsections_via_symbols
