	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mmal_port_flush                ## -- Begin function mmal_port_flush
	.p2align	4, 0x90
_mmal_port_flush:                       ## @mmal_port_flush
	.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
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.1:
	movq	%rdi, %r15
	cmpq	$0, 8(%rdi)
	je	LBB0_6
## %bb.2:
	movq	(%r15), %rax
	movl	(%rax), %esi
	movl	32(%r15), %edx
	movl	24(%r15), %ecx
	leaq	L_.str(%rip), %rdi
	movq	%r15, %r8
	callq	_LOG_TRACE
	movq	8(%r15), %rax
	cmpq	$0, (%rax)
	je	LBB0_9
## %bb.3:
	movq	(%r15), %rdi
	callq	_mmal_component_action_lock
	movq	%r15, %rdi
	callq	_LOCK_SENDING
	cmpl	$0, 16(%r15)
	je	LBB0_10
## %bb.4:
	movq	8(%r15), %rax
	movq	%r15, %rdi
	callq	*(%rax)
	movq	%rax, %r14
	movq	_MMAL_SUCCESS@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r14
	jne	LBB0_11
## %bb.5:
	movq	8(%r15), %rax
	movq	8(%rax), %rax
	movq	(%rax), %r12
	movq	$0, (%rax)
	movq	%rax, 8(%rax)
	jmp	LBB0_12
LBB0_6:
	movq	_MMAL_EINVAL@GOTPCREL(%rip), %rax
LBB0_7:
	movq	(%rax), %r14
LBB0_8:
	movq	%r14, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	_MMAL_ENOSYS@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_10:
	movq	%r15, %rdi
	callq	_UNLOCK_SENDING
	movq	(%r15), %rdi
	callq	_mmal_component_action_unlock
	movq	_MMAL_SUCCESS@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_11:
	xorl	%r12d, %r12d
LBB0_12:
	movq	%r15, %rdi
	callq	_UNLOCK_SENDING
	movq	(%r15), %rdi
	callq	_mmal_component_action_unlock
	testq	%r12, %r12
	je	LBB0_8
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rbx
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_mmal_port_buffer_header_callback
	movq	%rbx, %r12
	testq	%rbx, %rbx
	jne	LBB0_13
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_MMAL_EINVAL,8,3                ## @MMAL_EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s(%i:%i) port %p"

	.comm	_MMAL_ENOSYS,8,3                ## @MMAL_ENOSYS
	.comm	_MMAL_SUCCESS,8,3               ## @MMAL_SUCCESS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mmal_port_flush                ; -- Begin function mmal_port_flush
	.p2align	2
_mmal_port_flush:                       ; @mmal_port_flush
	.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
	cbz	x0, LBB0_6
; %bb.1:
	mov	x19, x0
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_6
; %bb.2:
	ldr	x8, [x19]
	ldr	w1, [x8]
	ldr	w2, [x19, #32]
	ldr	w3, [x19, #24]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x4, x19
	bl	_LOG_TRACE
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	cbz	x8, LBB0_9
; %bb.3:
	ldr	x0, [x19]
	bl	_mmal_component_action_lock
	mov	x0, x19
	bl	_LOCK_SENDING
	ldr	w8, [x19, #16]
	cbz	w8, LBB0_10
; %bb.4:
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	mov	x0, x19
	blr	x8
	mov	x20, x0
Lloh2:
	adrp	x8, _MMAL_SUCCESS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MMAL_SUCCESS@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_11
; %bb.5:
	ldr	x8, [x19, #8]
	ldr	x8, [x8, #8]
	ldr	x21, [x8]
	stp	xzr, x8, [x8]
	b	LBB0_12
LBB0_6:
Lloh5:
	adrp	x8, _MMAL_EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MMAL_EINVAL@GOTPAGEOFF]
LBB0_7:
	ldr	x20, [x8]
LBB0_8:
	mov	x0, x20
	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
LBB0_9:
Lloh7:
	adrp	x8, _MMAL_ENOSYS@GOTPAGE
Lloh8:
	ldr	x8, [x8, _MMAL_ENOSYS@GOTPAGEOFF]
	b	LBB0_7
LBB0_10:
	mov	x0, x19
	bl	_UNLOCK_SENDING
	ldr	x0, [x19]
	bl	_mmal_component_action_unlock
Lloh9:
	adrp	x8, _MMAL_SUCCESS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MMAL_SUCCESS@GOTPAGEOFF]
	b	LBB0_7
LBB0_11:
	mov	x21, #0
LBB0_12:
	mov	x0, x19
	bl	_UNLOCK_SENDING
	ldr	x0, [x19]
	bl	_mmal_component_action_unlock
	cbz	x21, LBB0_8
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	x22, [x21]
	mov	x0, x19
	mov	x1, x21
	bl	_mmal_port_buffer_header_callback
	mov	x21, x22
	cbnz	x22, LBB0_13
	b	LBB0_8
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_MMAL_EINVAL,8,3                ; @MMAL_EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s(%i:%i) port %p"

	.comm	_MMAL_ENOSYS,8,3                ; @MMAL_ENOSYS
	.comm	_MMAL_SUCCESS,8,3               ; @MMAL_SUCCESS
.subsections_via_symbols
