	.file	"extr_intel_ringbuffer.c_intel_ring_cacheline_align.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	intel_ring_cacheline_align
	.type	intel_ring_cacheline_align, @function
intel_ring_cacheline_align:
.LFB0:
	.cfi_startproc
	endbr64
	mov	rdx, QWORD PTR [rdi]
	mov	eax, DWORD PTR CACHELINE_BYTES[rip]
	sub	eax, 1
	and	eax, DWORD PTR [rdx]
	cdqe
	shr	rax, 2
	test	eax, eax
	jne	.L10
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	ebp, DWORD PTR CACHELINE_DWORDS[rip]
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rbx, rdi
	sub	ebp, eax
	mov	edi, ebp
	and	edi, 1
	call	GEM_BUG_ON@PLT
	mov	rdi, rbx
	mov	esi, ebp
	call	intel_ring_begin@PLT
	mov	rdi, rax
	mov	r12, rax
	call	IS_ERR@PLT
	test	rax, rax
	jne	.L11
	mov	edx, ebp
	mov	esi, DWORD PTR MI_NOOP[rip]
	mov	rdi, r12
	shr	edx, 31
	add	edx, ebp
	sar	edx
	call	memset64@PLT
	mov	rsi, r12
	mov	rdi, rbx
	call	intel_ring_advance@PLT
	mov	rax, QWORD PTR [rbx]
	mov	ecx, DWORD PTR CACHELINE_BYTES[rip]
	lea	edi, -1[rcx]
	and	edi, DWORD PTR [rax]
	call	GEM_BUG_ON@PLT
	xor	r8d, r8d
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	mov	eax, r8d
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	pop	rbx
	.cfi_restore 3
	.cfi_def_cfa_offset 24
	mov	rdi, r12
	pop	rbp
	.cfi_restore 6
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_restore 12
	.cfi_def_cfa_offset 8
	jmp	PTR_ERR@PLT
	.cfi_endproc
.LFE0:
	.size	intel_ring_cacheline_align, .-intel_ring_cacheline_align
	.comm	MI_NOOP,4,4
	.comm	CACHELINE_DWORDS,4,4
	.comm	CACHELINE_BYTES,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_intel_ringbuffer.c_intel_ring_cacheline_align.c"
	.text
	.align	2
	.global	intel_ring_cacheline_align
	.syntax unified
	.arm
	.fpu softvfp
	.type	intel_ring_cacheline_align, %function
intel_ring_cacheline_align:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r6, .L10
	ldr	r3, [r0]
	ldr	r1, [r6]
	ldr	r2, [r3]
	sub	r1, r1, #1
	and	r1, r1, r2
	lsrs	r1, r1, #2
	bne	.L8
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L8:
	mov	r4, r0
	ldr	r3, .L10+4
	ldr	r5, [r3]
	sub	r5, r5, r1
	and	r0, r5, #1
	bl	GEM_BUG_ON
	mov	r1, r5
	mov	r0, r4
	bl	intel_ring_begin
	mov	r7, r0
	bl	IS_ERR
	cmp	r0, #0
	bne	.L9
	ldr	r3, .L10+8
	add	r5, r5, r5, lsr #31
	ldr	r1, [r3]
	asr	r2, r5, #1
	mov	r0, r7
	bl	memset64
	mov	r1, r7
	mov	r0, r4
	bl	intel_ring_advance
	ldr	r2, [r4]
	ldr	r3, [r6]
	ldr	r0, [r2]
	sub	r3, r3, #1
	and	r0, r0, r3
	bl	GEM_BUG_ON
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L9:
	mov	r0, r7
	pop	{r4, r5, r6, r7, r8, lr}
	b	PTR_ERR
.L11:
	.align	2
.L10:
	.word	CACHELINE_BYTES
	.word	CACHELINE_DWORDS
	.word	MI_NOOP
	.size	intel_ring_cacheline_align, .-intel_ring_cacheline_align
	.comm	MI_NOOP,4,4
	.comm	CACHELINE_DWORDS,4,4
	.comm	CACHELINE_BYTES,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
