	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_lan743x_ptp_close              ## -- Begin function lan743x_ptp_close
	.p2align	4, 0x90
_lan743x_ptp_close:                     ## @lan743x_ptp_close
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	_CONFIG_PTP_1588_CLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_IS_ENABLED
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	_PTP_FLAG_PTP_CLOCK_REGISTERED@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	testl	%eax, 8(%r12)
	je	LBB0_3
## %bb.2:
	movq	64(%r12), %rdi
	callq	_ptp_clock_unregister
	movq	$0, 64(%r12)
	movl	(%rbx), %eax
	notl	%eax
	andl	%eax, 8(%r12)
	movq	_drv@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r12), %edx
	leaq	L_.str(%rip), %rcx
	movq	%r12, %rdi
	callq	_netif_info
LBB0_3:
	movq	_PTP_FLAG_ISR_ENABLED@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	testl	%eax, 8(%r12)
	je	LBB0_5
## %bb.4:
	movq	_PTP_INT_EN_CLR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_PTP_INT_BIT_TX_SWTS_ERR_@GOTPCREL(%rip), %rax
	movq	_PTP_INT_BIT_TX_TS_@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	%r12, %rdi
	callq	_lan743x_csr_write
	movq	_INT_EN_CLR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_INT_BIT_1588_@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	callq	_lan743x_csr_write
	movl	(%r14), %eax
	notl	%eax
	andl	%eax, 8(%r12)
LBB0_5:
	movq	%r12, %rdi
	callq	_lan743x_ptp_tx_ts_complete
	leaq	12(%r12), %r14
	movq	%r14, %rdi
	callq	_spin_lock_bh
	movq	_LAN743X_PTP_NUMBER_OF_TX_TIMESTAMPS@GOTPCREL(%rip), %r15
	cmpl	$0, (%r15)
	jle	LBB0_8
## %bb.6:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	56(%r12), %rax
	movq	(%rax,%rbx,8), %rdi
	callq	_dev_kfree_skb
	movq	56(%r12), %rax
	movq	$0, (%rax,%rbx,8)
	movq	48(%r12), %rax
	movq	$0, (%rax,%rbx,8)
	movq	40(%r12), %rax
	movq	$0, (%rax,%rbx,8)
	incq	%rbx
	movslq	(%r15), %rax
	cmpq	%rax, %rbx
	jl	LBB0_7
LBB0_8:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%r12)
	movq	$0, 32(%r12)
	movq	%r14, %rdi
	callq	_spin_unlock_bh
	movq	%r12, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_lan743x_ptp_disable            ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_CONFIG_PTP_1588_CLOCK,4,2      ## @CONFIG_PTP_1588_CLOCK
	.comm	_PTP_FLAG_PTP_CLOCK_REGISTERED,4,2 ## @PTP_FLAG_PTP_CLOCK_REGISTERED
	.comm	_drv,4,2                        ## @drv
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ptp clock unregister\n"

	.comm	_PTP_FLAG_ISR_ENABLED,4,2       ## @PTP_FLAG_ISR_ENABLED
	.comm	_PTP_INT_EN_CLR,4,2             ## @PTP_INT_EN_CLR
	.comm	_PTP_INT_BIT_TX_SWTS_ERR_,4,2   ## @PTP_INT_BIT_TX_SWTS_ERR_
	.comm	_PTP_INT_BIT_TX_TS_,4,2         ## @PTP_INT_BIT_TX_TS_
	.comm	_INT_EN_CLR,4,2                 ## @INT_EN_CLR
	.comm	_INT_BIT_1588_,4,2              ## @INT_BIT_1588_
	.comm	_LAN743X_PTP_NUMBER_OF_TX_TIMESTAMPS,4,2 ## @LAN743X_PTP_NUMBER_OF_TX_TIMESTAMPS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_lan743x_ptp_close              ; -- Begin function lan743x_ptp_close
	.p2align	2
_lan743x_ptp_close:                     ; @lan743x_ptp_close
	.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	x19, x0
Lloh0:
	adrp	x8, _CONFIG_PTP_1588_CLOCK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CONFIG_PTP_1588_CLOCK@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_IS_ENABLED
	cbz	x0, LBB0_3
