	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vidioc_s_frequency
_vidioc_s_frequency:                    ## @vidioc_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdx, %rbx
	callq	_video_drvdata
	cmpq	$0, (%rbx)
	jne	LBB0_1
## %bb.2:
	movq	%rax, %r14
	movl	8(%rbx), %eax
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:
	movq	%r14, %rdi
	callq	_tea5764_power_down
	movl	8(%rbx), %eax
LBB0_4:
	movq	_FREQ_MIN@GOTPCREL(%rip), %rdx
	movq	_FREQ_MUL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	(%rdx), %edx
	imull	%ecx, %edx
	cmpl	%edx, %eax
	jl	LBB0_1
## %bb.5:
	movq	_FREQ_MAX@GOTPCREL(%rip), %rdx
	imull	(%rdx), %ecx
	cmpl	%ecx, %eax
	jle	LBB0_6
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_7:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_6:
	movq	%r14, %rdi
	callq	_tea5764_power_up
	imull	$125, 8(%rbx), %eax
	movl	%eax, %esi
	shrl	$31, %esi
	addl	%eax, %esi
	sarl	%esi
	movq	%r14, %rdi
	callq	_tea5764_tune
	xorl	%eax, %eax
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_FREQ_MIN,4,2                   ## @FREQ_MIN
	.comm	_FREQ_MUL,4,2                   ## @FREQ_MUL
	.comm	_FREQ_MAX,4,2                   ## @FREQ_MAX
	.no_dead_strip	_vidioc_s_frequency
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vidioc_s_frequency
_vidioc_s_frequency:                    ; @vidioc_s_frequency
	.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_drvdata
	ldr	x8, [x20]
	cbnz	x8, LBB0_5
; %bb.1:
	mov	x19, x0
	ldr	w8, [x20, #8]
	cbnz	w8, LBB0_3
; %bb.2:
	mov	x0, x19
	bl	_tea5764_power_down
	ldr	w8, [x20, #8]
LBB0_3:
Lloh0:
	adrp	x9, _FREQ_MIN@GOTPAGE
Lloh1:
	ldr	x9, [x9, _FREQ_MIN@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x9]
Lloh3:
	adrp	x9, _FREQ_MUL@GOTPAGE
Lloh4:
	ldr	x9, [x9, _FREQ_MUL@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	mul	w10, w9, w10
	cmp	w8, w10
	b.lt	LBB0_5
; %bb.4:
Lloh6:
	adrp	x10, _FREQ_MAX@GOTPAGE
Lloh7:
	ldr	x10, [x10, _FREQ_MAX@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	mul	w9, w10, w9
	cmp	w8, w9
	b.le	LBB0_7
LBB0_5:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_7:
	mov	x0, x19
	bl	_tea5764_power_up
	ldr	w8, [x20, #8]
	mov	w9, #125
	mul	w8, w8, w9
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w1, w8, #1
	mov	x0, x19
	bl	_tea5764_tune
	mov	w0, #0
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_FREQ_MIN,4,2                   ; @FREQ_MIN
	.comm	_FREQ_MUL,4,2                   ; @FREQ_MUL
	.comm	_FREQ_MAX,4,2                   ; @FREQ_MAX
	.no_dead_strip	_vidioc_s_frequency
.subsections_via_symbols
