	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mmalomx_buffer_return          ## -- Begin function mmalomx_buffer_return
	.p2align	4, 0x90
_mmalomx_buffer_return:                 ## @mmalomx_buffer_return
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r12
	cmpq	$0, 8(%rsi)
	je	LBB0_2
## %bb.1:
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_mmalomx_buffer_event
	movq	%rbx, %rdi
	callq	_mmal_buffer_header_release
	jmp	LBB0_9
LBB0_2:
	movq	24(%r12), %r14
	movq	16(%rbx), %r15
	movq	_ENABLE_MMAL_EXTRA_LOGGING@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_4
## %bb.3:
	movl	16(%r12), %edx
	leaq	L_.str(%rip), %rdi
	movq	%r14, %rsi
	movq	%r15, %rcx
	callq	_LOG_TRACE
LBB0_4:
	movq	(%r15), %rax
	xorl	%edi, %edi
	cmpq	(%rbx), %rax
	sete	%dil
	callq	_vcos_assert
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_mmalil_buffer_header_to_omx
	movq	%rbx, %rdi
	callq	_mmal_buffer_header_release
	movl	8(%r15), %ecx
	movq	_OMX_BUFFERFLAG_EOS@GOTPCREL(%rip), %rax
	testl	%ecx, (%rax)
	je	LBB0_7
## %bb.5:
	movq	(%r12), %rax
	movq	_OMX_DirOutput@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	jne	LBB0_7
## %bb.6:
	movq	_OMX_EventBufferFlag@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	16(%r12), %edx
	movq	%r14, %rdi
	xorl	%r8d, %r8d
	callq	_mmalomx_callback_event_handler
LBB0_7:
	movq	%r14, %rdi
	movq	%r12, %rsi
	movq	%r15, %rdx
	callq	_mmalomx_mark_process_outgoing
	movq	(%r12), %rax
	movq	_OMX_DirInput@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	cmpq	(%rcx), %rax
	sete	%bl
	leal	4(%r14), %edi
	movl	(%r14), %esi
	movq	%r15, %rdx
	callq	*8(%r14,%rbx,8)
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_MMALOMX_LOCK_PORT
	movq	_MMALOMX_ACTION_CHECK_FLUSHED@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	andl	8(%r12), %ebx
	decl	12(%r12)
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_MMALOMX_UNLOCK_PORT
	testl	%ebx, %ebx
	je	LBB0_9
## %bb.8:
	movq	%r14, %rdi
	callq	_mmalomx_commands_actions_signal
LBB0_9:
	movq	_OMX_ErrorNone@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_OMX_ErrorNone,4,2              ## @OMX_ErrorNone
	.comm	_ENABLE_MMAL_EXTRA_LOGGING,8,3  ## @ENABLE_MMAL_EXTRA_LOGGING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"hComponent %p, port %i, pBuffer %p"

	.comm	_OMX_BUFFERFLAG_EOS,4,2         ## @OMX_BUFFERFLAG_EOS
	.comm	_OMX_DirOutput,8,3              ## @OMX_DirOutput
	.comm	_OMX_EventBufferFlag,4,2        ## @OMX_EventBufferFlag
	.comm	_OMX_DirInput,8,3               ## @OMX_DirInput
	.comm	_MMALOMX_ACTION_CHECK_FLUSHED,4,2 ## @MMALOMX_ACTION_CHECK_FLUSHED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mmalomx_buffer_return          ; -- Begin function mmalomx_buffer_return
	.p2align	2
_mmalomx_buffer_return:                 ; @mmalomx_buffer_return
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x22, x1
	mov	x19, x0
	ldr	x8, [x1, #8]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x0, x19
	mov	x1, x22
	bl	_mmalomx_buffer_event
	mov	x0, x22
	bl	_mmal_buffer_header_release
	b	LBB0_9
LBB0_2:
	ldr	x20, [x19, #24]
	ldr	x21, [x22, #16]
Lloh0:
	adrp	x8, _ENABLE_MMAL_EXTRA_LOGGING@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENABLE_MMAL_EXTRA_LOGGING@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_4
; %bb.3:
	ldr	w2, [x19, #16]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	mov	x3, x21
	bl	_LOG_TRACE
LBB0_4:
	ldr	x8, [x21]
	ldr	x9, [x22]
	cmp	x8, x9
	cset	w0, eq
	bl	_vcos_assert
	mov	x0, x21
	mov	x1, x22
	bl	_mmalil_buffer_header_to_omx
	mov	x0, x22
	bl	_mmal_buffer_header_release
	ldr	w3, [x21, #8]
Lloh5:
	adrp	x8, _OMX_BUFFERFLAG_EOS@GOTPAGE
Lloh6:
	ldr	x8, [x8, _OMX_BUFFERFLAG_EOS@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	tst	w8, w3
	b.eq	LBB0_7
; %bb.5:
	ldr	x8, [x19]
Lloh8:
	adrp	x9, _OMX_DirOutput@GOTPAGE
Lloh9:
	ldr	x9, [x9, _OMX_DirOutput@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.6:
Lloh11:
	adrp	x8, _OMX_EventBufferFlag@GOTPAGE
Lloh12:
	ldr	x8, [x8, _OMX_EventBufferFlag@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	ldr	w2, [x19, #16]
	mov	x0, x20
	mov	x4, #0
	bl	_mmalomx_callback_event_handler
LBB0_7:
	mov	x0, x20
	mov	x1, x19
	mov	x2, x21
	bl	_mmalomx_mark_process_outgoing
	ldr	x8, [x19]
Lloh14:
	adrp	x9, _OMX_DirInput@GOTPAGE
Lloh15:
	ldr	x9, [x9, _OMX_DirInput@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	mov	w10, #8
	mov	w11, #16
	cmp	x8, x9
	csel	x8, x11, x10, eq
	ldr	x8, [x20, x8]
	add	w0, w20, #4
	ldr	w1, [x20]
	mov	x2, x21
	blr	x8
	mov	x0, x20
	mov	x1, x19
	bl	_MMALOMX_LOCK_PORT
Lloh17:
	adrp	x8, _MMALOMX_ACTION_CHECK_FLUSHED@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MMALOMX_ACTION_CHECK_FLUSHED@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	ldp	w9, w10, [x19, #8]
	and	w21, w8, w9
	sub	w8, w10, #1
	str	w8, [x19, #12]
	mov	x0, x20
	mov	x1, x19
	bl	_MMALOMX_UNLOCK_PORT
	cbz	w21, LBB0_9
; %bb.8:
	mov	x0, x20
	bl	_mmalomx_commands_actions_signal
LBB0_9:
Lloh20:
	adrp	x8, _OMX_ErrorNone@GOTPAGE
Lloh21:
	ldr	x8, [x8, _OMX_ErrorNone@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_OMX_ErrorNone,4,2              ; @OMX_ErrorNone
	.comm	_ENABLE_MMAL_EXTRA_LOGGING,8,3  ; @ENABLE_MMAL_EXTRA_LOGGING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"hComponent %p, port %i, pBuffer %p"

	.comm	_OMX_BUFFERFLAG_EOS,4,2         ; @OMX_BUFFERFLAG_EOS
	.comm	_OMX_DirOutput,8,3              ; @OMX_DirOutput
	.comm	_OMX_EventBufferFlag,4,2        ; @OMX_EventBufferFlag
	.comm	_OMX_DirInput,8,3               ; @OMX_DirInput
	.comm	_MMALOMX_ACTION_CHECK_FLUSHED,4,2 ; @MMALOMX_ACTION_CHECK_FLUSHED
.subsections_via_symbols
