	.file	"extr_ring_buffer.c_ring_buffer_write.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	ring_buffer_write
	.type	ring_buffer_write, @function
ring_buffer_write:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	xor	eax, eax
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14, rdx
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rsi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	mov	r12d, DWORD PTR EBUSY[rip]
	call	preempt_disable_notrace@PLT
	lea	rdi, 12[rbp]
	neg	r12d
	call	atomic_read@PLT
	test	rax, rax
	je	.L12
.L2:
	xor	eax, eax
	call	preempt_enable_notrace@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	call	raw_smp_processor_id@PLT
	mov	esi, DWORD PTR 8[rbp]
	movsx	rbx, eax
	mov	edi, ebx
	call	cpumask_test_cpu@PLT
	test	eax, eax
	je	.L2
	mov	rax, QWORD PTR 0[rbp]
	mov	r15, QWORD PTR [rax+rbx*8]
	mov	rdi, r15
	call	atomic_read@PLT
	test	rax, rax
	jne	.L2
	cmp	QWORD PTR BUF_MAX_DATA_SIZE[rip], r13
	jb	.L2
	mov	rdi, r15
	call	trace_recursive_lock@PLT
	mov	edi, eax
	call	unlikely@PLT
	test	rax, rax
	jne	.L2
	mov	rdx, r13
	mov	rsi, r15
	mov	rdi, rbp
	call	rb_reserve_next_event@PLT
	mov	rbx, rax
	test	rax, rax
	je	.L3
	mov	rdi, rax
	xor	r12d, r12d
	call	rb_event_data@PLT
	mov	rdx, r13
	mov	rsi, r14
	mov	rdi, rax
	call	memcpy@PLT
	mov	rsi, rbx
	mov	rdi, r15
	call	rb_commit@PLT
	mov	rsi, r15
	mov	rdi, rbp
	call	rb_wakeups@PLT
.L3:
	mov	rdi, r15
	call	trace_recursive_unlock@PLT
	jmp	.L2
	.cfi_endproc
.LFE0:
	.size	ring_buffer_write, .-ring_buffer_write
	.comm	EBUSY,4,4
	.comm	BUF_MAX_DATA_SIZE,8,8
	.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_ring_buffer.c_ring_buffer_write.c"
	.text
	.align	2
	.global	ring_buffer_write
	.syntax unified
	.arm
	.fpu softvfp
	.type	ring_buffer_write, %function
ring_buffer_write:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r4, r0
	ldr	r3, .L13
	mov	r7, r1
	ldr	r5, [r3]
	mov	r6, r2
	bl	preempt_disable_notrace
	add	r0, r4, #8
	bl	atomic_read
	cmp	r0, #0
	rsb	r5, r5, #0
	beq	.L12
.L2:
	bl	preempt_enable_notrace
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L12:
	bl	raw_smp_processor_id
	ldr	r1, [r4, #4]
	mov	r8, r0
	bl	cpumask_test_cpu
	cmp	r0, #0
	beq	.L2
	ldr	r3, [r4]
	ldr	r8, [r3, r8, lsl #2]
	mov	r0, r8
	bl	atomic_read
	cmp	r0, #0
	bne	.L2
	ldr	r3, .L13+4
	ldr	r3, [r3]
	cmp	r3, r7
	bcc	.L2
	mov	r0, r8
	bl	trace_recursive_lock
	bl	unlikely
	subs	r9, r0, #0
	bne	.L2
	mov	r2, r7
	mov	r1, r8
	mov	r0, r4
	bl	rb_reserve_next_event
	subs	r10, r0, #0
	beq	.L3
	bl	rb_event_data
	mov	r2, r7
	mov	r1, r6
	bl	memcpy
	mov	r1, r10
	mov	r0, r8
	bl	rb_commit
	mov	r1, r8
	mov	r0, r4
	mov	r5, r9
	bl	rb_wakeups
.L3:
	mov	r0, r8
	bl	trace_recursive_unlock
	b	.L2
.L14:
	.align	2
.L13:
	.word	EBUSY
	.word	BUF_MAX_DATA_SIZE
	.size	ring_buffer_write, .-ring_buffer_write
	.comm	EBUSY,4,4
	.comm	BUF_MAX_DATA_SIZE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
