	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function saa7191_s_std
_saa7191_s_std:                         ## @saa7191_s_std
	.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, %r14
	movq	_SAA7191_REG_STDC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_saa7191_read_reg
	movl	%eax, %r12d
	movq	_SAA7191_REG_CTL3@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_saa7191_read_reg
	movl	%eax, %r13d
	movq	_SAA7191_REG_CHCV@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_saa7191_read_reg
	movq	_V4L2_STD_PAL@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	je	LBB0_2
## %bb.1:
	movq	_SAA7191_CTL3_AUFD@GOTPCREL(%rip), %rax
	movq	_SAA7191_CTL3_FSEL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_SAA7191_STDC_SECS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, %r12d
LBB0_8:
	notl	%ecx
	andl	%ecx, %r13d
	movq	_SAA7191_CHCV_PAL@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_2:
	movq	_V4L2_STD_NTSC@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_6
## %bb.3:
	movq	_SAA7191_STDC_SECS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, %r12d
	movq	_SAA7191_CTL3_AUFD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, %r13d
	movq	_SAA7191_CTL3_FSEL@GOTPCREL(%rip), %rax
	orl	(%rax), %r13d
	movq	_SAA7191_CHCV_NTSC@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %r14d
	movq	_SAA7191_REG_CTL3@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r13d, %edx
	callq	_saa7191_write_reg
	testl	%eax, %eax
	jne	LBB0_5
## %bb.11:
	movq	_SAA7191_REG_STDC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r12d, %edx
	callq	_saa7191_write_reg
	testl	%eax, %eax
	jne	LBB0_5
## %bb.12:
	movq	_SAA7191_REG_CHCV@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r14d, %edx
	callq	_saa7191_write_reg
	testl	%eax, %eax
	je	LBB0_13
LBB0_5:
	movq	_EIO@GOTPCREL(%rip), %rax
LBB0_10:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_14:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	_V4L2_STD_SECAM@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_9
## %bb.7:
	movq	_SAA7191_STDC_SECS@GOTPCREL(%rip), %rax
	orl	(%rax), %r12d
	movq	_SAA7191_CTL3_AUFD@GOTPCREL(%rip), %rax
	movq	_SAA7191_CTL3_FSEL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	jmp	LBB0_8
LBB0_13:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	%r15d, (%rax)
	leaq	L_.str(%rip), %rdi
	xorl	%ebx, %ebx
	movl	%r13d, %esi
	movl	%r12d, %edx
	movl	%r14d, %ecx
	xorl	%eax, %eax
	callq	_dprintk
	leaq	L_.str.1(%rip), %rdi
	movl	%r15d, %esi
	xorl	%eax, %eax
	callq	_dprintk
	jmp	LBB0_14
LBB0_9:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_SAA7191_REG_STDC,4,2           ## @SAA7191_REG_STDC
	.comm	_SAA7191_REG_CTL3,4,2           ## @SAA7191_REG_CTL3
	.comm	_SAA7191_REG_CHCV,4,2           ## @SAA7191_REG_CHCV
	.comm	_V4L2_STD_PAL,4,2               ## @V4L2_STD_PAL
	.comm	_SAA7191_STDC_SECS,4,2          ## @SAA7191_STDC_SECS
	.comm	_SAA7191_CTL3_AUFD,4,2          ## @SAA7191_CTL3_AUFD
	.comm	_SAA7191_CTL3_FSEL,4,2          ## @SAA7191_CTL3_FSEL
	.comm	_SAA7191_CHCV_PAL,4,2           ## @SAA7191_CHCV_PAL
	.comm	_V4L2_STD_NTSC,4,2              ## @V4L2_STD_NTSC
	.comm	_SAA7191_CHCV_NTSC,4,2          ## @SAA7191_CHCV_NTSC
	.comm	_V4L2_STD_SECAM,4,2             ## @V4L2_STD_SECAM
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_EIO,4,2                        ## @EIO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ctl3: %02x stdc: %02x chcv: %02x\n"

L_.str.1:                               ## @.str.1
	.asciz	"norm: %llx\n"

	.no_dead_strip	_saa7191_s_std
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function saa7191_s_std
_saa7191_s_std:                         ; @saa7191_s_std
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x1
	mov	x21, x0
	bl	_to_saa7191
	mov	x20, x0
Lloh0:
	adrp	x25, _SAA7191_REG_STDC@GOTPAGE
Lloh1:
	ldr	x25, [x25, _SAA7191_REG_STDC@GOTPAGEOFF]
	ldr	w1, [x25]
	mov	x0, x21
	bl	_saa7191_read_reg
	mov	x22, x0
Lloh2:
	adrp	x27, _SAA7191_REG_CTL3@GOTPAGE
Lloh3:
	ldr	x27, [x27, _SAA7191_REG_CTL3@GOTPAGEOFF]
	ldr	w1, [x27]
	mov	x0, x21
	bl	_saa7191_read_reg
	mov	x23, x0
Lloh4:
	adrp	x26, _SAA7191_REG_CHCV@GOTPAGE
Lloh5:
	ldr	x26, [x26, _SAA7191_REG_CHCV@GOTPAGEOFF]
	ldr	w1, [x26]
	mov	x0, x21
	bl	_saa7191_read_reg
Lloh6:
	adrp	x8, _V4L2_STD_PAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _V4L2_STD_PAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	tst	w8, w19
	b.eq	LBB0_3
