	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_lan743x_ptp_open               ## -- Begin function lan743x_ptp_open
	.p2align	4, 0x90
_lan743x_ptp_open:                      ## @lan743x_ptp_open
	.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, %rbx
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	callq	_lan743x_ptp_reset
	movq	%rbx, %rdi
	callq	_lan743x_ptp_sync_to_system_clock
	movq	_PTP_TX_MOD2@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_lan743x_csr_read
	movq	_PTP_TX_MOD2_TX_PTP_CLR_UDPV4_CHKSUM_@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	(%r15), %esi
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_lan743x_csr_write
	movq	%rbx, %rdi
	callq	_lan743x_ptp_enable
	movq	_INT_EN_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_INT_BIT_1588_@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_lan743x_csr_write
	movq	_PTP_INT_EN_SET@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	%rbx, %rdi
	callq	_lan743x_csr_write
	movq	_PTP_FLAG_ISR_ENABLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 16(%rbx)
	movq	_CONFIG_PTP_1588_CLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_IS_ENABLED
	testl	%eax, %eax
	je	LBB0_4
## %bb.1:
	movq	136(%rbx), %rax
	movl	24(%rax), %edi
	leaq	L_.str(%rip), %rdx
	xorl	%r14d, %r14d
	movl	$32, %esi
	xorl	%eax, %eax
	callq	_snprintf
	movq	136(%rbx), %rax
	movq	$0, 16(%rax)
	movq	_PTP_PF_PEROUT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 8(%rax)
	movq	$0, (%rax)
	movq	_THIS_MODULE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leaq	24(%rbx), %r15
	movl	%eax, 128(%rbx)
	movl	124(%rbx), %edi
	movq	(%rbx), %rax
	movl	(%rax), %ecx
	leaq	L_.str.1(%rip), %rdx
	movl	$16, %esi
	xorl	%eax, %eax
	callq	_snprintf
	movq	_LAN743X_PTP_MAX_FREQ_ADJ_IN_PPB@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 120(%rbx)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 104(%rbx)
	movl	$1, 24(%rbx)
	movups	%xmm0, 80(%rbx)
	movq	$0, 96(%rbx)
	movq	_lan743x_ptpci_adjfine@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 76(%rbx)
	movq	_lan743x_ptpci_adjfreq@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 72(%rbx)
	movq	_lan743x_ptpci_adjtime@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 68(%rbx)
	movq	_lan743x_ptpci_gettime64@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 64(%rbx)
	movq	$0, 56(%rbx)
	movq	_lan743x_ptpci_settime64@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 48(%rbx)
	movq	_lan743x_ptpci_enable@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 44(%rbx)
	movq	_lan743x_ptpci_do_aux_work@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%rbx)
	movq	$0, 32(%rbx)
	movq	8(%rbx), %rsi
	movq	%r15, %rdi
	callq	_ptp_clock_register
	movl	%eax, 20(%rbx)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	_ifup@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	(%rbx), %rdx
	leaq	L_.str.2(%rip), %rcx
	movq	%rbx, %rdi
	callq	_netif_err
	movq	%rbx, %rdi
	callq	_lan743x_ptp_close
	movl	%r12d, %r14d
	jmp	LBB0_4
LBB0_3:
	movq	_PTP_FLAG_PTP_CLOCK_REGISTERED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 16(%rbx)
	movq	_ifup@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	(%rbx), %rdx
	leaq	L_.str.3(%rip), %rcx
	movq	%rbx, %rdi
	callq	_netif_info
LBB0_4:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_PTP_TX_MOD2,4,2                ## @PTP_TX_MOD2
	.comm	_PTP_TX_MOD2_TX_PTP_CLR_UDPV4_CHKSUM_,4,2 ## @PTP_TX_MOD2_TX_PTP_CLR_UDPV4_CHKSUM_
	.comm	_INT_EN_SET,4,2                 ## @INT_EN_SET
	.comm	_INT_BIT_1588_,4,2              ## @INT_BIT_1588_
	.comm	_PTP_INT_EN_SET,4,2             ## @PTP_INT_EN_SET
	.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	_PTP_FLAG_ISR_ENABLED,4,2       ## @PTP_FLAG_ISR_ENABLED
	.comm	_CONFIG_PTP_1588_CLOCK,4,2      ## @CONFIG_PTP_1588_CLOCK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"lan743x_ptp_pin_0"

	.comm	_PTP_PF_PEROUT,4,2              ## @PTP_PF_PEROUT
	.comm	_THIS_MODULE,4,2                ## @THIS_MODULE
