	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ivtv_passthrough_mode          ## -- Begin function ivtv_passthrough_mode
	.p2align	4, 0x90
_ivtv_passthrough_mode:                 ## @ivtv_passthrough_mode
	.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	24(%rdi), %rbx
	movq	_IVTV_ENC_STREAM_TYPE_YUV@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	shlq	$4, %rax
	cmpq	$0, 8(%rbx,%rax)
	je	LBB0_2
## %bb.1:
	movq	_IVTV_DEC_STREAM_TYPE_YUV@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	shlq	$4, %rax
	cmpq	$0, 8(%rbx,%rax)
	je	LBB0_2
## %bb.4:
	movl	%esi, %r15d
	movq	%rdi, %r14
	addq	%rax, %rbx
	leaq	L_.str(%rip), %rdi
	callq	_IVTV_DEBUG_INFO
	movq	(%r14), %rax
	movq	_OUT_PASSTHROUGH@GOTPCREL(%rip), %r12
	movq	(%r12), %rsi
	testl	%r15d, %r15d
	je	LBB0_11
## %bb.5:
	xorl	%r15d, %r15d
	cmpq	%rsi, %rax
	je	LBB0_14
## %bb.6:
	movq	%r14, %rdi
	callq	_ivtv_set_output_mode
	cmpq	(%r12), %rax
	jne	LBB0_7
## %bb.8:
	movq	_IVTV_F_S_PASSTHROUGH@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_set_bit
	movq	_IVTV_F_S_STREAMING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_set_bit
	movq	%rbx, %rdi
	callq	_ivtv_setup_v4l2_decode_stream
	movq	_CX2341X_DEC_START_PLAYBACK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	movl	$2, %edx
	xorl	%ecx, %ecx
	movl	$1, %r8d
	xorl	%eax, %eax
	callq	_ivtv_vapi
	leaq	16(%r14), %rdi
	callq	_atomic_inc
	leaq	12(%r14), %rbx
	movq	%rbx, %rdi
	callq	_atomic_read
	testq	%rax, %rax
	jne	LBB0_10
## %bb.9:
	leaq	8(%r14), %r12
	movq	%r12, %rdi
	callq	_cx2341x_handler_setup
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_cx2341x_handler_set_busy
LBB0_10:
	movq	_CX2341X_ENC_START_CAPTURE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	$2, %edx
	movl	$2, %ecx
	movl	$11, %r8d
	xorl	%eax, %eax
	callq	_ivtv_vapi
	movq	%rbx, %rdi
	callq	_atomic_inc
	jmp	LBB0_14
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_3:
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_14:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	xorl	%r15d, %r15d
	cmpq	%rsi, %rax
	jne	LBB0_14
## %bb.12:
	movq	_CX2341X_ENC_STOP_CAPTURE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	movl	$3, %edx
	movl	$1, %ecx
	movl	$2, %r8d
	movl	$11, %r9d
	xorl	%eax, %eax
	callq	_ivtv_vapi
	movq	_CX2341X_DEC_STOP_PLAYBACK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	$3, %edx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	xorl	%eax, %eax
	callq	_ivtv_vapi
	leaq	12(%r14), %r12
	movq	%r12, %rdi
	callq	_atomic_dec
	leaq	16(%r14), %rdi
	callq	_atomic_dec
	movq	_IVTV_F_S_PASSTHROUGH@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_clear_bit
	movq	_IVTV_F_S_STREAMING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_clear_bit
	movq	_OUT_NONE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r14)
	movq	%r12, %rdi
	callq	_atomic_read
	testq	%rax, %rax
	jne	LBB0_14
## %bb.13:
	addq	$8, %r14
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_cx2341x_handler_set_busy
	jmp	LBB0_14
