	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vidioc_s_input
_vidioc_s_input:                        ## @vidioc_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), %r14
	movq	(%r14), %r15
	leaq	L_.str(%rip), %rdi
	movl	%edx, %esi
	callq	_DEB_EE
	movq	_MXB_INPUTS@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	jbe	LBB0_1
## %bb.2:
	movl	%ebx, (%r15)
	movq	_input_port_selection@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%ebx, %r12d
	movl	(%rax,%r12,8), %edx
	movl	4(%rax,%r12,8), %esi
	movq	%r14, %rdi
	callq	_saa7146_set_hps_source_and_sync
	addl	$-128, %ebx
	cmpl	$3, %ebx
	ja	LBB0_3
## %bb.4:
	leaq	LJTI0_0(%rip), %rax
	movslq	(%rax,%rbx,4), %rcx
	addq	%rax, %rcx
	jmpq	*%rcx
LBB0_5:
	movq	_SAA7115_COMPOSITE0@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_video@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_s_routing@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	movq	%r15, %rdi
	movl	$3, %ecx
	movl	$17, %r8d
	xorl	%r9d, %r9d
	callq	_tea6415c_call
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_17
## %bb.6:
	movq	_video@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r13), %edx
	movq	%r15, %rdi
	movl	$3, %ecx
	movl	$13, %r8d
	jmp	LBB0_10
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_17
LBB0_3:
	xorl	%r14d, %r14d
	jmp	LBB0_11
LBB0_7:
	movq	_SAA7115_SVIDEO1@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_11
LBB0_8:
	movq	_SAA7115_COMPOSITE1@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_11
LBB0_9:
	movq	_SAA7115_COMPOSITE0@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_video@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_s_routing@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	$1, %ecx
	movl	$17, %r8d
LBB0_10:
	xorl	%r9d, %r9d
	callq	_tea6415c_call
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_17
LBB0_11:
	movq	_video@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_s_routing@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_SAA7111_FMT_CCIR@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r15, %rdi
	movl	%r14d, %ecx
	xorl	%r9d, %r9d
	callq	_saa7111a_call
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	leaq	L_.str.1(%rip), %rdi
	callq	_pr_err
LBB0_13:
	movq	_video_audio_connect@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax,%r12,8), %rsi
	movq	%rsi, 8(%r15)
	cmpq	$0, 16(%r15)
	jne	LBB0_15
## %bb.14:
	movq	%r15, %rdi
	callq	_tea6420_route
	movq	8(%r15), %rsi
LBB0_15:
	xorl	%ebx, %ebx
	testq	%rsi, %rsi
	jne	LBB0_17
## %bb.16:
	movq	%r15, %rdi
	callq	_mxb_update_audmode
LBB0_17:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
LJTI0_0:
	.long	L0_0_set_5
	.long	L0_0_set_7
	.long	L0_0_set_8
	.long	L0_0_set_9
	.end_data_region
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"VIDIOC_S_INPUT %d\n"

	.comm	_MXB_INPUTS,4,2                 ## @MXB_INPUTS
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_input_port_selection,8,3       ## @input_port_selection
	.comm	_SAA7115_COMPOSITE0,4,2         ## @SAA7115_COMPOSITE0
	.comm	_video,4,2                      ## @video
	.comm	_s_routing,4,2                  ## @s_routing
	.comm	_SAA7115_SVIDEO1,4,2            ## @SAA7115_SVIDEO1
	.comm	_SAA7115_COMPOSITE1,4,2         ## @SAA7115_COMPOSITE1
	.comm	_SAA7111_FMT_CCIR,4,2           ## @SAA7111_FMT_CCIR
L_.str.1:                               ## @.str.1
	.asciz	"VIDIOC_S_INPUT: could not address saa7111a\n"

	.comm	_video_audio_connect,8,3        ## @video_audio_connect
	.no_dead_strip	_vidioc_s_input
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vidioc_s_input
_vidioc_s_input:                        ; @vidioc_s_input
	.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, x2
	ldr	x21, [x1]
	ldr	x19, [x21]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x2
	bl	_DEB_EE
Lloh2:
	adrp	x8, _MXB_INPUTS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MXB_INPUTS@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cmp	w8, w20
	b.ls	LBB0_5
; %bb.1:
	str	w20, [x19]
Lloh5:
	adrp	x8, _input_port_selection@GOTPAGE
Lloh6:
	ldr	x8, [x8, _input_port_selection@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	add	x8, x8, w20, uxtw #3
	ldp	w2, w1, [x8]
	mov	x0, x21
	bl	_saa7146_set_hps_source_and_sync
	sub	w8, w20, #128
	cmp	w8, #3
	b.hi	LBB0_6
; %bb.2:
Lloh8:
	adrp	x9, lJTI0_0@PAGE
Lloh9:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_3
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_3:
Lloh10:
	adrp	x8, _SAA7115_COMPOSITE0@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SAA7115_COMPOSITE0@GOTPAGEOFF]
Lloh12:
	ldr	w21, [x8]
Lloh13:
	adrp	x22, _video@GOTPAGE