L_.str.1:                               ## @.str.1
	.asciz	"%pm"

	.comm	_LAN743X_PTP_MAX_FREQ_ADJ_IN_PPB,4,2 ## @LAN743X_PTP_MAX_FREQ_ADJ_IN_PPB
	.comm	_lan743x_ptpci_adjfine,4,2      ## @lan743x_ptpci_adjfine
	.comm	_lan743x_ptpci_adjfreq,4,2      ## @lan743x_ptpci_adjfreq
	.comm	_lan743x_ptpci_adjtime,4,2      ## @lan743x_ptpci_adjtime
	.comm	_lan743x_ptpci_gettime64,4,2    ## @lan743x_ptpci_gettime64
	.comm	_lan743x_ptpci_settime64,4,2    ## @lan743x_ptpci_settime64
	.comm	_lan743x_ptpci_enable,4,2       ## @lan743x_ptpci_enable
	.comm	_lan743x_ptpci_do_aux_work,4,2  ## @lan743x_ptpci_do_aux_work
	.comm	_ifup,4,2                       ## @ifup
L_.str.2:                               ## @.str.2
	.asciz	"ptp_clock_register failed\n"

	.comm	_PTP_FLAG_PTP_CLOCK_REGISTERED,4,2 ## @PTP_FLAG_PTP_CLOCK_REGISTERED
L_.str.3:                               ## @.str.3
	.asciz	"successfully registered ptp clock\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_lan743x_ptp_open               ; -- Begin function lan743x_ptp_open
	.p2align	2
_lan743x_ptp_open:                      ; @lan743x_ptp_open
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _ENODEV@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
	bl	_lan743x_ptp_reset
	mov	x0, x19
	bl	_lan743x_ptp_sync_to_system_clock
Lloh3:
	adrp	x20, _PTP_TX_MOD2@GOTPAGE
