	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlxsw_sp1_ptp_init             ## -- Begin function mlxsw_sp1_ptp_init
	.p2align	4, 0x90
_mlxsw_sp1_ptp_init:                    ## @mlxsw_sp1_ptp_init
	.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	%rdi, %rbx
	callq	_mlxsw_sp1_ptp_shaper_params_set
	testl	%eax, %eax
	je	LBB0_3
## %bb.1:
	movl	%eax, %edi
	jmp	LBB0_2
LBB0_3:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$24, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %r14
	movq	%rbx, 16(%rax)
	leaq	8(%rax), %rdi
	callq	_spin_lock_init
	movq	_mlxsw_sp1_ptp_unmatched_ht_params@GOTPCREL(%rip), %rsi
	movq	%r14, %rdi
	callq	_rhltable_init
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_12
## %bb.6:
	movq	_MLXSW_SP_PTP_MESSAGE_TYPE_SYNC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT
	movl	%eax, %r15d
	movq	_MLXSW_SP_PTP_MESSAGE_TYPE_DELAY_REQ@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT
	movl	%eax, %r13d
	orl	%r15d, %r13d
	movq	_MLXSW_SP_PTP_MESSAGE_TYPE_PDELAY_REQ@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT
	movl	%eax, %r15d
	movq	_MLXSW_SP_PTP_MESSAGE_TYPE_PDELAY_RESP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT
	movl	%eax, %r12d
	orl	%r15d, %r12d
	orl	%r13d, %r12d
	movq	_MLXSW_REG_MTPTPT_TRAP_ID_PTP0@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%rbx, %rdi
	movl	%r12d, %edx
	callq	_mlxsw_sp_ptp_mtptpt_set
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_11
## %bb.7:
	notl	%r12d
	movq	_MLXSW_REG_MTPTPT_TRAP_ID_PTP1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r12d, %edx
	callq	_mlxsw_sp_ptp_mtptpt_set
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_10
## %bb.8:
	movq	_MLXSW_REG_MTPTPT_TRAP_ID_PTP1@GOTPCREL(%rip), %r12
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_mlxsw_sp1_ptp_set_fifo_clr_on_trap
	testl	%eax, %eax
	je	LBB0_13
## %bb.9:
	movl	%eax, %r15d
	movl	(%r12), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_mlxsw_sp_ptp_mtptpt_set
LBB0_10:
	movl	(%r13), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_mlxsw_sp_ptp_mtptpt_set
LBB0_11:
	movq	%r14, %rdi
	callq	_rhltable_destroy
LBB0_12:
	movq	%r14, %rdi
	callq	_kfree
	movl	%r15d, %edi
	jmp	LBB0_2
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
LBB0_2:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_13:
	movq	%r14, %rbx
	addq	$4, %rbx
	movq	_mlxsw_sp1_ptp_ht_gc@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_INIT_DELAYED_WORK
	movq	_MLXSW_SP1_PTP_HT_GC_INTERVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_mlxsw_core_schedule_dw
	movq	%r14, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_mlxsw_sp1_ptp_unmatched_ht_params,4,2 ## @mlxsw_sp1_ptp_unmatched_ht_params
	.comm	_MLXSW_SP_PTP_MESSAGE_TYPE_SYNC,4,2 ## @MLXSW_SP_PTP_MESSAGE_TYPE_SYNC
	.comm	_MLXSW_SP_PTP_MESSAGE_TYPE_DELAY_REQ,4,2 ## @MLXSW_SP_PTP_MESSAGE_TYPE_DELAY_REQ
	.comm	_MLXSW_SP_PTP_MESSAGE_TYPE_PDELAY_REQ,4,2 ## @MLXSW_SP_PTP_MESSAGE_TYPE_PDELAY_REQ
	.comm	_MLXSW_SP_PTP_MESSAGE_TYPE_PDELAY_RESP,4,2 ## @MLXSW_SP_PTP_MESSAGE_TYPE_PDELAY_RESP
	.comm	_MLXSW_REG_MTPTPT_TRAP_ID_PTP0,4,2 ## @MLXSW_REG_MTPTPT_TRAP_ID_PTP0
	.comm	_MLXSW_REG_MTPTPT_TRAP_ID_PTP1,4,2 ## @MLXSW_REG_MTPTPT_TRAP_ID_PTP1
	.comm	_mlxsw_sp1_ptp_ht_gc,4,2        ## @mlxsw_sp1_ptp_ht_gc
	.comm	_MLXSW_SP1_PTP_HT_GC_INTERVAL,4,2 ## @MLXSW_SP1_PTP_HT_GC_INTERVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlxsw_sp1_ptp_init             ; -- Begin function mlxsw_sp1_ptp_init
	.p2align	2
_mlxsw_sp1_ptp_init:                    ; @mlxsw_sp1_ptp_init
	.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, x0
	bl	_mlxsw_sp1_ptp_shaper_params_set
	cbnz	w0, LBB0_11
; %bb.1:
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #24
	bl	_kzalloc
	cbz	x0, LBB0_10
