	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ocrdma_mbx_get_link_speed      ## -- Begin function ocrdma_mbx_get_link_speed
	.p2align	4, 0x90
_ocrdma_mbx_get_link_speed:             ## @ocrdma_mbx_get_link_speed
	.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	%rdx, -48(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r12
	movq	%rdi, %r13
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_OCRDMA_CMD_QUERY_NTWK_LINK_CONFIG_V1@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	movl	$8, %esi
	callq	_ocrdma_init_emb_mqe
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	(%rax), %rdi
	movl	(%r14), %esi
	movq	_OCRDMA_SUBSYS_COMMON@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$8, %ecx
	callq	_ocrdma_init_mch
	movq	(%rbx), %rax
	movl	$1, (%rax)
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_ocrdma_mbx_cmd
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_7
## %bb.3:
	testq	%r12, %r12
	je	LBB0_5
## %bb.4:
	movq	_OCRDMA_PHY_PS_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	(%rbx), %eax
	movq	_OCRDMA_PHY_PS_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	sarl	%cl, %eax
	movl	%eax, (%r12)
LBB0_5:
	cmpq	$0, -48(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_7
## %bb.6:
	movq	_OCRDMA_LINK_ST_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	4(%rbx), %eax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
LBB0_7:
	movq	%rbx, %rdi
	callq	_kfree
	jmp	LBB0_8
LBB0_1:
	negl	%r15d
LBB0_8:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_OCRDMA_CMD_QUERY_NTWK_LINK_CONFIG_V1,4,2 ## @OCRDMA_CMD_QUERY_NTWK_LINK_CONFIG_V1
	.comm	_OCRDMA_SUBSYS_COMMON,4,2       ## @OCRDMA_SUBSYS_COMMON
	.comm	_OCRDMA_PHY_PS_MASK,4,2         ## @OCRDMA_PHY_PS_MASK
	.comm	_OCRDMA_PHY_PS_SHIFT,4,2        ## @OCRDMA_PHY_PS_SHIFT
	.comm	_OCRDMA_LINK_ST_MASK,4,2        ## @OCRDMA_LINK_ST_MASK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ocrdma_mbx_get_link_speed      ; -- Begin function ocrdma_mbx_get_link_speed
	.p2align	2
_ocrdma_mbx_get_link_speed:             ; @ocrdma_mbx_get_link_speed
	.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	x19, x2
	mov	x21, x1
	mov	x22, x0
Lloh0:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh2:
	ldr	w23, [x8]
Lloh3:
	adrp	x24, _OCRDMA_CMD_QUERY_NTWK_LINK_CONFIG_V1@GOTPAGE
Lloh4:
	ldr	x24, [x24, _OCRDMA_CMD_QUERY_NTWK_LINK_CONFIG_V1@GOTPAGEOFF]
	ldr	w0, [x24]
	mov	w1, #8
	bl	_ocrdma_init_emb_mqe
	cbz	x0, LBB0_7
; %bb.1:
	mov	x20, x0
	ldr	x0, [x0]
	ldr	w1, [x24]
Lloh5:
	adrp	x8, _OCRDMA_SUBSYS_COMMON@GOTPAGE
Lloh6:
	ldr	x8, [x8, _OCRDMA_SUBSYS_COMMON@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	mov	w3, #8
	bl	_ocrdma_init_mch
	ldr	x8, [x20]
	mov	w9, #1
	str	w9, [x8]
	mov	x0, x22
	mov	x1, x20
	bl	_ocrdma_mbx_cmd
	mov	x22, x0
	cbnz	w0, LBB0_6
; %bb.2:
	cbz	x21, LBB0_4
; %bb.3:
	ldr	w8, [x20]
Lloh8:
	adrp	x9, _OCRDMA_PHY_PS_MASK@GOTPAGE
Lloh9:
	ldr	x9, [x9, _OCRDMA_PHY_PS_MASK@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	and	w8, w9, w8
Lloh11:
	adrp	x9, _OCRDMA_PHY_PS_SHIFT@GOTPAGE
Lloh12:
	ldr	x9, [x9, _OCRDMA_PHY_PS_SHIFT@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	asr	w8, w8, w9
	str	w8, [x21]
LBB0_4:
	cbz	x19, LBB0_6
; %bb.5:
	ldr	w8, [x20, #4]
Lloh14:
	adrp	x9, _OCRDMA_LINK_ST_MASK@GOTPAGE
Lloh15:
	ldr	x9, [x9, _OCRDMA_LINK_ST_MASK@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	and	w8, w9, w8
	str	w8, [x19]
LBB0_6:
	mov	x0, x20
	bl	_kfree
	b	LBB0_8
LBB0_7:
	neg	w22, w23
LBB0_8:
	mov	x0, x22
	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 AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_OCRDMA_CMD_QUERY_NTWK_LINK_CONFIG_V1,4,2 ; @OCRDMA_CMD_QUERY_NTWK_LINK_CONFIG_V1
	.comm	_OCRDMA_SUBSYS_COMMON,4,2       ; @OCRDMA_SUBSYS_COMMON
	.comm	_OCRDMA_PHY_PS_MASK,4,2         ; @OCRDMA_PHY_PS_MASK
	.comm	_OCRDMA_PHY_PS_SHIFT,4,2        ; @OCRDMA_PHY_PS_SHIFT
	.comm	_OCRDMA_LINK_ST_MASK,4,2        ; @OCRDMA_LINK_ST_MASK
.subsections_via_symbols