LBB0_7:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_3
	.cfi_endproc
                                        ## -- End function
	.comm	_IVTV_ENC_STREAM_TYPE_YUV,8,3   ## @IVTV_ENC_STREAM_TYPE_YUV
	.comm	_IVTV_DEC_STREAM_TYPE_YUV,8,3   ## @IVTV_DEC_STREAM_TYPE_YUV
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ivtv ioctl: Select passthrough mode\n"

	.comm	_OUT_PASSTHROUGH,8,3            ## @OUT_PASSTHROUGH
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_IVTV_F_S_PASSTHROUGH,4,2       ## @IVTV_F_S_PASSTHROUGH
	.comm	_IVTV_F_S_STREAMING,4,2         ## @IVTV_F_S_STREAMING
	.comm	_CX2341X_DEC_START_PLAYBACK,4,2 ## @CX2341X_DEC_START_PLAYBACK
	.comm	_CX2341X_ENC_START_CAPTURE,4,2  ## @CX2341X_ENC_START_CAPTURE
	.comm	_CX2341X_ENC_STOP_CAPTURE,4,2   ## @CX2341X_ENC_STOP_CAPTURE
	.comm	_CX2341X_DEC_STOP_PLAYBACK,4,2  ## @CX2341X_DEC_STOP_PLAYBACK
	.comm	_OUT_NONE,8,3                   ## @OUT_NONE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ivtv_passthrough_mode          ; -- Begin function ivtv_passthrough_mode
	.p2align	2
