	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function si470x_vidioc_s_tuner
_si470x_vidioc_s_tuner:                 ## @si470x_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	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	callq	_video_drvdata
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_si470x_disconnect_check
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_1
## %bb.7:
	testl	%ebx, %ebx
	jns	LBB0_9
LBB0_8:
	movq	(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	callq	_dev_warn
	jmp	LBB0_9
LBB0_1:
	xorl	%ebx, %ebx
	cmpq	$0, (%r15)
	jne	LBB0_9
## %bb.2:
	movl	8(%r15), %eax
	cmpl	$128, %eax
	je	LBB0_5
## %bb.3:
	cmpl	$129, %eax
	jne	LBB0_9
## %bb.4:
	movq	_POWERCFG_MONO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	8(%r14), %rcx
	movq	_POWERCFG@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rsi
	orl	%eax, (%rcx,%rsi,4)
	jmp	LBB0_6
LBB0_5:
	movq	_POWERCFG_MONO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	movq	8(%r14), %rcx
	movq	_POWERCFG@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rsi
	andl	%eax, (%rcx,%rsi,4)
LBB0_6:
	movq	%r14, %rdi
	callq	_si470x_set_register
	movl	%eax, %ebx
	testl	%ebx, %ebx
	js	LBB0_8
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_POWERCFG_MONO,4,2              ## @POWERCFG_MONO
	.comm	_POWERCFG,8,3                   ## @POWERCFG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"set tuner failed with %d\n"

	.no_dead_strip	_si470x_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 si470x_vidioc_s_tuner
_si470x_vidioc_s_tuner:                 ; @si470x_vidioc_s_tuner
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x21, x2
	bl	_video_drvdata
	mov	x19, x0
	bl	_si470x_disconnect_check
	mov	x20, x0
	cbz	w0, LBB0_3
; %bb.1:
	tbz	w20, #31, LBB0_5
LBB0_2:
	ldr	x0, [x19]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_dev_warn
	b	LBB0_5
LBB0_3:
	ldr	x8, [x21]
	cbz	x8, LBB0_6
LBB0_4:
	mov	w20, #0
LBB0_5:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_6:
	ldr	w8, [x21, #8]
	cmp	w8, #128
	b.eq	LBB0_9
; %bb.7:
	cmp	w8, #129
	b.ne	LBB0_4
; %bb.8:
Lloh2:
	adrp	x8, _POWERCFG_MONO@GOTPAGE
Lloh3:
	ldr	x8, [x8, _POWERCFG_MONO@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	ldr	x9, [x19, #8]
Lloh5:
	adrp	x10, _POWERCFG@GOTPAGE
Lloh6:
	ldr	x10, [x10, _POWERCFG@GOTPAGEOFF]
Lloh7:
	ldr	x1, [x10]
	lsl	x10, x1, #2
	ldr	w11, [x9, x10]
	orr	w8, w11, w8
	b	LBB0_10
LBB0_9:
Lloh8:
	adrp	x8, _POWERCFG_MONO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _POWERCFG_MONO@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	ldr	x9, [x19, #8]
Lloh11:
	adrp	x10, _POWERCFG@GOTPAGE
Lloh12:
	ldr	x10, [x10, _POWERCFG@GOTPAGEOFF]
Lloh13:
	ldr	x1, [x10]
	lsl	x10, x1, #2
	ldr	w11, [x9, x10]
	bic	w8, w11, w8
LBB0_10:
	str	w8, [x9, x10]
	mov	x0, x19
	bl	_si470x_set_register
	mov	x20, x0
	tbz	w20, #31, LBB0_5
	b	LBB0_2
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_POWERCFG_MONO,4,2              ; @POWERCFG_MONO
	.comm	_POWERCFG,8,3                   ; @POWERCFG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"set tuner failed with %d\n"

	.no_dead_strip	_si470x_vidioc_s_tuner
.subsections_via_symbols
