	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function octeon_mgmt_ioctl_hwtstamp
_octeon_mgmt_ioctl_hwtstamp:            ## @octeon_mgmt_ioctl_hwtstamp
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %rbx
	callq	_netdev_priv
	movq	%rax, %r14
	movl	(%r15), %esi
	leaq	-56(%rbp), %rdi
	movl	$16, %edx
	callq	_copy_from_user
	testq	%rax, %rax
	je	LBB0_1
LBB0_16:
	movq	_EFAULT@GOTPCREL(%rip), %rcx
	jmp	LBB0_17
LBB0_1:
	cmpq	$0, -48(%rbp)
	je	LBB0_3
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_17:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_18:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	_OCTEON_CN6XXX@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_OCTEON_IS_MODEL
	testq	%rax, %rax
	je	LBB0_2
## %bb.4:
	movq	_CVMX_MIO_PTP_CLOCK_CFG@GOTPCREL(%rip), %r13
	movq	(%r13), %rdi
	callq	_cvmx_read_csr
	movq	%rax, %r12
	xorl	%eax, %eax
	callq	_octeon_get_io_clock_rate
	testl	%r12d, %r12d
	je	LBB0_6
## %bb.5:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_netdev_info
	jmp	LBB0_7
LBB0_6:
	movq	_CVMX_MIO_PTP_CLOCK_COMP@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_cvmx_write_csr
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_netdev_info
	movq	(%r13), %rdi
	movl	$1, %esi
	callq	_cvmx_write_csr
LBB0_7:
	movl	-56(%rbp), %eax
	andl	$-2, %eax
	cmpl	$128, %eax
	jne	LBB0_8
## %bb.9:
	movl	-52(%rbp), %eax
	leal	-130(%rax), %ecx
	cmpl	$14, %ecx
	jae	LBB0_10
LBB0_13:
	movl	$1, (%r14)
	movl	$145, -52(%rbp)
	movl	$1, %r12d
LBB0_14:
	movq	_AGL_GMX_RX_FRM_CTL@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	addq	8(%r14), %rdi
	callq	_cvmx_read_csr
	movq	(%rbx), %rdi
	addq	8(%r14), %rdi
	movl	%r12d, %esi
	callq	_cvmx_write_csr
	movl	(%r15), %edi
	leaq	-56(%rbp), %rsi
	movl	$16, %edx
	callq	_copy_to_user
	testq	%rax, %rax
	jne	LBB0_16
## %bb.15:
	xorl	%eax, %eax
	jmp	LBB0_18
LBB0_10:
	cmpl	$145, %eax
	je	LBB0_13
## %bb.11:
	cmpl	$144, %eax
	jne	LBB0_8
## %bb.12:
	movl	$0, (%r14)
	xorl	%r12d, %r12d
	jmp	LBB0_14
LBB0_8:
	movq	_ERANGE@GOTPCREL(%rip), %rcx
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_EFAULT,4,2                     ## @EFAULT
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_OCTEON_CN6XXX,4,2              ## @OCTEON_CN6XXX
	.comm	_CVMX_MIO_PTP_CLOCK_CFG,8,3     ## @CVMX_MIO_PTP_CLOCK_CFG
	.comm	_NSEC_PER_SEC,4,2               ## @NSEC_PER_SEC
	.comm	_CVMX_MIO_PTP_CLOCK_COMP,8,3    ## @CVMX_MIO_PTP_CLOCK_COMP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"PTP Clock using sclk reference @ %lldHz\n"

	.comm	_ERANGE,4,2                     ## @ERANGE
	.comm	_AGL_GMX_RX_FRM_CTL,8,3         ## @AGL_GMX_RX_FRM_CTL
	.no_dead_strip	_octeon_mgmt_ioctl_hwtstamp
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function octeon_mgmt_ioctl_hwtstamp
_octeon_mgmt_ioctl_hwtstamp:            ; @octeon_mgmt_ioctl_hwtstamp
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x1
	mov	x21, x0
	bl	_netdev_priv
	mov	x20, x0
	ldr	w1, [x19]
	mov	x0, sp
	mov	w2, #16
	bl	_copy_from_user
	cbz	x0, LBB0_2
