	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ocelot_get_hwtimestamp         ## -- Begin function ocelot_get_hwtimestamp
	.p2align	4, 0x90
_ocelot_get_hwtimestamp:                ## @ocelot_get_hwtimestamp
	.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, %r14
	movq	%rdi, %r15
	callq	_spin_lock_irqsave
	movq	_PTP_PIN_CFG@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	_TOD_ACC_PIN@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	movq	%r15, %rdi
	callq	_ocelot_read_rix
	movq	_PTP_PIN_CFG_SYNC@GOTPCREL(%rip), %rcx
	movq	_PTP_PIN_CFG_ACTION_MASK@GOTPCREL(%rip), %rdx
	movl	(%rdx), %ebx
	orl	(%rcx), %ebx
	movq	_PTP_PIN_CFG_DOM@GOTPCREL(%rip), %rcx
	orl	(%rcx), %ebx
	notl	%ebx
	andl	%eax, %ebx
	movq	_PTP_PIN_ACTION_SAVE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_PTP_PIN_CFG_ACTION
	orl	%eax, %ebx
	movl	(%r13), %edx
	movl	(%r12), %ecx
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_ocelot_write_rix
	movq	_PTP_PIN_TOD_SEC_LSB@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r12), %edx
	movq	%r15, %rdi
	callq	_ocelot_read_rix
	movl	%eax, (%r14)
	movq	_SYS_PTP_TXSTAMP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_ocelot_read
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_SYS_PTP_TXSTAMP_PTP_TXSTAMP
	movl	%eax, 4(%r14)
	movq	_SYS_PTP_TXSTAMP_PTP_TXSTAMP_SEC@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	movl	(%r14), %eax
	sete	%cl
	xorb	%al, %cl
	testb	$1, %cl
	jne	LBB0_2
## %bb.1:
	decl	%eax
	movl	%eax, (%r14)
LBB0_2:
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock_irqrestore         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_PTP_PIN_CFG,4,2                ## @PTP_PIN_CFG
	.comm	_TOD_ACC_PIN,4,2                ## @TOD_ACC_PIN
	.comm	_PTP_PIN_CFG_SYNC,4,2           ## @PTP_PIN_CFG_SYNC
	.comm	_PTP_PIN_CFG_ACTION_MASK,4,2    ## @PTP_PIN_CFG_ACTION_MASK
	.comm	_PTP_PIN_CFG_DOM,4,2            ## @PTP_PIN_CFG_DOM
	.comm	_PTP_PIN_ACTION_SAVE,4,2        ## @PTP_PIN_ACTION_SAVE
	.comm	_PTP_PIN_TOD_SEC_LSB,4,2        ## @PTP_PIN_TOD_SEC_LSB
	.comm	_SYS_PTP_TXSTAMP,4,2            ## @SYS_PTP_TXSTAMP
	.comm	_SYS_PTP_TXSTAMP_PTP_TXSTAMP_SEC,4,2 ## @SYS_PTP_TXSTAMP_PTP_TXSTAMP_SEC
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ocelot_get_hwtimestamp         ; -- Begin function ocelot_get_hwtimestamp
	.p2align	2
_ocelot_get_hwtimestamp:                ; @ocelot_get_hwtimestamp
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x1
	mov	x19, x0
	bl	_spin_lock_irqsave
Lloh0:
	adrp	x21, _PTP_PIN_CFG@GOTPAGE
Lloh1:
	ldr	x21, [x21, _PTP_PIN_CFG@GOTPAGEOFF]
	ldr	w1, [x21]
Lloh2:
	adrp	x22, _TOD_ACC_PIN@GOTPAGE
Lloh3:
	ldr	x22, [x22, _TOD_ACC_PIN@GOTPAGEOFF]
	ldr	w2, [x22]
	mov	x0, x19
	bl	_ocelot_read_rix
Lloh4:
	adrp	x8, _PTP_PIN_CFG_SYNC@GOTPAGE
Lloh5:
	ldr	x8, [x8, _PTP_PIN_CFG_SYNC@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
Lloh7:
	adrp	x9, _PTP_PIN_CFG_ACTION_MASK@GOTPAGE
Lloh8:
	ldr	x9, [x9, _PTP_PIN_CFG_ACTION_MASK@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh10:
	adrp	x9, _PTP_PIN_CFG_DOM@GOTPAGE
Lloh11:
	ldr	x9, [x9, _PTP_PIN_CFG_DOM@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	orr	w8, w8, w9
	bic	w23, w0, w8
Lloh13:
	adrp	x8, _PTP_PIN_ACTION_SAVE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _PTP_PIN_ACTION_SAVE@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	bl	_PTP_PIN_CFG_ACTION
	orr	w1, w23, w0
	ldr	w2, [x21]
	ldr	w3, [x22]
	mov	x0, x19
	bl	_ocelot_write_rix
Lloh16:
	adrp	x8, _PTP_PIN_TOD_SEC_LSB@GOTPAGE
Lloh17:
	ldr	x8, [x8, _PTP_PIN_TOD_SEC_LSB@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	ldr	w2, [x22]
	mov	x0, x19
	bl	_ocelot_read_rix
	str	w0, [x20]
Lloh19:
	adrp	x8, _SYS_PTP_TXSTAMP@GOTPAGE
Lloh20:
	ldr	x8, [x8, _SYS_PTP_TXSTAMP@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ocelot_read
	mov	x21, x0
	bl	_SYS_PTP_TXSTAMP_PTP_TXSTAMP
	str	w0, [x20, #4]
	ldr	w8, [x20]
Lloh22:
	adrp	x9, _SYS_PTP_TXSTAMP_PTP_TXSTAMP_SEC@GOTPAGE
Lloh23:
	ldr	x9, [x9, _SYS_PTP_TXSTAMP_PTP_TXSTAMP_SEC@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	tst	w9, w21
	cset	w9, eq
	eor	w9, w8, w9
	tbnz	w9, #0, LBB0_2
; %bb.1:
	sub	w8, w8, #1
	str	w8, [x20]
LBB0_2:
	mov	x0, x19
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_spin_unlock_irqrestore
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_PTP_PIN_CFG,4,2                ; @PTP_PIN_CFG
	.comm	_TOD_ACC_PIN,4,2                ; @TOD_ACC_PIN
	.comm	_PTP_PIN_CFG_SYNC,4,2           ; @PTP_PIN_CFG_SYNC
	.comm	_PTP_PIN_CFG_ACTION_MASK,4,2    ; @PTP_PIN_CFG_ACTION_MASK
	.comm	_PTP_PIN_CFG_DOM,4,2            ; @PTP_PIN_CFG_DOM
	.comm	_PTP_PIN_ACTION_SAVE,4,2        ; @PTP_PIN_ACTION_SAVE
	.comm	_PTP_PIN_TOD_SEC_LSB,4,2        ; @PTP_PIN_TOD_SEC_LSB
	.comm	_SYS_PTP_TXSTAMP,4,2            ; @SYS_PTP_TXSTAMP
	.comm	_SYS_PTP_TXSTAMP_PTP_TXSTAMP_SEC,4,2 ; @SYS_PTP_TXSTAMP_PTP_TXSTAMP_SEC
.subsections_via_symbols
