	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mmal_wrapper_buffer_get_empty  ## -- Begin function mmal_wrapper_buffer_get_empty
	.p2align	4, 0x90
_mmal_wrapper_buffer_get_empty:         ## @mmal_wrapper_buffer_get_empty
	.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	%edx, %r15d
	movq	%rsi, %r12
	movq	%rdi, %r13
	movq	24(%rdi), %rbx
	leaq	8(%rbx), %r14
	movl	16(%rdi), %edx
	leaq	L_.str(%rip), %rdi
	movq	%r14, %rsi
	callq	_LOG_TRACE
	movq	_MMAL_EINVAL@GOTPCREL(%rip), %rax
	testq	%r12, %r12
	je	LBB0_13
## %bb.1:
	movq	(%r13), %rcx
	movq	_MMAL_PORT_TYPE_INPUT@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	cmpq	%rdx, %rcx
	je	LBB0_3
## %bb.2:
	movq	_MMAL_PORT_TYPE_OUTPUT@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rcx
	jne	LBB0_13
LBB0_3:
	xorl	%eax, %eax
	cmpq	%rdx, %rcx
	sete	%sil
	movq	8(%rbx), %rcx
	movq	_MMAL_SUCCESS@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	cmpq	%rdx, %rcx
	jne	LBB0_9
## %bb.4:
	movb	%sil, %al
	movq	16(%rbx,%rax,8), %rax
	movq	8(%r13), %rcx
	movq	(%rax,%rcx,8), %r13
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %edi
	callq	_mmal_queue_get
	movq	%rax, (%r12)
	testq	%rax, %rax
	jne	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	_MMAL_WRAPPER_FLAG_WAIT@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%rbx, %rdi
	callq	_vcos_semaphore_wait
	movq	8(%rbx), %rax
	movq	_MMAL_SUCCESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_5
LBB0_8:
	movq	(%r14), %rcx
	movq	_MMAL_SUCCESS@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
LBB0_9:
	cmpq	%rdx, %rcx
	jne	LBB0_12
## %bb.10:
	cmpq	$0, (%r12)
	je	LBB0_11
LBB0_12:
	movq	%r14, %rax
LBB0_13:
	movq	(%rax), %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	_MMAL_EAGAIN@GOTPCREL(%rip), %rax
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%p, %s"

	.comm	_MMAL_PORT_TYPE_INPUT,8,3       ## @MMAL_PORT_TYPE_INPUT
	.comm	_MMAL_PORT_TYPE_OUTPUT,8,3      ## @MMAL_PORT_TYPE_OUTPUT
	.comm	_MMAL_EINVAL,8,3                ## @MMAL_EINVAL
	.comm	_MMAL_SUCCESS,8,3               ## @MMAL_SUCCESS
	.comm	_MMAL_WRAPPER_FLAG_WAIT,4,2     ## @MMAL_WRAPPER_FLAG_WAIT
	.comm	_MMAL_EAGAIN,8,3                ## @MMAL_EAGAIN
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mmal_wrapper_buffer_get_empty  ; -- Begin function mmal_wrapper_buffer_get_empty
	.p2align	2
_mmal_wrapper_buffer_get_empty:         ; @mmal_wrapper_buffer_get_empty
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x21, x2
	mov	x20, x1
	mov	x23, x0
	ldr	x22, [x0, #24]
	add	x19, x22, #8
	ldr	w2, [x0, #16]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_LOG_TRACE
	cbz	x20, LBB0_11
; %bb.1:
	ldr	x8, [x23]
Lloh2:
	adrp	x9, _MMAL_PORT_TYPE_INPUT@GOTPAGE
Lloh3:
	ldr	x9, [x9, _MMAL_PORT_TYPE_INPUT@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
Lloh5:
	adrp	x10, _MMAL_PORT_TYPE_OUTPUT@GOTPAGE
Lloh6:
	ldr	x10, [x10, _MMAL_PORT_TYPE_OUTPUT@GOTPAGEOFF]
Lloh7:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_11
; %bb.2:
	mov	w10, #16
	mov	w11, #24
	cmp	x8, x9
	csel	x10, x11, x10, eq
	ldr	x8, [x22, #8]
Lloh8:
	adrp	x24, _MMAL_SUCCESS@GOTPAGE
Lloh9:
	ldr	x24, [x24, _MMAL_SUCCESS@GOTPAGEOFF]
	ldr	x9, [x24]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.3:
	ldr	x8, [x22, x10]
	ldr	x9, [x23, #8]
	ldr	x23, [x8, x9, lsl #3]
Lloh10:
	adrp	x25, _MMAL_WRAPPER_FLAG_WAIT@GOTPAGE
Lloh11:
	ldr	x25, [x25, _MMAL_WRAPPER_FLAG_WAIT@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x23]
	bl	_mmal_queue_get
	str	x0, [x20]
	cbnz	x0, LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x25]
	tst	w8, w21
	b.eq	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x22
	bl	_vcos_semaphore_wait
	ldr	x8, [x22, #8]
	ldr	x9, [x24]
	cmp	x8, x9
	b.eq	LBB0_4
LBB0_7:
	ldr	x8, [x19]
	ldr	x9, [x24]
LBB0_8:
	cmp	x8, x9
	b.ne	LBB0_12
; %bb.9:
	ldr	x8, [x20]
	cbnz	x8, LBB0_12
; %bb.10:
Lloh12:
	adrp	x19, _MMAL_EAGAIN@GOTPAGE
Lloh13:
	ldr	x19, [x19, _MMAL_EAGAIN@GOTPAGEOFF]
	b	LBB0_12
LBB0_11:
Lloh14:
	adrp	x19, _MMAL_EINVAL@GOTPAGE
Lloh15:
	ldr	x19, [x19, _MMAL_EINVAL@GOTPAGEOFF]
LBB0_12:
	ldr	x0, [x19]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%p, %s"

	.comm	_MMAL_PORT_TYPE_INPUT,8,3       ; @MMAL_PORT_TYPE_INPUT
	.comm	_MMAL_PORT_TYPE_OUTPUT,8,3      ; @MMAL_PORT_TYPE_OUTPUT
	.comm	_MMAL_EINVAL,8,3                ; @MMAL_EINVAL
	.comm	_MMAL_SUCCESS,8,3               ; @MMAL_SUCCESS
	.comm	_MMAL_WRAPPER_FLAG_WAIT,4,2     ; @MMAL_WRAPPER_FLAG_WAIT
	.comm	_MMAL_EAGAIN,8,3                ; @MMAL_EAGAIN
.subsections_via_symbols