; %bb.1:
Lloh9:
	adrp	x8, _SAA7191_STDC_SECS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SAA7191_STDC_SECS@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	bic	w22, w22, w8
LBB0_2:
Lloh12:
	adrp	x8, _SAA7191_CTL3_AUFD@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SAA7191_CTL3_AUFD@GOTPAGEOFF]
Lloh14:
	adrp	x9, _SAA7191_CTL3_FSEL@GOTPAGE
Lloh15:
	ldr	x9, [x9, _SAA7191_CTL3_FSEL@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
Lloh17:
	ldr	w9, [x9]
	orr	w8, w9, w8
	bic	w23, w23, w8
Lloh18:
	adrp	x8, _SAA7191_CHCV_PAL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _SAA7191_CHCV_PAL@GOTPAGEOFF]
	b	LBB0_5
LBB0_3:
Lloh20:
	adrp	x8, _V4L2_STD_NTSC@GOTPAGE
Lloh21:
	ldr	x8, [x8, _V4L2_STD_NTSC@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	tst	w8, w19
	b.eq	LBB0_11
; %bb.4:
Lloh23:
	adrp	x8, _SAA7191_STDC_SECS@GOTPAGE
Lloh24:
	ldr	x8, [x8, _SAA7191_STDC_SECS@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	bic	w22, w22, w8
Lloh26:
	adrp	x8, _SAA7191_CTL3_AUFD@GOTPAGE
Lloh27:
	ldr	x8, [x8, _SAA7191_CTL3_AUFD@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	bic	w8, w23, w8
Lloh29:
	adrp	x9, _SAA7191_CTL3_FSEL@GOTPAGE
Lloh30:
	ldr	x9, [x9, _SAA7191_CTL3_FSEL@GOTPAGEOFF]
Lloh31:
	ldr	w9, [x9]
	orr	w23, w8, w9
Lloh32:
	adrp	x8, _SAA7191_CHCV_NTSC@GOTPAGE
Lloh33:
	ldr	x8, [x8, _SAA7191_CHCV_NTSC@GOTPAGEOFF]
LBB0_5:
	ldr	w24, [x8]
	ldr	w1, [x27]
	mov	x0, x21
	mov	x2, x23
	bl	_saa7191_write_reg
	cbnz	w0, LBB0_8
; %bb.6:
	ldr	w1, [x25]
	mov	x0, x21
	mov	x2, x22
	bl	_saa7191_write_reg
	cbnz	w0, LBB0_8
; %bb.7:
	ldr	w1, [x26]
	mov	x0, x21
	mov	x2, x24
	bl	_saa7191_write_reg
	cbz	w0, LBB0_13
LBB0_8:
Lloh34:
	adrp	x8, _EIO@GOTPAGE
Lloh35:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_10:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_11:
Lloh36:
	adrp	x8, _V4L2_STD_SECAM@GOTPAGE
Lloh37:
	ldr	x8, [x8, _V4L2_STD_SECAM@GOTPAGEOFF]
Lloh38:
	ldr	w8, [x8]
	tst	w8, w19
	b.eq	LBB0_14
; %bb.12:
Lloh39:
	adrp	x8, _SAA7191_STDC_SECS@GOTPAGE
Lloh40:
	ldr	x8, [x8, _SAA7191_STDC_SECS@GOTPAGEOFF]
Lloh41:
	ldr	w8, [x8]
	orr	w22, w8, w22
	b	LBB0_2
LBB0_13:
	str	w19, [x20]
	stp	x22, x24, [sp]
Lloh42:
	adrp	x0, l_.str@PAGE
Lloh43:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x23
	bl	_dprintk
Lloh44:
	adrp	x0, l_.str.1@PAGE
Lloh45:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x19
	bl	_dprintk
	mov	w0, #0
	b	LBB0_10
LBB0_14:
Lloh46:
	adrp	x8, _EINVAL@GOTPAGE
Lloh47:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpAdd	Lloh44, Lloh45
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpLdrGot	Lloh46, Lloh47
	.cfi_endproc
                                        ; -- End function
	.comm	_SAA7191_REG_STDC,4,2           ; @SAA7191_REG_STDC
	.comm	_SAA7191_REG_CTL3,4,2           ; @SAA7191_REG_CTL3
	.comm	_SAA7191_REG_CHCV,4,2           ; @SAA7191_REG_CHCV
	.comm	_V4L2_STD_PAL,4,2               ; @V4L2_STD_PAL
	.comm	_SAA7191_STDC_SECS,4,2          ; @SAA7191_STDC_SECS
	.comm	_SAA7191_CTL3_AUFD,4,2          ; @SAA7191_CTL3_AUFD
	.comm	_SAA7191_CTL3_FSEL,4,2          ; @SAA7191_CTL3_FSEL
	.comm	_SAA7191_CHCV_PAL,4,2           ; @SAA7191_CHCV_PAL
	.comm	_V4L2_STD_NTSC,4,2              ; @V4L2_STD_NTSC
	.comm	_SAA7191_CHCV_NTSC,4,2          ; @SAA7191_CHCV_NTSC
	.comm	_V4L2_STD_SECAM,4,2             ; @V4L2_STD_SECAM
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_EIO,4,2                        ; @EIO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ctl3: %02x stdc: %02x chcv: %02x\n"

l_.str.1:                               ; @.str.1
	.asciz	"norm: %llx\n"

	.no_dead_strip	_saa7191_s_std
.subsections_via_symbols
