	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tvp514x_s_routing
_tvp514x_s_routing:                     ## @tvp514x_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
	movq	%rdx, %r15
	movq	%rsi, %r14
	movq	%rdi, %rbx
	callq	_to_decoder
	movq	%rax, %r12
	movq	_INPUT_INVALID@GOTPCREL(%rip), %rax
	cmpq	%r14, (%rax)
	jle	LBB0_2
## %bb.1:
	movq	_OUTPUT_INVALID@GOTPCREL(%rip), %rax
	cmpq	%r15, (%rax)
	jle	LBB0_2
## %bb.3:
	movq	_REG_INPUT_SEL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%rbx, %rdi
	movl	%r14d, %edx
	callq	_tvp514x_write_reg
	testl	%eax, %eax
	jne	LBB0_6
## %bb.4:
	movq	_REG_OUTPUT_FORMATTER1@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%rbx, %rdi
	callq	_tvp514x_read_reg
	movl	%eax, %r13d
	andl	$7, %r13d
	orl	%r15d, %r13d
	movq	_REG_OUTPUT_FORMATTER1@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%rbx, %rdi
	movl	%r13d, %edx
	callq	_tvp514x_write_reg
	testl	%eax, %eax
	jne	LBB0_6
## %bb.5:
	movq	16(%r12), %rax
	movq	_REG_INPUT_SEL@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	%r14d, (%rax,%rcx,4)
	movq	_REG_OUTPUT_FORMATTER1@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	%r13d, (%rax,%rcx,4)
	movq	%r14, 8(%r12)
	movq	%r15, (%r12)
	movq	_debug@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rcx
	movl	$1, %edi
	movq	%rbx, %rdx
	movl	%r14d, %r8d
	callq	_v4l2_dbg
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_INPUT_INVALID,8,3              ## @INPUT_INVALID
	.comm	_OUTPUT_INVALID,8,3             ## @OUTPUT_INVALID
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_REG_INPUT_SEL,8,3              ## @REG_INPUT_SEL
	.comm	_REG_OUTPUT_FORMATTER1,8,3      ## @REG_OUTPUT_FORMATTER1
	.comm	_debug,4,2                      ## @debug
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Input set to: %d\n"

	.no_dead_strip	_tvp514x_s_routing
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tvp514x_s_routing
_tvp514x_s_routing:                     ; @tvp514x_s_routing
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
	bl	_to_decoder
Lloh0:
	adrp	x8, _INPUT_INVALID@GOTPAGE
Lloh1:
	ldr	x8, [x8, _INPUT_INVALID@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _OUTPUT_INVALID@GOTPAGE
Lloh4:
	ldr	x9, [x9, _OUTPUT_INVALID@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x19
	ccmp	x9, x21, #4, gt
	b.gt	LBB0_2
; %bb.1:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_5
LBB0_2:
	mov	x22, x0
Lloh9:
	adrp	x24, _REG_INPUT_SEL@GOTPAGE
Lloh10:
	ldr	x24, [x24, _REG_INPUT_SEL@GOTPAGEOFF]
	ldr	x1, [x24]
	mov	x0, x20
	mov	x2, x19
	bl	_tvp514x_write_reg
	cbnz	w0, LBB0_5
; %bb.3:
Lloh11:
	adrp	x25, _REG_OUTPUT_FORMATTER1@GOTPAGE
Lloh12:
	ldr	x25, [x25, _REG_OUTPUT_FORMATTER1@GOTPAGEOFF]
	ldr	x1, [x25]
	mov	x0, x20
	bl	_tvp514x_read_reg
	and	w8, w0, #0x7
	orr	w23, w8, w21
	ldr	x1, [x25]
	mov	x0, x20
	mov	x2, x23
	bl	_tvp514x_write_reg
	cbnz	w0, LBB0_5
; %bb.4:
	ldr	x8, [x22, #16]
	ldr	x9, [x24]
	str	w19, [x8, x9, lsl #2]
	ldr	x9, [x25]
	str	w23, [x8, x9, lsl #2]
	stp	x21, x19, [x22]
Lloh13:
	adrp	x8, _debug@GOTPAGE
Lloh14:
	ldr	x8, [x8, _debug@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
Lloh16:
	adrp	x3, l_.str@PAGE
Lloh17:
	add	x3, x3, l_.str@PAGEOFF
	mov	w0, #1
	mov	x2, x20
	mov	x4, x19
	bl	_v4l2_dbg
	mov	w0, #0
LBB0_5:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_INPUT_INVALID,8,3              ; @INPUT_INVALID
	.comm	_OUTPUT_INVALID,8,3             ; @OUTPUT_INVALID
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_REG_INPUT_SEL,8,3              ; @REG_INPUT_SEL
	.comm	_REG_OUTPUT_FORMATTER1,8,3      ; @REG_OUTPUT_FORMATTER1
	.comm	_debug,4,2                      ; @debug
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Input set to: %d\n"

	.no_dead_strip	_tvp514x_s_routing
.subsections_via_symbols
