	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ar8327_read_port_status
_ar8327_read_port_status:               ## @ar8327_read_port_status
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movl	%esi, %edi
	callq	_AR8327_REG_PORT_STATUS
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_ar8xxx_read
	movq	_AR8216_PORT_STATUS_LINK_UP@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_3
## %bb.1:
	movq	_AR8216_PORT_STATUS_LINK_AUTO@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_3
## %bb.2:
	movq	_AR8216_PORT_STATUS_TXFLOW@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_AR8216_PORT_STATUS_RXFLOW@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%edx, %esi
	orl	%ecx, %esi
	notl	%esi
	andl	%esi, %eax
	movq	_AR8327_PORT_STATUS_TXFLOW_AUTO@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	andl	%eax, %esi
	cmovnel	%ecx, %esi
	orl	%eax, %esi
	movq	_AR8327_PORT_STATUS_RXFLOW_AUTO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%esi, %eax
	cmovnel	%edx, %eax
	orl	%esi, %eax
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AR8216_PORT_STATUS_LINK_UP,4,2 ## @AR8216_PORT_STATUS_LINK_UP
	.comm	_AR8216_PORT_STATUS_LINK_AUTO,4,2 ## @AR8216_PORT_STATUS_LINK_AUTO
	.comm	_AR8216_PORT_STATUS_TXFLOW,4,2  ## @AR8216_PORT_STATUS_TXFLOW
	.comm	_AR8216_PORT_STATUS_RXFLOW,4,2  ## @AR8216_PORT_STATUS_RXFLOW
	.comm	_AR8327_PORT_STATUS_TXFLOW_AUTO,4,2 ## @AR8327_PORT_STATUS_TXFLOW_AUTO
	.comm	_AR8327_PORT_STATUS_RXFLOW_AUTO,4,2 ## @AR8327_PORT_STATUS_RXFLOW_AUTO
	.no_dead_strip	_ar8327_read_port_status
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ar8327_read_port_status
_ar8327_read_port_status:               ; @ar8327_read_port_status
	.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, x0
	mov	x0, x1
	bl	_AR8327_REG_PORT_STATUS
	mov	x1, x0
	mov	x0, x19
	bl	_ar8xxx_read
Lloh0:
	adrp	x8, _AR8216_PORT_STATUS_LINK_UP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AR8216_PORT_STATUS_LINK_UP@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_3
; %bb.1:
Lloh3:
	adrp	x8, _AR8216_PORT_STATUS_LINK_AUTO@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AR8216_PORT_STATUS_LINK_AUTO@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_3
; %bb.2:
Lloh6:
	adrp	x8, _AR8216_PORT_STATUS_TXFLOW@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AR8216_PORT_STATUS_TXFLOW@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _AR8216_PORT_STATUS_RXFLOW@GOTPAGE
Lloh10:
	ldr	x9, [x9, _AR8216_PORT_STATUS_RXFLOW@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w10, w9, w8
	bic	w10, w0, w10
Lloh12:
	adrp	x11, _AR8327_PORT_STATUS_TXFLOW_AUTO@GOTPAGE
Lloh13:
	ldr	x11, [x11, _AR8327_PORT_STATUS_TXFLOW_AUTO@GOTPAGEOFF]
Lloh14:
	ldr	w11, [x11]
	tst	w10, w11
	csel	w8, wzr, w8, eq
	orr	w8, w8, w10
Lloh15:
	adrp	x10, _AR8327_PORT_STATUS_RXFLOW_AUTO@GOTPAGE
Lloh16:
	ldr	x10, [x10, _AR8327_PORT_STATUS_RXFLOW_AUTO@GOTPAGEOFF]
Lloh17:
	ldr	w10, [x10]
	tst	w8, w10
	csel	w9, wzr, w9, eq
	orr	w0, w9, w8
LBB0_3:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_AR8216_PORT_STATUS_LINK_UP,4,2 ; @AR8216_PORT_STATUS_LINK_UP
	.comm	_AR8216_PORT_STATUS_LINK_AUTO,4,2 ; @AR8216_PORT_STATUS_LINK_AUTO
	.comm	_AR8216_PORT_STATUS_TXFLOW,4,2  ; @AR8216_PORT_STATUS_TXFLOW
	.comm	_AR8216_PORT_STATUS_RXFLOW,4,2  ; @AR8216_PORT_STATUS_RXFLOW
	.comm	_AR8327_PORT_STATUS_TXFLOW_AUTO,4,2 ; @AR8327_PORT_STATUS_TXFLOW_AUTO
	.comm	_AR8327_PORT_STATUS_RXFLOW_AUTO,4,2 ; @AR8327_PORT_STATUS_RXFLOW_AUTO
	.no_dead_strip	_ar8327_read_port_status
.subsections_via_symbols
