	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ar7240_get_ports
_ar7240_get_ports:                      ## @ar7240_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	callq	_sw_to_ar7240
	movq	(%rax), %rcx
	movq	(%r14), %rdx
	movl	(%rcx,%rdx,4), %r8d
	movq	$0, 8(%r14)
	movl	12(%rax), %r10d
	testl	%r10d, %r10d
	jle	LBB0_5
## %bb.1:
	xorl	%r11d, %r11d
	movq	_SWITCH_PORT_FLAG_TAGGED@GOTPCREL(%rip), %r9
	xorl	%edx, %edx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	incl	%edx
	cmpl	%edx, %r10d
	je	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	$1, %edi
	movl	%edx, %ecx
	shll	%cl, %edi
	btl	%edx, %r8d
	jae	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	16(%r14), %r15
	leaq	1(%r11), %rsi
	movq	%rsi, 8(%r14)
	movl	%edx, (%r15,%r11,8)
	andl	8(%rax), %edi
	movzbl	(%r9), %ecx
	movl	$1, %ebx
	shll	%cl, %ebx
	testl	%edi, %edi
	cmovel	%edi, %ebx
	movl	%ebx, 4(%r15,%r11,8)
	movq	%rsi, %r11
	jmp	LBB0_4
LBB0_5:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SWITCH_PORT_FLAG_TAGGED,4,2    ## @SWITCH_PORT_FLAG_TAGGED
	.no_dead_strip	_ar7240_get_ports
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ar7240_get_ports
_ar7240_get_ports:                      ; @ar7240_get_ports
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	bl	_sw_to_ar7240
	ldr	x8, [x0]
	ldr	x9, [x19]
	ldr	w8, [x8, x9, lsl #2]
	str	xzr, [x19, #8]
	ldr	w9, [x0, #12]
	cmp	w9, #1
	b.lt	LBB0_5
; %bb.1:
	mov	x13, #0
	mov	w10, #0
	mov	w11, #1
Lloh0:
	adrp	x12, _SWITCH_PORT_FLAG_TAGGED@GOTPAGE
Lloh1:
	ldr	x12, [x12, _SWITCH_PORT_FLAG_TAGGED@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	w10, w10, #1
	cmp	w9, w10
	b.eq	LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	lsl	w14, w11, w10
	tst	w14, w8
	b.eq	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x15, [x19, #16]
	add	x15, x15, x13, lsl #3
	add	x13, x13, #1
	str	x13, [x19, #8]
	str	w10, [x15]
	ldr	w16, [x0, #8]
	ldr	w17, [x12]
	lsl	w17, w11, w17
	tst	w16, w14
	csel	w14, wzr, w17, eq
	str	w14, [x15, #4]
	b	LBB0_2
LBB0_5:
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_SWITCH_PORT_FLAG_TAGGED,4,2    ; @SWITCH_PORT_FLAG_TAGGED
	.no_dead_strip	_ar7240_get_ports
.subsections_via_symbols