; %bb.1:
	ldr	w8, [x19, #8]
Lloh3:
	adrp	x20, _PTP_FLAG_PTP_CLOCK_REGISTERED@GOTPAGE
Lloh4:
	ldr	x20, [x20, _PTP_FLAG_PTP_CLOCK_REGISTERED@GOTPAGEOFF]
	ldr	w9, [x20]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.2:
	ldr	x0, [x19, #64]
	bl	_ptp_clock_unregister
	str	xzr, [x19, #64]
	ldr	w8, [x20]
	ldr	w9, [x19, #8]
	bic	w8, w9, w8
	str	w8, [x19, #8]
Lloh5:
	adrp	x8, _drv@GOTPAGE
Lloh6:
	ldr	x8, [x8, _drv@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	ldr	w2, [x19]
Lloh8:
	adrp	x3, l_.str@PAGE
Lloh9:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x19
	bl	_netif_info
LBB0_3:
	ldr	w8, [x19, #8]
Lloh10:
	adrp	x20, _PTP_FLAG_ISR_ENABLED@GOTPAGE
Lloh11:
	ldr	x20, [x20, _PTP_FLAG_ISR_ENABLED@GOTPAGEOFF]
	ldr	w9, [x20]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.4:
Lloh12:
	adrp	x8, _PTP_INT_EN_CLR@GOTPAGE
Lloh13:
	ldr	x8, [x8, _PTP_INT_EN_CLR@GOTPAGEOFF]
Lloh14:
	adrp	x9, _PTP_INT_BIT_TX_SWTS_ERR_@GOTPAGE
Lloh15:
	ldr	x9, [x9, _PTP_INT_BIT_TX_SWTS_ERR_@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
Lloh17:
	ldr	w8, [x9]
Lloh18:
	adrp	x9, _PTP_INT_BIT_TX_TS_@GOTPAGE
Lloh19:
	ldr	x9, [x9, _PTP_INT_BIT_TX_TS_@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x19
	bl	_lan743x_csr_write
Lloh21:
	adrp	x8, _INT_EN_CLR@GOTPAGE
Lloh22:
	ldr	x8, [x8, _INT_EN_CLR@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
Lloh24:
	adrp	x8, _INT_BIT_1588_@GOTPAGE
Lloh25:
	ldr	x8, [x8, _INT_BIT_1588_@GOTPAGEOFF]
Lloh26:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_lan743x_csr_write
	ldr	w8, [x20]
	ldr	w9, [x19, #8]
	bic	w8, w9, w8
	str	w8, [x19, #8]
LBB0_5:
	mov	x0, x19
	bl	_lan743x_ptp_tx_ts_complete
	add	x20, x19, #12
	mov	x0, x20
	bl	_spin_lock_bh
Lloh27:
	adrp	x21, _LAN743X_PTP_NUMBER_OF_TX_TIMESTAMPS@GOTPAGE
Lloh28:
	ldr	x21, [x21, _LAN743X_PTP_NUMBER_OF_TX_TIMESTAMPS@GOTPAGEOFF]
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.6:
	mov	x22, #0
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #56]
	lsl	x23, x22, #3
	ldr	x0, [x8, x23]
	bl	_dev_kfree_skb
	ldr	x8, [x19, #56]
	str	xzr, [x8, x23]
	ldp	x9, x8, [x19, #40]
	str	xzr, [x8, x23]
	str	xzr, [x9, x23]
	add	x22, x22, #1
	ldrsw	x8, [x21]
	cmp	x22, x8
	b.lt	LBB0_7
LBB0_8:
	stp	xzr, xzr, [x19, #16]
	str	xzr, [x19, #32]
	mov	x0, x20
	bl	_spin_unlock_bh
	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	_lan743x_ptp_disable
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh16
	.loh AdrpLdrGot	Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_CONFIG_PTP_1588_CLOCK,4,2      ; @CONFIG_PTP_1588_CLOCK
	.comm	_PTP_FLAG_PTP_CLOCK_REGISTERED,4,2 ; @PTP_FLAG_PTP_CLOCK_REGISTERED
	.comm	_drv,4,2                        ; @drv
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ptp clock unregister\n"

	.comm	_PTP_FLAG_ISR_ENABLED,4,2       ; @PTP_FLAG_ISR_ENABLED
	.comm	_PTP_INT_EN_CLR,4,2             ; @PTP_INT_EN_CLR
	.comm	_PTP_INT_BIT_TX_SWTS_ERR_,4,2   ; @PTP_INT_BIT_TX_SWTS_ERR_
	.comm	_PTP_INT_BIT_TX_TS_,4,2         ; @PTP_INT_BIT_TX_TS_
	.comm	_INT_EN_CLR,4,2                 ; @INT_EN_CLR
	.comm	_INT_BIT_1588_,4,2              ; @INT_BIT_1588_
	.comm	_LAN743X_PTP_NUMBER_OF_TX_TIMESTAMPS,4,2 ; @LAN743X_PTP_NUMBER_OF_TX_TIMESTAMPS
.subsections_via_symbols
