	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function saa711x_set_lcr
_saa711x_set_lcr:                       ## @saa711x_set_lcr
	.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	$104, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	callq	_to_state
	movl	(%rax), %ebx
	movq	_V4L2_STD_625_50@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r12d
	movq	8(%rax), %rdi
	movq	_R_41_LCR_BASE@GOTPCREL(%rip), %r15
	movq	(%r15), %rsi
	callq	_saa711x_has_reg
	testl	%eax, %eax
	je	LBB0_22
## %bb.1:
	andl	%ebx, %r12d
	leaq	L_.memset_pattern(%rip), %rsi
	leaq	-144(%rbp), %rdi
	movl	$96, %edx
	callq	_memset_pattern16
	testq	%r14, %r14
	je	LBB0_24
## %bb.2:
	movq	(%r14), %rcx
	movq	(%rcx), %rax
	movq	8(%rcx), %rcx
	movl	$0, (%rcx)
	movl	$0, (%rax)
	movl	$0, 4(%rcx)
	movl	$0, 4(%rax)
	movl	$0, 8(%rcx)
	movl	$0, 8(%rax)
	movl	$0, 12(%rcx)
	movl	$0, 12(%rax)
	movl	$0, 16(%rcx)
	movl	$0, 16(%rax)
	movl	$0, 20(%rcx)
	movl	$0, 20(%rax)
	testl	%r12d, %r12d
	jne	LBB0_4
## %bb.3:
	movl	$0, 24(%rcx)
	movl	$0, 24(%rax)
	movl	$0, 28(%rcx)
	movl	$0, 28(%rax)
	movl	$0, 32(%rcx)
	movl	$0, 32(%rax)
	movl	$0, 36(%rcx)
	movl	$0, 36(%rax)
	movl	$0, 88(%rcx)
	movl	$0, 88(%rax)
	movl	$0, 92(%rcx)
	movl	$0, 92(%rax)
LBB0_4:
	movl	$6, %edx
	leaq	LJTI0_1(%rip), %r8
	leaq	LJTI0_0(%rip), %r9
	jmp	LBB0_8
LBB0_5:                                 ##   in Loop: Header=BB0_8 Depth=1
	movl	$16, %esi
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_8 Depth=1
	orl	%esi, %ebx
	movl	%ebx, -144(%rbp,%rdx,4)
LBB0_7:                                 ##   in Loop: Header=BB0_8 Depth=1
	incq	%rdx
	cmpq	$24, %rdx
	je	LBB0_28
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movl	$0, -144(%rbp,%rdx,4)
	movl	(%rcx,%rdx,4), %edi
	leal	-128(%rdi), %esi
	cmpl	$3, %esi
	ja	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movslq	(%r9,%rsi,4), %rsi
	addq	%r9, %rsi
	jmpq	*%rsi
LBB0_10:                                ##   in Loop: Header=BB0_8 Depth=1
	movl	$5, %esi
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_8 Depth=1
	movl	$15, %esi
	xorl	%ebx, %ebx
	testl	%edi, %edi
	je	LBB0_15
	jmp	LBB0_16
LBB0_12:                                ##   in Loop: Header=BB0_8 Depth=1
	movl	$7, %esi
	jmp	LBB0_15
LBB0_13:                                ##   in Loop: Header=BB0_8 Depth=1
	movl	$1, %esi
	jmp	LBB0_15
LBB0_14:                                ##   in Loop: Header=BB0_8 Depth=1
	movl	$4, %esi
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_8 Depth=1
	movl	%esi, -144(%rbp,%rdx,4)
	movl	%esi, %ebx
LBB0_16:                                ##   in Loop: Header=BB0_8 Depth=1
	movl	(%rax,%rdx,4), %esi
	leal	-128(%rsi), %edi
	cmpl	$3, %edi
	ja	LBB0_19
## %bb.17:                              ##   in Loop: Header=BB0_8 Depth=1
	movl	$112, %esi
	movslq	(%r8,%rdi,4), %rdi
	addq	%r8, %rdi
	jmpq	*%rdi
