	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vchi_msg_queuev                ## -- Begin function vchi_msg_queuev
	.p2align	4, 0x90
_vchi_msg_queuev:                       ## @vchi_msg_queuev
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r12
	movq	%rcx, %r13
	movl	%edx, %r14d
	movq	%rsi, %r15
	callq	_find_service_by_handle
	movq	%rax, %rbx
	movq	%r12, %rdi
	callq	_vcos_unused
	movq	_VCHI_FLAGS_BLOCK_UNTIL_QUEUED@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpq	%r13, (%rax)
	sete	%dil
	callq	_vcos_assert
	testq	%rbx, %rbx
	je	LBB0_1
## %bb.2:
	movl	4(%rbx), %eax
	movl	%eax, -48(%rbp)
	movq	%r15, -56(%rbp)
	movl	%r14d, -64(%rbp)
	movl	(%rbx), %edi
	movq	_VCHIQ_IOC_QUEUE_MESSAGE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-64(%rbp), %rdx
	callq	_ioctl
	movl	%eax, %esi
	callq	_RETRY
                                        ## implicit-def: $eax
	jmp	LBB0_3
LBB0_1:
	movq	_VCHIQ_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_3:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VCHI_FLAGS_BLOCK_UNTIL_QUEUED,8,3 ## @VCHI_FLAGS_BLOCK_UNTIL_QUEUED
	.comm	_VCHIQ_ERROR,4,2                ## @VCHIQ_ERROR
	.comm	_VCHIQ_IOC_QUEUE_MESSAGE,4,2    ## @VCHIQ_IOC_QUEUE_MESSAGE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vchi_msg_queuev                ; -- Begin function vchi_msg_queuev
	.p2align	2
_vchi_msg_queuev:                       ; @vchi_msg_queuev
	.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	x22, x4
	mov	x23, x3
	mov	x19, x2
	mov	x20, x1
	bl	_find_service_by_handle
	mov	x21, x0
	mov	x0, x22
	bl	_vcos_unused
Lloh0:
	adrp	x8, _VCHI_FLAGS_BLOCK_UNTIL_QUEUED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VCHI_FLAGS_BLOCK_UNTIL_QUEUED@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x23
	cset	w0, eq
	bl	_vcos_assert
	cbz	x21, LBB0_2
; %bb.1:
	ldr	w8, [x21, #4]
	str	w8, [sp, #24]
	str	x20, [sp, #16]
	str	w19, [sp, #8]
	ldr	w0, [x21]
Lloh3:
	adrp	x8, _VCHIQ_IOC_QUEUE_MESSAGE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _VCHIQ_IOC_QUEUE_MESSAGE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	x2, sp, #8
	bl	_ioctl
	mov	x1, x0
	bl	_RETRY
                                        ; implicit-def: $w0
	b	LBB0_3
LBB0_2:
Lloh6:
	adrp	x8, _VCHIQ_ERROR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _VCHIQ_ERROR@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
LBB0_3:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_VCHI_FLAGS_BLOCK_UNTIL_QUEUED,8,3 ; @VCHI_FLAGS_BLOCK_UNTIL_QUEUED
	.comm	_VCHIQ_ERROR,4,2                ; @VCHIQ_ERROR
	.comm	_VCHIQ_IOC_QUEUE_MESSAGE,4,2    ; @VCHIQ_IOC_QUEUE_MESSAGE
.subsections_via_symbols
