	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_be_cmd_link_status_query       ## -- Begin function be_cmd_link_status_query
	.p2align	4, 0x90
_be_cmd_link_status_query:              ## @be_cmd_link_status_query
	.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
	movl	%ecx, %ebx
	movq	%rdx, %r14
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r13
	callq	_spin_lock_bh
	testq	%r14, %r14
	je	LBB0_2
## %bb.1:
	movq	_LINK_DOWN@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r14)
LBB0_2:
	movq	%r13, %rdi
	callq	_wrb_from_mccq
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_embedded_payload
	movq	%rax, %r15
	movq	_CMD_SUBSYSTEM_COMMON@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_OPCODE_COMMON_NTWK_LINK_STATUS_QUERY@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	$8, %ecx
	movq	%r12, %r8
	xorl	%r9d, %r9d
	callq	_be_wrb_cmd_hdr_prepare
	movq	%r13, %rdi
	callq	_BE2_chip
	testl	%eax, %eax
	jne	LBB0_6
## %bb.5:
	movl	$1, (%r15)
LBB0_6:
	movl	%ebx, 4(%r15)
	movq	%r13, %rdi
	callq	_be_mcc_notify_wait
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_14
## %bb.7:
	movq	%r12, %rdi
	callq	_embedded_payload
	movq	%rax, %r15
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	testq	%rbx, %rbx
	je	LBB0_12
## %bb.8:
	movq	16(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_10
## %bb.9:
	callq	_le16_to_cpu
                                        ## kill: def $eax killed $eax def $rax
	addl	%eax, %eax
	leal	(%rax,%rax,4), %eax
	jmp	LBB0_11
LBB0_3:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_14
LBB0_10:
	movl	8(%r15), %edi
	callq	_be_mac_to_link_speed
LBB0_11:
	xorl	%ecx, %ecx
	cmpq	$0, (%r15)
	cmovnel	%eax, %ecx
	movl	%ecx, (%rbx)
LBB0_12:
	xorl	%ebx, %ebx
	testq	%r14, %r14
	je	LBB0_14
## %bb.13:
	movq	(%r15), %rax
	movq	%rax, (%r14)
LBB0_14:
	movq	%r13, %rdi
	callq	_spin_unlock_bh
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LINK_DOWN,8,3                  ## @LINK_DOWN
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_CMD_SUBSYSTEM_COMMON,4,2       ## @CMD_SUBSYSTEM_COMMON
	.comm	_OPCODE_COMMON_NTWK_LINK_STATUS_QUERY,4,2 ## @OPCODE_COMMON_NTWK_LINK_STATUS_QUERY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_be_cmd_link_status_query       ; -- Begin function be_cmd_link_status_query
	.p2align	2
_be_cmd_link_status_query:              ; @be_cmd_link_status_query
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x22, x3
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	bl	_spin_lock_bh
	cbz	x20, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _LINK_DOWN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LINK_DOWN@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [x20]
LBB0_2:
	mov	x0, x19
	bl	_wrb_from_mccq
	cbz	x0, LBB0_9
; %bb.3:
	mov	x23, x0
	bl	_embedded_payload
	mov	x24, x0
Lloh3:
	adrp	x8, _CMD_SUBSYSTEM_COMMON@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CMD_SUBSYSTEM_COMMON@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x8, _OPCODE_COMMON_NTWK_LINK_STATUS_QUERY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _OPCODE_COMMON_NTWK_LINK_STATUS_QUERY@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	w3, #8
	mov	x4, x23
	mov	x5, #0
	bl	_be_wrb_cmd_hdr_prepare
	mov	x0, x19
	bl	_BE2_chip
	cbnz	w0, LBB0_5
; %bb.4:
	mov	w8, #1
	str	w8, [x24]
LBB0_5:
	str	w22, [x24, #4]
	mov	x0, x19
	bl	_be_mcc_notify_wait
	mov	x24, x0
	cbnz	w0, LBB0_14
; %bb.6:
	mov	x0, x23
	bl	_embedded_payload
	mov	x22, x0
	cbz	x21, LBB0_12
; %bb.7:
	ldr	x0, [x22, #16]
	cbz	x0, LBB0_10
; %bb.8:
	bl	_le16_to_cpu
	add	w8, w0, w0, lsl #2
	lsl	w0, w8, #1
	b	LBB0_11
LBB0_9:
Lloh9:
	adrp	x8, _EBUSY@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w24, w8
	b	LBB0_14
LBB0_10:
	ldr	w0, [x22, #8]
	bl	_be_mac_to_link_speed
LBB0_11:
	ldr	x8, [x22]
	cmp	x8, #0
	csel	w8, wzr, w0, eq
	str	w8, [x21]
LBB0_12:
	mov	w24, #0
	cbz	x20, LBB0_14
; %bb.13:
	ldr	x8, [x22]
	str	x8, [x20]
LBB0_14:
	mov	x0, x19
	bl	_spin_unlock_bh
	mov	x0, x24
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_LINK_DOWN,8,3                  ; @LINK_DOWN
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_CMD_SUBSYSTEM_COMMON,4,2       ; @CMD_SUBSYSTEM_COMMON
	.comm	_OPCODE_COMMON_NTWK_LINK_STATUS_QUERY,4,2 ; @OPCODE_COMMON_NTWK_LINK_STATUS_QUERY
.subsections_via_symbols