LBB0_18:                                ##   in Loop: Header=BB0_8 Depth=1
	movl	$80, %esi
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_19:                                ##   in Loop: Header=BB0_8 Depth=1
	testl	%esi, %esi
	jne	LBB0_7
## %bb.20:                              ##   in Loop: Header=BB0_8 Depth=1
	movl	$240, %esi
	jmp	LBB0_6
LBB0_21:                                ##   in Loop: Header=BB0_8 Depth=1
	movl	$64, %esi
	jmp	LBB0_6
LBB0_22:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_35
## %bb.23:
	addq	$104, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_24:
	testl	%r12d, %r12d
	je	LBB0_26
## %bb.25:
	leaq	-120(%rbp), %rdi
	leaq	L_.memset_pattern.2(%rip), %rsi
	movl	$72, %edx
	jmp	LBB0_27
LBB0_26:
	leaq	-104(%rbp), %rdi
	leaq	L_.memset_pattern.2(%rip), %rsi
	movl	$48, %edx
LBB0_27:
	callq	_memset_pattern16
LBB0_28:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_29:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rsi
	addq	%rbx, %rsi
	movl	-136(%rbp,%rbx,4), %edx
	movq	%r13, %rdi
	callq	_saa711x_write
	incq	%rbx
	cmpq	$22, %rbx
	jne	LBB0_29
## %bb.30:
	testq	%r14, %r14
	jne	LBB0_32
## %bb.31:
	movq	_saa7115_cfg_vbi_on@GOTPCREL(%rip), %rax
	jmp	LBB0_33
LBB0_32:
	movq	_saa7115_cfg_vbi_off@GOTPCREL(%rip), %rax
LBB0_33:
	movl	(%rax), %esi
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_35
## %bb.34:
	movq	%r13, %rdi
	addq	$104, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_saa711x_writeregs              ## TAILCALL
LBB0_35:
	callq	___stack_chk_fail
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_13, LBB0_13-LJTI0_0
.set L0_0_set_14, LBB0_14-LJTI0_0
LJTI0_0:
	.long	L0_0_set_10
	.long	L0_0_set_12
	.long	L0_0_set_13
	.long	L0_0_set_14
.set L0_1_set_18, LBB0_18-LJTI0_1
.set L0_1_set_6, LBB0_6-LJTI0_1
.set L0_1_set_5, LBB0_5-LJTI0_1
.set L0_1_set_21, LBB0_21-LJTI0_1
LJTI0_1:
	.long	L0_1_set_18
	.long	L0_1_set_6
	.long	L0_1_set_5
	.long	L0_1_set_21
	.end_data_region
                                        ## -- End function
	.comm	_V4L2_STD_625_50,4,2            ## @V4L2_STD_625_50
	.comm	_R_41_LCR_BASE,8,3              ## @R_41_LCR_BASE
	.comm	_saa7115_cfg_vbi_on,4,2         ## @saa7115_cfg_vbi_on
	.comm	_saa7115_cfg_vbi_off,4,2        ## @saa7115_cfg_vbi_off
	.comm	_SAA7115,8,3                    ## @SAA7115
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## @.memset_pattern
L_.memset_pattern:
	.long	255                             ## 0xff
	.long	255                             ## 0xff
	.long	255                             ## 0xff
	.long	255                             ## 0xff

	.p2align	4                               ## @.memset_pattern.2
L_.memset_pattern.2:
	.long	221                             ## 0xdd
	.long	221                             ## 0xdd
	.long	221                             ## 0xdd
	.long	221                             ## 0xdd

	.no_dead_strip	_saa711x_set_lcr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function saa711x_set_lcr
