	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vidioc_s_tuner
_vidioc_s_tuner:                        ## @vidioc_s_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdx, %rbx
	callq	_video_devdata
	movl	%eax, %edi
	callq	_video_get_drvdata
	cmpq	$0, 8(%rax)
	je	LBB0_2
## %bb.1:
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_2:
	cmpq	$0, (%rbx)
	jle	LBB0_3
LBB0_9:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_10:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_11:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_3:
	movq	%rax, %r14
	movl	8(%rbx), %eax
	cmpl	$128, %eax
	je	LBB0_7
## %bb.4:
	cmpl	$129, %eax
	jne	LBB0_9
## %bb.5:
	movq	_WANT_MONO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_amradio_set_stereo
	xorl	%ebx, %ebx
	testl	%eax, %eax
	jns	LBB0_11
## %bb.6:
	movq	(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_amradio_dev_warn
	jmp	LBB0_11
LBB0_7:
	movq	_WANT_STEREO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_amradio_set_stereo
	xorl	%ebx, %ebx
	testl	%eax, %eax
	jns	LBB0_11
## %bb.8:
	movq	(%r14), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_amradio_dev_warn
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_EIO,4,2                        ## @EIO
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_WANT_MONO,4,2                  ## @WANT_MONO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"set mono failed\n"

	.comm	_WANT_STEREO,4,2                ## @WANT_STEREO
L_.str.1:                               ## @.str.1
	.asciz	"set stereo failed\n"

	.no_dead_strip	_vidioc_s_tuner
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vidioc_s_tuner
_vidioc_s_tuner:                        ; @vidioc_s_tuner
	.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	x20, x2
	bl	_video_devdata
	bl	_video_get_drvdata
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EIO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:
	ldr	x8, [x20]
	cmp	x8, #1
	b.lt	LBB0_6
LBB0_3:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_6:
	mov	x19, x0
	ldr	w8, [x20, #8]
	cmp	w8, #128
	b.eq	LBB0_10
; %bb.7:
	cmp	w8, #129
	b.ne	LBB0_3
; %bb.8:
Lloh4:
	adrp	x8, _WANT_MONO@GOTPAGE
Lloh5:
	ldr	x8, [x8, _WANT_MONO@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_amradio_set_stereo
	tbz	w0, #31, LBB0_11
; %bb.9:
	ldr	x0, [x19]
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_13
LBB0_10:
Lloh9:
	adrp	x8, _WANT_STEREO@GOTPAGE
Lloh10:
	ldr	x8, [x8, _WANT_STEREO@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_amradio_set_stereo
	tbnz	w0, #31, LBB0_12
LBB0_11:
	mov	w0, #0
	b	LBB0_5
LBB0_12:
	ldr	x0, [x19]
Lloh12:
	adrp	x1, l_.str.1@PAGE
Lloh13:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_13:
	bl	_amradio_dev_warn
	mov	w0, #0
	b	LBB0_5
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_EIO,4,2                        ; @EIO
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_WANT_MONO,4,2                  ; @WANT_MONO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"set mono failed\n"

	.comm	_WANT_STEREO,4,2                ; @WANT_STEREO
l_.str.1:                               ; @.str.1
	.asciz	"set stereo failed\n"

	.no_dead_strip	_vidioc_s_tuner
.subsections_via_symbols