Lloh14:
	ldr	x22, [x22, _video@GOTPAGEOFF]
	ldr	w1, [x22]
Lloh15:
	adrp	x23, _s_routing@GOTPAGE
Lloh16:
	ldr	x23, [x23, _s_routing@GOTPAGEOFF]
	ldr	w2, [x23]
	mov	x0, x19
	mov	w3, #3
	mov	w4, #17
	mov	w5, #0
	bl	_tea6415c_call
	cbnz	w0, LBB0_16
; %bb.4:
	ldr	w1, [x22]
	ldr	w2, [x23]
	mov	x0, x19
	mov	w3, #3
	mov	w4, #13
	b	LBB0_10
LBB0_5:
Lloh17:
	adrp	x8, _EINVAL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_16
LBB0_6:
	mov	w21, #0
	b	LBB0_11
LBB0_7:
Lloh20:
	adrp	x8, _SAA7115_SVIDEO1@GOTPAGE
Lloh21:
	ldr	x8, [x8, _SAA7115_SVIDEO1@GOTPAGEOFF]
Lloh22:
	ldr	w21, [x8]
	b	LBB0_11
LBB0_8:
Lloh23:
	adrp	x8, _SAA7115_COMPOSITE1@GOTPAGE
Lloh24:
	ldr	x8, [x8, _SAA7115_COMPOSITE1@GOTPAGEOFF]
Lloh25:
	ldr	w21, [x8]
	b	LBB0_11
LBB0_9:
Lloh26:
	adrp	x8, _SAA7115_COMPOSITE0@GOTPAGE
Lloh27:
	ldr	x8, [x8, _SAA7115_COMPOSITE0@GOTPAGEOFF]
Lloh28:
	ldr	w21, [x8]
Lloh29:
	adrp	x8, _video@GOTPAGE
Lloh30:
	ldr	x8, [x8, _video@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x8]
Lloh32:
	adrp	x8, _s_routing@GOTPAGE
Lloh33:
	ldr	x8, [x8, _s_routing@GOTPAGEOFF]
Lloh34:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w3, #1
	mov	w4, #17
LBB0_10:
	mov	w5, #0
	bl	_tea6415c_call
	cbnz	w0, LBB0_16
LBB0_11:
	mov	w20, w20
Lloh35:
	adrp	x8, _video@GOTPAGE
Lloh36:
	ldr	x8, [x8, _video@GOTPAGEOFF]
Lloh37:
	ldr	w1, [x8]
Lloh38:
	adrp	x8, _s_routing@GOTPAGE
Lloh39:
	ldr	x8, [x8, _s_routing@GOTPAGEOFF]
Lloh40:
	ldr	w2, [x8]
Lloh41:
	adrp	x8, _SAA7111_FMT_CCIR@GOTPAGE
Lloh42:
	ldr	x8, [x8, _SAA7111_FMT_CCIR@GOTPAGEOFF]
Lloh43:
	ldr	w4, [x8]
	mov	x0, x19
	mov	x3, x21
	mov	w5, #0
	bl	_saa7111a_call
	cbz	x0, LBB0_13
; %bb.12:
Lloh44:
	adrp	x0, l_.str.1@PAGE
Lloh45:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_err
LBB0_13:
Lloh46:
	adrp	x8, _video_audio_connect@GOTPAGE
Lloh47:
	ldr	x8, [x8, _video_audio_connect@GOTPAGEOFF]
Lloh48:
	ldr	x8, [x8]
	ldr	x1, [x8, x20, lsl #3]
	str	x1, [x19, #8]
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_17
; %bb.14:
	cbz	x1, LBB0_18
LBB0_15:
	mov	w0, #0
LBB0_16:
	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_17:
	mov	x0, x19
	bl	_tea6420_route
	ldr	x1, [x19, #8]
	cbnz	x1, LBB0_15
LBB0_18:
	mov	x0, x19
	bl	_mxb_update_audmode
	b	LBB0_15
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpAdd	Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_7-LBB0_3)>>2
	.byte	(LBB0_8-LBB0_3)>>2
	.byte	(LBB0_9-LBB0_3)>>2
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"VIDIOC_S_INPUT %d\n"

	.comm	_MXB_INPUTS,4,2                 ; @MXB_INPUTS
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_input_port_selection,8,3       ; @input_port_selection
	.comm	_SAA7115_COMPOSITE0,4,2         ; @SAA7115_COMPOSITE0
	.comm	_video,4,2                      ; @video
	.comm	_s_routing,4,2                  ; @s_routing
	.comm	_SAA7115_SVIDEO1,4,2            ; @SAA7115_SVIDEO1
	.comm	_SAA7115_COMPOSITE1,4,2         ; @SAA7115_COMPOSITE1
	.comm	_SAA7111_FMT_CCIR,4,2           ; @SAA7111_FMT_CCIR
l_.str.1:                               ; @.str.1
	.asciz	"VIDIOC_S_INPUT: could not address saa7111a\n"

	.comm	_video_audio_connect,8,3        ; @video_audio_connect
	.no_dead_strip	_vidioc_s_input
.subsections_via_symbols