Lloh4:
	ldr	x20, [x20, _PTP_TX_MOD2@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_lan743x_csr_read
Lloh5:
	adrp	x8, _PTP_TX_MOD2_TX_PTP_CLR_UDPV4_CHKSUM_@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PTP_TX_MOD2_TX_PTP_CLR_UDPV4_CHKSUM_@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	orr	w2, w8, w0
	ldr	w1, [x20]
	mov	x0, x19
	bl	_lan743x_csr_write
	mov	x0, x19
	bl	_lan743x_ptp_enable
Lloh8:
	adrp	x8, _INT_EN_SET@GOTPAGE
Lloh9:
	ldr	x8, [x8, _INT_EN_SET@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x8, _INT_BIT_1588_@GOTPAGE
Lloh12:
	ldr	x8, [x8, _INT_BIT_1588_@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_lan743x_csr_write
Lloh14:
	adrp	x8, _PTP_INT_EN_SET@GOTPAGE
Lloh15:
	ldr	x8, [x8, _PTP_INT_EN_SET@GOTPAGEOFF]
Lloh16:
	adrp	x9, _PTP_INT_BIT_TX_SWTS_ERR_@GOTPAGE
Lloh17:
	ldr	x9, [x9, _PTP_INT_BIT_TX_SWTS_ERR_@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
Lloh19:
	ldr	w8, [x9]
Lloh20:
	adrp	x9, _PTP_INT_BIT_TX_TS_@GOTPAGE
Lloh21:
	ldr	x9, [x9, _PTP_INT_BIT_TX_TS_@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x19
	bl	_lan743x_csr_write
Lloh23:
	adrp	x8, _PTP_FLAG_ISR_ENABLED@GOTPAGE
Lloh24:
	ldr	x8, [x8, _PTP_FLAG_ISR_ENABLED@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	ldr	w9, [x19, #16]
	orr	w8, w9, w8
	str	w8, [x19, #16]
Lloh26:
	adrp	x8, _CONFIG_PTP_1588_CLOCK@GOTPAGE
Lloh27:
	ldr	x8, [x8, _CONFIG_PTP_1588_CLOCK@GOTPAGEOFF]
Lloh28:
	ldr	w0, [x8]
	bl	_IS_ENABLED
	cbz	w0, LBB0_4
; %bb.1:
	ldr	x8, [x19, #136]
	ldr	w0, [x8, #24]
Lloh29:
	adrp	x2, l_.str@PAGE
Lloh30:
	add	x2, x2, l_.str@PAGEOFF
	mov	w1, #32
	bl	_snprintf
	ldr	x8, [x19, #136]
	str	xzr, [x8, #16]
Lloh31:
	adrp	x9, _PTP_PF_PEROUT@GOTPAGE
Lloh32:
	ldr	x9, [x9, _PTP_PF_PEROUT@GOTPAGEOFF]
Lloh33:
	ldr	w9, [x9]
	str	w9, [x8, #8]
Lloh34:
	adrp	x9, _THIS_MODULE@GOTPAGE
Lloh35:
	ldr	x9, [x9, _THIS_MODULE@GOTPAGEOFF]
	str	xzr, [x8]
Lloh36:
	ldr	w8, [x9]
	str	w8, [x19, #128]
	ldr	w0, [x19, #124]
	ldr	x8, [x19]
	ldr	w8, [x8]
	str	x8, [sp]
Lloh37:
	adrp	x2, l_.str.1@PAGE
Lloh38:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	w1, #16
	bl	_snprintf
Lloh39:
	adrp	x8, _LAN743X_PTP_MAX_FREQ_ADJ_IN_PPB@GOTPAGE
Lloh40:
	ldr	x8, [x8, _LAN743X_PTP_MAX_FREQ_ADJ_IN_PPB@GOTPAGEOFF]
Lloh41:
	ldr	w8, [x8]
	mov	w9, #1
	mov	x20, x19
	str	w9, [x20, #24]!
	str	w8, [x20, #96]
	stp	xzr, xzr, [x20, #80]
	str	xzr, [x20, #72]
Lloh42:
	adrp	x8, _lan743x_ptpci_adjfine@GOTPAGE
Lloh43:
	ldr	x8, [x8, _lan743x_ptpci_adjfine@GOTPAGEOFF]
	stp	xzr, xzr, [x20, #56]
Lloh44:
	ldr	w8, [x8]
Lloh45:
	adrp	x9, _lan743x_ptpci_adjfreq@GOTPAGE
Lloh46:
	ldr	x9, [x9, _lan743x_ptpci_adjfreq@GOTPAGEOFF]
Lloh47:
	ldr	w9, [x9]
	stp	w9, w8, [x20, #48]
Lloh48:
	adrp	x8, _lan743x_ptpci_adjtime@GOTPAGE
Lloh49:
	ldr	x8, [x8, _lan743x_ptpci_adjtime@GOTPAGEOFF]
Lloh50:
	ldr	w8, [x8]
Lloh51:
	adrp	x9, _lan743x_ptpci_gettime64@GOTPAGE
Lloh52:
	ldr	x9, [x9, _lan743x_ptpci_gettime64@GOTPAGEOFF]
Lloh53:
	ldr	w9, [x9]
	stp	w9, w8, [x20, #40]
	str	xzr, [x20, #32]
Lloh54:
	adrp	x8, _lan743x_ptpci_settime64@GOTPAGE
Lloh55:
	ldr	x8, [x8, _lan743x_ptpci_settime64@GOTPAGEOFF]
Lloh56:
	ldr	w8, [x8]
	str	w8, [x20, #24]
Lloh57:
	adrp	x8, _lan743x_ptpci_enable@GOTPAGE
Lloh58:
	ldr	x8, [x8, _lan743x_ptpci_enable@GOTPAGEOFF]
Lloh59:
	adrp	x9, _lan743x_ptpci_do_aux_work@GOTPAGE
Lloh60:
	ldr	x9, [x9, _lan743x_ptpci_do_aux_work@GOTPAGEOFF]
Lloh61:
	ldr	w8, [x8]
Lloh62:
	ldr	w9, [x9]
	stp	w9, w8, [x20, #16]
	str	xzr, [x20, #8]
	ldur	x1, [x20, #-16]
	mov	x0, x20
	bl	_ptp_clock_register
	stur	w0, [x20, #-4]
	bl	_IS_ERR
	cbz	x0, LBB0_3
; %bb.2:
	neg	w20, w21
Lloh63:
	adrp	x8, _ifup@GOTPAGE
Lloh64:
	ldr	x8, [x8, _ifup@GOTPAGEOFF]
Lloh65:
	ldr	w1, [x8]
	ldr	x2, [x19]
Lloh66:
	adrp	x3, l_.str.2@PAGE
Lloh67:
	add	x3, x3, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_netif_err
	mov	x0, x19
	bl	_lan743x_ptp_close
	b	LBB0_5
LBB0_3:
Lloh68:
	adrp	x8, _PTP_FLAG_PTP_CLOCK_REGISTERED@GOTPAGE
Lloh69:
	ldr	x8, [x8, _PTP_FLAG_PTP_CLOCK_REGISTERED@GOTPAGEOFF]
Lloh70:
	ldr	w8, [x8]
	ldr	w9, [x19, #16]
	orr	w8, w9, w8
	str	w8, [x19, #16]
Lloh71:
	adrp	x8, _ifup@GOTPAGE
Lloh72:
	ldr	x8, [x8, _ifup@GOTPAGEOFF]
Lloh73:
	ldr	w1, [x8]
	ldr	x2, [x19]
Lloh74:
	adrp	x3, l_.str.3@PAGE
Lloh75:
	add	x3, x3, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_netif_info
LBB0_4:
	mov	w20, #0
LBB0_5:
	mov	x0, x20
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh18
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh59, Lloh60, Lloh62
	.loh AdrpLdrGotLdr	Lloh57, Lloh58, Lloh61
	.loh AdrpLdrGotLdr	Lloh54, Lloh55, Lloh56
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh66, Lloh67
	.loh AdrpLdrGotLdr	Lloh63, Lloh64, Lloh65
	.loh AdrpAdd	Lloh74, Lloh75
	.loh AdrpLdrGotLdr	Lloh71, Lloh72, Lloh73
	.loh AdrpLdrGotLdr	Lloh68, Lloh69, Lloh70
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_PTP_TX_MOD2,4,2                ; @PTP_TX_MOD2
	.comm	_PTP_TX_MOD2_TX_PTP_CLR_UDPV4_CHKSUM_,4,2 ; @PTP_TX_MOD2_TX_PTP_CLR_UDPV4_CHKSUM_
	.comm	_INT_EN_SET,4,2                 ; @INT_EN_SET
	.comm	_INT_BIT_1588_,4,2              ; @INT_BIT_1588_
	.comm	_PTP_INT_EN_SET,4,2             ; @PTP_INT_EN_SET
	.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	_PTP_FLAG_ISR_ENABLED,4,2       ; @PTP_FLAG_ISR_ENABLED
	.comm	_CONFIG_PTP_1588_CLOCK,4,2      ; @CONFIG_PTP_1588_CLOCK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"lan743x_ptp_pin_0"

	.comm	_PTP_PF_PEROUT,4,2              ; @PTP_PF_PEROUT
	.comm	_THIS_MODULE,4,2                ; @THIS_MODULE
l_.str.1:                               ; @.str.1
	.asciz	"%pm"

	.comm	_LAN743X_PTP_MAX_FREQ_ADJ_IN_PPB,4,2 ; @LAN743X_PTP_MAX_FREQ_ADJ_IN_PPB
	.comm	_lan743x_ptpci_adjfine,4,2      ; @lan743x_ptpci_adjfine
	.comm	_lan743x_ptpci_adjfreq,4,2      ; @lan743x_ptpci_adjfreq
	.comm	_lan743x_ptpci_adjtime,4,2      ; @lan743x_ptpci_adjtime
	.comm	_lan743x_ptpci_gettime64,4,2    ; @lan743x_ptpci_gettime64
	.comm	_lan743x_ptpci_settime64,4,2    ; @lan743x_ptpci_settime64
	.comm	_lan743x_ptpci_enable,4,2       ; @lan743x_ptpci_enable
	.comm	_lan743x_ptpci_do_aux_work,4,2  ; @lan743x_ptpci_do_aux_work
	.comm	_ifup,4,2                       ; @ifup
l_.str.2:                               ; @.str.2
	.asciz	"ptp_clock_register failed\n"

	.comm	_PTP_FLAG_PTP_CLOCK_REGISTERED,4,2 ; @PTP_FLAG_PTP_CLOCK_REGISTERED
l_.str.3:                               ; @.str.3
	.asciz	"successfully registered ptp clock\n"

.subsections_via_symbols
