	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lan743x_ptp_clock_step
_lan743x_ptp_clock_step:                ## @lan743x_ptp_clock_step
	.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, %rbx
	movq	%rdi, %r15
	movl	$0, -52(%rbp)
	movl	$0, -44(%rbp)
	movl	$0, -48(%rbp)
	movabsq	$15000000001, %rax              ## imm = 0x37E11D601
	cmpq	%rax, %rsi
	jl	LBB0_5
## %bb.1:
	leaq	-52(%rbp), %rsi
	leaq	-44(%rbp), %rdx
	movq	%r15, %rdi
	xorl	%ecx, %ecx
	callq	_lan743x_ptp_clock_get
	leaq	-48(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$1000000000, %esi               ## imm = 0x3B9ACA00
	callq	_div_u64_rem
	addl	-52(%rbp), %eax
	movl	%eax, -52(%rbp)
	movl	-44(%rbp), %edx
	addl	-48(%rbp), %edx
	movl	%edx, -44(%rbp)
	cmpl	$1000000000, %edx               ## imm = 0x3B9ACA00
	jl	LBB0_3
## %bb.2:
	incl	%eax
	movl	%eax, -52(%rbp)
	addl	$-1000000000, %edx              ## imm = 0xC4653600
	movl	%edx, -44(%rbp)
LBB0_3:
	movq	%r15, %rdi
	movl	%eax, %esi
	jmp	LBB0_4
LBB0_5:
	movabsq	$-15000000001, %rax             ## imm = 0xFFFFFFFC81EE29FF
	cmpq	%rax, %rbx
	jg	LBB0_9
## %bb.6:
	negq	%rbx
	leaq	-52(%rbp), %rsi
	leaq	-44(%rbp), %rdx
	movq	%r15, %rdi
	xorl	%ecx, %ecx
	callq	_lan743x_ptp_clock_get
	leaq	-48(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$1000000000, %esi               ## imm = 0x3B9ACA00
	callq	_div_u64_rem
	movl	-52(%rbp), %esi
	subl	%eax, %esi
	movl	%esi, -52(%rbp)
	movl	-48(%rbp), %eax
	movl	-44(%rbp), %edx
	cmpl	%eax, %edx
	jge	LBB0_8
## %bb.7:
	decl	%esi
	movl	%esi, -52(%rbp)
	addl	$1000000000, %edx               ## imm = 0x3B9ACA00
LBB0_8:
	subl	%eax, %edx
	movl	%edx, -44(%rbp)
	movq	%r15, %rdi
LBB0_4:
	xorl	%ecx, %ecx
	callq	_lan743x_ptp_clock_set
LBB0_27:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	testq	%rbx, %rbx
	js	LBB0_11
## %bb.10:
	leaq	-48(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$1000000000, %esi               ## imm = 0x3B9ACA00
	callq	_div_u64_rem
	movl	%eax, %r12d
	movl	-48(%rbp), %ecx
	jmp	LBB0_14
LBB0_11:
	negq	%rbx
	movl	$1000000000, %r14d              ## imm = 0x3B9ACA00
	leaq	-48(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$1000000000, %esi               ## imm = 0x3B9ACA00
	callq	_div_u64_rem
	movl	%eax, %r12d
	movl	-48(%rbp), %eax
	movl	%eax, -44(%rbp)
	testl	%eax, %eax
	jle	LBB0_12
## %bb.13:
	notl	%r12d
	subl	%eax, %r14d
	movl	%r14d, %ecx
LBB0_14:
	movl	%ecx, -44(%rbp)
	testl	%ecx, %ecx
	jle	LBB0_15
## %bb.16:
	leal	8(%rcx), %eax
	movl	%eax, -44(%rbp)
	cmpl	$999999992, %ecx                ## imm = 0x3B9AC9F8
	jb	LBB0_17
## %bb.18:
	incl	%r12d
	addl	$-999999992, %ecx               ## imm = 0xC4653608
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movl	%ecx, -44(%rbp)
	testl	%r12d, %r12d
	jne	LBB0_20
	jmp	LBB0_25
LBB0_15:
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	testl	%r12d, %r12d
	jne	LBB0_20
	jmp	LBB0_25
LBB0_17:
                                        ## kill: def $eax killed $eax def $rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	testl	%r12d, %r12d
	jne	LBB0_20
	jmp	LBB0_25
LBB0_12:
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	negl	%r12d
	testl	%r12d, %r12d
	je	LBB0_25
LBB0_20:
	movq	_PTP_CMD_CTL@GOTPCREL(%rip), %r14
	movq	_PTP_CMD_CTL_PTP_CLOCK_STEP_SEC_@GOTPCREL(%rip), %r13
	jmp	LBB0_21
	.p2align	4, 0x90
LBB0_22:                                ##   in Loop: Header=BB0_21 Depth=1
	cmpl	$15, %r12d
	movl	$15, %ebx
	cmovll	%r12d, %ebx
	movq	_PTP_CLOCK_STEP_ADJ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_PTP_CLOCK_STEP_ADJ_DIR_@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	orl	%ebx, %edx
	movq	%r15, %rdi
	callq	_lan743x_csr_write
	subl	%ebx, %r12d
LBB0_24:                                ##   in Loop: Header=BB0_21 Depth=1
	movl	(%r14), %esi
	movl	(%r13), %edx
	movq	%r15, %rdi
	callq	_lan743x_csr_write
	movl	(%r13), %esi
	movq	%r15, %rdi
	callq	_lan743x_ptp_wait_till_cmd_done
	movq	%r15, %rdi
	callq	_mutex_unlock
	testl	%r12d, %r12d
	je	LBB0_25
LBB0_21:                                ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	callq	_mutex_lock
	testl	%r12d, %r12d
	jg	LBB0_22
## %bb.23:                              ##   in Loop: Header=BB0_21 Depth=1
	movl	%r12d, %ebx
	negl	%ebx
	cmpl	$15, %ebx
	movl	$15, %eax
	cmovgel	%eax, %ebx
	movq	_PTP_CLOCK_STEP_ADJ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_lan743x_csr_write
	addl	%ebx, %r12d
	jmp	LBB0_24
LBB0_25:
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	testl	%ebx, %ebx
	je	LBB0_27
## %bb.26:
	movq	%r15, %rdi
	callq	_mutex_lock
	movq	_PTP_CLOCK_STEP_ADJ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_PTP_CLOCK_STEP_ADJ_DIR_@GOTPCREL(%rip), %rax
	movq	_PTP_CLOCK_STEP_ADJ_VALUE_MASK_@GOTPCREL(%rip), %rcx
	andl	(%rcx), %ebx
	orl	(%rax), %ebx
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_lan743x_csr_write
	movq	_PTP_CMD_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_PTP_CMD_CTL_PTP_CLK_STP_NSEC_@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movq	%r15, %rdi
	callq	_lan743x_csr_write
	movl	(%rbx), %esi
	movq	%r15, %rdi
	callq	_lan743x_ptp_wait_till_cmd_done
	movq	%r15, %rdi
	callq	_mutex_unlock
	jmp	LBB0_27
	.cfi_endproc
                                        ## -- End function
	.comm	_PTP_CLOCK_STEP_ADJ,4,2         ## @PTP_CLOCK_STEP_ADJ
	.comm	_PTP_CLOCK_STEP_ADJ_DIR_,4,2    ## @PTP_CLOCK_STEP_ADJ_DIR_
	.comm	_PTP_CMD_CTL,4,2                ## @PTP_CMD_CTL
	.comm	_PTP_CMD_CTL_PTP_CLOCK_STEP_SEC_,4,2 ## @PTP_CMD_CTL_PTP_CLOCK_STEP_SEC_
	.comm	_PTP_CLOCK_STEP_ADJ_VALUE_MASK_,4,2 ## @PTP_CLOCK_STEP_ADJ_VALUE_MASK_
	.comm	_PTP_CMD_CTL_PTP_CLK_STP_NSEC_,4,2 ## @PTP_CMD_CTL_PTP_CLK_STP_NSEC_
	.no_dead_strip	_lan743x_ptp_clock_step
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lan743x_ptp_clock_step
_lan743x_ptp_clock_step:                ; @lan743x_ptp_clock_step
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x1
	mov	x19, x0
	mov	w21, #51712
	movk	w21, #15258, lsl #16
	str	xzr, [sp, #8]
	str	wzr, [sp, #4]
	mov	x8, #54785
	movk	x8, #32273, lsl #16
	movk	x8, #3, lsl #32
	cmp	x1, x8
	b.lt	LBB0_3
; %bb.1:
	add	x1, sp, #12
	add	x2, sp, #8
	mov	x0, x19
	mov	x3, #0
	bl	_lan743x_ptp_clock_get
	add	x2, sp, #4
	mov	x0, x20
	mov	w1, #51712
	movk	w1, #15258, lsl #16
	bl	_div_u64_rem
	ldp	w9, w8, [sp, #8]
	add	w1, w8, w0
	ldr	w8, [sp, #4]
	sub	w10, w21, #1
	add	w2, w9, w8
	cmp	w2, w10
	stp	w2, w1, [sp, #8]
	b.le	LBB0_8
; %bb.2:
	add	w1, w1, #1
	str	w1, [sp, #12]
	mov	w8, #13824
	movk	w8, #50277, lsl #16
	add	w2, w2, w8
	b	LBB0_7
LBB0_3:
	mov	x8, #-54785
	movk	x8, #33262, lsl #16
	movk	x8, #65532, lsl #32
	cmp	x20, x8
	b.gt	LBB0_10
; %bb.4:
	neg	x20, x20
	add	x1, sp, #12
	add	x2, sp, #8
	mov	x0, x19
	mov	x3, #0
	bl	_lan743x_ptp_clock_get
	add	x2, sp, #4
	mov	x0, x20
	mov	w1, #51712
	movk	w1, #15258, lsl #16
	bl	_div_u64_rem
	ldp	w9, w8, [sp, #8]
	sub	w1, w8, w0
	str	w1, [sp, #12]
	ldr	w8, [sp, #4]
	cmp	w9, w8
	b.ge	LBB0_6
; %bb.5:
	sub	w1, w1, #1
	str	w1, [sp, #12]
	add	w9, w9, w21
LBB0_6:
	sub	w2, w9, w8
LBB0_7:
	str	w2, [sp, #8]
LBB0_8:
	mov	x0, x19
	mov	w3, #0
	bl	_lan743x_ptp_clock_set
LBB0_9:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_10:
	tbnz	x20, #63, LBB0_12
; %bb.11:
	add	x2, sp, #4
	mov	x0, x20
	mov	w1, #51712
	movk	w1, #15258, lsl #16
	bl	_div_u64_rem
	mov	x20, x0
	ldr	w22, [sp, #4]
	b	LBB0_14
LBB0_12:
	neg	x0, x20
	add	x2, sp, #4
	mov	w1, #51712
	movk	w1, #15258, lsl #16
	bl	_div_u64_rem
	ldr	w22, [sp, #4]
	str	w22, [sp, #8]
	cmp	w22, #1
	b.lt	LBB0_18
; %bb.13:
	mvn	w20, w0
	sub	w22, w21, w22
LBB0_14:
	str	w22, [sp, #8]
	cmp	w22, #1
	b.lt	LBB0_19
; %bb.15:
	add	w8, w22, #8
	str	w8, [sp, #8]
	sub	w9, w21, #9
	cmp	w22, w9
	b.ls	LBB0_17
; %bb.16:
	add	w20, w20, #1
	mov	w8, #13824
	movk	w8, #50277, lsl #16
	add	w8, w22, w8
	add	w22, w8, #8
	str	w22, [sp, #8]
	b	LBB0_19
LBB0_17:
	mov	x22, x8
	b	LBB0_19
LBB0_18:
	neg	w20, w0
LBB0_19:
Lloh0:
	adrp	x24, _PTP_CLOCK_STEP_ADJ@GOTPAGE
Lloh1:
	ldr	x24, [x24, _PTP_CLOCK_STEP_ADJ@GOTPAGEOFF]
Lloh2:
	adrp	x25, _PTP_CLOCK_STEP_ADJ_DIR_@GOTPAGE
Lloh3:
	ldr	x25, [x25, _PTP_CLOCK_STEP_ADJ_DIR_@GOTPAGEOFF]
Lloh4:
	adrp	x23, _PTP_CMD_CTL@GOTPAGE
Lloh5:
	ldr	x23, [x23, _PTP_CMD_CTL@GOTPAGEOFF]
	cbz	w20, LBB0_25
; %bb.20:
	mov	w26, #15
Lloh6:
	adrp	x27, _PTP_CMD_CTL_PTP_CLOCK_STEP_SEC_@GOTPAGE
Lloh7:
	ldr	x27, [x27, _PTP_CMD_CTL_PTP_CLOCK_STEP_SEC_@GOTPAGEOFF]
	b	LBB0_23
LBB0_21:                                ;   in Loop: Header=BB0_23 Depth=1
	cmp	w20, #15
	csel	w21, w20, w26, lt
	ldr	w1, [x24]
	ldr	w8, [x25]
	orr	w2, w8, w21
	mov	x0, x19
	bl	_lan743x_csr_write
	sub	w20, w20, w21
LBB0_22:                                ;   in Loop: Header=BB0_23 Depth=1
	ldr	w1, [x23]
	ldr	w2, [x27]
	mov	x0, x19
	bl	_lan743x_csr_write
	ldr	w1, [x27]
	mov	x0, x19
	bl	_lan743x_ptp_wait_till_cmd_done
	mov	x0, x19
	bl	_mutex_unlock
	cbz	w20, LBB0_25
LBB0_23:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_mutex_lock
	cmp	w20, #1
	b.ge	LBB0_21
; %bb.24:                               ;   in Loop: Header=BB0_23 Depth=1
	neg	w8, w20
	cmp	w8, #15
	csneg	w21, w26, w20, ge
	ldr	w1, [x24]
	mov	x0, x19
	mov	x2, x21
	bl	_lan743x_csr_write
	add	w20, w21, w20
	b	LBB0_22
LBB0_25:
	cbz	w22, LBB0_9
; %bb.26:
	mov	x0, x19
	bl	_mutex_lock
	ldr	w1, [x24]
	ldr	w8, [x25]
Lloh8:
	adrp	x9, _PTP_CLOCK_STEP_ADJ_VALUE_MASK_@GOTPAGE
Lloh9:
	ldr	x9, [x9, _PTP_CLOCK_STEP_ADJ_VALUE_MASK_@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	and	w9, w9, w22
	orr	w2, w9, w8
	mov	x0, x19
	bl	_lan743x_csr_write
	ldr	w1, [x23]
Lloh11:
	adrp	x20, _PTP_CMD_CTL_PTP_CLK_STP_NSEC_@GOTPAGE
Lloh12:
	ldr	x20, [x20, _PTP_CMD_CTL_PTP_CLK_STP_NSEC_@GOTPAGEOFF]
	ldr	w2, [x20]
	mov	x0, x19
	bl	_lan743x_csr_write
	ldr	w1, [x20]
	mov	x0, x19
	bl	_lan743x_ptp_wait_till_cmd_done
	mov	x0, x19
	bl	_mutex_unlock
	b	LBB0_9
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_PTP_CLOCK_STEP_ADJ,4,2         ; @PTP_CLOCK_STEP_ADJ
	.comm	_PTP_CLOCK_STEP_ADJ_DIR_,4,2    ; @PTP_CLOCK_STEP_ADJ_DIR_
	.comm	_PTP_CMD_CTL,4,2                ; @PTP_CMD_CTL
	.comm	_PTP_CMD_CTL_PTP_CLOCK_STEP_SEC_,4,2 ; @PTP_CMD_CTL_PTP_CLOCK_STEP_SEC_
	.comm	_PTP_CLOCK_STEP_ADJ_VALUE_MASK_,4,2 ; @PTP_CLOCK_STEP_ADJ_VALUE_MASK_
	.comm	_PTP_CMD_CTL_PTP_CLK_STP_NSEC_,4,2 ; @PTP_CMD_CTL_PTP_CLK_STP_NSEC_
	.no_dead_strip	_lan743x_ptp_clock_step
.subsections_via_symbols
