	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function saa7134_s_frequency
_saa7134_s_frequency:                   ## @saa7134_s_frequency
	.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, %r14
	movq	%rsi, %rbx
	movq	8(%rsi), %r15
	leaq	8(%r15), %rdi
	movl	4(%rsi), %esi
	callq	_v4l2_prio_check
	testl	%eax, %eax
	jne	LBB0_8
## %bb.1:
	cmpq	$0, (%r14)
	je	LBB0_3
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_8
LBB0_3:
	movl	(%rbx), %eax
	cmpl	$1, %eax
	je	LBB0_9
## %bb.4:
	testl	%eax, %eax
	jne	LBB0_7
## %bb.5:
	movq	_V4L2_TUNER_ANALOG_TV@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_9:
	movq	_V4L2_TUNER_RADIO@GOTPCREL(%rip), %rax
LBB0_6:
	movq	(%rax), %rax
	cmpq	8(%r14), %rax
	jne	LBB0_2
LBB0_7:
	movq	%r15, %rdi
	callq	_mutex_lock
	movl	16(%r14), %eax
	movl	%eax, 4(%r15)
	movq	_tuner@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_s_frequency@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movq	%r14, %rcx
	callq	_saa_call_all
	movq	%r15, %rdi
	callq	_saa7134_tvaudio_do_scan
	movq	%r15, %rdi
	callq	_mutex_unlock
	xorl	%eax, %eax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_V4L2_TUNER_ANALOG_TV,8,3       ## @V4L2_TUNER_ANALOG_TV
	.comm	_V4L2_TUNER_RADIO,8,3           ## @V4L2_TUNER_RADIO
	.comm	_tuner,4,2                      ## @tuner
	.comm	_s_frequency,4,2                ## @s_frequency
	.no_dead_strip	_saa7134_s_frequency
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function saa7134_s_frequency
_saa7134_s_frequency:                   ; @saa7134_s_frequency
	.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	x20, x2
	mov	x21, x1
	ldr	x19, [x1, #8]
	add	x0, x19, #8
	ldr	w1, [x1, #4]
	bl	_v4l2_prio_check
	cbnz	w0, LBB0_9
; %bb.1:
	ldr	x8, [x20]
	cbz	x8, LBB0_3
LBB0_2:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_3:
	ldr	w8, [x21]
	cmp	w8, #1
	b.eq	LBB0_6
; %bb.4:
	cbnz	w8, LBB0_8
; %bb.5:
Lloh3:
	adrp	x8, _V4L2_TUNER_ANALOG_TV@GOTPAGE
Lloh4:
	ldr	x8, [x8, _V4L2_TUNER_ANALOG_TV@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh5:
	adrp	x8, _V4L2_TUNER_RADIO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _V4L2_TUNER_RADIO@GOTPAGEOFF]
LBB0_7:
	ldr	x8, [x8]
	ldr	x9, [x20, #8]
	cmp	x8, x9
	b.ne	LBB0_2
LBB0_8:
	mov	x0, x19
	bl	_mutex_lock
	ldr	w8, [x20, #16]
	str	w8, [x19, #4]
Lloh7:
	adrp	x8, _tuner@GOTPAGE
Lloh8:
	ldr	x8, [x8, _tuner@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
Lloh10:
	adrp	x8, _s_frequency@GOTPAGE
Lloh11:
	ldr	x8, [x8, _s_frequency@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x3, x20
	bl	_saa_call_all
	mov	x0, x19
	bl	_saa7134_tvaudio_do_scan
	mov	x0, x19
	bl	_mutex_unlock
	mov	w0, #0
LBB0_9:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_V4L2_TUNER_ANALOG_TV,8,3       ; @V4L2_TUNER_ANALOG_TV
	.comm	_V4L2_TUNER_RADIO,8,3           ; @V4L2_TUNER_RADIO
	.comm	_tuner,4,2                      ; @tuner
	.comm	_s_frequency,4,2                ; @s_frequency
	.no_dead_strip	_saa7134_s_frequency
.subsections_via_symbols
