	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mmal_port_event_get            ## -- Begin function mmal_port_event_get
	.p2align	4, 0x90
_mmal_port_event_get:                   ## @mmal_port_event_get
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -32(%rbp)
	movq	_MMAL_EINVAL@GOTPCREL(%rip), %r15
	testq	%rdi, %rdi
	je	LBB0_12
## %bb.1:
	movq	%rsi, %r14
	testq	%rsi, %rsi
	je	LBB0_12
## %bb.2:
	movq	%rdi, %rbx
	cmpl	$0, 24(%rdi)
	je	LBB0_12
## %bb.3:
	movq	16(%rbx), %rax
	movl	(%rax), %esi
	movl	(%rbx), %ecx
	movl	8(%rbx), %edx
	leaq	L_.str(%rip), %rdi
	leaq	-32(%rbp), %r9
	movq	%rbx, %r8
	callq	_LOG_TRACE
	movq	16(%rbx), %rax
	movq	8(%rax), %rax
	movq	(%rax), %rax
	movl	(%rax), %edi
	callq	_mmal_queue_get
	movq	%rax, (%r14)
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	-32(%rbp), %rcx
	movq	%rcx, 24(%rax)
	movq	$0, 8(%rax)
	movq	_MMAL_EVENT_FORMAT_CHANGED@GOTPCREL(%rip), %rdx
	movq	_MMAL_SUCCESS@GOTPCREL(%rip), %r15
	cmpq	(%rdx), %rcx
	jne	LBB0_12
## %bb.6:
	movq	(%rax), %r10
	cmpq	$12, %r10
	jge	LBB0_7
## %bb.8:
	movq	16(%rbx), %rax
	movl	(%rax), %esi
	movl	(%rbx), %ecx
	movl	8(%rbx), %edx
	leaq	L_.str.2(%rip), %rdi
	leaq	-32(%rbp), %r9
	movq	%rbx, %r8
	xorl	%eax, %eax
	pushq	$12
	pushq	%r10
	callq	_LOG_ERROR
	addq	$16, %rsp
	movq	(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_10
## %bb.9:
	callq	_mmal_buffer_header_release
LBB0_10:
	movq	$0, (%r14)
	jmp	LBB0_11
LBB0_4:
	movq	16(%rbx), %rax
	movl	(%rax), %esi
	movl	(%rbx), %ecx
	movl	8(%rbx), %edx
	leaq	L_.str.1(%rip), %rdi
	leaq	-32(%rbp), %r9
	movq	%rbx, %r8
	xorl	%eax, %eax
	callq	_LOG_ERROR
LBB0_11:
	movq	_MMAL_ENOSPC@GOTPCREL(%rip), %r15
	jmp	LBB0_12
LBB0_7:
	movl	16(%rax), %edi
	movl	$12, %edx
	xorl	%esi, %esi
	callq	_memset
	movq	(%r14), %rax
	movq	$12, 8(%rax)
LBB0_12:
	movl	(%r15), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MMAL_EINVAL,4,2                ## @MMAL_EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s(%i:%i) port %p, event %4.4s"

L_.str.1:                               ## @.str.1
	.asciz	"%s(%i:%i) port %p, no event buffer left for %4.4s"

	.comm	_MMAL_ENOSPC,4,2                ## @MMAL_ENOSPC
	.comm	_MMAL_EVENT_FORMAT_CHANGED,8,3  ## @MMAL_EVENT_FORMAT_CHANGED
L_.str.2:                               ## @.str.2
	.asciz	"%s(%i:%i) port %p, event buffer for %4.4s is too small (%i/%i)"

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

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mmal_port_event_get            ; -- Begin function mmal_port_event_get
	.p2align	2
_mmal_port_event_get:                   ; @mmal_port_event_get
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	str	x2, [sp, #24]
	cbz	x0, LBB0_9
; %bb.1:
	mov	x19, x1
Lloh0:
	adrp	x8, _MMAL_EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MMAL_EINVAL@GOTPAGEOFF]
	cbz	x1, LBB0_14
; %bb.2:
	mov	x20, x0
	ldr	w9, [x0, #24]
	cbz	w9, LBB0_14
; %bb.3:
	ldr	x8, [x20, #16]
	ldr	w1, [x8]
	ldr	w2, [x20, #8]
	ldr	w3, [x20]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	add	x5, sp, #24
	mov	x4, x20
	bl	_LOG_TRACE
	ldr	x8, [x20, #16]
	ldr	x8, [x8, #8]
	ldr	x8, [x8]
	ldr	w0, [x8]
	bl	_mmal_queue_get
	str	x0, [x19]
	cbz	x0, LBB0_10
; %bb.4:
	ldr	x8, [sp, #24]
	str	x8, [x0, #24]
	str	xzr, [x0, #8]
Lloh4:
	adrp	x9, _MMAL_EVENT_FORMAT_CHANGED@GOTPAGE
Lloh5:
	ldr	x9, [x9, _MMAL_EVENT_FORMAT_CHANGED@GOTPAGEOFF]
Lloh6:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_13
; %bb.5:
	ldr	x8, [x0]
	cmp	x8, #12
	b.ge	LBB0_12
; %bb.6:
	ldr	x9, [x20, #16]
	ldr	w1, [x9]
	ldr	w2, [x20, #8]
	ldr	w3, [x20]
	mov	w9, #12
	stp	x8, x9, [sp]
Lloh7:
	adrp	x0, l_.str.2@PAGE
Lloh8:
	add	x0, x0, l_.str.2@PAGEOFF
	add	x5, sp, #24
	mov	x4, x20
	bl	_LOG_ERROR
	ldr	x0, [x19]
	cbz	x0, LBB0_8
; %bb.7:
	bl	_mmal_buffer_header_release
LBB0_8:
	str	xzr, [x19]
	b	LBB0_11
LBB0_9:
Lloh9:
	adrp	x8, _MMAL_EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MMAL_EINVAL@GOTPAGEOFF]
	b	LBB0_14
LBB0_10:
	ldr	x8, [x20, #16]
	ldr	w1, [x8]
	ldr	w2, [x20, #8]
	ldr	w3, [x20]
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
	add	x5, sp, #24
	mov	x4, x20
	bl	_LOG_ERROR
LBB0_11:
Lloh13:
	adrp	x8, _MMAL_ENOSPC@GOTPAGE
Lloh14:
	ldr	x8, [x8, _MMAL_ENOSPC@GOTPAGEOFF]
	b	LBB0_14
LBB0_12:
	ldr	w0, [x0, #16]
	mov	w20, #12
	mov	w1, #0
	mov	w2, #12
	bl	_memset
	ldr	x8, [x19]
	str	x20, [x8, #8]
LBB0_13:
Lloh15:
	adrp	x8, _MMAL_SUCCESS@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MMAL_SUCCESS@GOTPAGEOFF]
LBB0_14:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_MMAL_EINVAL,4,2                ; @MMAL_EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s(%i:%i) port %p, event %4.4s"

l_.str.1:                               ; @.str.1
	.asciz	"%s(%i:%i) port %p, no event buffer left for %4.4s"

	.comm	_MMAL_ENOSPC,4,2                ; @MMAL_ENOSPC
	.comm	_MMAL_EVENT_FORMAT_CHANGED,8,3  ; @MMAL_EVENT_FORMAT_CHANGED
l_.str.2:                               ; @.str.2
	.asciz	"%s(%i:%i) port %p, event buffer for %4.4s is too small (%i/%i)"

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