	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tda9873_getmode
_tda9873_getmode:                       ## @tda9873_getmode
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	callq	_chip_read
	movq	_V4L2_TUNER_MODE_MONO@GOTPCREL(%rip), %rdx
	movq	_TDA9873_STEREO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	%eax, %ecx
	je	LBB0_2
## %bb.1:
	movq	_V4L2_TUNER_MODE_STEREO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
LBB0_2:
	orl	(%rdx), %ecx
	movq	_TDA9873_DUAL@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movq	_V4L2_TUNER_MODE_LANG1@GOTPCREL(%rip), %rsi
	movq	_V4L2_TUNER_MODE_LANG2@GOTPCREL(%rip), %rdi
	movl	(%rdi), %ebx
	orl	(%rsi), %ebx
	andl	%eax, %edx
	testl	%edx, %edx
	cmovel	%edx, %ebx
	orl	%ecx, %ebx
	movq	_debug@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	L_.str(%rip), %rcx
	movl	$1, %edi
	movq	%r14, %rdx
	movl	%eax, %r8d
	movl	%ebx, %r9d
	callq	_v4l2_dbg
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_TUNER_MODE_MONO,4,2       ## @V4L2_TUNER_MODE_MONO
	.comm	_TDA9873_STEREO,4,2             ## @TDA9873_STEREO
	.comm	_V4L2_TUNER_MODE_STEREO,4,2     ## @V4L2_TUNER_MODE_STEREO
	.comm	_TDA9873_DUAL,4,2               ## @TDA9873_DUAL
	.comm	_V4L2_TUNER_MODE_LANG1,4,2      ## @V4L2_TUNER_MODE_LANG1
	.comm	_V4L2_TUNER_MODE_LANG2,4,2      ## @V4L2_TUNER_MODE_LANG2
	.comm	_debug,4,2                      ## @debug
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"tda9873_getmode(): raw chip read: %d, return: %d\n"

	.no_dead_strip	_tda9873_getmode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tda9873_getmode
_tda9873_getmode:                       ; @tda9873_getmode
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	bl	_chip_read
	mov	x4, x0
Lloh0:
	adrp	x8, _V4L2_TUNER_MODE_MONO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _V4L2_TUNER_MODE_MONO@GOTPAGEOFF]
Lloh2:
	adrp	x9, _TDA9873_STEREO@GOTPAGE
Lloh3:
	ldr	x9, [x9, _TDA9873_STEREO@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	ldr	w9, [x9]
Lloh6:
	adrp	x10, _V4L2_TUNER_MODE_STEREO@GOTPAGE
Lloh7:
	ldr	x10, [x10, _V4L2_TUNER_MODE_STEREO@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	tst	w9, w0
	csel	w9, wzr, w10, eq
	orr	w8, w9, w8
Lloh9:
	adrp	x9, _TDA9873_DUAL@GOTPAGE
Lloh10:
	ldr	x9, [x9, _TDA9873_DUAL@GOTPAGEOFF]
Lloh11:
	adrp	x10, _V4L2_TUNER_MODE_LANG1@GOTPAGE
Lloh12:
	ldr	x10, [x10, _V4L2_TUNER_MODE_LANG1@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
Lloh14:
	ldr	w10, [x10]
Lloh15:
	adrp	x11, _V4L2_TUNER_MODE_LANG2@GOTPAGE
Lloh16:
	ldr	x11, [x11, _V4L2_TUNER_MODE_LANG2@GOTPAGEOFF]
Lloh17:
	ldr	w11, [x11]
	orr	w10, w11, w10
	tst	w9, w0
	csel	w9, wzr, w10, eq
	orr	w20, w8, w9
Lloh18:
	adrp	x8, _debug@GOTPAGE
Lloh19:
	ldr	x8, [x8, _debug@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
Lloh21:
	adrp	x3, l_.str@PAGE
Lloh22:
	add	x3, x3, l_.str@PAGEOFF
	mov	w0, #1
	mov	x2, x19
	mov	x5, x20
	bl	_v4l2_dbg
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh13
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_TUNER_MODE_MONO,4,2       ; @V4L2_TUNER_MODE_MONO
	.comm	_TDA9873_STEREO,4,2             ; @TDA9873_STEREO
	.comm	_V4L2_TUNER_MODE_STEREO,4,2     ; @V4L2_TUNER_MODE_STEREO
	.comm	_TDA9873_DUAL,4,2               ; @TDA9873_DUAL
	.comm	_V4L2_TUNER_MODE_LANG1,4,2      ; @V4L2_TUNER_MODE_LANG1
	.comm	_V4L2_TUNER_MODE_LANG2,4,2      ; @V4L2_TUNER_MODE_LANG2
	.comm	_debug,4,2                      ; @debug
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"tda9873_getmode(): raw chip read: %d, return: %d\n"

	.no_dead_strip	_tda9873_getmode
.subsections_via_symbols
