	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fec_ptp_enable_pps
_fec_ptp_enable_pps:                    ## @fec_ptp_enable_pps
	.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	%rsi, %r15
	movq	%rdi, %r12
	cmpq	$0, 56(%rdi)
	jne	LBB0_3
## %bb.1:
	cmpq	$0, 48(%r12)
	je	LBB0_2
LBB0_3:
	xorl	%r13d, %r13d
	cmpq	%r15, (%r12)
	je	LBB0_10
## %bb.4:
	movq	_DEFAULT_PPS_CHANNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%r12)
	movq	_PPS_OUPUT_RELOAD_PERIOD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r12)
	leaq	16(%r12), %rbx
	movq	%rbx, %rdi
	callq	_spin_lock_irqsave
	testq	%r15, %r15
	je	LBB0_8
## %bb.5:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	_FEC_T_TF_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	24(%r12), %rbx
	movl	20(%r12), %edi
	callq	_FEC_TCSR
	addq	%rax, %rbx
	movl	%r13d, %edi
	movq	%rbx, %rsi
	callq	_writel
	movq	24(%r12), %rbx
	movl	20(%r12), %edi
	callq	_FEC_TCSR
	addq	%rax, %rbx
	movq	%rbx, %rdi
	callq	_readl
	movq	_FEC_T_TMODE_MASK@GOTPCREL(%rip), %r14
	movl	(%r14), %ebx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	notl	%ebx
	andl	%eax, %ebx
	movq	24(%r12), %r13
	movl	20(%r12), %edi
	callq	_FEC_TCSR
	addq	%rax, %r13
	movl	%ebx, %edi
	movq	%r13, %rsi
	callq	_writel
	movq	24(%r12), %rbx
	movl	20(%r12), %edi
	callq	_FEC_TCSR
	addq	%rax, %rbx
	movq	%rbx, %rdi
	callq	_readl
	movl	(%r14), %ebx
	testl	%eax, %ebx
	jne	LBB0_6
## %bb.7:
	leaq	36(%r12), %r13
	movq	%r13, %rdi
	callq	_timecounter_read
	movq	_FEC_ATIME_CTRL@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	%rax, %rbx
	addq	24(%r12), %rdi
	callq	_readl
	movq	_FEC_T_CTRL_CAPTURE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	(%rbx), %rsi
	addq	24(%r12), %rsi
	movl	%eax, %edi
	callq	_writel
	movq	_FEC_ATIME@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	24(%r12), %rdi
	callq	_readl
	movl	%eax, %ebx
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_timecounter_cyc2time
	movl	%eax, %edi
	callq	_ns_to_timespec64
	movq	_NSEC_PER_SEC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	subl	%eax, %ebx
	leal	(%rbx,%rcx,2), %ebx
	andl	32(%r12), %ebx
	movq	24(%r12), %r13
	movl	20(%r12), %edi
	callq	_FEC_TCCR
	addq	%rax, %r13
	movl	%ebx, %edi
	movq	%r13, %rsi
	callq	_writel
	addl	8(%r12), %ebx
	andl	32(%r12), %ebx
	movl	%ebx, 12(%r12)
	movq	_FEC_ATIME_CTRL@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	addq	24(%r12), %rdi
	callq	_readl
	movq	_FEC_T_CTRL_PINPER@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	(%rbx), %rsi
	addq	24(%r12), %rsi
	movl	%eax, %edi
	callq	_writel
	movq	24(%r12), %rbx
	movl	20(%r12), %edi
	callq	_FEC_TCSR
	addq	%rax, %rbx
	movq	%rbx, %rdi
	callq	_readl
	movq	_FEC_T_TF_OFFSET@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movq	_FEC_T_TIE_OFFSET@GOTPCREL(%rip), %rdx
	movb	(%rdx), %dl
	btsl	%ecx, %eax
	btsl	%edx, %eax
	movq	_FEC_T_TDRE_OFFSET@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	(%r14), %edx
	btsl	%ecx, %edx
	notl	%edx
	movq	_FEC_HIGH_PULSE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	movq	_FEC_T_TMODE_OFFSET@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %ebx
	andl	%eax, %edx
	orl	%edx, %ebx
	movq	24(%r12), %r13
	movl	20(%r12), %edi
	callq	_FEC_TCSR
	addq	%rax, %r13
	movl	%ebx, %edi
	movq	%r13, %rsi
	callq	_writel
	movq	24(%r12), %rbx
	movl	12(%r12), %r13d
	movl	20(%r12), %edi
	callq	_FEC_TCCR
	addq	%rax, %rbx
	movl	%r13d, %edi
	movq	%rbx, %rsi
	callq	_writel
	movl	8(%r12), %eax
	addl	12(%r12), %eax
	andl	32(%r12), %eax
	movl	%eax, 12(%r12)
	xorl	%r13d, %r13d
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_9
LBB0_8:
	movq	24(%r12), %r14
	movl	20(%r12), %edi
	callq	_FEC_TCSR
	addq	%rax, %r14
	xorl	%edi, %edi
	movq	%r14, %rsi
	callq	_writel
