	.file	"extr_mmal_vc_client.c_mmal_vc_sendwait_message.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"wait %p, reply to %p"
.LC1:
	.string	"failed bulk transmit"
.LC2:
	.string	"got reply (len %i/%i)"
	.text
	.p2align 4
	.globl	mmal_vc_sendwait_message
	.type	mmal_vc_sendwait_message, @function
mmal_vc_sendwait_message:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15d, ecx
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14, r8
	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
	xor	edi, edi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, r9
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	cmp	rdx, 15
	mov	QWORD PTR [rsp], rsi
	seta	dil
	mov	QWORD PTR 8[rsp], rdx
	call	vcos_assert@PLT
	mov	rdi, r14
	call	vcos_assert@PLT
	mov	eax, DWORD PTR 8[rbp]
	test	eax, eax
	je	.L12
	cmp	QWORD PTR 96[rsp], 0
	mov	rdi, rbp
	jne	.L13
	call	get_waiter@PLT
	mov	DWORD PTR 0[r13], r15d
	mov	rdx, r14
	lea	rdi, .LC0[rip]
	mov	QWORD PTR 8[r13], rax
	mov	r12, rax
	mov	eax, DWORD PTR MMAL_MAGIC[rip]
	mov	rsi, r12
	mov	DWORD PTR 4[r13], eax
	mov	rax, QWORD PTR [rbx]
	mov	QWORD PTR 16[r12], r14
	mov	QWORD PTR [r12], rax
	xor	eax, eax
	call	LOG_TRACE@PLT
	mov	rdi, rbp
	call	mmal_vc_use_internal@PLT
	mov	edi, DWORD PTR 4[rbp]
	mov	rsi, rsp
	mov	edx, 1
	call	vchiq_queue_message@PLT
	cmp	rax, QWORD PTR VCHIQ_SUCCESS[rip]
	mov	r13d, DWORD PTR MMAL_EIO[rip]
	je	.L6
.L7:
	mov	rdi, rbp
	call	mmal_vc_release_internal@PLT
	mov	rsi, r12
	mov	rdi, rbp
	call	release_waiter@PLT
.L1:
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L14
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r13d
	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
.L13:
	.cfi_restore_state
	call	vcos_mutex_lock@PLT
	mov	rdi, rbp
	call	get_waiter@PLT
	mov	DWORD PTR 0[r13], r15d
	mov	rdx, r14
	lea	rdi, .LC0[rip]
	mov	QWORD PTR 8[r13], rax
	mov	r12, rax
	mov	eax, DWORD PTR MMAL_MAGIC[rip]
	mov	rsi, r12
	mov	DWORD PTR 4[r13], eax
	mov	rax, QWORD PTR [rbx]
	mov	QWORD PTR 16[r12], r14
	mov	QWORD PTR [r12], rax
	xor	eax, eax
	call	LOG_TRACE@PLT
	mov	rdi, rbp
	call	mmal_vc_use_internal@PLT
	mov	edi, DWORD PTR 4[rbp]
	mov	rsi, rsp
	mov	edx, 1
	call	vchiq_queue_message@PLT
	cmp	rax, QWORD PTR VCHIQ_SUCCESS[rip]
	jne	.L5
	mov	edi, DWORD PTR 4[rbp]
	mov	rcx, r13
	mov	edx, 8
	lea	rsi, data.1996[rip]
	call	vchiq_queue_bulk_transmit@PLT
	mov	rdi, rbp
	mov	r13, rax
	call	vcos_mutex_unlock@PLT
	xor	edi, edi
	cmp	QWORD PTR VCHIQ_SUCCESS[rip], r13
	sete	dil
	call	vcos_verify@PLT
	test	eax, eax
	je	.L15
