	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vicodec_decoder_cmd
_vicodec_decoder_cmd:                   ## @vicodec_decoder_cmd
	.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	%rdx, %r15
	movq	%rsi, %r12
	movq	%rdi, %rbx
	callq	_file2ctx
	movq	%rax, %r14
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movq	%r15, %rdx
	callq	_v4l2_m2m_ioctl_try_decoder_cmd
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	8(%r14), %rdi
	callq	_vb2_is_streaming
	xorl	%ebx, %ebx
	testl	%eax, %eax
	je	LBB0_10
## %bb.3:
	movq	8(%r14), %rdi
	addq	$4, %rdi
	callq	_vb2_is_streaming
	testl	%eax, %eax
	je	LBB0_10
## %bb.4:
	movq	(%r15), %rax
	movq	_V4L2_DEC_CMD_STOP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.11:
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_vicodec_mark_last_buf          ## TAILCALL
LBB0_1:
	movl	%eax, %ebx
	jmp	LBB0_10
LBB0_5:
	movl	4(%r14), %edi
	callq	_spin_lock
	cmpq	$0, 16(%r14)
	je	LBB0_7
## %bb.6:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_9
LBB0_7:
	xorl	%ebx, %ebx
	cmpl	$0, (%r14)
	je	LBB0_9
## %bb.8:
	movl	$0, (%r14)
	movq	8(%r14), %rdi
	callq	_vb2_clear_last_buffer_dequeued
LBB0_9:
	movl	4(%r14), %edi
	callq	_spin_unlock
LBB0_10:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_DEC_CMD_STOP,8,3          ## @V4L2_DEC_CMD_STOP
	.comm	_EBUSY,4,2                      ## @EBUSY
	.no_dead_strip	_vicodec_decoder_cmd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vicodec_decoder_cmd
_vicodec_decoder_cmd:                   ; @vicodec_decoder_cmd
	.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, x2
	mov	x21, x1
	mov	x22, x0
	bl	_file2ctx
	mov	x19, x0
	mov	x0, x22
	mov	x1, x21
	mov	x2, x20
	bl	_v4l2_m2m_ioctl_try_decoder_cmd
	tbnz	w0, #31, LBB0_6
; %bb.1:
	ldr	x0, [x19, #8]
	bl	_vb2_is_streaming
	cbz	w0, LBB0_5
; %bb.2:
	ldr	x8, [x19, #8]
	add	x0, x8, #4
	bl	_vb2_is_streaming
	cbz	w0, LBB0_5
; %bb.3:
	ldr	x8, [x20]
Lloh0:
	adrp	x9, _V4L2_DEC_CMD_STOP@GOTPAGE
Lloh1:
	ldr	x9, [x9, _V4L2_DEC_CMD_STOP@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.4:
	mov	x0, x19
	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	_vicodec_mark_last_buf
LBB0_5:
	mov	w21, #0
	b	LBB0_13
LBB0_6:
	mov	x21, x0
	b	LBB0_13
LBB0_7:
	ldr	w0, [x19, #4]
	bl	_spin_lock
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_9
; %bb.8:
Lloh3:
	adrp	x8, _EBUSY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_12
LBB0_9:
	ldr	w8, [x19]
	cbz	w8, LBB0_11
; %bb.10:
	str	wzr, [x19]
	ldr	x0, [x19, #8]
	bl	_vb2_clear_last_buffer_dequeued
LBB0_11:
	mov	w21, #0
LBB0_12:
	ldr	w0, [x19, #4]
	bl	_spin_unlock
LBB0_13:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_DEC_CMD_STOP,8,3          ; @V4L2_DEC_CMD_STOP
	.comm	_EBUSY,4,2                      ; @EBUSY
	.no_dead_strip	_vicodec_decoder_cmd
.subsections_via_symbols
