	.file	"extr_i40e_ptp.c_i40e_ptp_set_timestamp_mode.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	i40e_ptp_set_timestamp_mode, @function
i40e_ptp_set_timestamp_mode:
.LFB0:
	.cfi_startproc
	endbr64
	cmp	QWORD PTR 8[rsi], 0
	jne	.L31
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	eax, DWORD PTR [rsi]
	cmp	eax, 128
	je	.L4
	cmp	eax, 129
	jne	.L7
	mov	DWORD PTR [rdi], 0
.L6:
	mov	eax, DWORD PTR 4[rsi]
	sub	eax, 130
	cmp	eax, 13
	ja	.L7
	lea	rdx, .L9[rip]
	movsx	rax, DWORD PTR [rdx+rax*4]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L9:
	.long	.L11-.L9
	.long	.L11-.L9
	.long	.L11-.L9
	.long	.L11-.L9
	.long	.L12-.L9
	.long	.L12-.L9
	.long	.L12-.L9
	.long	.L11-.L9
	.long	.L11-.L9
	.long	.L10-.L9
	.long	.L10-.L9
	.long	.L10-.L9
	.long	.L7-.L9
	.long	.L8-.L9
	.text
	.p2align 4,,10
	.p2align 3
.L7:
	mov	eax, DWORD PTR ERANGE[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	neg	eax
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	mov	DWORD PTR [rdi], 1
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L31:
	.cfi_def_cfa_offset 8
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	mov	eax, DWORD PTR EINVAL[rip]
	neg	eax
	ret
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -40
	.cfi_offset 6, -32
	.cfi_offset 12, -24
	.cfi_offset 13, -16
	mov	eax, DWORD PTR 8[rbx]
	test	DWORD PTR I40E_HW_PTP_L4_CAPABLE[rip], eax
	je	.L7
	mov	DWORD PTR 4[rbx], 1
	mov	edx, DWORD PTR I40E_PRTTSYN_CTL1_TSYNTYPE_V2[rip]
	or	edx, DWORD PTR I40E_PRTTSYN_CTL1_V2MESSTYPE0_MASK[rip]
	mov	r12d, edx
.L22:
	mov	DWORD PTR 4[rsi], 137
	or	r12d, DWORD PTR I40E_PRTTSYN_CTL1_UDP_ENA_MASK[rip]
.L13:
	lea	r13, 12[rbx]
	lea	rbp, 24[rbx]
	mov	rdi, r13
	call	spin_lock_bh@PLT
	mov	esi, DWORD PTR I40E_PRTTSYN_STAT_0[rip]
	mov	rdi, rbp
	call	rd32@PLT
	mov	esi, DWORD PTR I40E_PRTTSYN_TXTIME_H[rip]
	mov	rdi, rbp
	call	rd32@PLT
	xor	edi, edi
	call	I40E_PRTTSYN_RXTIME_H@PLT
	mov	rdi, rbp
	mov	esi, eax
	call	rd32@PLT
	mov	edi, 1
	call	I40E_PRTTSYN_RXTIME_H@PLT
	mov	rdi, rbp
	mov	esi, eax
	call	rd32@PLT
	mov	edi, 2
	call	I40E_PRTTSYN_RXTIME_H@PLT
	mov	rdi, rbp
	mov	esi, eax
	call	rd32@PLT
	mov	edi, 3
	call	I40E_PRTTSYN_RXTIME_H@PLT
	mov	rdi, rbp
	mov	esi, eax
	call	rd32@PLT
	mov	QWORD PTR 16[rbx], 0
	mov	rdi, r13
	call	spin_unlock_bh@PLT
	mov	esi, DWORD PTR I40E_PRTTSYN_CTL0[rip]
	mov	rdi, rbp
	call	rd32@PLT
	mov	ecx, DWORD PTR [rbx]
	mov	edx, eax
	test	ecx, ecx
	je	.L18
	or	edx, DWORD PTR I40E_PRTTSYN_CTL0_TXTIME_INT_ENA_MASK[rip]
.L19:
	mov	esi, DWORD PTR I40E_PRTTSYN_CTL0[rip]
	mov	rdi, rbp
	call	wr32@PLT
	mov	esi, DWORD PTR I40E_PFINT_ICR0_ENA[rip]
	mov	rdi, rbp
	call	rd32@PLT
	mov	edx, eax
	mov	eax, DWORD PTR [rbx]
	test	eax, eax
	je	.L20
	or	edx, DWORD PTR I40E_PFINT_ICR0_ENA_TIMESYNC_MASK[rip]
.L21:
	mov	esi, DWORD PTR I40E_PFINT_ICR0_ENA[rip]
	mov	rdi, rbp
	call	wr32@PLT
	mov	esi, DWORD PTR I40E_PRTTSYN_CTL1[rip]
	mov	rdi, rbp
	call	rd32@PLT
	and	eax, DWORD PTR I40E_PRTTSYN_CTL1_TSYNENA_MASK[rip]
	mov	esi, DWORD PTR I40E_PRTTSYN_CTL1[rip]
	mov	rdi, rbp
	mov	edx, eax
	or	edx, r12d
	call	wr32@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	mov	eax, DWORD PTR 8[rbx]
	test	DWORD PTR I40E_HW_PTP_L4_CAPABLE[rip], eax
	je	.L7
	mov	edx, DWORD PTR I40E_PRTTSYN_CTL1_V1MESSTYPE0_MASK[rip]
	or	edx, DWORD PTR I40E_PRTTSYN_CTL1_TSYNTYPE_V1[rip]
	mov	DWORD PTR 4[rbx], 1
	or	edx, DWORD PTR I40E_PRTTSYN_CTL1_UDP_ENA_MASK[rip]
	mov	DWORD PTR 4[rsi], 140
	mov	r12d, edx
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L12:
	mov	edx, DWORD PTR I40E_PRTTSYN_CTL1_V2MESSTYPE0_MASK[rip]
	mov	eax, DWORD PTR 8[rbx]
	mov	DWORD PTR 4[rbx], 1
	or	edx, DWORD PTR I40E_PRTTSYN_CTL1_TSYNTYPE_V2[rip]
	mov	r12d, edx
	test	DWORD PTR I40E_HW_PTP_L4_CAPABLE[rip], eax
	jne	.L22
	mov	DWORD PTR 4[rsi], 135
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L8:
	mov	DWORD PTR 4[rbx], 0
	mov	r12d, DWORD PTR I40E_PRTTSYN_CTL1_TSYNTYPE_V1[rip]
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L20:
	mov	eax, DWORD PTR I40E_PFINT_ICR0_ENA_TIMESYNC_MASK[rip]
	not	eax
	and	edx, eax
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L18:
	mov	eax, DWORD PTR I40E_PRTTSYN_CTL0_TXTIME_INT_ENA_MASK[rip]
	not	eax
	and	edx, eax
	jmp	.L19
	.cfi_endproc
.LFE0:
	.size	i40e_ptp_set_timestamp_mode, .-i40e_ptp_set_timestamp_mode
	.comm	I40E_PRTTSYN_TXTIME_H,4,4
	.comm	I40E_PRTTSYN_STAT_0,4,4
	.comm	I40E_PRTTSYN_CTL1_V2MESSTYPE0_MASK,4,4
	.comm	I40E_PRTTSYN_CTL1_V1MESSTYPE0_MASK,4,4
	.comm	I40E_PRTTSYN_CTL1_UDP_ENA_MASK,4,4
	.comm	I40E_PRTTSYN_CTL1_TSYNTYPE_V2,4,4
	.comm	I40E_PRTTSYN_CTL1_TSYNTYPE_V1,4,4
	.comm	I40E_PRTTSYN_CTL1_TSYNENA_MASK,4,4
	.comm	I40E_PRTTSYN_CTL1,4,4
	.comm	I40E_PRTTSYN_CTL0_TXTIME_INT_ENA_MASK,4,4
	.comm	I40E_PRTTSYN_CTL0,4,4
	.comm	I40E_PFINT_ICR0_ENA_TIMESYNC_MASK,4,4
	.comm	I40E_PFINT_ICR0_ENA,4,4
	.comm	I40E_HW_PTP_L4_CAPABLE,4,4
	.comm	ERANGE,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_i40e_ptp.c_i40e_ptp_set_timestamp_mode.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	i40e_ptp_set_timestamp_mode, %function
i40e_ptp_set_timestamp_mode:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r5, [r1, #8]
	cmp	r5, #0
	bne	.L29
	ldr	r3, [r1]
	mov	r4, r0
	cmp	r3, #128
	beq	.L4
	cmp	r3, #129
	streq	r5, [r0]
	beq	.L6
.L7:
	ldr	r3, .L30
	ldr	r5, [r3]
	rsb	r5, r5, #0
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L4:
	mov	r3, #1
	str	r3, [r0]
.L6:
	ldr	r3, [r1, #4]
	sub	r3, r3, #130
	cmp	r3, #13
	ldrls	pc, [pc, r3, asl #2]
	b	.L7
.L9:
	.word	.L11
	.word	.L11
	.word	.L11
	.word	.L11
	.word	.L12
	.word	.L12
	.word	.L12
	.word	.L11
	.word	.L11
	.word	.L10
	.word	.L10
	.word	.L10
	.word	.L7
	.word	.L8
.L29:
	ldr	r3, .L30+4
	ldr	r5, [r3]
	rsb	r5, r5, #0
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L11:
	ldr	r3, .L30+8
	ldr	r2, [r4, #8]
	ldr	r3, [r3]
	tst	r2, r3
	beq	.L7
	mov	r2, #1
	ldr	r0, .L30+12
	ldr	r3, .L30+16
	ldr	r7, [r0]
	ldr	r3, [r3]
	str	r2, [r4, #4]
	orr	r7, r7, r3
.L22:
	mov	r2, #137
	ldr	r3, .L30+20
	str	r2, [r1, #4]
	ldr	r3, [r3]
	orr	r7, r7, r3
.L13:
	add	r8, r4, #12
	mov	r0, r8
	bl	spin_lock_bh
	ldr	r3, .L30+24
	add	r6, r4, #20
	ldr	r1, [r3]
	mov	r0, r6
	bl	rd32
	ldr	r3, .L30+28
	mov	r0, r6
	ldr	r1, [r3]
	bl	rd32
	mov	r0, #0
	bl	I40E_PRTTSYN_RXTIME_H
	mov	r1, r0
	mov	r0, r6
	bl	rd32
	mov	r0, #1
	bl	I40E_PRTTSYN_RXTIME_H
	mov	r1, r0
	mov	r0, r6
	bl	rd32
	mov	r0, #2
	bl	I40E_PRTTSYN_RXTIME_H
	mov	r1, r0
	mov	r0, r6
	bl	rd32
	mov	r0, #3
	bl	I40E_PRTTSYN_RXTIME_H
	mov	r1, r0
	mov	r0, r6
	bl	rd32
	mov	r3, #0
	ldr	r9, .L30+32
	str	r3, [r4, #16]
	mov	r0, r8
	bl	spin_unlock_bh
	ldr	r1, [r9]
	mov	r0, r6
	bl	rd32
	ldr	r3, [r4]
	ldr	r8, .L30+36
	cmp	r3, #0
	ldr	r3, .L30+40
	ldr	r1, [r9]
	ldr	r2, [r3]
	orrne	r2, r0, r2
	biceq	r2, r0, r2
	mov	r0, r6
	bl	wr32
	ldr	r1, [r8]
	mov	r0, r6
	bl	rd32
	ldr	r3, [r4]
	ldr	r4, .L30+44
	cmp	r3, #0
	ldr	r3, .L30+48
	ldr	r1, [r8]
	ldr	r2, [r3]
	orrne	r2, r0, r2
	biceq	r2, r0, r2
	mov	r0, r6
	bl	wr32
	ldr	r1, [r4]
	mov	r0, r6
	bl	rd32
	mov	r2, r0
	ldr	r3, .L30+52
	mov	r0, r6
	ldr	r3, [r3]
	ldr	r1, [r4]
	and	r2, r2, r3
	orr	r2, r7, r2
	bl	wr32
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L10:
	ldr	r3, .L30+8
	ldr	r2, [r4, #8]
	ldr	r3, [r3]
	tst	r2, r3
	beq	.L7
	mov	r0, #1
	mov	r3, #140
	ldr	ip, .L30+56
	ldr	r2, .L30+60
	ldr	r7, [ip]
	ldr	ip, [r2]
	ldr	r2, .L30+20
	orr	r7, r7, ip
	ldr	r2, [r2]
	str	r0, [r4, #4]
	orr	r7, r7, r2
	str	r3, [r1, #4]
	b	.L13
.L12:
	ldr	r3, .L30+8
	ldr	ip, [r4, #8]
	ldr	r3, [r3]
	ldr	r0, .L30+16
	tst	ip, r3
	ldr	r3, .L30+12
	ldr	r7, [r0]
	ldr	r3, [r3]
	mov	r2, #1
	orr	r7, r7, r3
	moveq	r3, #135
	str	r2, [r4, #4]
	streq	r3, [r1, #4]
	beq	.L13
	b	.L22
.L8:
	mov	r2, #0
	ldr	r3, .L30+60
	str	r2, [r4, #4]
	ldr	r7, [r3]
	b	.L13
.L31:
	.align	2
.L30:
	.word	ERANGE
	.word	EINVAL
	.word	I40E_HW_PTP_L4_CAPABLE
	.word	I40E_PRTTSYN_CTL1_TSYNTYPE_V2
	.word	I40E_PRTTSYN_CTL1_V2MESSTYPE0_MASK
	.word	I40E_PRTTSYN_CTL1_UDP_ENA_MASK
	.word	I40E_PRTTSYN_STAT_0
	.word	I40E_PRTTSYN_TXTIME_H
	.word	I40E_PRTTSYN_CTL0
	.word	I40E_PFINT_ICR0_ENA
	.word	I40E_PRTTSYN_CTL0_TXTIME_INT_ENA_MASK
	.word	I40E_PRTTSYN_CTL1
	.word	I40E_PFINT_ICR0_ENA_TIMESYNC_MASK
	.word	I40E_PRTTSYN_CTL1_TSYNENA_MASK
	.word	I40E_PRTTSYN_CTL1_V1MESSTYPE0_MASK
	.word	I40E_PRTTSYN_CTL1_TSYNTYPE_V1
	.size	i40e_ptp_set_timestamp_mode, .-i40e_ptp_set_timestamp_mode
	.comm	I40E_PRTTSYN_TXTIME_H,4,4
	.comm	I40E_PRTTSYN_STAT_0,4,4
	.comm	I40E_PRTTSYN_CTL1_V2MESSTYPE0_MASK,4,4
	.comm	I40E_PRTTSYN_CTL1_V1MESSTYPE0_MASK,4,4
	.comm	I40E_PRTTSYN_CTL1_UDP_ENA_MASK,4,4
	.comm	I40E_PRTTSYN_CTL1_TSYNTYPE_V2,4,4
	.comm	I40E_PRTTSYN_CTL1_TSYNTYPE_V1,4,4
	.comm	I40E_PRTTSYN_CTL1_TSYNENA_MASK,4,4
	.comm	I40E_PRTTSYN_CTL1,4,4
	.comm	I40E_PRTTSYN_CTL0_TXTIME_INT_ENA_MASK,4,4
	.comm	I40E_PRTTSYN_CTL0,4,4
	.comm	I40E_PFINT_ICR0_ENA_TIMESYNC_MASK,4,4
	.comm	I40E_PFINT_ICR0_ENA,4,4
	.comm	I40E_HW_PTP_L4_CAPABLE,4,4
	.comm	ERANGE,4,4
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
