	.file	"119299.c"
	.intel_syntax noprefix
	.text
	.globl	ringbuf_init
	.type	ringbuf_init, @function
ringbuf_init:
.LFB12:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -8[rbp], rdi
	mov	QWORD PTR -16[rbp], rsi
	mov	DWORD PTR -20[rbp], edx
	mov	DWORD PTR -24[rbp], ecx
	mov	DWORD PTR -28[rbp], r8d
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR -24[rbp]
	mov	DWORD PTR 36[rax], edx
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR -16[rbp]
	mov	QWORD PTR [rax], rdx
	mov	edx, DWORD PTR -20[rbp]
	mov	rax, QWORD PTR -16[rbp]
	add	rdx, rax
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR 8[rax], rdx
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR -28[rbp]
	mov	DWORD PTR 40[rax], edx
	mov	rax, QWORD PTR -8[rbp]
	mov	rdi, rax
	call	ringbuf_reset
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE12:
	.size	ringbuf_init, .-ringbuf_init
	.globl	ringbuf_push
	.type	ringbuf_push, @function
ringbuf_push:
.LFB13:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 64
	mov	QWORD PTR -40[rbp], rdi
	mov	QWORD PTR -48[rbp], rsi
	mov	DWORD PTR -52[rbp], edx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -20[rbp], 0
	mov	DWORD PTR -16[rbp], 0
	mov	DWORD PTR -12[rbp], 0
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	ringbuf_is_full
	test	al, al
	je	.L4
	mov	eax, 106
	jmp	.L17
