	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ar8xxx_check_link_states
_ar8xxx_check_link_states:              ## @ar8xxx_check_link_states
	.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	%rdi, %r15
	addq	$8, %rdi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_mutex_lock
	cmpl	$0, 32(%r15)
	jle	LBB0_1
## %bb.2:
	xorl	%ebx, %ebx
	movq	_AR8216_PORT_STATUS_LINK_UP@GOTPCREL(%rip), %r14
	leaq	L_.str(%rip), %r12
	xorl	%r13d, %r13d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	16(%r15), %rdi
	movq	%r12, %rsi
	movl	%ebx, %edx
	callq	_dev_info
	movl	$1, %r13d
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%rbx
	movslq	32(%r15), %rax
	cmpq	%rax, %rbx
	jge	LBB0_8
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	24(%r15), %rax
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	*(%rax)
	xorl	%ecx, %ecx
	andl	(%r14), %eax
	setne	%cl
	movq	(%r15), %rdx
	cmpl	%ecx, (%rdx,%rbx,4)
	je	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%ecx, (%rdx,%rbx,4)
	leaq	L_.str.1(%rip), %rcx
	testl	%eax, %eax
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	24(%r15), %rax
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	*8(%rax)
	leaq	L_.str.2(%rip), %rcx
	jmp	LBB0_6
LBB0_1:
	xorl	%r13d, %r13d
LBB0_8:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AR8216_PORT_STATUS_LINK_UP,4,2 ## @AR8216_PORT_STATUS_LINK_UP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Port %d is %s\n"

L_.str.1:                               ## @.str.1
	.asciz	"up"

L_.str.2:                               ## @.str.2
	.asciz	"down"

	.no_dead_strip	_ar8xxx_check_link_states
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ar8xxx_check_link_states
_ar8xxx_check_link_states:              ; @ar8xxx_check_link_states
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x20, x0
	add	x19, x0, #8
	mov	x0, x19
	bl	_mutex_lock
	ldr	w8, [x20, #32]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.1:
	mov	x21, #0
	mov	w23, #0
Lloh0:
	adrp	x24, _AR8216_PORT_STATUS_LINK_UP@GOTPAGE
Lloh1:
	ldr	x24, [x24, _AR8216_PORT_STATUS_LINK_UP@GOTPAGEOFF]
Lloh2:
	adrp	x25, l_.str.1@PAGE
Lloh3:
	add	x25, x25, l_.str.1@PAGEOFF
Lloh4:
	adrp	x22, l_.str@PAGE
Lloh5:
	add	x22, x22, l_.str@PAGEOFF
Lloh6:
	adrp	x26, l_.str.2@PAGE
Lloh7:
	add	x26, x26, l_.str.2@PAGEOFF
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x0, [x20, #16]
	mov	x1, x22
	mov	x2, x21
	bl	_dev_info
	mov	w23, #1
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x21, x21, #1
	ldrsw	x8, [x20, #32]
	cmp	x21, x8
	b.ge	LBB0_8
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #24]
	ldr	x8, [x8]
	mov	x0, x20
	mov	x1, x21
	blr	x8
	ldr	w8, [x24]
	ands	w8, w8, w0
	cset	w9, ne
	ldr	x10, [x20]
	ldr	w11, [x10, x21, lsl #2]
	cmp	w11, w9
	b.eq	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	str	w9, [x10, x21, lsl #2]
	mov	x3, x25
	cbnz	w8, LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x20, #24]
	ldr	x8, [x8, #8]
	mov	x0, x20
	mov	x1, x21
	blr	x8
	mov	x3, x26
	b	LBB0_2
LBB0_7:
	mov	w23, #0
LBB0_8:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x23
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_AR8216_PORT_STATUS_LINK_UP,4,2 ; @AR8216_PORT_STATUS_LINK_UP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Port %d is %s\n"

l_.str.1:                               ; @.str.1
	.asciz	"up"

l_.str.2:                               ; @.str.2
	.asciz	"down"

	.no_dead_strip	_ar8xxx_check_link_states
.subsections_via_symbols
