	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mmal_vc_send_message           ## -- Begin function mmal_vc_send_message
	.p2align	4, 0x90
_mmal_vc_send_message:                  ## @mmal_vc_send_message
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, %r13d
	movq	%r8, %rbx
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r12
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	%rsi, -64(%rbp)
	movq	%rdx, -56(%rbp)
	leaq	L_.str(%rip), %rdi
	movq	%r8, %rsi
	xorl	%eax, %eax
	callq	_LOG_TRACE
	xorl	%edi, %edi
	cmpq	$8, %r12
	setae	%dil
	callq	_vcos_assert
	cmpl	$0, 8(%r14)
	je	LBB0_1
## %bb.2:
	testq	%rbx, %rbx
	je	LBB0_4
## %bb.3:
	movq	%r14, %rdi
	callq	_vcos_mutex_lock
LBB0_4:
	movl	%r13d, 4(%r15)
	movq	_MMAL_MAGIC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r15)
	movl	4(%r14), %edi
	leaq	-64(%rbp), %rsi
	movl	$1, %edx
	callq	_vchiq_queue_message
	movq	_VCHIQ_SUCCESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.8:
	movq	_MMAL_SUCCESS@GOTPCREL(%rip), %r12
	testq	%rbx, %rbx
	je	LBB0_12
## %bb.9:
	leaq	L_.str.2(%rip), %rdi
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rsi
	movq	%rbx, %rdx
	xorl	%eax, %eax
	callq	_LOG_TRACE
	addq	$3, %rbx
	andq	$-4, %rbx
	movl	4(%r14), %edi
	movq	%r13, %rsi
	movq	%rbx, %rdx
	movq	%r15, %rcx
	callq	_vchiq_queue_bulk_transmit
	movq	%rax, %rbx
	movq	%r14, %rdi
	callq	_vcos_mutex_unlock
	xorl	%edi, %edi
	movq	_VCHIQ_SUCCESS@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	sete	%dil
	callq	_vcos_verify
	testl	%eax, %eax
	jne	LBB0_12
## %bb.10:
	leaq	L_.str.3(%rip), %rdi
	callq	_LOG_ERROR
	xorl	%edi, %edi
	callq	_vcos_assert
	jmp	LBB0_11
LBB0_1:
	xorl	%edi, %edi
	callq	_vcos_assert
	movq	_MMAL_EINVAL@GOTPCREL(%rip), %r12
	jmp	LBB0_12
LBB0_5:
	testq	%rbx, %rbx
	je	LBB0_7
## %bb.6:
	movq	%r14, %rdi
	callq	_vcos_mutex_unlock
LBB0_7:
	leaq	L_.str.1(%rip), %rdi
	callq	_LOG_ERROR
LBB0_11:
	movq	_MMAL_EIO@GOTPCREL(%rip), %r12
LBB0_12:
	movl	(%r12), %eax
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_14
## %bb.13:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"len %d"

	.comm	_MMAL_EINVAL,4,2                ## @MMAL_EINVAL
	.comm	_MMAL_MAGIC,4,2                 ## @MMAL_MAGIC
	.comm	_VCHIQ_SUCCESS,8,3              ## @VCHIQ_SUCCESS
L_.str.1:                               ## @.str.1
	.asciz	"failed"

L_.str.2:                               ## @.str.2
	.asciz	"bulk transmit: %p, %i"

L_.str.3:                               ## @.str.3
	.asciz	"failed bulk transmit"

	.comm	_MMAL_SUCCESS,4,2               ## @MMAL_SUCCESS
	.comm	_MMAL_EIO,4,2                   ## @MMAL_EIO
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mmal_vc_send_message           ; -- Begin function mmal_vc_send_message
	.p2align	2
_mmal_vc_send_message:                  ; @mmal_vc_send_message
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x23, x5
	mov	x22, x4
	mov	x21, x3
	mov	x24, x2
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	stp	x1, x2, [sp, #8]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x4
	bl	_LOG_TRACE
	cmp	x24, #7
	cset	w0, hi
	bl	_vcos_assert
	ldr	w8, [x19, #8]
	cbz	w8, LBB0_7
; %bb.1:
	cbz	x22, LBB0_3
; %bb.2:
	mov	x0, x19
	bl	_vcos_mutex_lock
LBB0_3:
Lloh5:
	adrp	x8, _MMAL_MAGIC@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MMAL_MAGIC@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	stp	w8, w23, [x20]
	ldr	w0, [x19, #4]
	add	x1, sp, #8
	mov	w2, #1
	bl	_vchiq_queue_message
Lloh8:
	adrp	x23, _VCHIQ_SUCCESS@GOTPAGE
Lloh9:
	ldr	x23, [x23, _VCHIQ_SUCCESS@GOTPAGEOFF]
	ldr	x8, [x23]
	cmp	x0, x8
	b.ne	LBB0_8
; %bb.4:
	cbz	x22, LBB0_6
; %bb.5:
	str	x22, [sp]
Lloh10:
	adrp	x0, l_.str.2@PAGE
Lloh11:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x21
	bl	_LOG_TRACE
	add	x8, x22, #3
	and	x2, x8, #0xfffffffffffffffc
	ldr	w0, [x19, #4]
	mov	x1, x21
	mov	x3, x20
	bl	_vchiq_queue_bulk_transmit
	mov	x20, x0
	mov	x0, x19
	bl	_vcos_mutex_unlock
	ldr	x8, [x23]
	cmp	x20, x8
	cset	w0, eq
	bl	_vcos_verify
	cbz	w0, LBB0_14
LBB0_6:
Lloh12:
	adrp	x8, _MMAL_SUCCESS@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MMAL_SUCCESS@GOTPAGEOFF]
	b	LBB0_12
LBB0_7:
	mov	w0, #0
	bl	_vcos_assert
Lloh14:
	adrp	x8, _MMAL_EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MMAL_EINVAL@GOTPAGEOFF]
	b	LBB0_12
LBB0_8:
	cbz	x22, LBB0_10
; %bb.9:
	mov	x0, x19
	bl	_vcos_mutex_unlock
LBB0_10:
Lloh16:
	adrp	x0, l_.str.1@PAGE
Lloh17:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_LOG_ERROR
LBB0_11:
Lloh18:
	adrp	x8, _MMAL_EIO@GOTPAGE
Lloh19:
	ldr	x8, [x8, _MMAL_EIO@GOTPAGEOFF]
LBB0_12:
	ldr	w0, [x8]
	ldr	x8, [sp, #24]
Lloh20:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh21:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_15
; %bb.13:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_14:
Lloh23:
	adrp	x0, l_.str.3@PAGE
Lloh24:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_LOG_ERROR
	mov	w0, #0
	bl	_vcos_assert
	b	LBB0_11
LBB0_15:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"len %d"

	.comm	_MMAL_EINVAL,4,2                ; @MMAL_EINVAL
	.comm	_MMAL_MAGIC,4,2                 ; @MMAL_MAGIC
	.comm	_VCHIQ_SUCCESS,8,3              ; @VCHIQ_SUCCESS
l_.str.1:                               ; @.str.1
	.asciz	"failed"

l_.str.2:                               ; @.str.2
	.asciz	"bulk transmit: %p, %i"

l_.str.3:                               ; @.str.3
	.asciz	"failed bulk transmit"

	.comm	_MMAL_SUCCESS,4,2               ; @MMAL_SUCCESS
	.comm	_MMAL_EIO,4,2                   ; @MMAL_EIO
.subsections_via_symbols
