	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_efx_ptp_change_mode            ## -- Begin function efx_ptp_change_mode
	.p2align	4, 0x90
_efx_ptp_change_mode:                   ## @efx_ptp_change_mode
	.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
	movl	%edx, %r15d
	movl	%esi, %r14d
	movq	%rdi, %r12
	movq	(%rdi), %rax
	movl	(%rax), %ecx
	cmpl	%esi, %ecx
	jne	LBB0_3
## %bb.1:
	xorl	%ebx, %ebx
	testl	%r14d, %r14d
	je	LBB0_14
## %bb.2:
	cmpl	%r15d, 4(%rax)
	jne	LBB0_4
	jmp	LBB0_14
LBB0_3:
	testl	%r14d, %r14d
	je	LBB0_12
LBB0_4:
	testl	%ecx, %ecx
	je	LBB0_8
## %bb.5:
	cmpl	%r15d, 4(%rax)
	je	LBB0_8
## %bb.6:
	movl	$0, (%rax)
	movq	%r12, %rdi
	callq	_efx_ptp_stop
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_14
## %bb.7:
	movq	(%r12), %rax
LBB0_8:
	movl	%r15d, 4(%rax)
	movl	8(%r12), %edi
	callq	_netif_running
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movq	%r12, %rdi
	callq	_efx_ptp_start
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_14
LBB0_10:
	movq	_PTP_SYNC_ATTEMPTS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	addl	%esi, %esi
	movq	%r12, %rdi
	callq	_efx_ptp_synchronize
	testl	%eax, %eax
	je	LBB0_13
## %bb.11:
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_efx_ptp_stop
	jmp	LBB0_14
LBB0_12:
	movq	%r12, %rdi
	callq	_efx_ptp_stop
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_14
LBB0_13:
	movq	(%r12), %rax
	movl	%r14d, (%rax)
	xorl	%ebx, %ebx
LBB0_14:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PTP_SYNC_ATTEMPTS,4,2          ## @PTP_SYNC_ATTEMPTS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_efx_ptp_change_mode            ; -- Begin function efx_ptp_change_mode
	.p2align	2
_efx_ptp_change_mode:                   ; @efx_ptp_change_mode
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x21, x2
	mov	x20, x1
	mov	x19, x0
	ldr	x8, [x0]
	ldr	w9, [x8]
	cmp	w9, w1
	b.ne	LBB0_4
; %bb.1:
	cbz	w20, LBB0_3
; %bb.2:
	ldr	w10, [x8, #4]
	cmp	w10, w21
	b.ne	LBB0_5
LBB0_3:
	mov	w22, #0
	b	LBB0_15
LBB0_4:
	cbz	w20, LBB0_13
LBB0_5:
	cbz	w9, LBB0_9
; %bb.6:
	ldr	w9, [x8, #4]
	cmp	w9, w21
	b.eq	LBB0_9
; %bb.7:
	str	wzr, [x8]
	mov	x0, x19
	bl	_efx_ptp_stop
	mov	x22, x0
	cbnz	w0, LBB0_15
; %bb.8:
	ldr	x8, [x19]
LBB0_9:
	str	w21, [x8, #4]
	ldr	w0, [x19, #8]
	bl	_netif_running
	cbz	x0, LBB0_11
; %bb.10:
	mov	x0, x19
	bl	_efx_ptp_start
	mov	x22, x0
	cbnz	w0, LBB0_15
LBB0_11:
Lloh0:
	adrp	x8, _PTP_SYNC_ATTEMPTS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PTP_SYNC_ATTEMPTS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	lsl	w1, w8, #1
	mov	x0, x19
	bl	_efx_ptp_synchronize
	cbz	w0, LBB0_14
; %bb.12:
	mov	x22, x0
	mov	x0, x19
	bl	_efx_ptp_stop
	b	LBB0_15
LBB0_13:
	mov	x0, x19
	bl	_efx_ptp_stop
	mov	x22, x0
	cbnz	w0, LBB0_15
LBB0_14:
	mov	w22, #0
	ldr	x8, [x19]
	str	w20, [x8]
LBB0_15:
	mov	x0, x22
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_PTP_SYNC_ATTEMPTS,4,2          ; @PTP_SYNC_ATTEMPTS
.subsections_via_symbols
