	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function adv7170_s_routing
_adv7170_s_routing:                     ## @adv7170_s_routing
	.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	%esi, %r15d
	movq	%rdi, %rbx
	callq	_to_adv7170
	movq	%rax, %r12
	movq	_debug@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	testl	%r15d, %r15d
	leaq	L_.str.1(%rip), %rax
	leaq	L_.str.2(%rip), %r8
	cmoveq	%rax, %r8
	leaq	L_.str(%rip), %rcx
	xorl	%r14d, %r14d
	movl	$1, %edi
	movq	%rbx, %rdx
	xorl	%eax, %eax
	callq	_v4l2_dbg
	testl	%r15d, %r15d
	je	LBB0_1
## %bb.2:
	cmpl	$1, %r15d
	jne	LBB0_6
## %bb.3:
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	movl	$8, %r13d
	movq	_TR1PLAY@GOTPCREL(%rip), %r12
	xorl	%edx, %edx
	jmp	LBB0_4
LBB0_1:
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	movl	$14, %r13d
	movq	_TR1CAPT@GOTPCREL(%rip), %r12
	movl	$32, %edx
LBB0_4:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_adv7170_write
	movl	(%r12), %edx
	movq	%rbx, %rdi
	movl	$8, %esi
	callq	_adv7170_write
	movq	%rbx, %rdi
	movl	$2, %esi
	movl	%r13d, %edx
	callq	_adv7170_write
	movq	_TR0MODE@GOTPCREL(%rip), %r12
	movq	_TR0RST@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	orl	(%r12), %edx
	movq	%rbx, %rdi
	movl	$7, %esi
	callq	_adv7170_write
	movl	(%r12), %edx
	movq	%rbx, %rdi
	movl	$7, %esi
	callq	_adv7170_write
	movq	_debug@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_inputs@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%r15d, %ecx
	movl	(%rax,%rcx,4), %r8d
	leaq	L_.str.4(%rip), %rcx
	movl	$1, %edi
	movq	%rbx, %rdx
	xorl	%eax, %eax
	callq	_v4l2_dbg
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	%r15d, (%rax)
	jmp	LBB0_5
LBB0_6:
	movl	(%r13), %esi
	leaq	L_.str.3(%rip), %rcx
	xorl	%r14d, %r14d
	movl	$1, %edi
	movq	%rbx, %rdx
	movl	%r15d, %r8d
	xorl	%eax, %eax
	callq	_v4l2_dbg
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
LBB0_5:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_debug,4,2                      ## @debug
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"set input from %s\n"

L_.str.1:                               ## @.str.1
	.asciz	"decoder"

L_.str.2:                               ## @.str.2
	.asciz	"ZR36060"

	.comm	_TR1CAPT,4,2                    ## @TR1CAPT
	.comm	_TR0MODE,4,2                    ## @TR0MODE
	.comm	_TR0RST,4,2                     ## @TR0RST
	.comm	_TR1PLAY,4,2                    ## @TR1PLAY
L_.str.3:                               ## @.str.3
	.asciz	"illegal input: %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.4:                               ## @.str.4
	.asciz	"switched to %s\n"

	.comm	_inputs,8,3                     ## @inputs
	.no_dead_strip	_adv7170_s_routing
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function adv7170_s_routing
_adv7170_s_routing:                     ; @adv7170_s_routing
	.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, x1
	mov	x19, x0
	bl	_to_adv7170
	mov	x21, x0
Lloh0:
	adrp	x23, _debug@GOTPAGE
Lloh1:
	ldr	x23, [x23, _debug@GOTPAGEOFF]
	ldr	w1, [x23]
Lloh2:
	adrp	x8, l_.str.2@PAGE
Lloh3:
	add	x8, x8, l_.str.2@PAGEOFF
Lloh4:
	adrp	x9, l_.str.1@PAGE
Lloh5:
	add	x9, x9, l_.str.1@PAGEOFF
	cmp	w20, #0
	csel	x8, x9, x8, eq
	str	x8, [sp]
Lloh6:
	adrp	x3, l_.str@PAGE
Lloh7:
	add	x3, x3, l_.str@PAGEOFF
	mov	w0, #1
	mov	x2, x19
	bl	_v4l2_dbg
	cbz	w20, LBB0_3
; %bb.1:
	cmp	w20, #1
	b.ne	LBB0_5
; %bb.2:
	mov	w2, #0
	mov	w22, #8
Lloh8:
	adrp	x24, _TR1PLAY@GOTPAGE
Lloh9:
	ldr	x24, [x24, _TR1PLAY@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:
	mov	w22, #14
Lloh10:
	adrp	x24, _TR1CAPT@GOTPAGE
Lloh11:
	ldr	x24, [x24, _TR1CAPT@GOTPAGEOFF]
	mov	w2, #32
LBB0_4:
	mov	x0, x19
	mov	w1, #1
	bl	_adv7170_write
	ldr	w2, [x24]
	mov	x0, x19
	mov	w1, #8
	bl	_adv7170_write
	mov	x0, x19
	mov	w1, #2
	mov	x2, x22
	bl	_adv7170_write
Lloh12:
	adrp	x22, _TR0MODE@GOTPAGE
Lloh13:
	ldr	x22, [x22, _TR0MODE@GOTPAGEOFF]
	ldr	w8, [x22]
Lloh14:
	adrp	x9, _TR0RST@GOTPAGE
Lloh15:
	ldr	x9, [x9, _TR0RST@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	x0, x19
	mov	w1, #7
	bl	_adv7170_write
	ldr	w2, [x22]
	mov	x0, x19
	mov	w1, #7
	bl	_adv7170_write
	ldr	w1, [x23]
Lloh17:
	adrp	x8, _inputs@GOTPAGE
Lloh18:
	ldr	x8, [x8, _inputs@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
	ldr	w8, [x8, w20, uxtw #2]
	str	x8, [sp]
Lloh20:
	adrp	x3, l_.str.4@PAGE
Lloh21:
	add	x3, x3, l_.str.4@PAGEOFF
	mov	w0, #1
	mov	x2, x19
	bl	_v4l2_dbg
	mov	w0, #0
	str	w20, [x21]
	b	LBB0_6
LBB0_5:
	ldr	w1, [x23]
	str	x20, [sp]
Lloh22:
	adrp	x3, l_.str.3@PAGE
Lloh23:
	add	x3, x3, l_.str.3@PAGEOFF
	mov	w0, #1
	mov	x2, x19
	bl	_v4l2_dbg
Lloh24:
	adrp	x8, _EINVAL@GOTPAGE
Lloh25:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	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	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_debug,4,2                      ; @debug
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"set input from %s\n"

l_.str.1:                               ; @.str.1
	.asciz	"decoder"

l_.str.2:                               ; @.str.2
	.asciz	"ZR36060"

	.comm	_TR1CAPT,4,2                    ; @TR1CAPT
	.comm	_TR0MODE,4,2                    ; @TR0MODE
	.comm	_TR0RST,4,2                     ; @TR0RST
	.comm	_TR1PLAY,4,2                    ; @TR1PLAY
l_.str.3:                               ; @.str.3
	.asciz	"illegal input: %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.4:                               ; @.str.4
	.asciz	"switched to %s\n"

	.comm	_inputs,8,3                     ; @inputs
	.no_dead_strip	_adv7170_s_routing
.subsections_via_symbols
