	.file	"extr_vchiq_lib.c_vchi_msg_queue.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	vchi_msg_queue
	.type	vchi_msg_queue, @function
vchi_msg_queue:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	mov	r14, rsi
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13d, edx
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	mov	r12, r8
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rcx
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	sub	rsp, 48
	.cfi_def_cfa_offset 96
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	call	find_service_by_handle@PLT
	mov	rdi, r12
	mov	QWORD PTR [rsp], r14
	mov	DWORD PTR 8[rsp], r13d
	mov	rbx, rax
	call	vcos_unused@PLT
	xor	edi, edi
	cmp	QWORD PTR VCHI_FLAGS_BLOCK_UNTIL_QUEUED[rip], rbp
	sete	dil
	call	vcos_assert@PLT
	mov	r12d, DWORD PTR VCHIQ_ERROR[rip]
	test	rbx, rbx
	je	.L1
	mov	eax, DWORD PTR 4[rbx]
	mov	edi, DWORD PTR [rbx]
	lea	rdx, 16[rsp]
	xor	r12d, r12d
	mov	esi, DWORD PTR VCHIQ_IOC_QUEUE_MESSAGE[rip]
	mov	DWORD PTR 16[rsp], 1
	mov	DWORD PTR 32[rsp], eax
	mov	rax, rsp
	mov	QWORD PTR 24[rsp], rax
	call	ioctl@PLT
	mov	edi, r12d
	mov	esi, eax
	call	RETRY@PLT
.L1:
	mov	rax, QWORD PTR 40[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L7
	add	rsp, 48
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
.L7:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	vchi_msg_queue, .-vchi_msg_queue
	.comm	VCHI_FLAGS_BLOCK_UNTIL_QUEUED,8,8
	.comm	VCHIQ_IOC_QUEUE_MESSAGE,4,4
	.comm	VCHIQ_ERROR,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_vchiq_lib.c_vchi_msg_queue.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	vchi_msg_queue
	.syntax unified
	.arm
	.fpu softvfp
	.type	vchi_msg_queue, %function
vchi_msg_queue:
	@ args = 4, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r5, r3
	ldr	r3, .L9
	sub	sp, sp, #24
	mov	r7, r1
	mov	r6, r2
	ldr	r3, [r3]
	str	r3, [sp, #20]
	mov	r3,#0
	ldr	r8, [sp, #48]
	bl	find_service_by_handle
	mov	r4, r0
	mov	r0, r8
	str	r7, [sp]
	str	r6, [sp, #4]
	bl	vcos_unused
	ldr	r3, .L9+4
	ldr	r0, [r3]
	sub	r0, r0, r5
	clz	r0, r0
	lsr	r0, r0, #5
	bl	vcos_assert
	cmp	r4, #0
	beq	.L7
	mov	r2, #1
	ldr	r1, .L9+8
	ldr	r3, [r4, #4]
	ldr	r0, [r4]
	ldr	r1, [r1]
	str	r2, [sp, #8]
	add	r2, sp, #8
	mov	r5, #0
	str	r3, [sp, #16]
	str	sp, [sp, #12]
	bl	ioctl
	mov	r1, r0
	mov	r0, r5
	bl	RETRY
.L1:
	ldr	r3, .L9
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L8
	mov	r0, r5
	add	sp, sp, #24
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L7:
	ldr	r3, .L9+12
	ldr	r5, [r3]
	b	.L1
.L8:
	bl	__stack_chk_fail
.L10:
	.align	2
.L9:
	.word	.LC0
	.word	VCHI_FLAGS_BLOCK_UNTIL_QUEUED
	.word	VCHIQ_IOC_QUEUE_MESSAGE
	.word	VCHIQ_ERROR
	.size	vchi_msg_queue, .-vchi_msg_queue
	.comm	VCHI_FLAGS_BLOCK_UNTIL_QUEUED,4,4
	.comm	VCHIQ_IOC_QUEUE_MESSAGE,4,4
	.comm	VCHIQ_ERROR,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
