	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lio_sync_octeon_time
_lio_sync_octeon_time:                  ## @lio_sync_octeon_time
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %r14
	movq	16(%r14), %r15
	movq	%r15, %rdi
	movl	$8, %esi
	movl	$16, %edx
	xorl	%ecx, %ecx
	callq	_octeon_alloc_soft_command
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	movq	%rax, %r12
	movq	16(%rax), %rbx
	leaq	-40(%rbp), %rdi
	callq	_ktime_get_real_ts64
	movl	-36(%rbp), %eax
	movl	%eax, 4(%rbx)
	movl	-40(%rbp), %eax
	movl	%eax, (%rbx)
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_octeon_swap_8B_data
	movq	8(%r14), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r12)
	movq	_OPCODE_NIC@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_OPCODE_NIC_SYNC_OCTEON_TIME@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	$0, (%rsp)
	movq	%r15, %rdi
	movq	%r12, %rsi
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_octeon_prepare_soft_command
	movq	%r12, %rdi
	addq	$8, %rdi
	callq	_init_completion
	movq	_OCTEON_REQUEST_PENDING@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r12)
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_octeon_send_soft_command
	movq	_IQ_SEND_FAILED@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_3
## %bb.2:
	movq	(%r15), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_octeon_free_soft_command
	jmp	LBB0_4
LBB0_5:
	movq	(%r15), %rdi
	leaq	L_.str(%rip), %rsi
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_err                        ## TAILCALL
LBB0_3:
	movl	(%r12), %edi
	movl	$1, %esi
	callq	_WRITE_ONCE
LBB0_4:
	movl	4(%r14), %ebx
	movq	_LIO_SYNC_OCTEON_TIME_INTERVAL_MS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msecs_to_jiffies
	movl	%ebx, %edi
	movq	%r14, %rsi
	movl	%eax, %edx
	callq	_queue_delayed_work
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to sync time to octeon: soft command allocation failed\n"

	.comm	_OPCODE_NIC,4,2                 ## @OPCODE_NIC
	.comm	_OPCODE_NIC_SYNC_OCTEON_TIME,4,2 ## @OPCODE_NIC_SYNC_OCTEON_TIME
	.comm	_OCTEON_REQUEST_PENDING,4,2     ## @OCTEON_REQUEST_PENDING
	.comm	_IQ_SEND_FAILED,4,2             ## @IQ_SEND_FAILED
L_.str.1:                               ## @.str.1
	.asciz	"Failed to sync time to octeon: failed to send soft command\n"

	.comm	_LIO_SYNC_OCTEON_TIME_INTERVAL_MS,4,2 ## @LIO_SYNC_OCTEON_TIME_INTERVAL_MS
	.no_dead_strip	_lio_sync_octeon_time
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lio_sync_octeon_time
_lio_sync_octeon_time:                  ; @lio_sync_octeon_time
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	ldr	x19, [x0]
	ldr	x20, [x19, #16]
	mov	x0, x20
	mov	w1, #8
	mov	w2, #16
	mov	w3, #0
	bl	_octeon_alloc_soft_command
	cbz	x0, LBB0_3
; %bb.1:
	mov	x21, x0
	ldr	x22, [x0, #16]
	add	x0, sp, #8
	bl	_ktime_get_real_ts64
	ldr	d0, [sp, #8]
	str	d0, [x22]
	mov	x0, x22
	mov	w1, #1
	bl	_octeon_swap_8B_data
	ldr	x8, [x19, #8]
	ldr	w8, [x8]
	str	w8, [x21, #12]
Lloh0:
	adrp	x8, _OPCODE_NIC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _OPCODE_NIC@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
Lloh3:
	adrp	x8, _OPCODE_NIC_SYNC_OCTEON_TIME@GOTPAGE
Lloh4:
	ldr	x8, [x8, _OPCODE_NIC_SYNC_OCTEON_TIME@GOTPAGEOFF]
Lloh5:
	ldr	w3, [x8]
	mov	x0, x20
	mov	x1, x21
	mov	w4, #0
	mov	w5, #0
	mov	w6, #0
	bl	_octeon_prepare_soft_command
	add	x0, x21, #8
	bl	_init_completion
Lloh6:
	adrp	x8, _OCTEON_REQUEST_PENDING@GOTPAGE
Lloh7:
	ldr	x8, [x8, _OCTEON_REQUEST_PENDING@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [x21, #4]
	mov	x0, x20
	mov	x1, x21
	bl	_octeon_send_soft_command
Lloh9:
	adrp	x8, _IQ_SEND_FAILED@GOTPAGE
Lloh10:
	ldr	x8, [x8, _IQ_SEND_FAILED@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_4
; %bb.2:
	ldr	x0, [x20]
Lloh12:
	adrp	x1, l_.str.1@PAGE
Lloh13:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
	mov	x0, x20
	mov	x1, x21
	bl	_octeon_free_soft_command
	b	LBB0_5
LBB0_3:
	ldr	x0, [x20]
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	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
	add	sp, sp, #64
	b	_dev_err
LBB0_4:
	ldr	w0, [x21]
	mov	w1, #1
	bl	_WRITE_ONCE
LBB0_5:
	ldr	w20, [x19, #4]
Lloh16:
	adrp	x8, _LIO_SYNC_OCTEON_TIME_INTERVAL_MS@GOTPAGE
Lloh17:
	ldr	x8, [x8, _LIO_SYNC_OCTEON_TIME_INTERVAL_MS@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	bl	_msecs_to_jiffies
	mov	x2, x0
	mov	x0, x20
	mov	x1, x19
	bl	_queue_delayed_work
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to sync time to octeon: soft command allocation failed\n"

	.comm	_OPCODE_NIC,4,2                 ; @OPCODE_NIC
	.comm	_OPCODE_NIC_SYNC_OCTEON_TIME,4,2 ; @OPCODE_NIC_SYNC_OCTEON_TIME
	.comm	_OCTEON_REQUEST_PENDING,4,2     ; @OCTEON_REQUEST_PENDING
	.comm	_IQ_SEND_FAILED,4,2             ; @IQ_SEND_FAILED
l_.str.1:                               ; @.str.1
	.asciz	"Failed to sync time to octeon: failed to send soft command\n"

	.comm	_LIO_SYNC_OCTEON_TIME_INTERVAL_MS,4,2 ; @LIO_SYNC_OCTEON_TIME_INTERVAL_MS
	.no_dead_strip	_lio_sync_octeon_time
.subsections_via_symbols
