	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function v4l2_getfree_v4l2buf
_v4l2_getfree_v4l2buf:                  ## @v4l2_getfree_v4l2buf
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movl	16(%rdi), %edi
	callq	_V4L2_TYPE_IS_OUTPUT
	testq	%rax, %rax
	je	LBB0_2
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_v4l2_dequeue_v4l2buf
	testq	%rax, %rax
	jne	LBB0_1
LBB0_2:
	movl	(%rbx), %ecx
	testl	%ecx, %ecx
	jle	LBB0_7
## %bb.3:
	movq	8(%rbx), %rax
	movq	_V4L2BUF_AVAILABLE@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%rdx, (%rax)
	je	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	addq	$8, %rax
	decq	%rcx
	jne	LBB0_4
LBB0_7:
	xorl	%eax, %eax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2BUF_AVAILABLE,8,3          ## @V4L2BUF_AVAILABLE
	.no_dead_strip	_v4l2_getfree_v4l2buf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function v4l2_getfree_v4l2buf
_v4l2_getfree_v4l2buf:                  ; @v4l2_getfree_v4l2buf
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	w0, [x0, #16]
	bl	_V4L2_TYPE_IS_OUTPUT
	cbz	x0, LBB0_2
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	w1, #0
	bl	_v4l2_dequeue_v4l2buf
	cbnz	x0, LBB0_1
LBB0_2:
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.3:
	ldr	x0, [x19, #8]
Lloh0:
	adrp	x9, _V4L2BUF_AVAILABLE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _V4L2BUF_AVAILABLE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x0]
	cmp	x10, x9
	b.eq	LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x0, x0, #8
	subs	x8, x8, #1
	b.ne	LBB0_4
LBB0_6:
	mov	x0, #0
LBB0_7:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2BUF_AVAILABLE,8,3          ; @V4L2BUF_AVAILABLE
	.no_dead_strip	_v4l2_getfree_v4l2buf
.subsections_via_symbols
