	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_v4l2_event_dequeue             ## -- Begin function v4l2_event_dequeue
	.p2align	4, 0x90
_v4l2_event_dequeue:                    ## @v4l2_event_dequeue
	.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, %r14
	movq	%rdi, %r15
	testl	%edx, %edx
	je	LBB0_1
## %bb.10:
	movq	%r15, %rdi
	movq	%r14, %rsi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	___v4l2_event_dequeue           ## TAILCALL
LBB0_1:
	movq	8(%r15), %rax
	movq	(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_3
## %bb.2:
	callq	_mutex_unlock
LBB0_3:
	movq	_ENOENT@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	16(%r15), %edi
	xorl	%esi, %esi
	cmpq	$0, (%r15)
	setne	%sil
	callq	_wait_event_interruptible
	testl	%eax, %eax
	js	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	___v4l2_event_dequeue
	movl	%eax, %ebx
	movl	(%r12), %eax
	addl	%ebx, %eax
	je	LBB0_4
	jmp	LBB0_7
LBB0_5:
	movl	%eax, %ebx
LBB0_7:
	movq	8(%r15), %rax
	movq	(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_9
## %bb.8:
	callq	_mutex_lock
LBB0_9:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOENT,4,2                     ## @ENOENT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_v4l2_event_dequeue             ; -- Begin function v4l2_event_dequeue
	.p2align	2
_v4l2_event_dequeue:                    ; @v4l2_event_dequeue
	.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	x20, x1
	mov	x19, x0
	cbz	w2, LBB0_2
; %bb.1:
	mov	x0, x19
	mov	x1, 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
	b	___v4l2_event_dequeue
LBB0_2:
	ldr	x8, [x19, #8]
	ldr	x0, [x8]
	cbz	x0, LBB0_4
; %bb.3:
	bl	_mutex_unlock
LBB0_4:
Lloh0:
	adrp	x22, _ENOENT@GOTPAGE
Lloh1:
	ldr	x22, [x22, _ENOENT@GOTPAGEOFF]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x19, #16]
	ldr	x8, [x19]
	cmp	x8, #0
	cset	w1, ne
	bl	_wait_event_interruptible
	tbnz	w0, #31, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x19
	mov	x1, x20
	bl	___v4l2_event_dequeue
	ldr	w8, [x22]
	cmn	w0, w8
	b.eq	LBB0_5
LBB0_7:
	mov	x21, x0
	ldr	x8, [x19, #8]
	ldr	x0, [x8]
	cbz	x0, LBB0_9
; %bb.8:
	bl	_mutex_lock
LBB0_9:
	mov	x0, x21
	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 AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOENT,4,2                     ; @ENOENT
.subsections_via_symbols
