	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ivtv_video_command
_ivtv_video_command:                    ## @ivtv_video_command
	.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
	movq	_V4L2_CAP_VIDEO_OUTPUT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdi)
	je	LBB0_26
## %bb.1:
	movq	%rdx, %r15
	movl	(%rdx), %eax
	addl	$-128, %eax
	cmpl	$3, %eax
	ja	LBB0_26
## %bb.2:
	movl	%ecx, %r13d
	movq	%rsi, %r12
	movq	%rdi, %r14
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_12:
	movq	_IVTV_DEC_STREAM_TYPE_MPG@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	shlq	$2, %r12
	addq	24(%r14), %r12
	movq	_VIDEO_CMD_STOP_IMMEDIATELY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_VIDEO_CMD_STOP_TO_BLACK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%eax, %ecx
	movl	4(%r15), %edx
	andl	%edx, %ecx
	movl	%ecx, 4(%r15)
	testl	%eax, %edx
	je	LBB0_14
## %bb.13:
	movl	$0, 8(%r15)
LBB0_14:
	xorl	%ebx, %ebx
	testl	%r13d, %r13d
	jne	LBB0_28
## %bb.15:
	leaq	16(%r14), %rdi
	callq	_atomic_read
	testl	%eax, %eax
	je	LBB0_28
## %bb.16:
	movl	12(%r14), %eax
	movq	_OUT_MPG@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_7
## %bb.17:
	movq	_OUT_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r14)
	movl	4(%r15), %esi
	movl	8(%r15), %edx
	movq	%r12, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ivtv_stop_v4l2_decode_stream   ## TAILCALL
LBB0_26:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_27:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_28:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movl	$0, 4(%r15)
	movl	4(%r14), %edi
	movl	12(%r15), %esi
	callq	_ivtv_validate_speed
	movl	%eax, 12(%r15)
	testl	%eax, %eax
	jns	LBB0_5
## %bb.4:
	movq	_VIDEO_PLAY_FMT_GOP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r15)
LBB0_5:
	xorl	%ebx, %ebx
	testl	%r13d, %r13d
	jne	LBB0_28
## %bb.6:
	movq	_OUT_MPG@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r14, %rdi
	callq	_ivtv_set_output_mode
	cmpl	(%rbx), %eax
	jne	LBB0_7
## %bb.8:
	movq	_IVTV_F_I_DEC_PAUSED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	8(%r14), %rsi
	callq	_test_and_clear_bit
	testl	%eax, %eax
	je	LBB0_10
## %bb.9:
	movl	$0, 4(%r14)
LBB0_10:
	movl	12(%r15), %esi
	jmp	LBB0_11
LBB0_18:
	movq	_VIDEO_CMD_FREEZE_TO_BLACK@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	andl	%eax, 4(%r15)
	xorl	%ebx, %ebx
	testl	%r13d, %r13d
	jne	LBB0_28
## %bb.19:
	movl	12(%r14), %eax
	movq	_OUT_MPG@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_7
## %bb.20:
	leaq	16(%r14), %rdi
	callq	_atomic_read
	testl	%eax, %eax
	jle	LBB0_28
## %bb.21:
	movq	_CX2341X_DEC_PAUSE_PLAYBACK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r12), %eax
	xorl	%ecx, %ecx
	andl	4(%r15), %eax
	setne	%cl
	movq	%r14, %rdi
	movl	$1, %edx
	callq	_ivtv_vapi
	movq	_IVTV_F_I_DEC_PAUSED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$8, %r14
	movq	%r14, %rsi
	callq	_set_bit
	jmp	LBB0_28
LBB0_22:
	movl	$0, 4(%r15)
	xorl	%ebx, %ebx
	testl	%r13d, %r13d
	jne	LBB0_28
## %bb.23:
	movl	12(%r14), %eax
	movq	_OUT_MPG@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_7
## %bb.24:
	movq	_IVTV_F_I_DEC_PAUSED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	8(%r14), %rsi
	callq	_test_and_clear_bit
	testl	%eax, %eax
	je	LBB0_28
## %bb.25:
	movl	4(%r14), %esi
	movl	$0, 4(%r14)
LBB0_11:
	movq	%r12, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ivtv_start_decoding            ## TAILCALL
