	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mmal_vc_handle_event_msg
_mmal_vc_handle_event_msg:              ## @mmal_vc_handle_event_msg
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	(%rdi), %r13
	movq	48(%r13), %rbx
	movl	24(%r13), %esi
	movq	(%r13), %rdx
	movq	40(%r13), %r8
	movq	32(%r13), %r9
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %rcx
	xorl	%eax, %eax
	callq	_LOG_DEBUG
	movq	32(%r13), %rdx
	movq	40(%r13), %rsi
	movq	%rbx, %rdi
	callq	_mmal_vc_port_by_number
	movq	%rax, %rbx
	movl	%ebx, %edi
	callq	_vcos_verify
	testl	%eax, %eax
	je	LBB0_11
## %bb.1:
	movl	24(%r13), %edx
	leaq	-48(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_mmal_port_event_get
	movq	_MMAL_SUCCESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_12
## %bb.2:
	movq	(%r13), %rax
	movq	-48(%rbp), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	setle	%dil
	callq	_vcos_verify
	testl	%eax, %eax
	je	LBB0_13
## %bb.3:
	movl	(%r13), %eax
	movq	-48(%rbp), %rdi
	movl	%eax, 8(%rdi)
	callq	_mmal_buffer_header_driver_data
	movq	(%rax), %rax
	movq	_MMAL_MAGIC@GOTPCREL(%rip), %rcx
	xorl	%r12d, %r12d
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.4:
	movq	-48(%rbp), %rdi
	callq	_mmal_buffer_header_driver_data
	cmpq	$0, 8(%rax)
	je	LBB0_7
## %bb.5:
	movq	-48(%rbp), %rdi
	callq	_mmal_buffer_header_driver_data
	movq	8(%rax), %rax
	movq	(%rax), %rax
	movq	_MMAL_MAGIC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.6:
	movq	-48(%rbp), %rdi
	callq	_mmal_buffer_header_driver_data
	movq	8(%rax), %rax
	xorl	%r12d, %r12d
	cmpq	$0, 8(%rax)
	setne	%r12b
LBB0_7:
	movl	%r12d, %edi
	callq	_vcos_verify
	testl	%eax, %eax
	je	LBB0_18
## %bb.8:
	movq	-48(%rbp), %rdi
	movl	8(%rdi), %edx
	movq	_MMAL_WORKER_EVENT_SPACE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	jle	LBB0_19
## %bb.9:
	leal	3(%rdx), %ebx
	andl	$-4, %ebx
	movl	12(%rdi), %esi
	leaq	L_.str.5(%rip), %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	xorl	%eax, %eax
	callq	_LOG_DEBUG
	movq	-48(%rbp), %rax
	movq	%rax, 16(%r13)
	movl	12(%rax), %esi
	movl	%r14d, %edi
	movl	%ebx, %edx
	movq	%r15, %rcx
	callq	_vchiq_queue_bulk_receive
	movq	_VCHIQ_SUCCESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_17
## %bb.10:
	movq	-48(%rbp), %rax
	movl	8(%rax), %esi
	leaq	L_.str.6(%rip), %rdi
	callq	_LOG_TRACE
	movq	-48(%rbp), %rdi
	callq	_mmal_buffer_header_release
	jmp	LBB0_15
LBB0_11:
	movl	32(%r13), %edx
	movl	40(%r13), %esi
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_14
LBB0_12:
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_LOG_ERROR
	jmp	LBB0_15
LBB0_13:
	movq	-48(%rbp), %rax
	movl	(%rax), %esi
	movl	(%r13), %edx
	leaq	L_.str.3(%rip), %rdi
LBB0_14:
	xorl	%eax, %eax
	callq	_LOG_ERROR
LBB0_15:
	movq	$0, (%r13)
LBB0_16:
	movl	%r14d, %edi
	movq	%r15, %rsi
	callq	_vchiq_release_message
LBB0_17:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	leaq	L_.str.4(%rip), %rdi
	xorl	%eax, %eax
	callq	_LOG_ERROR
	jmp	LBB0_15
LBB0_19:
	movq	(%r13), %rdx
	testq	%rdx, %rdx
	je	LBB0_21
## %bb.20:
	movl	12(%rdi), %edi
	movl	8(%r13), %esi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_memcpy
	movq	-48(%rbp), %rdi
LBB0_21:
	callq	_mmal_buffer_header_driver_data
	movq	8(%rax), %rax
	movq	-48(%rbp), %rsi
	movq	%rbx, %rdi
	callq	*8(%rax)
	leaq	L_.str.7(%rip), %rdi
	xorl	%eax, %eax
	callq	_LOG_DEBUG
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"event to host, cmd 0x%08x len %d to component %p port (%d,%d)"

L_.str.1:                               ## @.str.1
	.asciz	"port (%i,%i) doesn't exist"

	.comm	_MMAL_SUCCESS,8,3               ## @MMAL_SUCCESS
L_.str.2:                               ## @.str.2
	.asciz	"no event buffer available to receive event (%i)"

L_.str.3:                               ## @.str.3
	.asciz	"event buffer to small to receive event (%i/%i)"

	.comm	_MMAL_MAGIC,8,3                 ## @MMAL_MAGIC
L_.str.4:                               ## @.str.4
	.asciz	"event buffers not configured properly by component"

	.comm	_MMAL_WORKER_EVENT_SPACE,4,2    ## @MMAL_WORKER_EVENT_SPACE
L_.str.5:                               ## @.str.5
	.asciz	"queue event bulk rx: %p, %d"

	.comm	_VCHIQ_SUCCESS,8,3              ## @VCHIQ_SUCCESS
L_.str.6:                               ## @.str.6
	.asciz	"queue event bulk rx len %d failed to start"

L_.str.7:                               ## @.str.7
	.asciz	"done callback back to client"

	.no_dead_strip	_mmal_vc_handle_event_msg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mmal_vc_handle_event_msg
_mmal_vc_handle_event_msg:              ; @mmal_vc_handle_event_msg
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x20, x1
	mov	x19, x0
	ldr	x22, [x0]
	ldp	x9, x21, [x22, #40]
	ldr	x8, [x22]
	ldr	x10, [x22, #32]
	ldr	w11, [x22, #24]
	stp	x9, x10, [sp, #24]
	stp	x8, x21, [sp, #8]
	str	x11, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_LOG_DEBUG
	ldp	x2, x1, [x22, #32]
	mov	x0, x21
	bl	_mmal_vc_port_by_number
	mov	x21, x0
	bl	_vcos_verify
	cbz	w0, LBB0_8
; %bb.1:
	ldr	w2, [x22, #24]
	add	x1, sp, #40
	mov	x0, x21
	bl	_mmal_port_event_get
Lloh2:
	adrp	x8, _MMAL_SUCCESS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MMAL_SUCCESS@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_9
; %bb.2:
	ldr	x8, [x22]
	ldr	x9, [sp, #40]
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, le
	bl	_vcos_verify
	cbz	w0, LBB0_14
; %bb.3:
	ldr	x8, [x22]
	ldr	x0, [sp, #40]
	str	w8, [x0, #8]
	bl	_mmal_buffer_header_driver_data
	ldr	x8, [x0]
Lloh5:
	adrp	x23, _MMAL_MAGIC@GOTPAGE
Lloh6:
	ldr	x23, [x23, _MMAL_MAGIC@GOTPAGEOFF]
	ldr	x9, [x23]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.4:
	ldr	x0, [sp, #40]
	bl	_mmal_buffer_header_driver_data
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_10
; %bb.5:
	ldr	x0, [sp, #40]
	bl	_mmal_buffer_header_driver_data
	ldr	x8, [x0, #8]
	ldr	x8, [x8]
	ldr	x9, [x23]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.6:
	ldr	x0, [sp, #40]
	bl	_mmal_buffer_header_driver_data
	ldr	x8, [x0, #8]
	ldr	x8, [x8, #8]
	cmp	x8, #0
	cset	w0, ne
	bl	_vcos_verify
	cbnz	w0, LBB0_11
LBB0_7:
Lloh7:
	adrp	x0, l_.str.4@PAGE
Lloh8:
	add	x0, x0, l_.str.4@PAGEOFF
	b	LBB0_15
LBB0_8:
	ldp	x9, x8, [x22, #32]
	stp	x8, x9, [sp]
Lloh9:
	adrp	x0, l_.str.1@PAGE
Lloh10:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_15
LBB0_9:
	str	x0, [sp]
Lloh11:
	adrp	x0, l_.str.2@PAGE
Lloh12:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_15
LBB0_10:
	mov	w0, #0
	bl	_vcos_verify
	cbz	w0, LBB0_7
LBB0_11:
	ldr	x0, [sp, #40]
	ldr	w8, [x0, #8]
Lloh13:
	adrp	x9, _MMAL_WORKER_EVENT_SPACE@GOTPAGE
Lloh14:
	ldr	x9, [x9, _MMAL_WORKER_EVENT_SPACE@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	cmp	w8, w9
	b.le	LBB0_19
; %bb.12:
	add	w9, w8, #3
	and	w21, w9, #0xfffffffc
	ldr	w9, [x0, #12]
	stp	x9, x8, [sp]
Lloh16:
	adrp	x0, l_.str.5@PAGE
Lloh17:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_LOG_DEBUG
	ldr	x8, [sp, #40]
	str	x8, [x22, #16]
	ldr	w1, [x8, #12]
	mov	x0, x20
	mov	x2, x21
	mov	x3, x19
	bl	_vchiq_queue_bulk_receive
Lloh18:
	adrp	x8, _VCHIQ_SUCCESS@GOTPAGE
Lloh19:
	ldr	x8, [x8, _VCHIQ_SUCCESS@GOTPAGEOFF]
Lloh20:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_18
; %bb.13:
	ldr	x8, [sp, #40]
	ldr	w1, [x8, #8]
Lloh21:
	adrp	x0, l_.str.6@PAGE
Lloh22:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_LOG_TRACE
	ldr	x0, [sp, #40]
	bl	_mmal_buffer_header_release
	b	LBB0_16
LBB0_14:
	ldr	x8, [sp, #40]
	ldr	x8, [x8]
	ldr	x9, [x22]
	stp	x8, x9, [sp]
Lloh23:
	adrp	x0, l_.str.3@PAGE
Lloh24:
	add	x0, x0, l_.str.3@PAGEOFF
LBB0_15:
	bl	_LOG_ERROR
LBB0_16:
	str	xzr, [x22]
LBB0_17:
	mov	x0, x20
	mov	x1, x19
	bl	_vchiq_release_message
LBB0_18:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_19:
	ldr	x2, [x22]
	cbz	x2, LBB0_21
; %bb.20:
	ldr	w0, [x0, #12]
	ldr	w1, [x22, #8]
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_memcpy
	ldr	x0, [sp, #40]
LBB0_21:
	bl	_mmal_buffer_header_driver_data
	ldr	x8, [x0, #8]
	ldr	x8, [x8, #8]
	ldr	x1, [sp, #40]
	mov	x0, x21
	blr	x8
Lloh25:
	adrp	x0, l_.str.7@PAGE
Lloh26:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_LOG_DEBUG
	b	LBB0_17
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"event to host, cmd 0x%08x len %d to component %p port (%d,%d)"

l_.str.1:                               ; @.str.1
	.asciz	"port (%i,%i) doesn't exist"

	.comm	_MMAL_SUCCESS,8,3               ; @MMAL_SUCCESS
l_.str.2:                               ; @.str.2
	.asciz	"no event buffer available to receive event (%i)"

l_.str.3:                               ; @.str.3
	.asciz	"event buffer to small to receive event (%i/%i)"

	.comm	_MMAL_MAGIC,8,3                 ; @MMAL_MAGIC
l_.str.4:                               ; @.str.4
	.asciz	"event buffers not configured properly by component"

	.comm	_MMAL_WORKER_EVENT_SPACE,4,2    ; @MMAL_WORKER_EVENT_SPACE
l_.str.5:                               ; @.str.5
	.asciz	"queue event bulk rx: %p, %d"

	.comm	_VCHIQ_SUCCESS,8,3              ; @VCHIQ_SUCCESS
l_.str.6:                               ; @.str.6
	.asciz	"queue event bulk rx len %d failed to start"

l_.str.7:                               ; @.str.7
	.asciz	"done callback back to client"

	.no_dead_strip	_mmal_vc_handle_event_msg
.subsections_via_symbols
