	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_stk1160_select_input           ## -- Begin function stk1160_select_input
	.p2align	4, 0x90
_stk1160_select_input:                  ## @stk1160_select_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
	movq	%rdi, %r12
	movq	(%rdi), %rbx
	movq	_STK1160_SVIDEO_INPUT@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	movq	_SAA7115_SVIDEO3@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_SAA7115_COMPOSITE0@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	leaq	_stk1160_select_input.gctrl(%rip), %rdi
	callq	_ARRAY_SIZE
	cmpq	%rax, %rbx
	jae	LBB0_1
## %bb.2:
	cmpq	%r13, %rbx
	cmovel	%r14d, %r15d
	leaq	8(%r12), %rdi
	movq	_video@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_s_routing@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	$0, (%rsp)
	xorl	%esi, %esi
	movl	%r15d, %r8d
	xorl	%r9d, %r9d
	callq	_v4l2_device_call_all
	movq	_STK1160_GCTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	(%r12), %rax
	leaq	_stk1160_select_input.gctrl(%rip), %rcx
	movl	(%rcx,%rax,4), %edx
	movq	%r12, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_stk1160_write_reg              ## TAILCALL
LBB0_1:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @stk1160_select_input.gctrl
_stk1160_select_input.gctrl:
	.long	152                             ## 0x98
	.long	144                             ## 0x90
	.long	136                             ## 0x88
	.long	128                             ## 0x80
	.long	152                             ## 0x98

	.comm	_STK1160_SVIDEO_INPUT,8,3       ## @STK1160_SVIDEO_INPUT
	.comm	_SAA7115_SVIDEO3,4,2            ## @SAA7115_SVIDEO3
	.comm	_SAA7115_COMPOSITE0,4,2         ## @SAA7115_COMPOSITE0
	.comm	_video,4,2                      ## @video
	.comm	_s_routing,4,2                  ## @s_routing
	.comm	_STK1160_GCTRL,4,2              ## @STK1160_GCTRL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_stk1160_select_input           ; -- Begin function stk1160_select_input
	.p2align	2
_stk1160_select_input:                  ; @stk1160_select_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	x19, x0
	ldr	x21, [x0]
Lloh0:
	adrp	x8, _STK1160_SVIDEO_INPUT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _STK1160_SVIDEO_INPUT@GOTPAGEOFF]
Lloh2:
	ldr	x22, [x8]
Lloh3:
	adrp	x8, _SAA7115_SVIDEO3@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SAA7115_SVIDEO3@GOTPAGEOFF]
Lloh5:
	ldr	w23, [x8]
Lloh6:
	adrp	x8, _SAA7115_COMPOSITE0@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SAA7115_COMPOSITE0@GOTPAGEOFF]
Lloh8:
	ldr	w24, [x8]
Lloh9:
	adrp	x20, _stk1160_select_input.gctrl@PAGE
Lloh10:
	add	x20, x20, _stk1160_select_input.gctrl@PAGEOFF
	mov	x0, x20
	bl	_ARRAY_SIZE
	cmp	x21, x0
	b.hs	LBB0_2
; %bb.1:
	cmp	x21, x22
	csel	w4, w23, w24, eq
	add	x0, x19, #8
Lloh11:
	adrp	x8, _video@GOTPAGE
Lloh12:
	ldr	x8, [x8, _video@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
Lloh14:
	adrp	x8, _s_routing@GOTPAGE
Lloh15:
	ldr	x8, [x8, _s_routing@GOTPAGEOFF]
Lloh16:
	ldr	w3, [x8]
	mov	w1, #0
	mov	w5, #0
	mov	w6, #0
	bl	_v4l2_device_call_all
Lloh17:
	adrp	x8, _STK1160_GCTRL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _STK1160_GCTRL@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	ldr	x8, [x19]
	ldr	w2, [x20, x8, lsl #2]
	mov	x0, x19
	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	_stk1160_write_reg
LBB0_2:
	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
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	2                               ; @stk1160_select_input.gctrl
_stk1160_select_input.gctrl:
	.long	152                             ; 0x98
	.long	144                             ; 0x90
	.long	136                             ; 0x88
	.long	128                             ; 0x80
	.long	152                             ; 0x98

	.comm	_STK1160_SVIDEO_INPUT,8,3       ; @STK1160_SVIDEO_INPUT
	.comm	_SAA7115_SVIDEO3,4,2            ; @SAA7115_SVIDEO3
	.comm	_SAA7115_COMPOSITE0,4,2         ; @SAA7115_COMPOSITE0
	.comm	_video,4,2                      ; @video
	.comm	_s_routing,4,2                  ; @s_routing
	.comm	_STK1160_GCTRL,4,2              ; @STK1160_GCTRL
.subsections_via_symbols