LBB0_7:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_27
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_18, LBB0_18-LJTI0_0
.set L0_0_set_22, LBB0_22-LJTI0_0
LJTI0_0:
	.long	L0_0_set_12
	.long	L0_0_set_3
	.long	L0_0_set_18
	.long	L0_0_set_22
	.end_data_region
                                        ## -- End function
	.comm	_IVTV_DEC_STREAM_TYPE_MPG,8,3   ## @IVTV_DEC_STREAM_TYPE_MPG
	.comm	_V4L2_CAP_VIDEO_OUTPUT,4,2      ## @V4L2_CAP_VIDEO_OUTPUT
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_VIDEO_PLAY_FMT_GOP,4,2         ## @VIDEO_PLAY_FMT_GOP
	.comm	_OUT_MPG,4,2                    ## @OUT_MPG
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_IVTV_F_I_DEC_PAUSED,4,2        ## @IVTV_F_I_DEC_PAUSED
	.comm	_VIDEO_CMD_STOP_IMMEDIATELY,4,2 ## @VIDEO_CMD_STOP_IMMEDIATELY
	.comm	_VIDEO_CMD_STOP_TO_BLACK,4,2    ## @VIDEO_CMD_STOP_TO_BLACK
	.comm	_OUT_NONE,4,2                   ## @OUT_NONE
	.comm	_VIDEO_CMD_FREEZE_TO_BLACK,4,2  ## @VIDEO_CMD_FREEZE_TO_BLACK
	.comm	_CX2341X_DEC_PAUSE_PLAYBACK,4,2 ## @CX2341X_DEC_PAUSE_PLAYBACK
	.no_dead_strip	_ivtv_video_command
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ivtv_video_command
_ivtv_video_command:                    ; @ivtv_video_command
	.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
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _V4L2_CAP_VIDEO_OUTPUT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _V4L2_CAP_VIDEO_OUTPUT@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.1:
	mov	x20, x2
	ldr	w8, [x2]
	sub	w8, w8, #128
	cmp	w8, #3
	b.hi	LBB0_9
; %bb.2:
	mov	x22, x3
	mov	x21, x1
	mov	x19, x0
Lloh3:
	adrp	x9, lJTI0_0@PAGE