_saa711x_set_lcr:                       ; @saa711x_set_lcr
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #176
	.cfi_def_cfa_offset 176
	stp	x24, x23, [sp, #112]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #128]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #144]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #160]            ; 16-byte Folded Spill
	add	x29, sp, #160
	.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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	bl	_to_state
Lloh3:
	adrp	x8, _V4L2_STD_625_50@GOTPAGE
Lloh4:
	ldr	x8, [x8, _V4L2_STD_625_50@GOTPAGEOFF]
	ldr	w22, [x0]
Lloh5:
	ldr	w23, [x8]
	ldr	x0, [x0, #8]
Lloh6:
	adrp	x21, _R_41_LCR_BASE@GOTPAGE
Lloh7:
	ldr	x21, [x21, _R_41_LCR_BASE@GOTPAGEOFF]
	ldr	x1, [x21]
	bl	_saa711x_has_reg
	cbz	w0, LBB0_23
; %bb.1:
	and	w22, w23, w22
Lloh8:
	adrp	x1, l_.memset_pattern@PAGE
Lloh9:
	add	x1, x1, l_.memset_pattern@PAGEOFF
	add	x23, sp, #8
	add	x0, sp, #8
	mov	w2, #96
	bl	_memset_pattern16
	cbz	x20, LBB0_25
; %bb.2:
	ldr	x9, [x20]
	ldp	x9, x8, [x9]
	str	wzr, [x8]
	str	wzr, [x9]
	str	wzr, [x8, #4]
	str	wzr, [x9, #4]
	str	wzr, [x8, #8]
	str	wzr, [x9, #8]
	str	wzr, [x8, #12]
	str	wzr, [x9, #12]
	str	wzr, [x8, #16]
	str	wzr, [x9, #16]
	str	wzr, [x8, #20]
	str	wzr, [x9, #20]
	cbnz	w22, LBB0_4
; %bb.3:
	str	wzr, [x8, #24]
	str	wzr, [x9, #24]
	str	wzr, [x8, #28]
	str	wzr, [x9, #28]
	str	wzr, [x8, #32]
	str	wzr, [x9, #32]
	str	wzr, [x8, #36]
	str	wzr, [x9, #36]
	str	wzr, [x8, #88]
	str	wzr, [x9, #88]
	str	wzr, [x8, #92]
	str	wzr, [x9, #92]
LBB0_4:
	mov	w10, #24
	add	x11, sp, #8
Lloh10:
	adrp	x12, lJTI0_1@PAGE
Lloh11:
	add	x12, x12, lJTI0_1@PAGEOFF
Lloh12:
	adrp	x13, lJTI0_0@PAGE
Lloh13:
	add	x13, x13, lJTI0_0@PAGEOFF
	b	LBB0_8
LBB0_5:                                 ;   in Loop: Header=BB0_8 Depth=1
	mov	w15, #16
LBB0_6:                                 ;   in Loop: Header=BB0_8 Depth=1
	orr	w14, w14, w15
	str	w14, [x11, x10]
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	add	x10, x10, #4
	cmp	x10, #96
	b.eq	LBB0_26
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	str	wzr, [x11, x10]
	ldr	w15, [x8, x10]
	sub	w14, w15, #128
	cmp	w14, #3
	b.hi	LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	adr	x15, LBB0_10
	ldrb	w16, [x13, x14]
	add	x15, x15, x16, lsl #2
	br	x15
LBB0_10:                                ;   in Loop: Header=BB0_8 Depth=1
	mov	w14, #5
	b	LBB0_16
LBB0_11:                                ;   in Loop: Header=BB0_8 Depth=1
	mov	w14, #0
	cbnz	w15, LBB0_17
; %bb.12:                               ;   in Loop: Header=BB0_8 Depth=1
	mov	w14, #15
	b	LBB0_16
LBB0_13:                                ;   in Loop: Header=BB0_8 Depth=1
	mov	w14, #7
	b	LBB0_16
LBB0_14:                                ;   in Loop: Header=BB0_8 Depth=1
	mov	w14, #1
	b	LBB0_16
LBB0_15:                                ;   in Loop: Header=BB0_8 Depth=1
	mov	w14, #4
LBB0_16:                                ;   in Loop: Header=BB0_8 Depth=1
	str	w14, [x11, x10]
LBB0_17:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	w15, [x9, x10]
	sub	w16, w15, #128
	cmp	w16, #3
	b.hi	LBB0_20
; %bb.18:                               ;   in Loop: Header=BB0_8 Depth=1
	mov	w15, #112
	adr	x17, LBB0_5
	ldrb	w0, [x12, x16]
	add	x17, x17, x0, lsl #2
	br	x17
LBB0_19:                                ;   in Loop: Header=BB0_8 Depth=1
	mov	w15, #80
	b	LBB0_6
LBB0_20:                                ;   in Loop: Header=BB0_8 Depth=1
	cbnz	w15, LBB0_7
; %bb.21:                               ;   in Loop: Header=BB0_8 Depth=1
	mov	w15, #240
	b	LBB0_6
LBB0_22:                                ;   in Loop: Header=BB0_8 Depth=1
	mov	w15, #64
	b	LBB0_6
LBB0_23:
	ldur	x8, [x29, #-56]
Lloh14:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh15:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_30
; %bb.24:
	ldp	x29, x30, [sp, #160]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #144]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #128]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #112]            ; 16-byte Folded Reload
	add	sp, sp, #176
	ret
LBB0_25:
	cmp	w22, #0
	mov	w8, #24
	mov	w9, #40
	csel	x8, x9, x8, eq
	mov	w9, #72
	mov	w10, #48
	csel	x2, x10, x9, eq
	add	x0, x23, x8
Lloh17:
	adrp	x1, l_.memset_pattern.2@PAGE
Lloh18:
	add	x1, x1, l_.memset_pattern.2@PAGEOFF
	bl	_memset_pattern16
LBB0_26:
	mov	x22, #0
	add	x8, sp, #8
	add	x23, x8, #8
LBB0_27:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21]
	add	x1, x22, x8
	ldr	w2, [x23, x22, lsl #2]
	mov	x0, x19
	bl	_saa711x_write
	add	x22, x22, #1
	cmp	x22, #22
	b.ne	LBB0_27
; %bb.28:
Lloh19:
	adrp	x8, _saa7115_cfg_vbi_on@GOTPAGE
Lloh20:
	ldr	x8, [x8, _saa7115_cfg_vbi_on@GOTPAGEOFF]
Lloh21:
	adrp	x9, _saa7115_cfg_vbi_off@GOTPAGE
Lloh22:
	ldr	x9, [x9, _saa7115_cfg_vbi_off@GOTPAGEOFF]
	cmp	x20, #0
	csel	x8, x8, x9, eq
	ldr	w1, [x8]
	ldur	x8, [x29, #-56]
Lloh23:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh24:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_30
; %bb.29:
	mov	x0, x19
	ldp	x29, x30, [sp, #160]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #144]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #128]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #112]            ; 16-byte Folded Reload
	add	sp, sp, #176
	b	_saa711x_writeregs
LBB0_30:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_10-LBB0_10)>>2
	.byte	(LBB0_13-LBB0_10)>>2
	.byte	(LBB0_14-LBB0_10)>>2
	.byte	(LBB0_15-LBB0_10)>>2
lJTI0_1:
	.byte	(LBB0_19-LBB0_5)>>2
	.byte	(LBB0_6-LBB0_5)>>2
	.byte	(LBB0_5-LBB0_5)>>2
	.byte	(LBB0_22-LBB0_5)>>2
                                        ; -- End function
	.comm	_V4L2_STD_625_50,4,2            ; @V4L2_STD_625_50
	.comm	_R_41_LCR_BASE,8,3              ; @R_41_LCR_BASE
	.comm	_saa7115_cfg_vbi_on,4,2         ; @saa7115_cfg_vbi_on
	.comm	_saa7115_cfg_vbi_off,4,2        ; @saa7115_cfg_vbi_off
	.comm	_SAA7115,8,3                    ; @SAA7115
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ; @.memset_pattern
l_.memset_pattern:
	.long	255                             ; 0xff
	.long	255                             ; 0xff
	.long	255                             ; 0xff
	.long	255                             ; 0xff

	.p2align	4                               ; @.memset_pattern.2
l_.memset_pattern.2:
	.long	221                             ; 0xdd
	.long	221                             ; 0xdd
	.long	221                             ; 0xdd
	.long	221                             ; 0xdd

	.no_dead_strip	_saa711x_set_lcr
.subsections_via_symbols
