	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function __nfp_eth_read_ports
LCPI0_0:
	.long	2                               ## 0x2
	.long	2                               ## 0x2
	.long	2                               ## 0x2
	.long	2                               ## 0x2
	.section	__TEXT,__text,regular,pure_instructions
	.globl	___nfp_eth_read_ports
	.p2align	4, 0x90
___nfp_eth_read_ports:                  ## @__nfp_eth_read_ports
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	_NSP_ETH_TABLE_SIZE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r13
	movl	(%rbx), %edx
	movq	%r15, %rdi
	movq	%rax, %rsi
	callq	_nfp_nsp_read_eth_table
	testl	%eax, %eax
	js	LBB0_30
## %bb.3:
	movq	_NSP_ETH_MAX_COUNT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, %ecx
	jle	LBB0_4
## %bb.5:
	movq	_NSP_ETH_PORT_LANES_MASK@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	cmpl	$8, %ecx
	jae	LBB0_7
## %bb.6:
	xorl	%esi, %esi
	xorl	%ebx, %ebx
	jmp	LBB0_14
LBB0_1:
	xorl	%r12d, %r12d
	jmp	LBB0_29
LBB0_30:
	leaq	L_.str(%rip), %rsi
	xorl	%r12d, %r12d
	movq	%r14, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_nfp_err
	jmp	LBB0_28
LBB0_4:
	xorl	%ebx, %ebx
	jmp	LBB0_15
LBB0_7:
	movl	%ecx, %esi
	andl	$-8, %esi
	movd	%edx, %xmm0
	pshufd	$0, %xmm0, %xmm0                ## xmm0 = xmm0[0,0,0,0]
	leaq	-8(%rsi), %rdi
	movq	%rdi, %r8
	shrq	$3, %r8
	incq	%r8
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.9:
	movq	%r8, %rdi
	andq	$-2, %rdi
	pxor	%xmm3, %xmm3
	xorl	%ebx, %ebx
	movdqa	LCPI0_0(%rip), %xmm8            ## xmm8 = [2,2,2,2]
	pxor	%xmm6, %xmm6
	pxor	%xmm5, %xmm5
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movdqu	(%r13,%rbx,4), %xmm7
	movdqu	16(%r13,%rbx,4), %xmm4
	movdqu	32(%r13,%rbx,4), %xmm1
	movdqu	48(%r13,%rbx,4), %xmm2
	pand	%xmm0, %xmm7
	pand	%xmm0, %xmm4
	pcmpeqd	%xmm3, %xmm7
	paddd	%xmm6, %xmm7
	pcmpeqd	%xmm3, %xmm4
	paddd	%xmm5, %xmm4
	pand	%xmm0, %xmm1
	pcmpeqd	%xmm3, %xmm1
	pand	%xmm0, %xmm2
	pcmpeqd	%xmm3, %xmm2
	paddd	%xmm8, %xmm1
	paddd	%xmm7, %xmm1
	paddd	%xmm8, %xmm2
	paddd	%xmm4, %xmm2
	addq	$16, %rbx
	movdqa	%xmm1, %xmm6
	movdqa	%xmm2, %xmm5
	addq	$-2, %rdi
	jne	LBB0_10
## %bb.11:
	testb	$1, %r8b
	je	LBB0_13
LBB0_12:
	movdqu	(%r13,%rbx,4), %xmm3
	movdqu	16(%r13,%rbx,4), %xmm4
	pand	%xmm0, %xmm3
	pand	%xmm0, %xmm4
	pxor	%xmm0, %xmm0
	pcmpeqd	%xmm0, %xmm3
	paddd	%xmm3, %xmm1
	pcmpeqd	%xmm0, %xmm4
	paddd	%xmm4, %xmm2
	pcmpeqd	%xmm0, %xmm0
	psubd	%xmm0, %xmm1
	psubd	%xmm0, %xmm2
LBB0_13:
	paddd	%xmm2, %xmm1
	pshufd	$238, %xmm1, %xmm0              ## xmm0 = xmm1[2,3,2,3]
	paddd	%xmm1, %xmm0
	pshufd	$85, %xmm0, %xmm1               ## xmm1 = xmm0[1,1,1,1]
	paddd	%xmm0, %xmm1
	movd	%xmm1, %ebx
	cmpq	%rcx, %rsi
	je	LBB0_15
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r13,%rsi,4), %edi
	andl	%edx, %edi
	cmpl	$1, %edi
	sbbl	$-1, %ebx
	incq	%rsi
	cmpq	%rsi, %rcx
	jne	LBB0_14