LBB0_1:
Lloh0:
	adrp	x8, _EFAULT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:
	ldr	x8, [sp, #8]
	cbz	x8, LBB0_6
LBB0_3:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	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
	add	sp, sp, #80
	ret
LBB0_6:
Lloh4:
	adrp	x8, _OCTEON_CN6XXX@GOTPAGE
Lloh5:
	ldr	x8, [x8, _OCTEON_CN6XXX@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
	bl	_OCTEON_IS_MODEL
	cbz	x0, LBB0_3
; %bb.7:
Lloh7:
	adrp	x23, _CVMX_MIO_PTP_CLOCK_CFG@GOTPAGE
Lloh8:
	ldr	x23, [x23, _CVMX_MIO_PTP_CLOCK_CFG@GOTPAGEOFF]
	ldr	x0, [x23]
	bl	_cvmx_read_csr
	mov	x22, x0
	bl	_octeon_get_io_clock_rate
	cbz	w22, LBB0_9
; %bb.8:
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_netdev_info
	b	LBB0_10
LBB0_9:
Lloh11:
	adrp	x8, _CVMX_MIO_PTP_CLOCK_COMP@GOTPAGE
Lloh12:
	ldr	x8, [x8, _CVMX_MIO_PTP_CLOCK_COMP@GOTPAGEOFF]
Lloh13:
	ldr	x0, [x8]
	bl	_cvmx_write_csr
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_netdev_info
	ldr	x0, [x23]
	mov	w1, #1
	bl	_cvmx_write_csr
LBB0_10:
	ldr	w8, [sp]
	and	w8, w8, #0xfffffffe
	cmp	w8, #128
	b.ne	LBB0_17
; %bb.11:
	ldr	w8, [sp, #4]
	sub	w9, w8, #130
	cmp	w9, #14
	b.hs	LBB0_14
LBB0_12:
	mov	w21, #1
	str	w21, [x20]
	mov	w8, #145
	str	w8, [sp, #4]
LBB0_13:
	ldr	x8, [x20, #8]
Lloh16:
	adrp	x22, _AGL_GMX_RX_FRM_CTL@GOTPAGE
Lloh17:
	ldr	x22, [x22, _AGL_GMX_RX_FRM_CTL@GOTPAGEOFF]
	ldr	x9, [x22]
	add	x0, x9, x8
	bl	_cvmx_read_csr
	ldr	x8, [x20, #8]
	ldr	x9, [x22]
	add	x0, x9, x8
	mov	x1, x21
	bl	_cvmx_write_csr
	ldr	w0, [x19]
	mov	x1, sp
	mov	w2, #16
	bl	_copy_to_user
	cbnz	x0, LBB0_1
	b	LBB0_5
LBB0_14:
	cmp	w8, #145
	b.eq	LBB0_12
; %bb.15:
	cmp	w8, #144
	b.ne	LBB0_17
; %bb.16:
	mov	w21, #0
	str	wzr, [x20]
	b	LBB0_13
LBB0_17:
Lloh18:
	adrp	x8, _ERANGE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ERANGE@GOTPAGEOFF]
	b	LBB0_4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_EFAULT,4,2                     ; @EFAULT
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_OCTEON_CN6XXX,4,2              ; @OCTEON_CN6XXX
	.comm	_CVMX_MIO_PTP_CLOCK_CFG,8,3     ; @CVMX_MIO_PTP_CLOCK_CFG
	.comm	_NSEC_PER_SEC,4,2               ; @NSEC_PER_SEC
	.comm	_CVMX_MIO_PTP_CLOCK_COMP,8,3    ; @CVMX_MIO_PTP_CLOCK_COMP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"PTP Clock using sclk reference @ %lldHz\n"

	.comm	_ERANGE,4,2                     ; @ERANGE
	.comm	_AGL_GMX_RX_FRM_CTL,8,3         ; @AGL_GMX_RX_FRM_CTL
	.no_dead_strip	_octeon_mgmt_ioctl_hwtstamp
.subsections_via_symbols