LBB0_9:
	movq	%r15, (%r12)
	movq	%rbx, %rdi
	callq	_spin_unlock_irqrestore
	jmp	LBB0_10
LBB0_2:
	movq	40(%r12), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
LBB0_10:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"No ptp stack is running\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_DEFAULT_PPS_CHANNEL,4,2        ## @DEFAULT_PPS_CHANNEL
	.comm	_PPS_OUPUT_RELOAD_PERIOD,4,2    ## @PPS_OUPUT_RELOAD_PERIOD
	.comm	_FEC_T_TF_MASK,4,2              ## @FEC_T_TF_MASK
	.comm	_FEC_T_TMODE_MASK,4,2           ## @FEC_T_TMODE_MASK
	.comm	_FEC_ATIME_CTRL,8,3             ## @FEC_ATIME_CTRL
	.comm	_FEC_T_CTRL_CAPTURE,4,2         ## @FEC_T_CTRL_CAPTURE
	.comm	_FEC_ATIME,8,3                  ## @FEC_ATIME
	.comm	_NSEC_PER_SEC,4,2               ## @NSEC_PER_SEC
	.comm	_FEC_T_CTRL_PINPER,4,2          ## @FEC_T_CTRL_PINPER
	.comm	_FEC_T_TF_OFFSET,4,2            ## @FEC_T_TF_OFFSET
	.comm	_FEC_T_TIE_OFFSET,4,2           ## @FEC_T_TIE_OFFSET
	.comm	_FEC_T_TDRE_OFFSET,4,2          ## @FEC_T_TDRE_OFFSET
	.comm	_FEC_HIGH_PULSE,4,2             ## @FEC_HIGH_PULSE
	.comm	_FEC_T_TMODE_OFFSET,4,2         ## @FEC_T_TMODE_OFFSET
	.no_dead_strip	_fec_ptp_enable_pps
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fec_ptp_enable_pps
_fec_ptp_enable_pps:                    ; @fec_ptp_enable_pps
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x1
	mov	x19, x0
	ldr	x8, [x0, #56]
	cbnz	x8, LBB0_2
; %bb.1:
	ldr	x8, [x19, #48]
	cbz	x8, LBB0_11
LBB0_2:
	ldr	x8, [x19]
	cmp	x8, x20
	b.eq	LBB0_9
; %bb.3:
Lloh0:
	adrp	x8, _DEFAULT_PPS_CHANNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DEFAULT_PPS_CHANNEL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x19, #20]
Lloh3:
	adrp	x8, _PPS_OUPUT_RELOAD_PERIOD@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PPS_OUPUT_RELOAD_PERIOD@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x19, #8]
	add	x21, x19, #16
	mov	x0, x21
	bl	_spin_lock_irqsave
	cbz	x20, LBB0_7
; %bb.4:
Lloh6:
	adrp	x8, _FEC_T_TF_MASK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _FEC_T_TF_MASK@GOTPAGEOFF]
Lloh8:
	ldr	w22, [x8]
	ldr	x23, [x19, #24]
	ldr	w0, [x19, #20]
	bl	_FEC_TCSR
	add	x1, x0, x23
	mov	x0, x22
	bl	_writel
	ldr	x22, [x19, #24]
	ldr	w0, [x19, #20]
	bl	_FEC_TCSR
	add	x0, x0, x22
	bl	_readl
Lloh9:
	adrp	x24, _FEC_T_TMODE_MASK@GOTPAGE
Lloh10:
	ldr	x24, [x24, _FEC_T_TMODE_MASK@GOTPAGEOFF]
	ldr	w8, [x24]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	bic	w22, w0, w8
	ldr	x23, [x19, #24]
	ldr	w0, [x19, #20]
	bl	_FEC_TCSR
	add	x1, x0, x23
	mov	x0, x22
	bl	_writel
	ldr	x22, [x19, #24]
	ldr	w0, [x19, #20]
	bl	_FEC_TCSR
	add	x0, x0, x22
	bl	_readl
	ldr	w8, [x24]
	tst	w8, w0
	b.ne	LBB0_5
; %bb.6:
	add	x22, x19, #36
	mov	x0, x22
	bl	_timecounter_read
	ldr	x8, [x19, #24]
Lloh11:
	adrp	x25, _FEC_ATIME_CTRL@GOTPAGE
Lloh12:
	ldr	x25, [x25, _FEC_ATIME_CTRL@GOTPAGEOFF]
	ldr	x9, [x25]
	add	x0, x9, x8
	bl	_readl
Lloh13:
	adrp	x8, _FEC_T_CTRL_CAPTURE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _FEC_T_CTRL_CAPTURE@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	orr	w0, w8, w0
	ldr	x8, [x19, #24]
	ldr	x9, [x25]
	add	x1, x9, x8
	bl	_writel
	ldr	x8, [x19, #24]
Lloh16:
	adrp	x9, _FEC_ATIME@GOTPAGE
Lloh17:
	ldr	x9, [x9, _FEC_ATIME@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl
	mov	x23, x0
	mov	x0, x22
	mov	x1, x23
	bl	_timecounter_cyc2time
	bl	_ns_to_timespec64
Lloh19:
	adrp	x8, _NSEC_PER_SEC@GOTPAGE
Lloh20:
	ldr	x8, [x8, _NSEC_PER_SEC@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	sub	w9, w23, w0
	add	w8, w9, w8, lsl #1
	ldr	w9, [x19, #32]
	and	w22, w8, w9
	ldr	x23, [x19, #24]
	ldr	w0, [x19, #20]
	bl	_FEC_TCCR
	add	x1, x0, x23
	mov	x0, x22
	bl	_writel
	ldr	w8, [x19, #8]
	ldr	w9, [x19, #32]
	add	w8, w8, w22
	and	w8, w8, w9
	str	w8, [x19, #12]
	ldr	x8, [x19, #24]
	ldr	x9, [x25]
	add	x0, x9, x8
	bl	_readl
Lloh22:
	adrp	x8, _FEC_T_CTRL_PINPER@GOTPAGE
Lloh23:
	ldr	x8, [x8, _FEC_T_CTRL_PINPER@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	orr	w0, w8, w0
	ldr	x8, [x19, #24]
	ldr	x9, [x25]
	add	x1, x9, x8
	bl	_writel
	ldr	x22, [x19, #24]
	ldr	w0, [x19, #20]
	bl	_FEC_TCSR
	add	x0, x0, x22
	bl	_readl
Lloh25:
	adrp	x8, _FEC_T_TF_OFFSET@GOTPAGE
Lloh26:
	ldr	x8, [x8, _FEC_T_TF_OFFSET@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	mov	w9, #1
	lsl	w8, w9, w8
Lloh28:
	adrp	x10, _FEC_T_TIE_OFFSET@GOTPAGE
Lloh29:
	ldr	x10, [x10, _FEC_T_TIE_OFFSET@GOTPAGEOFF]
Lloh30:
	ldr	w10, [x10]
	lsl	w10, w9, w10
	orr	w8, w8, w0
	orr	w8, w8, w10
Lloh31:
	adrp	x10, _FEC_T_TDRE_OFFSET@GOTPAGE
Lloh32:
	ldr	x10, [x10, _FEC_T_TDRE_OFFSET@GOTPAGEOFF]
Lloh33:
	ldr	w10, [x10]
	lsl	w9, w9, w10
	ldr	w10, [x24]
	orr	w9, w9, w10
	bic	w8, w8, w9
Lloh34:
	adrp	x9, _FEC_HIGH_PULSE@GOTPAGE
Lloh35:
	ldr	x9, [x9, _FEC_HIGH_PULSE@GOTPAGEOFF]
Lloh36:
	adrp	x10, _FEC_T_TMODE_OFFSET@GOTPAGE
Lloh37:
	ldr	x10, [x10, _FEC_T_TMODE_OFFSET@GOTPAGEOFF]
Lloh38:
	ldr	w9, [x9]
Lloh39:
	ldr	w10, [x10]
	lsl	w9, w9, w10
	orr	w22, w9, w8
	ldr	x23, [x19, #24]
	ldr	w0, [x19, #20]
	bl	_FEC_TCSR
	add	x1, x0, x23
	mov	x0, x22
	bl	_writel
	ldr	w22, [x19, #12]
	ldr	x23, [x19, #24]
	ldr	w0, [x19, #20]
	bl	_FEC_TCCR
	add	x1, x0, x23
	mov	x0, x22
	bl	_writel
	ldp	w9, w8, [x19, #8]
	ldr	w10, [x19, #32]
	add	w8, w9, w8
	and	w8, w8, w10
	str	w8, [x19, #12]
	b	LBB0_8
LBB0_7:
	ldr	x22, [x19, #24]
	ldr	w0, [x19, #20]
	bl	_FEC_TCSR
	add	x1, x0, x22
	mov	w0, #0
	bl	_writel
LBB0_8:
	str	x20, [x19]
	mov	x0, x21
	bl	_spin_unlock_irqrestore
LBB0_9:
	mov	w0, #0
LBB0_10:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_11:
	ldr	x0, [x19, #40]
Lloh40:
	adrp	x1, l_.str@PAGE
Lloh41:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh42:
	adrp	x8, _EINVAL@GOTPAGE
Lloh43:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh44:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh38
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpAdd	Lloh40, Lloh41
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"No ptp stack is running\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_DEFAULT_PPS_CHANNEL,4,2        ; @DEFAULT_PPS_CHANNEL
	.comm	_PPS_OUPUT_RELOAD_PERIOD,4,2    ; @PPS_OUPUT_RELOAD_PERIOD
	.comm	_FEC_T_TF_MASK,4,2              ; @FEC_T_TF_MASK
	.comm	_FEC_T_TMODE_MASK,4,2           ; @FEC_T_TMODE_MASK
	.comm	_FEC_ATIME_CTRL,8,3             ; @FEC_ATIME_CTRL
	.comm	_FEC_T_CTRL_CAPTURE,4,2         ; @FEC_T_CTRL_CAPTURE
	.comm	_FEC_ATIME,8,3                  ; @FEC_ATIME
	.comm	_NSEC_PER_SEC,4,2               ; @NSEC_PER_SEC
	.comm	_FEC_T_CTRL_PINPER,4,2          ; @FEC_T_CTRL_PINPER
	.comm	_FEC_T_TF_OFFSET,4,2            ; @FEC_T_TF_OFFSET
	.comm	_FEC_T_TIE_OFFSET,4,2           ; @FEC_T_TIE_OFFSET
	.comm	_FEC_T_TDRE_OFFSET,4,2          ; @FEC_T_TDRE_OFFSET
	.comm	_FEC_HIGH_PULSE,4,2             ; @FEC_HIGH_PULSE
	.comm	_FEC_T_TMODE_OFFSET,4,2         ; @FEC_T_TMODE_OFFSET
	.no_dead_strip	_fec_ptp_enable_pps
.subsections_via_symbols