_ivtv_passthrough_mode:                 ; @ivtv_passthrough_mode
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	ldr	x8, [x0, #24]
Lloh0:
	adrp	x9, _IVTV_ENC_STREAM_TYPE_YUV@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IVTV_ENC_STREAM_TYPE_YUV@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x9, x8, x9, lsl #4
	ldr	x9, [x9, #8]
	cbz	x9, LBB0_8
; %bb.1:
Lloh3:
	adrp	x9, _IVTV_DEC_STREAM_TYPE_YUV@GOTPAGE
Lloh4:
	ldr	x9, [x9, _IVTV_DEC_STREAM_TYPE_YUV@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	add	x20, x8, x9, lsl #4
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_8
; %bb.2:
	mov	x21, x1
	mov	x19, x0
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_IVTV_DEBUG_INFO
	ldr	x8, [x19]
Lloh8:
	adrp	x22, _OUT_PASSTHROUGH@GOTPAGE
Lloh9:
	ldr	x22, [x22, _OUT_PASSTHROUGH@GOTPAGEOFF]
	ldr	x1, [x22]
	cbz	w21, LBB0_10
; %bb.3:
	cmp	x8, x1
	b.eq	LBB0_13
; %bb.4:
	mov	x0, x19
	bl	_ivtv_set_output_mode
	ldr	x8, [x22]
	cmp	x0, x8
	b.ne	LBB0_15
; %bb.5:
Lloh10:
	adrp	x8, _IVTV_F_S_PASSTHROUGH@GOTPAGE
Lloh11:
	ldr	x8, [x8, _IVTV_F_S_PASSTHROUGH@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_set_bit
Lloh13:
	adrp	x8, _IVTV_F_S_STREAMING@GOTPAGE
Lloh14:
	ldr	x8, [x8, _IVTV_F_S_STREAMING@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_set_bit
	mov	x0, x20
	bl	_ivtv_setup_v4l2_decode_stream
Lloh16:
	adrp	x8, _CX2341X_DEC_START_PLAYBACK@GOTPAGE
Lloh17:
	ldr	x8, [x8, _CX2341X_DEC_START_PLAYBACK@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #2
	mov	w3, #0
	mov	w4, #1
	bl	_ivtv_vapi
	add	x0, x19, #16
	bl	_atomic_inc
	add	x20, x19, #12
	mov	x0, x20
	bl	_atomic_read
	cbnz	x0, LBB0_7
; %bb.6:
	add	x21, x19, #8
	mov	x0, x21
	bl	_cx2341x_handler_setup
	mov	x0, x21
	mov	w1, #1
	bl	_cx2341x_handler_set_busy
LBB0_7:
Lloh19:
	adrp	x8, _CX2341X_ENC_START_CAPTURE@GOTPAGE
Lloh20:
	ldr	x8, [x8, _CX2341X_ENC_START_CAPTURE@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #2
	mov	w3, #2
	mov	w4, #11
	bl	_ivtv_vapi
	mov	x0, x20
	bl	_atomic_inc
	b	LBB0_13
LBB0_8:
Lloh22:
	adrp	x8, _EINVAL@GOTPAGE
Lloh23:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_14
LBB0_10:
	cmp	x8, x1
	b.ne	LBB0_13
; %bb.11:
Lloh24:
	adrp	x8, _CX2341X_ENC_STOP_CAPTURE@GOTPAGE
Lloh25:
	ldr	x8, [x8, _CX2341X_ENC_STOP_CAPTURE@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	mov	w8, #11
	str	x8, [sp]
	mov	x0, x19
	mov	w2, #3
	mov	w3, #1
	mov	w4, #2
	bl	_ivtv_vapi
Lloh27:
	adrp	x8, _CX2341X_DEC_STOP_PLAYBACK@GOTPAGE
Lloh28:
	ldr	x8, [x8, _CX2341X_DEC_STOP_PLAYBACK@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	str	xzr, [sp]
	mov	x0, x19
	mov	w2, #3
	mov	w3, #1
	mov	w4, #0
	bl	_ivtv_vapi
	add	x21, x19, #12
	mov	x0, x21
	bl	_atomic_dec
	add	x0, x19, #16
	bl	_atomic_dec
Lloh30:
	adrp	x8, _IVTV_F_S_PASSTHROUGH@GOTPAGE
Lloh31:
	ldr	x8, [x8, _IVTV_F_S_PASSTHROUGH@GOTPAGEOFF]
Lloh32:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_clear_bit
Lloh33:
	adrp	x8, _IVTV_F_S_STREAMING@GOTPAGE
Lloh34:
	ldr	x8, [x8, _IVTV_F_S_STREAMING@GOTPAGEOFF]
Lloh35:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_clear_bit
Lloh36:
	adrp	x8, _OUT_NONE@GOTPAGE
Lloh37:
	ldr	x8, [x8, _OUT_NONE@GOTPAGEOFF]
Lloh38:
	ldr	x8, [x8]
	str	x8, [x19]
	mov	x0, x21
	bl	_atomic_read
	mov	x8, x0
	mov	w0, #0
	cbnz	x8, LBB0_14
; %bb.12:
	add	x0, x19, #8
	mov	w1, #0
	bl	_cx2341x_handler_set_busy
LBB0_13:
	mov	w0, #0
LBB0_14:
	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
	add	sp, sp, #64
	ret
LBB0_15:
Lloh39:
	adrp	x8, _EBUSY@GOTPAGE
Lloh40:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.comm	_IVTV_ENC_STREAM_TYPE_YUV,8,3   ; @IVTV_ENC_STREAM_TYPE_YUV
	.comm	_IVTV_DEC_STREAM_TYPE_YUV,8,3   ; @IVTV_DEC_STREAM_TYPE_YUV
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ivtv ioctl: Select passthrough mode\n"

	.comm	_OUT_PASSTHROUGH,8,3            ; @OUT_PASSTHROUGH
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_IVTV_F_S_PASSTHROUGH,4,2       ; @IVTV_F_S_PASSTHROUGH
	.comm	_IVTV_F_S_STREAMING,4,2         ; @IVTV_F_S_STREAMING
	.comm	_CX2341X_DEC_START_PLAYBACK,4,2 ; @CX2341X_DEC_START_PLAYBACK
	.comm	_CX2341X_ENC_START_CAPTURE,4,2  ; @CX2341X_ENC_START_CAPTURE
	.comm	_CX2341X_ENC_STOP_CAPTURE,4,2   ; @CX2341X_ENC_STOP_CAPTURE
	.comm	_CX2341X_DEC_STOP_PLAYBACK,4,2  ; @CX2341X_DEC_STOP_PLAYBACK
	.comm	_OUT_NONE,8,3                   ; @OUT_NONE
.subsections_via_symbols