; %bb.2:
	mov	x19, x0
	str	x20, [x0, #16]
	add	x0, x0, #8
	bl	_spin_lock_init
Lloh3:
	adrp	x1, _mlxsw_sp1_ptp_unmatched_ht_params@GOTPAGE
Lloh4:
	ldr	x1, [x1, _mlxsw_sp1_ptp_unmatched_ht_params@GOTPAGEOFF]
	mov	x0, x19
	bl	_rhltable_init
	mov	x21, x0
	cbnz	w0, LBB0_9
; %bb.3:
Lloh5:
	adrp	x8, _MLXSW_SP_PTP_MESSAGE_TYPE_SYNC@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MLXSW_SP_PTP_MESSAGE_TYPE_SYNC@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	bl	_BIT
	mov	x21, x0
Lloh8:
	adrp	x8, _MLXSW_SP_PTP_MESSAGE_TYPE_DELAY_REQ@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MLXSW_SP_PTP_MESSAGE_TYPE_DELAY_REQ@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	bl	_BIT
	orr	w21, w0, w21
Lloh11:
	adrp	x8, _MLXSW_SP_PTP_MESSAGE_TYPE_PDELAY_REQ@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MLXSW_SP_PTP_MESSAGE_TYPE_PDELAY_REQ@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	bl	_BIT
	orr	w21, w21, w0
Lloh14:
	adrp	x8, _MLXSW_SP_PTP_MESSAGE_TYPE_PDELAY_RESP@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MLXSW_SP_PTP_MESSAGE_TYPE_PDELAY_RESP@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	bl	_BIT
	orr	w22, w21, w0
Lloh17:
	adrp	x23, _MLXSW_REG_MTPTPT_TRAP_ID_PTP0@GOTPAGE
Lloh18:
	ldr	x23, [x23, _MLXSW_REG_MTPTPT_TRAP_ID_PTP0@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x20
	mov	x2, x22
	bl	_mlxsw_sp_ptp_mtptpt_set
	mov	x21, x0
	cbnz	w0, LBB0_8
; %bb.4:
	mvn	w2, w22
Lloh19:
	adrp	x22, _MLXSW_REG_MTPTPT_TRAP_ID_PTP1@GOTPAGE
Lloh20:
	ldr	x22, [x22, _MLXSW_REG_MTPTPT_TRAP_ID_PTP1@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x20
	bl	_mlxsw_sp_ptp_mtptpt_set
	mov	x21, x0
	cbnz	w0, LBB0_7
; %bb.5:
	mov	x0, x20
	mov	w1, #1
	bl	_mlxsw_sp1_ptp_set_fifo_clr_on_trap
	cbz	w0, LBB0_12
; %bb.6:
	mov	x21, x0
	ldr	w1, [x22]
	mov	x0, x20
	mov	w2, #0
	bl	_mlxsw_sp_ptp_mtptpt_set
LBB0_7:
	ldr	w1, [x23]
	mov	x0, x20
	mov	w2, #0
	bl	_mlxsw_sp_ptp_mtptpt_set
LBB0_8:
	mov	x0, x19
	bl	_rhltable_destroy
LBB0_9:
	mov	x0, x19
	bl	_kfree
	mov	x0, x21
	b	LBB0_11
LBB0_10:
Lloh21:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_11:
	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	_ERR_PTR
LBB0_12:
	add	x20, x19, #4
Lloh24:
	adrp	x8, _mlxsw_sp1_ptp_ht_gc@GOTPAGE
Lloh25:
	ldr	x8, [x8, _mlxsw_sp1_ptp_ht_gc@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_INIT_DELAYED_WORK
Lloh27:
	adrp	x8, _MLXSW_SP1_PTP_HT_GC_INTERVAL@GOTPAGE
Lloh28:
	ldr	x8, [x8, _MLXSW_SP1_PTP_HT_GC_INTERVAL@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_mlxsw_core_schedule_dw
	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
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_mlxsw_sp1_ptp_unmatched_ht_params,4,2 ; @mlxsw_sp1_ptp_unmatched_ht_params
	.comm	_MLXSW_SP_PTP_MESSAGE_TYPE_SYNC,4,2 ; @MLXSW_SP_PTP_MESSAGE_TYPE_SYNC
	.comm	_MLXSW_SP_PTP_MESSAGE_TYPE_DELAY_REQ,4,2 ; @MLXSW_SP_PTP_MESSAGE_TYPE_DELAY_REQ
	.comm	_MLXSW_SP_PTP_MESSAGE_TYPE_PDELAY_REQ,4,2 ; @MLXSW_SP_PTP_MESSAGE_TYPE_PDELAY_REQ
	.comm	_MLXSW_SP_PTP_MESSAGE_TYPE_PDELAY_RESP,4,2 ; @MLXSW_SP_PTP_MESSAGE_TYPE_PDELAY_RESP
	.comm	_MLXSW_REG_MTPTPT_TRAP_ID_PTP0,4,2 ; @MLXSW_REG_MTPTPT_TRAP_ID_PTP0
	.comm	_MLXSW_REG_MTPTPT_TRAP_ID_PTP1,4,2 ; @MLXSW_REG_MTPTPT_TRAP_ID_PTP1
	.comm	_mlxsw_sp1_ptp_ht_gc,4,2        ; @mlxsw_sp1_ptp_ht_gc
	.comm	_MLXSW_SP1_PTP_HT_GC_INTERVAL,4,2 ; @MLXSW_SP1_PTP_HT_GC_INTERVAL
.subsections_via_symbols
