	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gem_set_hwtst                  ## -- Begin function gem_set_hwtst
	.p2align	4, 0x90
_gem_set_hwtst:                         ## @gem_set_hwtst
	.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, %r12
	movq	_TSTAMP_DISABLED@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	callq	_netdev_priv
	movq	%rax, %rbx
	movq	_HW_DMA_CAP_PTP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_3
## %bb.1:
	leaq	8(%rbx), %r14
	movl	(%r12), %esi
	movq	%r14, %rdi
	movl	$16, %edx
	callq	_copy_from_user
	testq	%rax, %rax
	je	LBB0_4
LBB0_2:
	movq	_EFAULT@GOTPCREL(%rip), %rcx
	jmp	LBB0_18
LBB0_3:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rcx
	jmp	LBB0_18
LBB0_4:
	cmpq	$0, 16(%rbx)
	je	LBB0_6
## %bb.5:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_18
LBB0_6:
	movl	(%r14), %eax
	movl	%r15d, %esi
	cmpl	$130, %eax
	je	LBB0_11
## %bb.7:
	cmpl	$129, %eax
	je	LBB0_10
## %bb.8:
	cmpl	$128, %eax
	jne	LBB0_17
## %bb.9:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_gem_ptp_set_one_step_sync
	testl	%eax, %eax
	jne	LBB0_17
LBB0_10:
	movq	_TSTAMP_ALL_FRAMES@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
LBB0_11:
	movl	$-131, %eax
	addl	12(%rbx), %eax
	cmpl	$13, %eax
	ja	LBB0_22
## %bb.12:
	movl	$511, %ecx                      ## imm = 0x1FF
	btl	%eax, %ecx
	jae	LBB0_14
## %bb.13:
	movq	_TSTAMP_ALL_PTP_FRAMES@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	$138, 12(%rbx)
	movq	_NCR@GOTPCREL(%rip), %rax
	movl	%esi, -48(%rbp)                 ## 4-byte Spill
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_macb_readl
	movl	%eax, %r13d
	movq	_NCR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_SRTSM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_MACB_BIT
	orl	%eax, %r13d
	movq	%rbx, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	%r13d, %edx
	callq	_macb_writel
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	jmp	LBB0_16
LBB0_14:
	movl	$6656, %ecx                     ## imm = 0x1A00
	btl	%eax, %ecx
	jb	LBB0_16
## %bb.15:
	movq	_TSTAMP_ALL_FRAMES@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	$144, 12(%rbx)
LBB0_16:
	movq	%rbx, %rdi
	movl	%r15d, %edx
	callq	_gem_ptp_set_ts_mode
	testq	%rax, %rax
	je	LBB0_20
LBB0_17:
	movq	_ERANGE@GOTPCREL(%rip), %rcx
LBB0_18:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_19:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_20:
	movl	(%r12), %edi
	movq	%r14, %rsi
	movl	$16, %edx
	callq	_copy_to_user
	testq	%rax, %rax
	jne	LBB0_2
## %bb.21:
	xorl	%eax, %eax
	jmp	LBB0_19
LBB0_22:
	movl	$143, 12(%rbx)
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_TSTAMP_DISABLED,4,2            ## @TSTAMP_DISABLED
	.comm	_HW_DMA_CAP_PTP,4,2             ## @HW_DMA_CAP_PTP
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_EFAULT,4,2                     ## @EFAULT
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ERANGE,4,2                     ## @ERANGE
	.comm	_TSTAMP_ALL_FRAMES,4,2          ## @TSTAMP_ALL_FRAMES
	.comm	_TSTAMP_ALL_PTP_FRAMES,4,2      ## @TSTAMP_ALL_PTP_FRAMES
	.comm	_NCR,4,2                        ## @NCR
	.comm	_SRTSM,4,2                      ## @SRTSM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gem_set_hwtst                  ; -- Begin function gem_set_hwtst
	.p2align	2
_gem_set_hwtst:                         ; @gem_set_hwtst
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x1
Lloh0:
	adrp	x8, _TSTAMP_DISABLED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TSTAMP_DISABLED@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
	bl	_netdev_priv
	mov	x20, x0
	ldr	w8, [x20], #8
Lloh3:
	adrp	x9, _HW_DMA_CAP_PTP@GOTPAGE
