	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rtl_get_ports
_rtl_get_ports:                         ## @rtl_get_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movl	16(%rsi), %edi
	movq	_PORTMASK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_RTL_VLAN_REG
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_rtl_get
	movl	%eax, %r15d
	movq	_RTL8306_NUM_PORTS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	je	LBB0_8
## %bb.1:
	xorl	%ebx, %ebx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_SWITCH_PORT_FLAG_TAGGED@GOTPCREL(%rip), %rax
	movzbl	(%rax), %ecx
	movl	$1, %eax
	shll	%cl, %eax
	movl	%eax, 4(%r14,%r13,8)
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	(%r12)
	movq	_RTL8306_NUM_PORTS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	incl	%ebx
	cmpl	%eax, %ebx
	jae	LBB0_8
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	btl	%ebx, %r15d
	jae	LBB0_7
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r12), %r13
	movq	8(%r12), %r14
	movl	%ebx, (%r14,%r13,8)
	movq	_TAG_INSERT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_RTL_PORT_REG
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %esi
	callq	_rtl_get
	cmpl	$2, %eax
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	cmpl	(%rax), %ebx
	je	LBB0_5
	jmp	LBB0_6
LBB0_8:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PORTMASK,4,2                   ## @PORTMASK
	.comm	_RTL8306_NUM_PORTS,4,2          ## @RTL8306_NUM_PORTS
	.comm	_TAG_INSERT,4,2                 ## @TAG_INSERT
	.comm	_SWITCH_PORT_FLAG_TAGGED,4,2    ## @SWITCH_PORT_FLAG_TAGGED
	.no_dead_strip	_rtl_get_ports
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rtl_get_ports
_rtl_get_ports:                         ; @rtl_get_ports
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x19, x1
	mov	x20, x0
	ldr	w0, [x1, #16]
Lloh0:
	adrp	x8, _PORTMASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PORTMASK@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_RTL_VLAN_REG
	mov	x1, x0
	mov	x0, x20
	bl	_rtl_get
Lloh3:
	adrp	x23, _RTL8306_NUM_PORTS@GOTPAGE
Lloh4:
	ldr	x23, [x23, _RTL8306_NUM_PORTS@GOTPAGEOFF]
	ldr	w8, [x23]
	cbz	w8, LBB0_8
; %bb.1:
	mov	x21, x0
	mov	w22, #0
Lloh5:
	adrp	x24, _TAG_INSERT@GOTPAGE
Lloh6:
	ldr	x24, [x24, _TAG_INSERT@GOTPAGEOFF]
Lloh7:
	adrp	x25, _SWITCH_PORT_FLAG_TAGGED@GOTPAGE
Lloh8:
	ldr	x25, [x25, _SWITCH_PORT_FLAG_TAGGED@GOTPAGEOFF]
	mov	w26, #1
	b	LBB0_5
LBB0_2:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x25]
	lsl	w8, w26, w8
	add	x9, x27, x28, lsl #3
	str	w8, [x9, #4]
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x19]
	add	x8, x8, #1
	str	x8, [x19]
	ldr	w8, [x23]
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	w22, w22, #1
	cmp	w22, w8
	b.hs	LBB0_8
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	lsr	w9, w21, w22
	tbz	w9, #0, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldp	x28, x27, [x19]
	lsl	x8, x28, #3
	str	w22, [x27, x8]
	ldr	w1, [x24]
	mov	x0, x22
	bl	_RTL_PORT_REG
	mov	x1, x0
	mov	x0, x20
	bl	_rtl_get
	cmp	w0, #2
	b.eq	LBB0_2
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x20]
	cmp	w22, w8
	b.eq	LBB0_2
	b	LBB0_3
LBB0_8:
	mov	w0, #0
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_PORTMASK,4,2                   ; @PORTMASK
	.comm	_RTL8306_NUM_PORTS,4,2          ; @RTL8306_NUM_PORTS
	.comm	_TAG_INSERT,4,2                 ; @TAG_INSERT
	.comm	_SWITCH_PORT_FLAG_TAGGED,4,2    ; @SWITCH_PORT_FLAG_TAGGED
	.no_dead_strip	_rtl_get_ports
.subsections_via_symbols
