	.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	%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
	movl	(%r15), %esi
	movq	_FREQ_LO@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_FREQ_HI@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%edx, %esi
	jl	LBB0_2
## %bb.1:
	cmpl	%eax, %esi
	jg	LBB0_2
## %bb.3:
	movq	%r14, %rbx
	addq	$4, %rbx
	movq	%rbx, %rdi
	callq	_mutex_lock
	movl	(%r15), %esi
	movl	%esi, (%r14)
	movq	%r14, %rdi
	callq	_set_freq
	movl	$125, %edi
	callq	_msleep
	movq	%rbx, %rdi
	callq	_mutex_unlock
	xorl	%eax, %eax
	jmp	LBB0_4
LBB0_2:
	movslq	%esi, %rcx
	imulq	$274877907, %rcx, %rcx          ## imm = 0x10624DD3
	movq	%rcx, %rdi
	shrq	$63, %rdi
	sarq	$42, %rcx
	addl	%edi, %ecx
	imull	$16000, %ecx, %edi              ## imm = 0x3E80
	subl	%edi, %esi
	movswl	%si, %esi
	imull	$26215, %esi, %r8d              ## imm = 0x6667
	movl	%r8d, %esi
	shrl	$31, %esi
	sarl	$22, %r8d
	addl	%esi, %r8d
	movslq	%edx, %rdx
	imulq	$274877907, %rdx, %r9           ## imm = 0x10624DD3
	movq	%r9, %rdx
	shrq	$63, %rdx
	sarq	$42, %r9
	addl	%edx, %r9d
	cltq
	imulq	$274877907, %rax, %rax          ## imm = 0x10624DD3
	movq	%rax, %rdx
	shrq	$63, %rdx
	sarq	$42, %rax
	addl	%edx, %eax
	movl	%eax, (%rsp)
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	movl	$1, %esi
                                        ## kill: def $ecx killed $ecx killed $rcx
                                        ## kill: def $r9d killed $r9d killed $r9
	callq	_dprintk
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FREQ_LO,4,2                    ## @FREQ_LO
	.comm	_FREQ_HI,4,2                    ## @FREQ_HI
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"radio freq (%d.%02d MHz) out of range (%d-%d)\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.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	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
	bl	_video_drvdata
	mov	x19, x0
	ldr	w10, [x20]
Lloh0:
	adrp	x8, _FREQ_LO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FREQ_LO@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x8]
Lloh3:
	adrp	x8, _FREQ_HI@GOTPAGE
Lloh4:
	ldr	x8, [x8, _FREQ_HI@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w10, w9
	ccmp	w10, w8, #0, ge
	b.le	LBB0_2
; %bb.1:
	mov	w11, #19923
	movk	w11, #4194, lsl #16
	smull	x12, w10, w11
	lsr	x13, x12, #63
	asr	x12, x12, #42
	add	w3, w12, w13
	mov	w12, #16000
	msub	w10, w3, w12, w10
	sxth	w10, w10
	mov	w12, #26215
	mul	w10, w10, w12
	asr	w12, w10, #22
	add	w4, w12, w10, lsr #31
	smull	x9, w9, w11
	lsr	x10, x9, #63
	asr	x9, x9, #42
	add	w5, w9, w10
	smull	x8, w8, w11
	lsr	x9, x8, #63
	asr	x8, x8, #42
	add	w6, w8, w9
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	mov	w1, #1
	bl	_dprintk
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_3
LBB0_2:
	add	x21, x19, #4
	mov	x0, x21
	bl	_mutex_lock
	ldr	w1, [x20]
	str	w1, [x19]
	mov	x0, x19
	bl	_set_freq
	mov	w0, #125
	bl	_msleep
	mov	x0, x21
	bl	_mutex_unlock
	mov	w0, #0
LBB0_3:
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_FREQ_LO,4,2                    ; @FREQ_LO
	.comm	_FREQ_HI,4,2                    ; @FREQ_HI
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"radio freq (%d.%02d MHz) out of range (%d-%d)\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_vidioc_s_frequency
.subsections_via_symbols