Lloh4:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_3
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_3:
	ldr	x21, [x19, #24]
Lloh5:
	adrp	x8, _IVTV_DEC_STREAM_TYPE_MPG@GOTPAGE
Lloh6:
	ldr	x8, [x8, _IVTV_DEC_STREAM_TYPE_MPG@GOTPAGEOFF]
Lloh7:
	ldr	x23, [x8]
Lloh8:
	adrp	x8, _VIDEO_CMD_STOP_IMMEDIATELY@GOTPAGE
Lloh9:
	ldr	x8, [x8, _VIDEO_CMD_STOP_IMMEDIATELY@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _VIDEO_CMD_STOP_TO_BLACK@GOTPAGE
Lloh12:
	ldr	x9, [x9, _VIDEO_CMD_STOP_TO_BLACK@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	orr	w9, w9, w8
	ldr	w10, [x20, #4]
	and	w9, w10, w9
	str	w9, [x20, #4]
	tst	w10, w8
	b.eq	LBB0_5
; %bb.4:
	str	wzr, [x20, #8]
LBB0_5:
	cbnz	w22, LBB0_19
; %bb.6:
	add	x0, x19, #16
	bl	_atomic_read
	cbz	w0, LBB0_21
; %bb.7:
	ldr	w8, [x19, #12]
Lloh14:
	adrp	x9, _OUT_MPG@GOTPAGE
Lloh15:
	ldr	x9, [x9, _OUT_MPG@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_29
; %bb.8:
	add	x0, x21, x23, lsl #2
Lloh17:
	adrp	x8, _OUT_NONE@GOTPAGE
Lloh18:
	ldr	x8, [x8, _OUT_NONE@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	str	w8, [x19, #12]
	ldp	w1, w2, [x20, #4]
	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
	b	_ivtv_stop_v4l2_decode_stream
LBB0_9:
Lloh20:
	adrp	x8, _EINVAL@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_21
LBB0_11:
	str	wzr, [x20, #4]
	ldr	w0, [x19, #4]
	ldr	w1, [x20, #12]
	bl	_ivtv_validate_speed
	str	w0, [x20, #12]
	tbz	w0, #31, LBB0_13
; %bb.12:
Lloh22:
	adrp	x8, _VIDEO_PLAY_FMT_GOP@GOTPAGE
Lloh23:
	ldr	x8, [x8, _VIDEO_PLAY_FMT_GOP@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	str	w8, [x20, #16]
LBB0_13:
	cbnz	w22, LBB0_19
; %bb.14:
Lloh25:
	adrp	x22, _OUT_MPG@GOTPAGE
Lloh26:
	ldr	x22, [x22, _OUT_MPG@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_ivtv_set_output_mode
	ldr	w8, [x22]
	cmp	w0, w8
	b.ne	LBB0_29
; %bb.15:
Lloh27:
	adrp	x8, _IVTV_F_I_DEC_PAUSED@GOTPAGE
Lloh28:
	ldr	x8, [x8, _IVTV_F_I_DEC_PAUSED@GOTPAGEOFF]
Lloh29:
	ldr	w0, [x8]
	add	x1, x19, #8
	bl	_test_and_clear_bit
	cbz	w0, LBB0_17
; %bb.16:
	str	wzr, [x19, #4]
LBB0_17:
	ldr	w1, [x20, #12]
	b	LBB0_28
LBB0_18:
Lloh30:
	adrp	x21, _VIDEO_CMD_FREEZE_TO_BLACK@GOTPAGE
Lloh31:
	ldr	x21, [x21, _VIDEO_CMD_FREEZE_TO_BLACK@GOTPAGEOFF]
	ldr	w8, [x21]
	ldr	w9, [x20, #4]
	and	w8, w9, w8
	str	w8, [x20, #4]
	cbz	w22, LBB0_22
LBB0_19:
	mov	w0, #0
	b	LBB0_21
LBB0_20:
	mov	w0, #0
	str	wzr, [x20, #4]
	cbz	w22, LBB0_25
LBB0_21:
	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_22:
	ldr	w8, [x19, #12]
Lloh32:
	adrp	x9, _OUT_MPG@GOTPAGE
Lloh33:
	ldr	x9, [x9, _OUT_MPG@GOTPAGEOFF]
Lloh34:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_29
; %bb.23:
	add	x0, x19, #16
	bl	_atomic_read
	cmp	w0, #1
	b.lt	LBB0_19
; %bb.24:
Lloh35:
	adrp	x8, _CX2341X_DEC_PAUSE_PLAYBACK@GOTPAGE
Lloh36:
	ldr	x8, [x8, _CX2341X_DEC_PAUSE_PLAYBACK@GOTPAGEOFF]
Lloh37:
	ldr	w1, [x8]
	ldr	w8, [x20, #4]
	ldr	w9, [x21]
	tst	w9, w8
	cset	w3, ne
	mov	x0, x19
	mov	w2, #1
	bl	_ivtv_vapi
Lloh38:
	adrp	x8, _IVTV_F_I_DEC_PAUSED@GOTPAGE
Lloh39:
	ldr	x8, [x8, _IVTV_F_I_DEC_PAUSED@GOTPAGEOFF]
Lloh40:
	ldr	w0, [x8]
	add	x1, x19, #8
	bl	_set_bit
	mov	w0, #0
	b	LBB0_21
LBB0_25:
	ldr	w8, [x19, #12]
Lloh41:
	adrp	x9, _OUT_MPG@GOTPAGE
Lloh42:
	ldr	x9, [x9, _OUT_MPG@GOTPAGEOFF]
Lloh43:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_29
; %bb.26:
Lloh44:
	adrp	x8, _IVTV_F_I_DEC_PAUSED@GOTPAGE
Lloh45:
	ldr	x8, [x8, _IVTV_F_I_DEC_PAUSED@GOTPAGEOFF]
Lloh46:
	ldr	w0, [x8]
	add	x1, x19, #8
	bl	_test_and_clear_bit
	cbz	w0, LBB0_21
; %bb.27:
	ldr	w1, [x19, #4]
	str	wzr, [x19, #4]
LBB0_28:
	mov	x0, x21
	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
	b	_ivtv_start_decoding
LBB0_29:
Lloh47:
	adrp	x8, _EBUSY@GOTPAGE
Lloh48:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGot	Lloh47, Lloh48
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_11-LBB0_3)>>2
	.byte	(LBB0_18-LBB0_3)>>2
	.byte	(LBB0_20-LBB0_3)>>2
                                        ; -- End function
	.comm	_IVTV_DEC_STREAM_TYPE_MPG,8,3   ; @IVTV_DEC_STREAM_TYPE_MPG
	.comm	_V4L2_CAP_VIDEO_OUTPUT,4,2      ; @V4L2_CAP_VIDEO_OUTPUT
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_VIDEO_PLAY_FMT_GOP,4,2         ; @VIDEO_PLAY_FMT_GOP
	.comm	_OUT_MPG,4,2                    ; @OUT_MPG
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_IVTV_F_I_DEC_PAUSED,4,2        ; @IVTV_F_I_DEC_PAUSED
	.comm	_VIDEO_CMD_STOP_IMMEDIATELY,4,2 ; @VIDEO_CMD_STOP_IMMEDIATELY
	.comm	_VIDEO_CMD_STOP_TO_BLACK,4,2    ; @VIDEO_CMD_STOP_TO_BLACK
	.comm	_OUT_NONE,4,2                   ; @OUT_NONE
	.comm	_VIDEO_CMD_FREEZE_TO_BLACK,4,2  ; @VIDEO_CMD_FREEZE_TO_BLACK
	.comm	_CX2341X_DEC_PAUSE_PLAYBACK,4,2 ; @CX2341X_DEC_PAUSE_PLAYBACK
	.no_dead_strip	_ivtv_video_command
.subsections_via_symbols