LBB0_15:
	testl	%eax, %eax
	je	LBB0_18
## %bb.16:
	cmpl	%ebx, %eax
	je	LBB0_18
## %bb.17:
	leaq	L_.str.1(%rip), %rsi
	xorl	%r12d, %r12d
	movq	%r14, %rdi
	movl	%eax, %edx
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	_nfp_err
	jmp	LBB0_28
LBB0_18:
	movq	_ports@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edx
	callq	_struct_size
	movl	(%r12), %esi
	movl	%eax, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_19
## %bb.20:
	movq	%rax, %r12
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movl	%ebx, (%rax)
	movq	_NSP_ETH_MAX_COUNT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_25
## %bb.21:
	xorl	%r15d, %r15d
	xorl	%ebx, %ebx
	xorl	%r14d, %r14d
	jmp	LBB0_22
	.p2align	4, 0x90
LBB0_24:                                ##   in Loop: Header=BB0_22 Depth=1
	incq	%rbx
	movslq	%eax, %rcx
	addq	$4, %r15
	cmpq	%rcx, %rbx
	jge	LBB0_25
LBB0_22:                                ## =>This Inner Loop Header: Depth=1
	movq	_NSP_ETH_PORT_LANES_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%r13,%rbx,4)
	je	LBB0_24
## %bb.23:                              ##   in Loop: Header=BB0_22 Depth=1
	leaq	(%r15,%r13), %rsi
	movslq	%r14d, %rcx
	incl	%r14d
	shlq	$2, %rcx
	addq	8(%r12), %rcx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%ebx, %edx
	callq	_nfp_eth_port_translate
	movq	_NSP_ETH_MAX_COUNT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_24
LBB0_25:
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_nfp_eth_calc_port_geometry
	cmpl	$0, (%r12)
	jle	LBB0_28
## %bb.26:
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_27:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rsi
	addq	%r14, %rsi
	movq	%r15, %rdi
	callq	_nfp_eth_calc_port_type
	incq	%rbx
	movslq	(%r12), %rax
	addq	$4, %r14
	cmpq	%rax, %rbx
	jl	LBB0_27
	jmp	LBB0_28
LBB0_19:
	xorl	%r12d, %r12d
LBB0_28:
	movq	%r13, %rdi
	callq	_kfree
LBB0_29:
	movq	%r12, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	pxor	%xmm1, %xmm1
	xorl	%ebx, %ebx
	pxor	%xmm2, %xmm2
	testb	$1, %r8b
	jne	LBB0_12
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_NSP_ETH_TABLE_SIZE,4,2         ## @NSP_ETH_TABLE_SIZE
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"reading port table failed %d\n"

	.comm	_NSP_ETH_MAX_COUNT,4,2          ## @NSP_ETH_MAX_COUNT
	.comm	_NSP_ETH_PORT_LANES_MASK,4,2    ## @NSP_ETH_PORT_LANES_MASK
L_.str.1:                               ## @.str.1
	.asciz	"table entry count reported (%d) does not match entries present (%d)\n"

	.comm	_ports,4,2                      ## @ports
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___nfp_eth_read_ports           ; -- Begin function __nfp_eth_read_ports
	.p2align	2
___nfp_eth_read_ports:                  ; @__nfp_eth_read_ports
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x1
	mov	x20, x0
Lloh0:
	adrp	x23, _NSP_ETH_TABLE_SIZE@GOTPAGE
Lloh1:
	ldr	x23, [x23, _NSP_ETH_TABLE_SIZE@GOTPAGEOFF]
	ldr	w0, [x23]
Lloh2:
	adrp	x22, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x22, [x22, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x22]
	bl	_kzalloc
	cbz	x0, LBB0_5
; %bb.1:
	mov	x19, x0
	ldr	w2, [x23]
	mov	x0, x21
	mov	x1, x19
	bl	_nfp_nsp_read_eth_table
	mov	x2, x0
	tbnz	w0, #31, LBB0_6
; %bb.2:
Lloh4:
	adrp	x24, _NSP_ETH_MAX_COUNT@GOTPAGE
Lloh5:
	ldr	x24, [x24, _NSP_ETH_MAX_COUNT@GOTPAGEOFF]
	ldr	w9, [x24]
	cmp	w9, #1
	b.lt	LBB0_7
; %bb.3:
Lloh6:
	adrp	x8, _NSP_ETH_PORT_LANES_MASK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _NSP_ETH_PORT_LANES_MASK@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w9, #16
	b.hs	LBB0_8
; %bb.4:
	mov	x10, #0
	mov	w23, #0
	b	LBB0_11
