	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function octeon_mgmt_disable_link
_octeon_mgmt_disable_link:              ## @octeon_mgmt_disable_link
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	_AGL_GMX_PRT_CFG@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	addq	(%rbx), %rdi
	callq	_cvmx_read_csr
	movq	(%r14), %rdi
	addq	(%rbx), %rdi
	movq	%rax, %rsi
	callq	_cvmx_write_csr
	movq	_OCTEON_CN6XXX@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_OCTEON_IS_MODEL
	testq	%rax, %rax
	je	LBB0_11
## %bb.1:
	movq	(%r14), %rdi
	addq	(%rbx), %rdi
	callq	_cvmx_read_csr
	cmpl	$1, %eax
	je	LBB0_11
## %bb.2:
	movabsq	$-4294967296, %r15              ## imm = 0xFFFFFFFF00000000
	andq	%r15, %rax
	movabsq	$4294967296, %r12               ## imm = 0x100000000
	cmpq	%r12, %rax
	je	LBB0_11
## %bb.3:
	movl	$1, %edi
	callq	_mdelay
	movq	(%r14), %rdi
	addq	(%rbx), %rdi
	callq	_cvmx_read_csr
	cmpl	$1, %eax
	je	LBB0_11
## %bb.4:
	andq	%r15, %rax
	cmpq	%r12, %rax
	je	LBB0_11
## %bb.5:
	movl	$1, %edi
	callq	_mdelay
	movq	(%r14), %rdi
	addq	(%rbx), %rdi
	callq	_cvmx_read_csr
	cmpl	$1, %eax
	je	LBB0_11
## %bb.6:
	andq	%r15, %rax
	cmpq	%r12, %rax
	je	LBB0_11
## %bb.7:
	movl	$1, %edi
	callq	_mdelay
	movq	(%r14), %rdi
	addq	(%rbx), %rdi
	callq	_cvmx_read_csr
	cmpl	$1, %eax
	je	LBB0_11
## %bb.8:
	andq	%r15, %rax
	cmpq	%r12, %rax
	je	LBB0_11
## %bb.9:
	movl	$1, %edi
	callq	_mdelay
	movq	(%r14), %rdi
	addq	(%rbx), %rdi
	callq	_cvmx_read_csr
	cmpl	$1, %eax
	je	LBB0_11
## %bb.10:
	andq	%r15, %rax
	cmpq	%r12, %rax
	je	LBB0_11
## %bb.12:
	movl	$1, %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mdelay                         ## TAILCALL
LBB0_11:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AGL_GMX_PRT_CFG,8,3            ## @AGL_GMX_PRT_CFG
	.comm	_OCTEON_CN6XXX,4,2              ## @OCTEON_CN6XXX
	.no_dead_strip	_octeon_mgmt_disable_link
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function octeon_mgmt_disable_link
_octeon_mgmt_disable_link:              ; @octeon_mgmt_disable_link
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x20, _AGL_GMX_PRT_CFG@GOTPAGE
Lloh1:
	ldr	x20, [x20, _AGL_GMX_PRT_CFG@GOTPAGEOFF]
	ldr	x9, [x20]
	add	x0, x9, x8
	bl	_cvmx_read_csr
	mov	x1, x0
	ldr	x8, [x19]
	ldr	x9, [x20]
	add	x0, x9, x8
	bl	_cvmx_write_csr
Lloh2:
	adrp	x8, _OCTEON_CN6XXX@GOTPAGE
Lloh3:
	ldr	x8, [x8, _OCTEON_CN6XXX@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	bl	_OCTEON_IS_MODEL
	cbz	x0, LBB0_9
; %bb.1:
	ldr	x8, [x19]
	ldr	x9, [x20]
	add	x0, x9, x8
	bl	_cvmx_read_csr
	and	x8, x0, #0xffffffff00000000
	cmp	w0, #1
	mov	x21, #4294967296
	ccmp	x8, x21, #4, ne
	b.eq	LBB0_9
; %bb.2:
	mov	w0, #1
	bl	_mdelay
	ldr	x8, [x19]
	ldr	x9, [x20]
	add	x0, x9, x8
	bl	_cvmx_read_csr
	and	x8, x0, #0xffffffff00000000
	cmp	w0, #1
	ccmp	x8, x21, #4, ne
	b.eq	LBB0_9
; %bb.3:
	mov	w0, #1
	bl	_mdelay
	ldr	x8, [x19]
	ldr	x9, [x20]
	add	x0, x9, x8
	bl	_cvmx_read_csr
	and	x8, x0, #0xffffffff00000000
	cmp	w0, #1
	mov	x9, #4294967296
	ccmp	x8, x9, #4, ne
	b.eq	LBB0_9
; %bb.4:
	mov	w0, #1
	bl	_mdelay
	ldr	x8, [x19]
	ldr	x9, [x20]
	add	x0, x9, x8
	bl	_cvmx_read_csr
	cmp	w0, #1
	b.eq	LBB0_9
; %bb.5:
	and	x8, x0, #0xffffffff00000000
	mov	x9, #4294967296
	cmp	x8, x9
	b.eq	LBB0_9
; %bb.6:
	mov	w0, #1
	bl	_mdelay
	ldr	x8, [x19]
	ldr	x9, [x20]
	add	x0, x9, x8
	bl	_cvmx_read_csr
	cmp	w0, #1
	b.eq	LBB0_9
; %bb.7:
	and	x8, x0, #0xffffffff00000000
	mov	x9, #4294967296
	cmp	x8, x9
	b.eq	LBB0_9
; %bb.8:
	mov	w0, #1
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_mdelay
LBB0_9:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_AGL_GMX_PRT_CFG,8,3            ; @AGL_GMX_PRT_CFG
	.comm	_OCTEON_CN6XXX,4,2              ; @OCTEON_CN6XXX
	.no_dead_strip	_octeon_mgmt_disable_link
.subsections_via_symbols
