	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function saa7191_autodetect_norm
_saa7191_autodetect_norm:               ## @saa7191_autodetect_norm
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	leaq	L_.str(%rip), %rdi
	callq	_dprintk
	leaq	L_.str.1(%rip), %rdi
	callq	_dprintk
	leaq	-12(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_saa7191_read_status
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	_EIO@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_3:
	leaq	L_.str.2(%rip), %rdi
	callq	_dprintk
	movq	_SAA7191_STATUS_HLCK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, -12(%rbp)
	je	LBB0_5
## %bb.4:
	leaq	L_.str.3(%rip), %rdi
	callq	_dprintk
	movq	_EBUSY@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_5:
	leaq	L_.str.4(%rip), %rdi
	callq	_dprintk
	movq	_SAA7191_STATUS_FIDT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, -12(%rbp)
	je	LBB0_7
## %bb.6:
	leaq	L_.str.5(%rip), %rdi
	callq	_dprintk
	movq	_V4L2_STD_NTSC@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_7:
	leaq	L_.str.6(%rip), %rdi
	callq	_dprintk
	movq	_V4L2_STD_PAL@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_saa7191_s_std
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SAA7191 signal auto-detection...\n"

L_.str.1:                               ## @.str.1
	.asciz	"Reading status...\n"

	.comm	_EIO,4,2                        ## @EIO
L_.str.2:                               ## @.str.2
	.asciz	"Checking for signal...\n"

	.comm	_SAA7191_STATUS_HLCK,4,2        ## @SAA7191_STATUS_HLCK
L_.str.3:                               ## @.str.3
	.asciz	"No signal\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
L_.str.4:                               ## @.str.4
	.asciz	"Signal found\n"

	.comm	_SAA7191_STATUS_FIDT,4,2        ## @SAA7191_STATUS_FIDT
L_.str.5:                               ## @.str.5
	.asciz	"NTSC\n"

	.comm	_V4L2_STD_NTSC,4,2              ## @V4L2_STD_NTSC
L_.str.6:                               ## @.str.6
	.asciz	"PAL\n"

	.comm	_V4L2_STD_PAL,4,2               ## @V4L2_STD_PAL
	.no_dead_strip	_saa7191_autodetect_norm
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function saa7191_autodetect_norm
_saa7191_autodetect_norm:               ; @saa7191_autodetect_norm
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_dprintk
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_dprintk
	add	x1, sp, #12
	mov	x0, x19
	bl	_saa7191_read_status
	cbz	x0, LBB0_2
; %bb.1:
Lloh4:
	adrp	x8, _EIO@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:
Lloh6:
	adrp	x0, l_.str.2@PAGE
Lloh7:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_dprintk
	ldr	w8, [sp, #12]
Lloh8:
	adrp	x9, _SAA7191_STATUS_HLCK@GOTPAGE
Lloh9:
	ldr	x9, [x9, _SAA7191_STATUS_HLCK@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.3:
Lloh11:
	adrp	x0, l_.str.3@PAGE
Lloh12:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_dprintk
Lloh13:
	adrp	x8, _EBUSY@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_6:
Lloh15:
	adrp	x0, l_.str.4@PAGE
Lloh16:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_dprintk
	ldr	w8, [sp, #12]
Lloh17:
	adrp	x9, _SAA7191_STATUS_FIDT@GOTPAGE
Lloh18:
	ldr	x9, [x9, _SAA7191_STATUS_FIDT@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.7:
Lloh20:
	adrp	x0, l_.str.5@PAGE
Lloh21:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_dprintk
Lloh22:
	adrp	x8, _V4L2_STD_NTSC@GOTPAGE
Lloh23:
	ldr	x8, [x8, _V4L2_STD_NTSC@GOTPAGEOFF]
	b	LBB0_9
LBB0_8:
Lloh24:
	adrp	x0, l_.str.6@PAGE
Lloh25:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_dprintk
Lloh26:
	adrp	x8, _V4L2_STD_PAL@GOTPAGE
Lloh27:
	ldr	x8, [x8, _V4L2_STD_PAL@GOTPAGEOFF]
LBB0_9:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_saa7191_s_std
	b	LBB0_5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpAdd	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SAA7191 signal auto-detection...\n"

l_.str.1:                               ; @.str.1
	.asciz	"Reading status...\n"

	.comm	_EIO,4,2                        ; @EIO
l_.str.2:                               ; @.str.2
	.asciz	"Checking for signal...\n"

	.comm	_SAA7191_STATUS_HLCK,4,2        ; @SAA7191_STATUS_HLCK
l_.str.3:                               ; @.str.3
	.asciz	"No signal\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
l_.str.4:                               ; @.str.4
	.asciz	"Signal found\n"

	.comm	_SAA7191_STATUS_FIDT,4,2        ; @SAA7191_STATUS_FIDT
l_.str.5:                               ; @.str.5
	.asciz	"NTSC\n"

	.comm	_V4L2_STD_NTSC,4,2              ; @V4L2_STD_NTSC
l_.str.6:                               ; @.str.6
	.asciz	"PAL\n"

	.comm	_V4L2_STD_PAL,4,2               ; @V4L2_STD_PAL
	.no_dead_strip	_saa7191_autodetect_norm
.subsections_via_symbols
