	.file	"extr_qcom_glink_smem.c_glink_smem_rx_avail.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"failed to acquire RX fifo handle: %ld\n"
	.text
	.p2align 4
	.type	glink_smem_rx_avail, @function
glink_smem_rx_avail:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	sub	rsp, 24
	.cfi_def_cfa_offset 48
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	call	to_smem_pipe@PLT
	cmp	QWORD PTR 24[rax], 0
	mov	rbx, rax
	je	.L9
.L2:
	mov	rax, QWORD PTR 16[rbx]
	mov	edi, DWORD PTR [rax]
	call	le32_to_cpu@PLT
	mov	rbp, rax
	mov	rax, QWORD PTR 8[rbx]
	mov	edi, DWORD PTR [rax]
	call	le32_to_cpu@PLT
	mov	r8, rbp
	sub	r8, rax
	cmp	rbp, rax
	jb	.L10
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L11
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	rax, r8
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	mov	r8, QWORD PTR [rbx]
	add	r8, rbp
	sub	r8, rax
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L9:
	mov	edi, DWORD PTR 32[rax]
	mov	esi, DWORD PTR SMEM_GLINK_NATIVE_XPRT_FIFO_1[rip]
	mov	rdx, rsp
	call	qcom_smem_get@PLT
	mov	rdi, rax
	mov	rbp, rax
	call	IS_ERR@PLT
	test	rax, rax
	jne	.L12
	mov	rax, QWORD PTR [rsp]
	mov	QWORD PTR 24[rbx], rbp
	mov	QWORD PTR [rbx], rax
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L12:
	mov	rdi, rbp
	call	PTR_ERR@PLT
	lea	rdi, .LC0[rip]
	mov	esi, eax
	call	pr_err@PLT
	xor	r8d, r8d
	jmp	.L1
.L11:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	glink_smem_rx_avail, .-glink_smem_rx_avail
	.comm	SMEM_GLINK_NATIVE_XPRT_FIFO_1,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_qcom_glink_smem.c_glink_smem_rx_avail.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"failed to acquire RX fifo handle: %ld\012\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	glink_smem_rx_avail, %function
glink_smem_rx_avail:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	ldr	r3, .L12
	sub	sp, sp, #8
	ldr	r3, [r3]
	str	r3, [sp, #4]
	mov	r3,#0
	bl	to_smem_pipe
	ldr	r4, [r0, #12]
	mov	r5, r0
	cmp	r4, #0
	beq	.L9
.L2:
	ldr	r3, [r5, #8]
	ldr	r0, [r3]
	bl	le32_to_cpu
	ldr	r3, [r5, #4]
	mov	r4, r0
	ldr	r0, [r3]
	bl	le32_to_cpu
	cmp	r4, r0
	ldrcc	r3, [r5]
	addcc	r4, r4, r3
	sub	r0, r4, r0
.L1:
	ldr	r3, .L12
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L10
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, pc}
.L9:
	ldr	r3, .L12+4
	mov	r2, sp
	ldr	r1, [r3]
	ldr	r0, [r0, #16]
	bl	qcom_smem_get
	mov	r6, r0
	bl	IS_ERR
	cmp	r0, #0
	ldreq	r3, [sp]
	streq	r6, [r5, #12]
	streq	r3, [r5]
	beq	.L2
.L11:
	mov	r0, r6
	bl	PTR_ERR
	mov	r1, r0
	ldr	r0, .L12+8
	bl	pr_err
	mov	r0, r4
	b	.L1
.L10:
	bl	__stack_chk_fail
.L13:
	.align	2
.L12:
	.word	.LC1
	.word	SMEM_GLINK_NATIVE_XPRT_FIFO_1
	.word	.LC0
	.size	glink_smem_rx_avail, .-glink_smem_rx_avail
	.comm	SMEM_GLINK_NATIVE_XPRT_FIFO_1,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