LBB0_5:
	mov	x22, #0
	b	LBB0_18
LBB0_6:
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_16
LBB0_7:
	mov	w23, #0
	b	LBB0_13
LBB0_8:
	and	x10, x9, #0xfffffff0
	dup.4s	v0, w8
	add	x11, x19, #32
	movi.2d	v1, #0000000000000000
	mov	x12, x10
	movi.2d	v2, #0000000000000000
	movi.2d	v3, #0000000000000000
	movi.2d	v4, #0000000000000000
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldp	q5, q6, [x11, #-32]
	ldp	q7, q16, [x11], #64
	cmtst.4s	v5, v0, v5
	cmtst.4s	v6, v0, v6
	cmtst.4s	v7, v0, v7
	cmtst.4s	v16, v0, v16
	sub.4s	v1, v1, v5
	sub.4s	v2, v2, v6
	sub.4s	v3, v3, v7
	sub.4s	v4, v4, v16
	subs	x12, x12, #16
	b.ne	LBB0_9
; %bb.10:
	add.4s	v0, v2, v1
	add.4s	v0, v3, v0
	add.4s	v0, v4, v0
	addv.4s	s0, v0
	fmov	w23, s0
	cmp	x10, x9
	b.eq	LBB0_13
LBB0_11:
	add	x11, x19, x10, lsl #2
	sub	x9, x9, x10
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	w10, [x11], #4
	tst	w8, w10
	cinc	w23, w23, ne
	subs	x9, x9, #1
	b.ne	LBB0_12
LBB0_13:
	cbz	w2, LBB0_19
; %bb.14:
	cmp	w2, w23
	b.eq	LBB0_19
; %bb.15:
	str	x23, [sp]
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_16:
	mov	x0, x20
	bl	_nfp_err
	mov	x22, #0
LBB0_17:
	mov	x0, x19
	bl	_kfree
LBB0_18:
	mov	x0, x22
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_19:
Lloh13:
	adrp	x8, _ports@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ports@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	mov	x2, x23
	bl	_struct_size
	ldr	w1, [x22]
	bl	_kzalloc
	mov	x22, x0
	cbz	x0, LBB0_17
; %bb.20:
	str	w23, [x22]
	ldr	w8, [x24]
	cmp	w8, #1
	b.lt	LBB0_25
; %bb.21:
	mov	x25, #0
	mov	x23, #0
	mov	w9, #0
Lloh16:
	adrp	x26, _NSP_ETH_PORT_LANES_MASK@GOTPAGE
Lloh17:
	ldr	x26, [x26, _NSP_ETH_PORT_LANES_MASK@GOTPAGEOFF]
	b	LBB0_23
LBB0_22:                                ;   in Loop: Header=BB0_23 Depth=1
	add	x23, x23, #1
	add	x25, x25, #4
	cmp	x23, w8, sxtw
	b.ge	LBB0_25
LBB0_23:                                ; =>This Inner Loop Header: Depth=1
	ldr	w10, [x19, x23, lsl #2]
	ldr	w11, [x26]
	tst	w11, w10
	b.eq	LBB0_22
; %bb.24:                               ;   in Loop: Header=BB0_23 Depth=1
	add	x1, x19, x25
	ldr	x8, [x22, #8]
	add	w27, w9, #1
	add	x3, x8, w9, sxtw #2
	mov	x0, x21
	mov	x2, x23
	bl	_nfp_eth_port_translate
	ldr	w8, [x24]
	mov	x9, x27
	b	LBB0_22
LBB0_25:
	mov	x0, x20
	mov	x1, x22
	bl	_nfp_eth_calc_port_geometry
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_17
; %bb.26:
	mov	x21, #0
	mov	x23, #0
LBB0_27:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22, #8]
	add	x1, x8, x21
	mov	x0, x20
	bl	_nfp_eth_calc_port_type
	add	x23, x23, #1
	ldrsw	x8, [x22]
	add	x21, x21, #4
	cmp	x23, x8
	b.lt	LBB0_27
	b	LBB0_17
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_NSP_ETH_TABLE_SIZE,4,2         ; @NSP_ETH_TABLE_SIZE
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"reading port table failed %d\n"

	.comm	_NSP_ETH_MAX_COUNT,4,2          ; @NSP_ETH_MAX_COUNT
	.comm	_NSP_ETH_PORT_LANES_MASK,4,2    ; @NSP_ETH_PORT_LANES_MASK
l_.str.1:                               ; @.str.1
	.asciz	"table entry count reported (%d) does not match entries present (%d)\n"

	.comm	_ports,4,2                      ; @ports
.subsections_via_symbols
