	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function saa7191_s_routing
_saa7191_s_routing:                     ## @saa7191_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_saa7191
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_SAA7191_REG_LUMA@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_saa7191_read_reg
	movl	%eax, %r13d
	movq	_SAA7191_REG_IOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_saa7191_read_reg
	movl	%eax, %r12d
	cmpl	$128, %r15d
	je	LBB0_5
## %bb.1:
	cmpl	$129, %r15d
	jne	LBB0_3
## %bb.2:
	movq	_SAA7191_IOCK_CHRS@GOTPCREL(%rip), %rax
	movq	_SAA7191_IOCK_GPSW1@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_SAA7191_IOCK_GPSW2@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	notl	%ecx
	andl	%ecx, %r12d
	movq	_SAA7191_LUMA_BYPS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, %r13d
	jmp	LBB0_6
LBB0_5:
	movq	_SAA7191_IOCK_CHRS@GOTPCREL(%rip), %rax
	movq	_SAA7191_IOCK_GPSW2@GOTPCREL(%rip), %rcx
	orl	(%rax), %r12d
	orl	(%rcx), %r12d
	movq	_SAA7191_LUMA_BYPS@GOTPCREL(%rip), %rax
	orl	(%rax), %r13d
LBB0_6:
	movl	(%r14), %esi
	movq	%rbx, %rdi
	movl	%r13d, %edx
	callq	_saa7191_write_reg
	testl	%eax, %eax
	jne	LBB0_7
## %bb.8:
	movq	_SAA7191_REG_IOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r12d, %edx
	callq	_saa7191_write_reg
	testl	%eax, %eax
	je	LBB0_9
LBB0_7:
	movq	_EIO@GOTPCREL(%rip), %rcx
	jmp	LBB0_4
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_4:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	%r15d, (%rax)
	xorl	%eax, %eax
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_SAA7191_REG_LUMA,4,2           ## @SAA7191_REG_LUMA
	.comm	_SAA7191_REG_IOCK,4,2           ## @SAA7191_REG_IOCK
	.comm	_SAA7191_IOCK_CHRS,4,2          ## @SAA7191_IOCK_CHRS
	.comm	_SAA7191_IOCK_GPSW1,4,2         ## @SAA7191_IOCK_GPSW1
	.comm	_SAA7191_IOCK_GPSW2,4,2         ## @SAA7191_IOCK_GPSW2
	.comm	_SAA7191_LUMA_BYPS,4,2          ## @SAA7191_LUMA_BYPS
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_saa7191_s_routing
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function saa7191_s_routing
_saa7191_s_routing:                     ; @saa7191_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	x19, x1
	mov	x21, x0
	bl	_to_saa7191
	mov	x20, x0
Lloh0:
	adrp	x25, _SAA7191_REG_LUMA@GOTPAGE
Lloh1:
	ldr	x25, [x25, _SAA7191_REG_LUMA@GOTPAGEOFF]
	ldr	w1, [x25]
	mov	x0, x21
	bl	_saa7191_read_reg
	mov	x22, x0
Lloh2:
	adrp	x24, _SAA7191_REG_IOCK@GOTPAGE
Lloh3:
	ldr	x24, [x24, _SAA7191_REG_IOCK@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	x0, x21
	bl	_saa7191_read_reg
	cmp	w19, #128
	b.eq	LBB0_3
; %bb.1:
	cmp	w19, #129
	b.ne	LBB0_7
; %bb.2:
Lloh4:
	adrp	x8, _SAA7191_IOCK_CHRS@GOTPAGE
Lloh5:
	ldr	x8, [x8, _SAA7191_IOCK_CHRS@GOTPAGEOFF]
Lloh6:
	adrp	x9, _SAA7191_IOCK_GPSW1@GOTPAGE
Lloh7:
	ldr	x9, [x9, _SAA7191_IOCK_GPSW1@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh10:
	adrp	x9, _SAA7191_IOCK_GPSW2@GOTPAGE
Lloh11:
	ldr	x9, [x9, _SAA7191_IOCK_GPSW2@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	orr	w8, w8, w9
	bic	w23, w0, w8
Lloh13:
	adrp	x8, _SAA7191_LUMA_BYPS@GOTPAGE
Lloh14:
	ldr	x8, [x8, _SAA7191_LUMA_BYPS@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	bic	w2, w22, w8
	b	LBB0_4
LBB0_3:
Lloh16:
	adrp	x8, _SAA7191_IOCK_CHRS@GOTPAGE
Lloh17:
	ldr	x8, [x8, _SAA7191_IOCK_CHRS@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
Lloh19:
	adrp	x9, _SAA7191_IOCK_GPSW2@GOTPAGE
Lloh20:
	ldr	x9, [x9, _SAA7191_IOCK_GPSW2@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	orr	w8, w8, w0
	orr	w23, w8, w9
Lloh22:
	adrp	x8, _SAA7191_LUMA_BYPS@GOTPAGE
Lloh23:
	ldr	x8, [x8, _SAA7191_LUMA_BYPS@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	orr	w2, w8, w22
LBB0_4:
	ldr	w1, [x25]
	mov	x0, x21
	bl	_saa7191_write_reg
	cbnz	w0, LBB0_6
; %bb.5:
	ldr	w1, [x24]
	mov	x0, x21
	mov	x2, x23
	bl	_saa7191_write_reg
	cbz	w0, LBB0_10
LBB0_6:
Lloh25:
	adrp	x8, _EIO@GOTPAGE
Lloh26:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
Lloh27:
	adrp	x8, _EINVAL@GOTPAGE
Lloh28:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	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
LBB0_10:
	str	w19, [x20]
	b	LBB0_9
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh8
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_SAA7191_REG_LUMA,4,2           ; @SAA7191_REG_LUMA
	.comm	_SAA7191_REG_IOCK,4,2           ; @SAA7191_REG_IOCK
	.comm	_SAA7191_IOCK_CHRS,4,2          ; @SAA7191_IOCK_CHRS
	.comm	_SAA7191_IOCK_GPSW1,4,2         ; @SAA7191_IOCK_GPSW1
	.comm	_SAA7191_IOCK_GPSW2,4,2         ; @SAA7191_IOCK_GPSW2
	.comm	_SAA7191_LUMA_BYPS,4,2          ; @SAA7191_LUMA_BYPS
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_saa7191_s_routing
.subsections_via_symbols