Lloh4:
	ldr	x9, [x9, _HW_DMA_CAP_PTP@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.1:
	mov	x22, x0
	ldr	w1, [x19]
	mov	x0, x20
	mov	w2, #16
	bl	_copy_from_user
	cbz	x0, LBB0_4
LBB0_2:
Lloh6:
	adrp	x8, _EFAULT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
	b	LBB0_18
LBB0_3:
Lloh8:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
	b	LBB0_18
LBB0_4:
	ldr	x8, [x22, #16]
	cbz	x8, LBB0_6
; %bb.5:
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_18
LBB0_6:
	ldr	w8, [x20]
	mov	x23, x21
	cmp	w8, #130
	b.eq	LBB0_11
; %bb.7:
	cmp	w8, #129
	b.eq	LBB0_10
; %bb.8:
	cmp	w8, #128
	b.ne	LBB0_17
; %bb.9:
	mov	x0, x22
	mov	w1, #1
	bl	_gem_ptp_set_one_step_sync
	cbnz	w0, LBB0_17
LBB0_10:
Lloh12:
	adrp	x8, _TSTAMP_ALL_FRAMES@GOTPAGE
Lloh13:
	ldr	x8, [x8, _TSTAMP_ALL_FRAMES@GOTPAGEOFF]
Lloh14:
	ldr	w23, [x8]
LBB0_11:
	ldr	w8, [x22, #12]
	sub	w8, w8, #131
	cmp	w8, #13
	b.hi	LBB0_21
; %bb.12:
	mov	w9, #1
	lsl	w8, w9, w8
	tst	w8, #0x1ff
	b.eq	LBB0_14
; %bb.13:
Lloh15:
	adrp	x8, _TSTAMP_ALL_PTP_FRAMES@GOTPAGE
Lloh16:
	ldr	x8, [x8, _TSTAMP_ALL_PTP_FRAMES@GOTPAGEOFF]
Lloh17:
	ldr	w21, [x8]
	mov	w8, #138
	str	w8, [x22, #12]
Lloh18:
	adrp	x25, _NCR@GOTPAGE
Lloh19:
	ldr	x25, [x25, _NCR@GOTPAGEOFF]
	ldr	w1, [x25]
	mov	x0, x22
	bl	_macb_readl
	mov	x24, x0
	ldr	w25, [x25]
Lloh20:
	adrp	x8, _SRTSM@GOTPAGE
Lloh21:
	ldr	x8, [x8, _SRTSM@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
	bl	_MACB_BIT
	orr	w2, w0, w24
	mov	x0, x22
	mov	x1, x25
	bl	_macb_writel
	b	LBB0_16
LBB0_14:
	mov	w9, #6656
	tst	w8, w9
	b.ne	LBB0_16
; %bb.15:
Lloh23:
	adrp	x8, _TSTAMP_ALL_FRAMES@GOTPAGE
Lloh24:
	ldr	x8, [x8, _TSTAMP_ALL_FRAMES@GOTPAGEOFF]
Lloh25:
	ldr	w21, [x8]
	mov	w8, #144
	str	w8, [x22, #12]
LBB0_16:
	mov	x0, x22
	mov	x1, x23
	mov	x2, x21
	bl	_gem_ptp_set_ts_mode
	cbz	x0, LBB0_20
LBB0_17:
Lloh26:
	adrp	x8, _ERANGE@GOTPAGE
Lloh27:
	ldr	x8, [x8, _ERANGE@GOTPAGEOFF]
LBB0_18:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_19:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_20:
	ldr	w0, [x19]
	mov	x1, x20
	mov	w2, #16
	bl	_copy_to_user
	cbnz	x0, LBB0_2
	b	LBB0_19
LBB0_21:
	mov	w8, #143
	str	w8, [x22, #12]
	b	LBB0_17
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_TSTAMP_DISABLED,4,2            ; @TSTAMP_DISABLED
	.comm	_HW_DMA_CAP_PTP,4,2             ; @HW_DMA_CAP_PTP
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_EFAULT,4,2                     ; @EFAULT
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ERANGE,4,2                     ; @ERANGE
	.comm	_TSTAMP_ALL_FRAMES,4,2          ; @TSTAMP_ALL_FRAMES
	.comm	_TSTAMP_ALL_PTP_FRAMES,4,2      ; @TSTAMP_ALL_PTP_FRAMES
	.comm	_NCR,4,2                        ; @NCR
	.comm	_SRTSM,4,2                      ; @SRTSM
.subsections_via_symbols
