	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function saa7127_set_xds
_saa7127_set_xds:                       ## @saa7127_set_xds
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r15
	callq	_to_state
	movq	(%rbx), %rcx
	movl	(%rcx), %edx
	movl	4(%rcx), %r12d
	movl	8(%rbx), %r13d
	xorl	%r14d, %r14d
	testl	%r13d, %r13d
	setne	%cl
	je	LBB0_4
## %bb.1:
	cmpl	$1, 12(%rbx)
	jne	LBB0_3
## %bb.2:
	cmpl	$21, %r13d
	jne	LBB0_3
LBB0_4:
	movb	%cl, %r14b
	cmpl	%r14d, (%rax)
	je	LBB0_6
## %bb.5:
	xorl	%ebx, %ebx
	testl	%r13d, %r13d
	setne	%bl
	movq	_debug@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	L_.str.1(%rip), %rcx
	leaq	L_.str.2(%rip), %r8
	cmovneq	%rcx, %r8
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	leaq	L_.str(%rip), %rcx
	movl	$1, %edi
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movq	%r15, %rdx
	xorl	%eax, %eax
	callq	_v4l2_dbg
	movq	_SAA7127_REG_CLOSED_CAPTION@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	4(%rax), %eax
	shll	$6, %eax
	shll	$7, %ebx
	orl	%eax, %ebx
	orl	$17, %ebx
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_saa7127_write
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	%r14d, (%rax)
LBB0_6:
	testl	%r13d, %r13d
	je	LBB0_7
## %bb.8:
	shll	$8, %r12d
	orl	%edx, %r12d
	movq	_debug@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%rax, %r14
	leaq	L_.str.3(%rip), %rcx
	xorl	%ebx, %ebx
	movl	$2, %edi
	movl	%edx, %r13d
	movq	%r15, %rdx
	movl	%r12d, %r8d
	xorl	%eax, %eax
	callq	_v4l2_dbg
	movq	_SAA7127_REG_LINE_21_EVEN_0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzbl	%r13b, %edx
	movq	%r15, %rdi
	callq	_saa7127_write
	movq	_SAA7127_REG_LINE_21_EVEN_1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r12d, %edx
	sarl	$8, %edx
	movq	%r15, %rdi
	callq	_saa7127_write
	movl	%r12d, 8(%r14)
	jmp	LBB0_9
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_9
LBB0_7:
	xorl	%ebx, %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_debug,4,2                      ## @debug
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Turn XDS %s\n"

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

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

	.comm	_SAA7127_REG_CLOSED_CAPTION,4,2 ## @SAA7127_REG_CLOSED_CAPTION
L_.str.3:                               ## @.str.3
	.asciz	"XDS data: %04x\n"

	.comm	_SAA7127_REG_LINE_21_EVEN_0,4,2 ## @SAA7127_REG_LINE_21_EVEN_0
	.comm	_SAA7127_REG_LINE_21_EVEN_1,4,2 ## @SAA7127_REG_LINE_21_EVEN_1
	.no_dead_strip	_saa7127_set_xds
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function saa7127_set_xds
_saa7127_set_xds:                       ; @saa7127_set_xds
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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, x1
	mov	x20, x0
	bl	_to_state
	mov	x19, x0
	ldr	x8, [x21]
	ldp	w22, w23, [x8]
	ldr	w24, [x21, #8]
	cmp	w24, #0
	cset	w25, ne
	cbz	w24, LBB0_3
; %bb.1:
	ldr	w8, [x21, #12]
	cmp	w8, #1
	ccmp	w24, #21, #0, eq
	b.eq	LBB0_3
; %bb.2:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_8
LBB0_3:
	ldr	w8, [x19]
Lloh3:
	adrp	x21, _debug@GOTPAGE
Lloh4:
	ldr	x21, [x21, _debug@GOTPAGEOFF]
	cmp	w8, w25
	b.eq	LBB0_5
; %bb.4:
	ldr	w1, [x21]
Lloh5:
	adrp	x8, l_.str.2@PAGE
Lloh6:
	add	x8, x8, l_.str.2@PAGEOFF
Lloh7:
	adrp	x9, l_.str.1@PAGE
Lloh8:
	add	x9, x9, l_.str.1@PAGEOFF
	cmp	w24, #0
	csel	x8, x9, x8, ne
	str	x8, [sp]
Lloh9:
	adrp	x3, l_.str@PAGE
Lloh10:
	add	x3, x3, l_.str@PAGEOFF
	mov	w8, #17
	mov	w9, #145
	csel	w26, w9, w8, ne
	mov	w0, #1
	mov	x2, x20
	bl	_v4l2_dbg
Lloh11:
	adrp	x8, _SAA7127_REG_CLOSED_CAPTION@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SAA7127_REG_CLOSED_CAPTION@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	ldr	w8, [x19, #4]
	orr	w2, w26, w8, lsl #6
	mov	x0, x20
	bl	_saa7127_write
	str	w25, [x19]
LBB0_5:
	cbz	w24, LBB0_7
; %bb.6:
	orr	w23, w22, w23, lsl #8
	ldr	w1, [x21]
	str	x23, [sp]
Lloh14:
	adrp	x3, l_.str.3@PAGE
Lloh15:
	add	x3, x3, l_.str.3@PAGEOFF
	mov	w0, #2
	mov	x2, x20
	bl	_v4l2_dbg
Lloh16:
	adrp	x8, _SAA7127_REG_LINE_21_EVEN_0@GOTPAGE
Lloh17:
	ldr	x8, [x8, _SAA7127_REG_LINE_21_EVEN_0@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	and	w2, w22, #0xff
	mov	x0, x20
	bl	_saa7127_write
Lloh19:
	adrp	x8, _SAA7127_REG_LINE_21_EVEN_1@GOTPAGE
Lloh20:
	ldr	x8, [x8, _SAA7127_REG_LINE_21_EVEN_1@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	asr	w2, w23, #8
	mov	x0, x20
	bl	_saa7127_write
	mov	w0, #0
	str	w23, [x19, #8]
	b	LBB0_8
LBB0_7:
	mov	w0, #0
LBB0_8:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_debug,4,2                      ; @debug
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Turn XDS %s\n"

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

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

	.comm	_SAA7127_REG_CLOSED_CAPTION,4,2 ; @SAA7127_REG_CLOSED_CAPTION
l_.str.3:                               ; @.str.3
	.asciz	"XDS data: %04x\n"

	.comm	_SAA7127_REG_LINE_21_EVEN_0,4,2 ; @SAA7127_REG_LINE_21_EVEN_0
	.comm	_SAA7127_REG_LINE_21_EVEN_1,4,2 ; @SAA7127_REG_LINE_21_EVEN_1
	.no_dead_strip	_saa7127_set_xds
.subsections_via_symbols