.L4:
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR 36[rax]
	test	eax, eax
	jne	.L6
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR 24[rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 8[rax]
	cmp	rdx, rax
	jne	.L7
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR 24[rax], rdx
.L7:
	mov	rax, QWORD PTR -40[rbp]
	mov	edx, DWORD PTR 40[rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	rcx, QWORD PTR -48[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	memcpy@PLT
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR 24[rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR 40[rax]
	mov	eax, eax
	add	rdx, rax
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR 24[rax], rdx
	mov	rax, QWORD PTR -40[rbp]
	mov	edx, DWORD PTR 32[rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR 40[rax]
	sub	edx, eax
	mov	rax, QWORD PTR -40[rbp]
	mov	DWORD PTR 32[rax], edx
	jmp	.L8
.L6:
	mov	eax, DWORD PTR -52[rbp]
	test	eax, eax
	jne	.L9
	mov	eax, 5
	jmp	.L17
.L9:
	mov	DWORD PTR -20[rbp], 4
	lea	rcx, -52[rbp]
	lea	rax, -12[rbp]
	mov	edx, 4
	mov	rsi, rcx
	mov	rdi, rax
	call	memcpy@PLT
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR 32[rax]
	mov	ecx, DWORD PTR -52[rbp]
	mov	edx, DWORD PTR -20[rbp]
	add	edx, ecx
	cmp	eax, edx
	jnb	.L10
	mov	eax, 106
	jmp	.L17
.L10:
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR 24[rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 8[rax]
	cmp	rdx, rax
	jne	.L11
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR 24[rax], rdx
.L11:
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR 24[rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 16[rax]
	cmp	rdx, rax
	jb	.L12
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	rcx, QWORD PTR 24[rax]
	mov	rax, rdx
	sub	rax, rcx
	mov	DWORD PTR -16[rbp], eax
	mov	eax, DWORD PTR -16[rbp]
	cmp	eax, DWORD PTR -20[rbp]
	jnb	.L12
	cmp	DWORD PTR -16[rbp], 0
	je	.L12
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	edx, DWORD PTR -16[rbp]
	lea	rcx, -12[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	memcpy@PLT
	mov	eax, DWORD PTR -16[rbp]
	sub	DWORD PTR -20[rbp], eax
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR 24[rax], rdx
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR 32[rax]
	sub	eax, DWORD PTR -16[rbp]
	mov	edx, eax
	mov	rax, QWORD PTR -40[rbp]
	mov	DWORD PTR 32[rax], edx
	jmp	.L13
.L12:
	mov	DWORD PTR -16[rbp], 0
.L13:
	cmp	DWORD PTR -20[rbp], 0
	je	.L14
	lea	rdx, -12[rbp]
	mov	eax, DWORD PTR -16[rbp]
	lea	rcx, [rdx+rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	edx, DWORD PTR -20[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	memcpy@PLT
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR 32[rax]
	sub	eax, DWORD PTR -20[rbp]
	mov	edx, eax
	mov	rax, QWORD PTR -40[rbp]
	mov	DWORD PTR 32[rax], edx
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR 24[rax]
	mov	eax, DWORD PTR -20[rbp]
	add	rdx, rax
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR 24[rax], rdx
.L14:
	mov	DWORD PTR -16[rbp], 0
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR 24[rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 8[rax]
	cmp	rdx, rax
	jne	.L15
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR 24[rax], rdx
.L15:
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR 24[rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 16[rax]
	cmp	rdx, rax
	jb	.L16
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	rcx, QWORD PTR 24[rax]
	mov	rax, rdx
	sub	rax, rcx
	mov	DWORD PTR -16[rbp], eax
	mov	eax, DWORD PTR -52[rbp]
	cmp	DWORD PTR -16[rbp], eax
	jnb	.L16
	cmp	DWORD PTR -16[rbp], 0
	je	.L16
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	edx, DWORD PTR -16[rbp]
	mov	rcx, QWORD PTR -48[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	memcpy@PLT
	mov	eax, DWORD PTR -16[rbp]
	add	QWORD PTR -48[rbp], rax
	mov	eax, DWORD PTR -52[rbp]
	sub	eax, DWORD PTR -16[rbp]
	mov	DWORD PTR -52[rbp], eax
	mov	rax, QWORD PTR -40[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR 24[rax], rdx
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR 32[rax]
	sub	eax, DWORD PTR -16[rbp]
	mov	edx, eax
	mov	rax, QWORD PTR -40[rbp]
	mov	DWORD PTR 32[rax], edx
.L16:
	mov	edx, DWORD PTR -52[rbp]
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	rcx, QWORD PTR -48[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	memcpy@PLT
	mov	rax, QWORD PTR -40[rbp]
	mov	rax, QWORD PTR 24[rax]
	mov	edx, DWORD PTR -52[rbp]
	mov	edx, edx
	add	rdx, rax
	mov	rax, QWORD PTR -40[rbp]
	mov	QWORD PTR 24[rax], rdx
	mov	rax, QWORD PTR -40[rbp]
	mov	eax, DWORD PTR 32[rax]
	mov	ecx, DWORD PTR -52[rbp]
	sub	eax, ecx
	mov	edx, eax
	mov	rax, QWORD PTR -40[rbp]
	mov	DWORD PTR 32[rax], edx
.L8:
	mov	eax, 0
.L17:
	mov	rsi, QWORD PTR -8[rbp]
	sub	rsi, QWORD PTR fs:40
	je	.L18
	call	__stack_chk_fail@PLT
.L18:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE13:
	.size	ringbuf_push, .-ringbuf_push
	.globl	ringbuf_pop
	.type	ringbuf_pop, @function
ringbuf_pop:
.LFB14:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 80
	mov	QWORD PTR -56[rbp], rdi
	mov	QWORD PTR -64[rbp], rsi
	mov	QWORD PTR -72[rbp], rdx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -32[rbp], 0
	mov	rax, QWORD PTR -64[rbp]
	mov	QWORD PTR -24[rbp], rax
	mov	DWORD PTR -36[rbp], 0
	mov	DWORD PTR -12[rbp], 0
	mov	DWORD PTR -28[rbp], 0
	mov	rax, QWORD PTR -56[rbp]
	mov	rdi, rax
	call	ringbuf_is_empty
	test	al, al
	je	.L20
	mov	eax, 107
	jmp	.L31
.L20:
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR 36[rax]
	test	eax, eax
	jne	.L22
	mov	rax, QWORD PTR -56[rbp]
	mov	rdx, QWORD PTR 16[rax]
	mov	rax, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR 8[rax]
	cmp	rdx, rax
	jne	.L23
	mov	rax, QWORD PTR -56[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -56[rbp]
	mov	QWORD PTR 16[rax], rdx
.L23:
	mov	rax, QWORD PTR -56[rbp]
	mov	edx, DWORD PTR 40[rax]
	mov	rax, QWORD PTR -56[rbp]
	mov	rcx, QWORD PTR 16[rax]
	mov	rax, QWORD PTR -64[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	memcpy@PLT
	mov	rax, QWORD PTR -56[rbp]
	mov	rdx, QWORD PTR 16[rax]
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR 40[rax]
	mov	eax, eax
	add	rdx, rax
	mov	rax, QWORD PTR -56[rbp]
	mov	QWORD PTR 16[rax], rdx
	mov	rax, QWORD PTR -56[rbp]
	mov	edx, DWORD PTR 32[rax]
	mov	rax, QWORD PTR -56[rbp]
	mov	eax, DWORD PTR 40[rax]
	add	edx, eax
	mov	rax, QWORD PTR -56[rbp]
	mov	DWORD PTR 32[rax], edx
	cmp	QWORD PTR -72[rbp], 0
	je	.L24
	mov	rax, QWORD PTR -56[rbp]
	mov	edx, DWORD PTR 40[rax]
	mov	rax, QWORD PTR -72[rbp]
	mov	DWORD PTR [rax], edx
.L24:
	mov	eax, 0
	jmp	.L31
.L22:
	mov	DWORD PTR -28[rbp], 4
	mov	rax, QWORD PTR -56[rbp]
	mov	rdx, QWORD PTR 16[rax]
	mov	rax, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR 8[rax]
	cmp	rdx, rax
	jne	.L25
	mov	rax, QWORD PTR -56[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -56[rbp]
	mov	QWORD PTR 16[rax], rdx
.L25:
	mov	rax, QWORD PTR -56[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR -56[rbp]
	mov	rcx, QWORD PTR 16[rax]
	mov	rax, rdx
	sub	rax, rcx
	mov	DWORD PTR -32[rbp], eax
	mov	eax, DWORD PTR -32[rbp]
	cmp	eax, DWORD PTR -28[rbp]
	jnb	.L26
	cmp	DWORD PTR -32[rbp], 0
	je	.L26
	mov	rax, QWORD PTR -56[rbp]
	mov	rcx, QWORD PTR 16[rax]
	mov	edx, DWORD PTR -32[rbp]
	lea	rax, -12[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	memcpy@PLT
	mov	rax, QWORD PTR -56[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -56[rbp]
	mov	QWORD PTR 16[rax], rdx
	mov	rax, QWORD PTR -56[rbp]
	mov	edx, DWORD PTR 32[rax]
	mov	eax, DWORD PTR -32[rbp]
	add	edx, eax
	mov	rax, QWORD PTR -56[rbp]
	mov	DWORD PTR 32[rax], edx
	jmp	.L27
.L26:
	mov	DWORD PTR -32[rbp], 0
.L27:
	mov	eax, DWORD PTR -28[rbp]
	cmp	eax, DWORD PTR -32[rbp]
	je	.L28
	mov	eax, DWORD PTR -28[rbp]
	sub	eax, DWORD PTR -32[rbp]
	mov	edx, eax
	mov	rax, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR 16[rax]
	lea	rsi, -12[rbp]
	mov	ecx, DWORD PTR -32[rbp]
	add	rcx, rsi
	mov	rsi, rax
	mov	rdi, rcx
	call	memcpy@PLT
	mov	rax, QWORD PTR -56[rbp]
	mov	rdx, QWORD PTR 16[rax]
	mov	eax, DWORD PTR -28[rbp]
	sub	eax, DWORD PTR -32[rbp]
	mov	eax, eax
	add	rdx, rax
	mov	rax, QWORD PTR -56[rbp]
	mov	QWORD PTR 16[rax], rdx
	mov	rax, QWORD PTR -56[rbp]
	mov	edx, DWORD PTR 32[rax]
	mov	eax, DWORD PTR -28[rbp]
	sub	eax, DWORD PTR -32[rbp]
	add	edx, eax
	mov	rax, QWORD PTR -56[rbp]
	mov	DWORD PTR 32[rax], edx
.L28:
	lea	rcx, -12[rbp]
	lea	rax, -36[rbp]
	mov	edx, 4
	mov	rsi, rcx
	mov	rdi, rax
	call	memcpy@PLT
	mov	edx, DWORD PTR -36[rbp]
	mov	rax, QWORD PTR -72[rbp]
	mov	DWORD PTR [rax], edx
	mov	rax, QWORD PTR -56[rbp]
	mov	rdx, QWORD PTR 16[rax]
	mov	rax, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR 8[rax]
	cmp	rdx, rax
	jne	.L29
	mov	rax, QWORD PTR -56[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -56[rbp]
	mov	QWORD PTR 16[rax], rdx
.L29:
	mov	rax, QWORD PTR -56[rbp]
	mov	rdx, QWORD PTR 16[rax]
	mov	rax, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR 24[rax]
	cmp	rdx, rax
	jbe	.L30
	mov	rax, QWORD PTR -56[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR -56[rbp]
	mov	rcx, QWORD PTR 16[rax]
	mov	rax, rdx
	sub	rax, rcx
	mov	DWORD PTR -32[rbp], eax
	mov	eax, DWORD PTR -36[rbp]
	cmp	DWORD PTR -32[rbp], eax
	jnb	.L30
	mov	rax, QWORD PTR -56[rbp]
	mov	rcx, QWORD PTR 16[rax]
	mov	edx, DWORD PTR -32[rbp]
	mov	rax, QWORD PTR -64[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	memcpy@PLT
	mov	edx, DWORD PTR -32[rbp]
	mov	rax, QWORD PTR -64[rbp]
	add	rax, rdx
	mov	QWORD PTR -24[rbp], rax
	mov	eax, DWORD PTR -36[rbp]
	sub	eax, DWORD PTR -32[rbp]
	mov	DWORD PTR -36[rbp], eax
	mov	rax, QWORD PTR -56[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -56[rbp]
	mov	QWORD PTR 16[rax], rdx
	mov	rax, QWORD PTR -56[rbp]
	mov	edx, DWORD PTR 32[rax]
	mov	eax, DWORD PTR -32[rbp]
	add	edx, eax
	mov	rax, QWORD PTR -56[rbp]
	mov	DWORD PTR 32[rax], edx
.L30:
	mov	edx, DWORD PTR -36[rbp]
	mov	rax, QWORD PTR -56[rbp]
	mov	rcx, QWORD PTR 16[rax]
	mov	rax, QWORD PTR -24[rbp]
	mov	rsi, rcx
	mov	rdi, rax
	call	memcpy@PLT
	mov	rax, QWORD PTR -56[rbp]
	mov	rax, QWORD PTR 16[rax]
	mov	edx, DWORD PTR -36[rbp]
	mov	edx, edx
	add	rdx, rax
	mov	rax, QWORD PTR -56[rbp]
	mov	QWORD PTR 16[rax], rdx
	mov	rax, QWORD PTR -56[rbp]
	mov	edx, DWORD PTR 32[rax]
	mov	eax, DWORD PTR -36[rbp]
	add	edx, eax
	mov	rax, QWORD PTR -56[rbp]
	mov	DWORD PTR 32[rax], edx
	mov	eax, 0
.L31:
	mov	rdi, QWORD PTR -8[rbp]
	sub	rdi, QWORD PTR fs:40
	je	.L32
	call	__stack_chk_fail@PLT
.L32:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE14:
	.size	ringbuf_pop, .-ringbuf_pop
	.globl	ringbuf_is_full
	.type	ringbuf_is_full, @function
ringbuf_is_full:
.LFB15:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 36[rax]
	cmp	eax, 1
	jne	.L34
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 32[rax]
	cmp	eax, 4
	ja	.L34
	mov	eax, 1
	jmp	.L35
.L34:
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 36[rax]
	test	eax, eax
	jne	.L36
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR 32[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	eax, DWORD PTR 40[rax]
	cmp	edx, eax
	jnb	.L36
	mov	eax, 1
	jmp	.L35
.L36:
	mov	eax, 0
.L35:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE15:
	.size	ringbuf_is_full, .-ringbuf_is_full
	.globl	ringbuf_is_empty
	.type	ringbuf_is_empty, @function
ringbuf_is_empty:
.LFB16:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	edx, DWORD PTR 32[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	rcx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, QWORD PTR [rax]
	mov	rax, rcx
	sub	rax, rsi
	cmp	edx, eax
	jne	.L38
	mov	eax, 1
	jmp	.L39
.L38:
	mov	eax, 0
.L39:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE16:
	.size	ringbuf_is_empty, .-ringbuf_is_empty
	.globl	ringbuf_reset
	.type	ringbuf_reset, @function
ringbuf_reset:
.LFB17:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR 16[rax], rdx
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	QWORD PTR 24[rax], rdx
	mov	rax, QWORD PTR -8[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	rcx, QWORD PTR [rax]
	mov	rax, rdx
	sub	rax, rcx
	mov	edx, eax
	mov	rax, QWORD PTR -8[rbp]
	mov	DWORD PTR 32[rax], edx
	mov	eax, 0
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE17:
	.size	ringbuf_reset, .-ringbuf_reset
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"119299.c"
	.text
	.align	2
	.global	ringbuf_init
	.syntax unified
	.arm
	.fpu softvfp
	.type	ringbuf_init, %function
ringbuf_init:
	@ args = 4, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	str	r2, [fp, #-16]
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-20]
	str	r2, [r3, #20]
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #-12]
	str	r2, [r3]
	ldr	r2, [fp, #-12]
	ldr	r3, [fp, #-16]
	add	r2, r2, r3
	ldr	r3, [fp, #-8]
	str	r2, [r3, #4]
	ldr	r3, [fp, #-8]
	ldr	r2, [fp, #4]
	str	r2, [r3, #24]
	ldr	r0, [fp, #-8]
	bl	ringbuf_reset
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	ringbuf_init, .-ringbuf_init
	.section	.rodata
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	ringbuf_push
	.syntax unified
	.arm
	.fpu softvfp
	.type	ringbuf_push, %function
ringbuf_push:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	str	r2, [fp, #-32]
	ldr	r3, .L20
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-16]
	mov	r3, #0
	str	r3, [fp, #-12]
	ldr	r0, [fp, #-24]
	bl	ringbuf_is_full
	mov	r3, r0
	cmp	r3, #0
	beq	.L4
	mov	r3, #106
	b	.L18
.L4:
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #20]
	cmp	r3, #0
	bne	.L6
	ldr	r3, [fp, #-24]
	ldr	r2, [r3, #12]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #4]
	cmp	r2, r3
	bne	.L7
	ldr	r3, [fp, #-24]
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	str	r2, [r3, #12]
.L7:
	ldr	r3, [fp, #-24]
	ldr	r0, [r3, #12]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #24]
	mov	r2, r3
	ldr	r1, [fp, #-28]
	bl	memcpy
	ldr	r3, [fp, #-24]
	ldr	r2, [r3, #12]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #24]
	add	r2, r2, r3
	ldr	r3, [fp, #-24]
	str	r2, [r3, #12]
	ldr	r3, [fp, #-24]
	ldr	r2, [r3, #16]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #24]
	sub	r2, r2, r3
	ldr	r3, [fp, #-24]
	str	r2, [r3, #16]
	b	.L8
.L6:
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	beq	.L9
	ldr	r3, [fp, #-32]
	cmn	r3, #1
	bne	.L10
.L9:
	mov	r3, #5
	b	.L18
.L10:
	mov	r3, #4
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-32]
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-24]
	ldr	r2, [r3, #16]
	ldr	r1, [fp, #-32]
	ldr	r3, [fp, #-20]
	add	r3, r1, r3
	cmp	r2, r3
	bcs	.L11
	mov	r3, #106
	b	.L18
.L11:
	ldr	r3, [fp, #-24]
	ldr	r2, [r3, #12]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #4]
	cmp	r2, r3
	bne	.L12
	ldr	r3, [fp, #-24]
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	str	r2, [r3, #12]
.L12:
	ldr	r3, [fp, #-24]
	ldr	r2, [r3, #12]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #8]
	cmp	r2, r3
	bcc	.L13
	ldr	r3, [fp, #-24]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #12]
	sub	r3, r2, r3
	str	r3, [fp, #-16]
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-20]
	cmp	r2, r3
	bcs	.L13
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	beq	.L13
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #12]
	sub	r1, fp, #12
	ldr	r2, [fp, #-16]
	mov	r0, r3
	bl	memcpy
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-16]
	sub	r3, r2, r3
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-24]
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	str	r2, [r3, #12]
	ldr	r3, [fp, #-24]
	ldr	r2, [r3, #16]
	ldr	r3, [fp, #-16]
	sub	r2, r2, r3
	ldr	r3, [fp, #-24]
	str	r2, [r3, #16]
	b	.L14
.L13:
	mov	r3, #0
	str	r3, [fp, #-16]
.L14:
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	beq	.L15
	ldr	r3, [fp, #-24]
	ldr	r0, [r3, #12]
	sub	r2, fp, #12
	ldr	r3, [fp, #-16]
	add	r3, r2, r3
	ldr	r2, [fp, #-20]
	mov	r1, r3
	bl	memcpy
	ldr	r3, [fp, #-24]
	ldr	r2, [r3, #16]
	ldr	r3, [fp, #-20]
	sub	r2, r2, r3
	ldr	r3, [fp, #-24]
	str	r2, [r3, #16]
	ldr	r3, [fp, #-24]
	ldr	r2, [r3, #12]
	ldr	r3, [fp, #-20]
	add	r2, r2, r3
	ldr	r3, [fp, #-24]
	str	r2, [r3, #12]
.L15:
	mov	r3, #0
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-24]
	ldr	r2, [r3, #12]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #4]
	cmp	r2, r3
	bne	.L16
	ldr	r3, [fp, #-24]
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	str	r2, [r3, #12]
.L16:
	ldr	r3, [fp, #-24]
	ldr	r2, [r3, #12]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #8]
	cmp	r2, r3
	bcc	.L17
	ldr	r3, [fp, #-24]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #12]
	sub	r3, r2, r3
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-32]
	ldr	r2, [fp, #-16]
	cmp	r2, r3
	bcs	.L17
	ldr	r3, [fp, #-16]
	cmp	r3, #0
	beq	.L17
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #12]
	ldr	r2, [fp, #-16]
	ldr	r1, [fp, #-28]
	mov	r0, r3
	bl	memcpy
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #-16]
	add	r3, r2, r3
	str	r3, [fp, #-28]
	ldr	r2, [fp, #-32]
	ldr	r3, [fp, #-16]
	sub	r3, r2, r3
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-24]
	ldr	r2, [r3]
	ldr	r3, [fp, #-24]
	str	r2, [r3, #12]
	ldr	r3, [fp, #-24]
	ldr	r2, [r3, #16]
	ldr	r3, [fp, #-16]
	sub	r2, r2, r3
	ldr	r3, [fp, #-24]
	str	r2, [r3, #16]
.L17:
	ldr	r3, [fp, #-24]
	ldr	r3, [r3, #12]
	ldr	r2, [fp, #-32]
	ldr	r1, [fp, #-28]
	mov	r0, r3
	bl	memcpy
	ldr	r3, [fp, #-24]
	ldr	r2, [r3, #12]
	ldr	r3, [fp, #-32]
	add	r2, r2, r3
	ldr	r3, [fp, #-24]
	str	r2, [r3, #12]
	ldr	r3, [fp, #-24]
	ldr	r2, [r3, #16]
	ldr	r3, [fp, #-32]
	sub	r2, r2, r3
	ldr	r3, [fp, #-24]
	str	r2, [r3, #16]
.L8:
	mov	r3, #0
.L18:
	ldr	r2, .L20
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L19
	bl	__stack_chk_fail
.L19:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L21:
	.align	2
.L20:
	.word	.LC0
	.size	ringbuf_push, .-ringbuf_push
	.section	.rodata
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	ringbuf_pop
	.syntax unified
	.arm
	.fpu softvfp
	.type	ringbuf_pop, %function
ringbuf_pop:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	str	r0, [fp, #-32]
	str	r1, [fp, #-36]
	str	r2, [fp, #-40]
	ldr	r3, .L36
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-36]
	str	r3, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-28]
	mov	r3, #0
	str	r3, [fp, #-12]
	mov	r3, #0
	str	r3, [fp, #-16]
	ldr	r0, [fp, #-32]
	bl	ringbuf_is_empty
	mov	r3, r0
	cmp	r3, #0
	beq	.L23
	mov	r3, #107
	b	.L34
.L23:
	ldr	r3, [fp, #-32]
	ldr	r3, [r3, #20]
	cmp	r3, #0
	bne	.L25
	ldr	r3, [fp, #-32]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-32]
	ldr	r3, [r3, #4]
	cmp	r2, r3
	bne	.L26
	ldr	r3, [fp, #-32]
	ldr	r2, [r3]
	ldr	r3, [fp, #-32]
	str	r2, [r3, #8]
.L26:
	ldr	r3, [fp, #-32]
	ldr	r1, [r3, #8]
	ldr	r3, [fp, #-32]
	ldr	r3, [r3, #24]
	mov	r2, r3
	ldr	r0, [fp, #-36]
	bl	memcpy
	ldr	r3, [fp, #-32]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-32]
	ldr	r3, [r3, #24]
	add	r2, r2, r3
	ldr	r3, [fp, #-32]
	str	r2, [r3, #8]
	ldr	r3, [fp, #-32]
	ldr	r2, [r3, #16]
	ldr	r3, [fp, #-32]
	ldr	r3, [r3, #24]
	add	r2, r2, r3
	ldr	r3, [fp, #-32]
	str	r2, [r3, #16]
	ldr	r3, [fp, #-40]
	cmp	r3, #0
	beq	.L27
	ldr	r3, [fp, #-32]
	ldr	r2, [r3, #24]
	ldr	r3, [fp, #-40]
	str	r2, [r3]
.L27:
	mov	r3, #0
	b	.L34
.L25:
	mov	r3, #4
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-32]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-32]
	ldr	r3, [r3, #4]
	cmp	r2, r3
	bne	.L28
	ldr	r3, [fp, #-32]
	ldr	r2, [r3]
	ldr	r3, [fp, #-32]
	str	r2, [r3, #8]
.L28:
	ldr	r3, [fp, #-32]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-32]
	ldr	r3, [r3, #8]
	sub	r3, r2, r3
	str	r3, [fp, #-24]
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-16]
	cmp	r2, r3
	bcs	.L29
	ldr	r3, [fp, #-24]
	cmp	r3, #0
	beq	.L29
	ldr	r3, [fp, #-32]
	ldr	r1, [r3, #8]
	sub	r3, fp, #12
	ldr	r2, [fp, #-24]
	mov	r0, r3
	bl	memcpy
	ldr	r3, [fp, #-32]
	ldr	r2, [r3]
	ldr	r3, [fp, #-32]
	str	r2, [r3, #8]
	ldr	r3, [fp, #-32]
	ldr	r2, [r3, #16]
	ldr	r3, [fp, #-24]
	add	r2, r2, r3
	ldr	r3, [fp, #-32]
	str	r2, [r3, #16]
	b	.L30
.L29:
	mov	r3, #0
	str	r3, [fp, #-24]
.L30:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	beq	.L31
	sub	r2, fp, #12
	ldr	r3, [fp, #-24]
	add	r0, r2, r3
	ldr	r3, [fp, #-32]
	ldr	r1, [r3, #8]
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-24]
	sub	r3, r2, r3
	mov	r2, r3
	bl	memcpy
	ldr	r3, [fp, #-32]
	ldr	r2, [r3, #8]
	ldr	r1, [fp, #-16]
	ldr	r3, [fp, #-24]
	sub	r3, r1, r3
	add	r2, r2, r3
	ldr	r3, [fp, #-32]
	str	r2, [r3, #8]
	ldr	r3, [fp, #-32]
	ldr	r2, [r3, #16]
	ldr	r1, [fp, #-16]
	ldr	r3, [fp, #-24]
	sub	r3, r1, r3
	add	r2, r2, r3
	ldr	r3, [fp, #-32]
	str	r2, [r3, #16]
.L31:
	sub	r1, fp, #12
	sub	r3, fp, #28
	mov	r2, #4
	mov	r0, r3
	bl	memcpy
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #-40]
	str	r2, [r3]
	ldr	r3, [fp, #-32]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-32]
	ldr	r3, [r3, #4]
	cmp	r2, r3
	bne	.L32
	ldr	r3, [fp, #-32]
	ldr	r2, [r3]
	ldr	r3, [fp, #-32]
	str	r2, [r3, #8]
.L32:
	ldr	r3, [fp, #-32]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-32]
	ldr	r3, [r3, #12]
	cmp	r2, r3
	bls	.L33
	ldr	r3, [fp, #-32]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-32]
	ldr	r3, [r3, #8]
	sub	r3, r2, r3
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-28]
	ldr	r2, [fp, #-24]
	cmp	r2, r3
	bcs	.L33
	ldr	r3, [fp, #-32]
	ldr	r3, [r3, #8]
	ldr	r2, [fp, #-24]
	mov	r1, r3
	ldr	r0, [fp, #-36]
	bl	memcpy
	ldr	r2, [fp, #-36]
	ldr	r3, [fp, #-24]
	add	r3, r2, r3
	str	r3, [fp, #-20]
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #-24]
	sub	r3, r2, r3
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-32]
	ldr	r2, [r3]
	ldr	r3, [fp, #-32]
	str	r2, [r3, #8]
	ldr	r3, [fp, #-32]
	ldr	r2, [r3, #16]
	ldr	r3, [fp, #-24]
	add	r2, r2, r3
	ldr	r3, [fp, #-32]
	str	r2, [r3, #16]
.L33:
	ldr	r3, [fp, #-32]
	ldr	r3, [r3, #8]
	ldr	r2, [fp, #-28]
	mov	r1, r3
	ldr	r0, [fp, #-20]
	bl	memcpy
	ldr	r3, [fp, #-32]
	ldr	r2, [r3, #8]
	ldr	r3, [fp, #-28]
	add	r2, r2, r3
	ldr	r3, [fp, #-32]
	str	r2, [r3, #8]
	ldr	r3, [fp, #-32]
	ldr	r2, [r3, #16]
	ldr	r3, [fp, #-28]
	add	r2, r2, r3
	ldr	r3, [fp, #-32]
	str	r2, [r3, #16]
	mov	r3, #0
.L34:
	ldr	r2, .L36
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L35
	bl	__stack_chk_fail
.L35:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L37:
	.align	2
.L36:
	.word	.LC1
	.size	ringbuf_pop, .-ringbuf_pop
	.align	2
	.global	ringbuf_is_full
	.syntax unified
	.arm
	.fpu softvfp
	.type	ringbuf_is_full, %function
ringbuf_is_full:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #20]
	cmp	r3, #1
	bne	.L39
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #16]
	cmp	r3, #4
	bhi	.L39
	mov	r3, #1
	b	.L40
.L39:
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #20]
	cmp	r3, #0
	bne	.L41
	ldr	r3, [fp, #-8]
	ldr	r2, [r3, #16]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #24]
	cmp	r2, r3
	bcs	.L41
	mov	r3, #1
	b	.L40
.L41:
	mov	r3, #0
.L40:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	ringbuf_is_full, .-ringbuf_is_full
	.align	2
	.global	ringbuf_is_empty
	.syntax unified
	.arm
	.fpu softvfp
	.type	ringbuf_is_empty, %function
ringbuf_is_empty:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3, #16]
	ldr	r2, [fp, #-8]
	ldr	r1, [r2, #4]
	ldr	r2, [fp, #-8]
	ldr	r2, [r2]
	sub	r2, r1, r2
	cmp	r3, r2
	bne	.L43
	mov	r3, #1
	b	.L44
.L43:
	mov	r3, #0
.L44:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	ringbuf_is_empty, .-ringbuf_is_empty
	.align	2
	.global	ringbuf_reset
	.syntax unified
	.arm
	.fpu softvfp
	.type	ringbuf_reset, %function
ringbuf_reset:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	str	r2, [r3, #8]
	ldr	r3, [fp, #-8]
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	str	r2, [r3, #12]
	ldr	r3, [fp, #-8]
	ldr	r2, [r3, #4]
	ldr	r3, [fp, #-8]
	ldr	r3, [r3]
	sub	r3, r2, r3
	mov	r2, r3
	ldr	r3, [fp, #-8]
	str	r2, [r3, #16]
	mov	r3, #0
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	ringbuf_reset, .-ringbuf_reset
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
