	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_videobuf_waiton                ## -- Begin function videobuf_waiton
	.p2align	4, 0x90
_videobuf_waiton:                       ## @videobuf_waiton
	.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	%ecx, %r14d
	movl	%edx, %ebx
	movq	%rsi, %r13
	movq	%rdi, %r15
	movl	4(%rsi), %edi
	movq	_MAGIC_BUFFER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_MAGIC_CHECK
	testl	%ebx, %ebx
	je	LBB0_3
## %bb.1:
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_state_neither_active_nor_queued
	xorl	%ebx, %ebx
	testq	%rax, %rax
	jne	LBB0_13
## %bb.2:
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_13
LBB0_3:
	movq	(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.4:
	callq	_mutex_is_locked
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:
	movq	(%r15), %rdi
	callq	_mutex_unlock
	movb	$1, %al
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	jmp	LBB0_8
LBB0_7:
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
LBB0_8:
	movl	(%r13), %r12d
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_state_neither_active_nor_queued
	movl	%r12d, %edi
	movq	%rax, %rsi
	testl	%r14d, %r14d
	je	LBB0_10
## %bb.9:
	callq	_wait_event_interruptible
	movl	%eax, %ebx
	jmp	LBB0_11
LBB0_10:
	callq	_wait_event
	xorl	%ebx, %ebx
LBB0_11:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	testb	%al, %al
	je	LBB0_13
## %bb.12:
	movq	(%r15), %rdi
	callq	_mutex_lock
LBB0_13:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAGIC_BUFFER,4,2               ## @MAGIC_BUFFER
	.comm	_EAGAIN,4,2                     ## @EAGAIN
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_videobuf_waiton                ; -- Begin function videobuf_waiton
	.p2align	2
_videobuf_waiton:                       ; @videobuf_waiton
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x3
	mov	x22, x2
	mov	x21, x1
	mov	x19, x0
	ldr	w0, [x1, #4]
Lloh0:
	adrp	x8, _MAGIC_BUFFER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAGIC_BUFFER@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_MAGIC_CHECK
	cbz	w22, LBB0_3
; %bb.1:
	mov	x0, x19
	mov	x1, x21
	bl	_state_neither_active_nor_queued
	cbz	x0, LBB0_6
; %bb.2:
	mov	w20, #0
	b	LBB0_11
LBB0_3:
	ldr	x0, [x19]
	cbz	x0, LBB0_7
; %bb.4:
	bl	_mutex_is_locked
	cbz	x0, LBB0_7
; %bb.5:
	ldr	x0, [x19]
	bl	_mutex_unlock
	mov	w23, #1
	b	LBB0_8
LBB0_6:
Lloh3:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_11
LBB0_7:
	mov	w23, #0
LBB0_8:
	ldr	w22, [x21]
	mov	x0, x19
	mov	x1, x21
	bl	_state_neither_active_nor_queued
	mov	x1, x0
	cbz	w20, LBB0_12
; %bb.9:
	mov	x0, x22
	bl	_wait_event_interruptible
	mov	x20, x0
	cbz	w23, LBB0_11
LBB0_10:
	ldr	x0, [x19]
	bl	_mutex_lock
LBB0_11:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_12:
	mov	x0, x22
	bl	_wait_event
	cbnz	w23, LBB0_10
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_MAGIC_BUFFER,4,2               ; @MAGIC_BUFFER
	.comm	_EAGAIN,4,2                     ; @EAGAIN
.subsections_via_symbols
