	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cx18_s_input                   ## -- Begin function cx18_s_input
	.p2align	4, 0x90
_cx18_s_input:                          ## @cx18_s_input
	.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	%edx, %ebx
	movq	%rsi, %rdi
	callq	_fh2id
	movq	(%rax), %r15
	cmpl	%ebx, (%r15)
	jbe	LBB0_1
## %bb.2:
	movl	4(%r15), %esi
	cmpl	%ebx, %esi
	jne	LBB0_4
## %bb.3:
	leaq	L_.str(%rip), %rdi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_CX18_DEBUG_INFO
	jmp	LBB0_7
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_7
LBB0_4:
	movq	_V4L2_STD_ALL@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	movq	24(%r15), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	%ebx, %r13d
	leaq	L_.str.1(%rip), %rdi
	xorl	%r14d, %r14d
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_CX18_DEBUG_INFO
	movl	%ebx, 4(%r15)
	movq	24(%r15), %rax
	movq	(%rax), %rax
	shlq	$4, %r13
	movl	8(%rax,%r13), %eax
	movl	%eax, 32(%r15)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax,%r13), %rax
	movq	_V4L2_INPUT_TYPE_TUNER@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.5:
	movq	16(%r15), %r12
LBB0_6:
	movq	8(%r15), %rax
	movq	_CX18_ENC_STREAM_TYPE_MPG@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%r12, (%rax,%rcx,8)
	movq	_CX18_ENC_STREAM_TYPE_YUV@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%r12, (%rax,%rcx,8)
	movq	_CX18_ENC_STREAM_TYPE_VBI@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%r12, (%rax,%rcx,8)
	movq	%r15, %rdi
	callq	_cx18_mute
	movq	%r15, %rdi
	callq	_cx18_video_set_io
	movq	%r15, %rdi
	callq	_cx18_audio_set_io
	movq	%r15, %rdi
	callq	_cx18_unmute
LBB0_7:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_STD_ALL,8,3               ## @V4L2_STD_ALL
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Input unchanged\n"

L_.str.1:                               ## @.str.1
	.asciz	"Changing input from %d to %d\n"

	.comm	_V4L2_INPUT_TYPE_TUNER,8,3      ## @V4L2_INPUT_TYPE_TUNER
	.comm	_CX18_ENC_STREAM_TYPE_MPG,8,3   ## @CX18_ENC_STREAM_TYPE_MPG
	.comm	_CX18_ENC_STREAM_TYPE_YUV,8,3   ## @CX18_ENC_STREAM_TYPE_YUV
	.comm	_CX18_ENC_STREAM_TYPE_VBI,8,3   ## @CX18_ENC_STREAM_TYPE_VBI
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cx18_s_input                   ; -- Begin function cx18_s_input
	.p2align	2
_cx18_s_input:                          ; @cx18_s_input
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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, x2
	mov	x0, x1
	bl	_fh2id
	ldr	x19, [x0]
	ldr	w8, [x19]
	cmp	w8, w20
	b.ls	LBB0_3
; %bb.1:
	ldr	w8, [x19, #4]
	cmp	w8, w20
	b.ne	LBB0_4
; %bb.2:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_CX18_DEBUG_INFO
	b	LBB0_7
LBB0_3:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_8
LBB0_4:
Lloh5:
	adrp	x9, _V4L2_STD_ALL@GOTPAGE
Lloh6:
	ldr	x9, [x9, _V4L2_STD_ALL@GOTPAGEOFF]
Lloh7:
	ldr	x21, [x9]
	ldr	x9, [x19, #24]
	ldr	x22, [x9]
	mov	w23, w20
	stp	x8, x20, [sp]
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_CX18_DEBUG_INFO
	str	w20, [x19, #4]
	ldr	x8, [x19, #24]
	ldr	x8, [x8]
	lsl	x9, x23, #4
	add	x8, x8, x9
	ldr	w8, [x8, #8]
	str	w8, [x19, #32]
	ldr	x8, [x22, x9]
Lloh10:
	adrp	x9, _V4L2_INPUT_TYPE_TUNER@GOTPAGE
Lloh11:
	ldr	x9, [x9, _V4L2_INPUT_TYPE_TUNER@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.5:
	ldr	x21, [x19, #16]
LBB0_6:
	ldr	x8, [x19, #8]
Lloh13:
	adrp	x9, _CX18_ENC_STREAM_TYPE_MPG@GOTPAGE
Lloh14:
	ldr	x9, [x9, _CX18_ENC_STREAM_TYPE_MPG@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	str	x21, [x8, x9, lsl #3]
Lloh16:
	adrp	x9, _CX18_ENC_STREAM_TYPE_YUV@GOTPAGE
Lloh17:
	ldr	x9, [x9, _CX18_ENC_STREAM_TYPE_YUV@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	str	x21, [x8, x9, lsl #3]
Lloh19:
	adrp	x9, _CX18_ENC_STREAM_TYPE_VBI@GOTPAGE
Lloh20:
	ldr	x9, [x9, _CX18_ENC_STREAM_TYPE_VBI@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	str	x21, [x8, x9, lsl #3]
	mov	x0, x19
	bl	_cx18_mute
	mov	x0, x19
	bl	_cx18_video_set_io
	mov	x0, x19
	bl	_cx18_audio_set_io
	mov	x0, x19
	bl	_cx18_unmute
LBB0_7:
	mov	w0, #0
LBB0_8:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_STD_ALL,8,3               ; @V4L2_STD_ALL
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Input unchanged\n"

l_.str.1:                               ; @.str.1
	.asciz	"Changing input from %d to %d\n"

	.comm	_V4L2_INPUT_TYPE_TUNER,8,3      ; @V4L2_INPUT_TYPE_TUNER
	.comm	_CX18_ENC_STREAM_TYPE_MPG,8,3   ; @CX18_ENC_STREAM_TYPE_MPG
	.comm	_CX18_ENC_STREAM_TYPE_YUV,8,3   ; @CX18_ENC_STREAM_TYPE_YUV
	.comm	_CX18_ENC_STREAM_TYPE_VBI,8,3   ; @CX18_ENC_STREAM_TYPE_VBI
.subsections_via_symbols
