	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_snd_tea575x_g_tuner            ## -- Begin function snd_tea575x_g_tuner
	.p2align	4, 0x90
_snd_tea575x_g_tuner:                   ## @snd_tea575x_g_tuner
	.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	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -48(%rbp)
	cmpq	$0, (%rsi)
	jle	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_9
LBB0_2:
	movq	%rsi, %rbx
	movq	%rdi, %r14
	callq	_snd_tea575x_read
	leaq	-48(%rbp), %rsi
	movq	%r14, %rdi
	callq	_snd_tea575x_enum_freq_bands
	xorl	%r15d, %r15d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$40, %edx
	callq	_memset
	movl	36(%rbx), %edi
	cmpq	$0, 24(%r14)
	leaq	L_.str.1(%rip), %rax
	leaq	L_.str(%rip), %rsi
	cmoveq	%rax, %rsi
	movl	$4, %edx
	callq	_strscpy
	movq	_V4L2_TUNER_RADIO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%rbx)
	movl	-40(%rbp), %eax
	movl	%eax, 28(%rbx)
	movq	_bands@GOTPCREL(%rip), %rax
	movq	_BAND_AM@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	shlq	$2, %rcx
	addq	(%rax), %rcx
	cmpq	$0, 24(%r14)
	leaq	-44(%rbp), %rax
	cmovneq	%rcx, %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rbx)
	movl	-48(%rbp), %eax
	movl	%eax, 20(%rbx)
	cmpq	$0, 16(%r14)
	jne	LBB0_3
## %bb.4:
	movq	_V4L2_TUNER_SUB_MONO@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_3:
	movq	_V4L2_TUNER_SUB_STEREO@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	movq	_TEA575X_BIT_MONO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	(%r14), %eax
	jne	LBB0_6
## %bb.7:
	movq	_V4L2_TUNER_MODE_STEREO@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_6:
	movq	_V4L2_TUNER_MODE_MONO@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %eax
	movl	%eax, 12(%rbx)
	cmpq	$0, 8(%r14)
	movl	$65535, %eax                    ## imm = 0xFFFF
	cmovel	%r15d, %eax
	movl	%eax, 8(%rbx)
LBB0_9:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"FM/AM"

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

	.comm	_V4L2_TUNER_RADIO,4,2           ## @V4L2_TUNER_RADIO
	.comm	_bands,8,3                      ## @bands
	.comm	_BAND_AM,8,3                    ## @BAND_AM
	.comm	_V4L2_TUNER_SUB_STEREO,4,2      ## @V4L2_TUNER_SUB_STEREO
	.comm	_V4L2_TUNER_SUB_MONO,4,2        ## @V4L2_TUNER_SUB_MONO
	.comm	_TEA575X_BIT_MONO,4,2           ## @TEA575X_BIT_MONO
	.comm	_V4L2_TUNER_MODE_MONO,4,2       ## @V4L2_TUNER_MODE_MONO
	.comm	_V4L2_TUNER_MODE_STEREO,4,2     ## @V4L2_TUNER_MODE_STEREO
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_snd_tea575x_g_tuner            ; -- Begin function snd_tea575x_g_tuner
	.p2align	2
_snd_tea575x_g_tuner:                   ; @snd_tea575x_g_tuner
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	stp	xzr, xzr, [sp]
	ldr	x8, [x1]
	cmp	x8, #1
	b.lt	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_3
LBB0_2:
	mov	x19, x1
	mov	x20, x0
	bl	_snd_tea575x_read
	mov	x21, sp
	mov	x1, sp
	mov	x0, x20
	bl	_snd_tea575x_enum_freq_bands
	mov	x0, x19
	mov	w1, #0
	mov	w2, #40
	bl	_memset
	ldr	w0, [x19, #36]
	ldr	x8, [x20, #24]
Lloh3:
	adrp	x9, l_.str@PAGE
Lloh4:
	add	x9, x9, l_.str@PAGEOFF
Lloh5:
	adrp	x10, l_.str.1@PAGE
Lloh6:
	add	x10, x10, l_.str.1@PAGEOFF
	cmp	x8, #0
	csel	x1, x10, x9, eq
	mov	w2, #4
	bl	_strscpy
	mov	w0, #0
Lloh7:
	adrp	x8, _V4L2_TUNER_RADIO@GOTPAGE
Lloh8:
	ldr	x8, [x8, _V4L2_TUNER_RADIO@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	ldr	w9, [sp, #8]
	ldr	w10, [sp]
	stp	w9, w8, [x19, #28]
Lloh10:
	adrp	x8, _bands@GOTPAGE
Lloh11:
	ldr	x8, [x8, _bands@GOTPAGEOFF]
Lloh12:
	adrp	x9, _BAND_AM@GOTPAGE
Lloh13:
	ldr	x9, [x9, _BAND_AM@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
Lloh15:
	ldr	x9, [x9]
	add	x8, x8, x9, lsl #2
	ldr	x9, [x20, #24]
	orr	x11, x21, #0x4
	cmp	x9, #0
	csel	x8, x11, x8, eq
	ldr	w8, [x8]
	stp	w10, w8, [x19, #20]
Lloh16:
	adrp	x8, _V4L2_TUNER_SUB_STEREO@GOTPAGE
Lloh17:
	ldr	x8, [x8, _V4L2_TUNER_SUB_STEREO@GOTPAGEOFF]
	ldr	x9, [x20, #16]
Lloh18:
	adrp	x10, _V4L2_TUNER_SUB_MONO@GOTPAGE
Lloh19:
	ldr	x10, [x10, _V4L2_TUNER_SUB_MONO@GOTPAGEOFF]
	cmp	x9, #0
	csel	x8, x10, x8, eq
	ldr	w8, [x8]
	str	w8, [x19, #16]
	ldr	w8, [x20]
Lloh20:
	adrp	x9, _TEA575X_BIT_MONO@GOTPAGE
Lloh21:
	ldr	x9, [x9, _TEA575X_BIT_MONO@GOTPAGEOFF]
Lloh22:
	adrp	x10, _V4L2_TUNER_MODE_MONO@GOTPAGE
Lloh23:
	ldr	x10, [x10, _V4L2_TUNER_MODE_MONO@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	tst	w9, w8
Lloh25:
	adrp	x8, _V4L2_TUNER_MODE_STEREO@GOTPAGE
Lloh26:
	ldr	x8, [x8, _V4L2_TUNER_MODE_STEREO@GOTPAGEOFF]
	csel	x8, x8, x10, eq
	ldr	w8, [x8]
	str	w8, [x19, #12]
	ldr	x8, [x20, #8]
	cmp	x8, #0
	mov	w8, #65535
	csel	w8, wzr, w8, eq
	str	w8, [x19, #8]
LBB0_3:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh24
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh14
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"FM/AM"

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

	.comm	_V4L2_TUNER_RADIO,4,2           ; @V4L2_TUNER_RADIO
	.comm	_bands,8,3                      ; @bands
	.comm	_BAND_AM,8,3                    ; @BAND_AM
	.comm	_V4L2_TUNER_SUB_STEREO,4,2      ; @V4L2_TUNER_SUB_STEREO
	.comm	_V4L2_TUNER_SUB_MONO,4,2        ; @V4L2_TUNER_SUB_MONO
	.comm	_TEA575X_BIT_MONO,4,2           ; @TEA575X_BIT_MONO
	.comm	_V4L2_TUNER_MODE_MONO,4,2       ; @V4L2_TUNER_MODE_MONO
	.comm	_V4L2_TUNER_MODE_STEREO,4,2     ; @V4L2_TUNER_MODE_STEREO
.subsections_via_symbols