.L6:
	lea	rdi, 8[r12]
	call	vcos_semaphore_wait@PLT
	mov	rdi, rbp
	call	mmal_vc_release_internal@PLT
	mov	edx, DWORD PTR [r12]
	mov	esi, DWORD PTR [rbx]
	xor	eax, eax
	lea	rdi, .LC2[rip]
	call	LOG_TRACE@PLT
	mov	rax, QWORD PTR [r12]
	mov	rsi, r12
	mov	rdi, rbp
	mov	QWORD PTR [rbx], rax
	call	release_waiter@PLT
	mov	r13d, DWORD PTR MMAL_SUCCESS[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L12:
	xor	edi, edi
	call	vcos_assert@PLT
	mov	r13d, DWORD PTR MMAL_EINVAL[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L5:
	mov	rdi, rbp
	mov	r13d, DWORD PTR MMAL_EIO[rip]
	call	vcos_mutex_unlock@PLT
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L15:
	lea	rdi, .LC1[rip]
	call	LOG_ERROR@PLT
	xor	edi, edi
	call	vcos_assert@PLT
	mov	r13d, DWORD PTR MMAL_EIO[rip]
	jmp	.L7
.L14:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	mmal_vc_sendwait_message, .-mmal_vc_sendwait_message
	.local	data.1996
	.comm	data.1996,32,32
	.comm	VCHIQ_SUCCESS,8,8
	.comm	MMAL_SUCCESS,4,4
	.comm	MMAL_MAGIC,4,4
	.comm	MMAL_EIO,4,4
	.comm	MMAL_EINVAL,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_mmal_vc_client.c_mmal_vc_sendwait_message.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"wait %p, reply to %p\000"
	.align	2
.LC1:
	.ascii	"failed bulk transmit\000"
	.align	2
.LC2:
	.ascii	"got reply (len %i/%i)\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC3:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	mmal_vc_sendwait_message
	.syntax unified
	.arm
	.fpu softvfp
	.type	mmal_vc_sendwait_message, %function
mmal_vc_sendwait_message:
	@ args = 12, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	mov	r4, r0
	sub	sp, sp, #20
	stmib	sp, {r1, r2}
	cmp	r2, #11
	ldr	r8, [sp, #48]
	mov	r7, r3
	ldr	r3, .L16
	movls	r0, #0
	movhi	r0, #1
	mov	r6, r1
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	ldr	r9, [sp, #52]
	bl	vcos_assert
	mov	r0, r8
	bl	vcos_assert
	ldr	r0, [r4, #8]
	cmp	r0, #0
	beq	.L12
	ldr	r3, [sp, #56]
	mov	r0, r4
	cmp	r3, #0
	bne	.L13
	bl	get_waiter
	ldr	r3, .L16+4
	mov	r1, r0
	ldr	r2, [r3]
	ldr	r3, [r9]
	str	r0, [r6, #8]
	str	r2, [r6, #4]
	str	r7, [r6]
	mov	r2, r8
	str	r3, [r0]
	str	r8, [r0, #8]
	mov	r5, r0
	ldr	r0, .L16+8
	bl	LOG_TRACE
	mov	r0, r4
	bl	mmal_vc_use_internal
	mov	r2, #1
	ldr	r0, [r4, #4]
	add	r1, sp, #4
	bl	vchiq_queue_message
	ldr	r3, .L16+12
	ldr	r3, [r3]
	cmp	r0, r3
	beq	.L6
	ldr	r3, .L16+16
	ldr	r6, [r3]
.L7:
	mov	r0, r4
	bl	mmal_vc_release_internal
	mov	r1, r5
	mov	r0, r4
	bl	release_waiter
.L1:
	ldr	r3, .L16
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L14
	mov	r0, r6
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L13:
	bl	vcos_mutex_lock
	mov	r0, r4
	bl	get_waiter
	ldr	r2, .L16+4
	ldr	r3, [r9]
	ldr	r2, [r2]
	mov	r1, r0
	str	r0, [r6, #8]
	str	r7, [r6]
	str	r2, [r6, #4]
	mov	r5, r0
	str	r3, [r0]
	mov	r2, r8
	str	r8, [r0, #8]
	ldr	r0, .L16+8
	bl	LOG_TRACE
	mov	r0, r4
	bl	mmal_vc_use_internal
	mov	r2, #1
	ldr	r0, [r4, #4]
	add	r1, sp, #4
	bl	vchiq_queue_message
	ldr	r7, .L16+12
	ldr	r3, [r7]
	cmp	r0, r3
	bne	.L5
	mov	r3, r6
	mov	r2, #8
	ldr	r1, .L16+20
	ldr	r0, [r4, #4]
	bl	vchiq_queue_bulk_transmit
	mov	r6, r0
	mov	r0, r4
	bl	vcos_mutex_unlock
	ldr	r0, [r7]
	sub	r0, r0, r6
	clz	r0, r0
	lsr	r0, r0, #5
	bl	vcos_verify
	subs	r6, r0, #0
	beq	.L15
.L6:
	add	r0, r5, #4
	bl	vcos_semaphore_wait
	mov	r0, r4
	bl	mmal_vc_release_internal
	ldr	r2, [r5]
	ldr	r1, [r9]
	ldr	r0, .L16+24
	bl	LOG_TRACE
	ldr	r3, [r5]
	mov	r0, r4
	str	r3, [r9]
	mov	r1, r5
	bl	release_waiter
	ldr	r3, .L16+28
	ldr	r6, [r3]
	b	.L1
.L12:
	bl	vcos_assert
	ldr	r3, .L16+32
	ldr	r6, [r3]
	b	.L1
.L5:
	ldr	r3, .L16+16
	mov	r0, r4
	ldr	r6, [r3]
	bl	vcos_mutex_unlock
	b	.L7
.L15:
	ldr	r0, .L16+36
	bl	LOG_ERROR
	mov	r0, r6
	bl	vcos_assert
	ldr	r3, .L16+16
	ldr	r6, [r3]
	b	.L7
.L14:
	bl	__stack_chk_fail
.L17:
	.align	2
.L16:
	.word	.LC3
	.word	MMAL_MAGIC
	.word	.LC0
	.word	VCHIQ_SUCCESS
	.word	MMAL_EIO
	.word	.LANCHOR0
	.word	.LC2
	.word	MMAL_SUCCESS
	.word	MMAL_EINVAL
	.word	.LC1
	.size	mmal_vc_sendwait_message, .-mmal_vc_sendwait_message
	.comm	VCHIQ_SUCCESS,4,4
	.comm	MMAL_SUCCESS,4,4
	.comm	MMAL_MAGIC,4,4
	.comm	MMAL_EIO,4,4
	.comm	MMAL_EINVAL,4,4
	.bss
	.align	2
	.set	.LANCHOR0,. + 0
	.type	data.4280, %object
	.size	data.4280, 32
data.4280:
	.space	32
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
