	.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, %rbx
	callq	_video_drvdata
	movq	%rax, %r14
	movl	(%rbx), %eax
	movq	_RSF16_MINFREQ@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jl	LBB0_2
## %bb.1:
	movq	_RSF16_MAXFREQ@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jg	LBB0_2
## %bb.3:
	cltq
	imulq	$1374389535, %rax, %rax         ## imm = 0x51EB851F
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$38, %rax
	addl	%ecx, %eax
	imull	$200, %eax, %eax
	movl	%eax, (%r14)
	xorl	%ebx, %ebx
	cmpq	$0, 16(%r14)
	je	LBB0_6
## %bb.4:
	cmpl	$0, 8(%r14)
	jne	LBB0_6
## %bb.5:
	movq	%r14, %r15
	addq	$4, %r15
	movq	%r15, %rdi
	callq	_mutex_lock
	movq	%r14, %rdi
	callq	_fmr2_setfreq
	movq	%r15, %rdi
	callq	_mutex_unlock
	jmp	LBB0_6
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_6:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RSF16_MINFREQ,4,2              ## @RSF16_MINFREQ
	.comm	_RSF16_MAXFREQ,4,2              ## @RSF16_MAXFREQ
	.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	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	w8, [x20]
Lloh0:
	adrp	x9, _RSF16_MINFREQ@GOTPAGE
Lloh1:
	ldr	x9, [x9, _RSF16_MINFREQ@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
Lloh3:
	adrp	x10, _RSF16_MAXFREQ@GOTPAGE
Lloh4:
	ldr	x10, [x10, _RSF16_MAXFREQ@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	cmp	w8, w9
	ccmp	w8, w10, #0, ge
	b.le	LBB0_2
; %bb.1:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
LBB0_2:
	mov	x19, x0
	mov	w9, #34079
	movk	w9, #20971, lsl #16
	smull	x8, w8, w9
	lsr	x9, x8, #63
	asr	x8, x8, #38
	add	w8, w8, w9
	mov	w9, #200
	mul	w8, w8, w9
	str	w8, [x0]
	ldr	x8, [x0, #16]
	cbz	x8, LBB0_5
; %bb.3:
	ldr	w8, [x19, #8]
	cbnz	w8, LBB0_5
; %bb.4:
	add	x20, x19, #4
	mov	x0, x20
	bl	_mutex_lock
	mov	x0, x19
	bl	_fmr2_setfreq
	mov	x0, x20
	bl	_mutex_unlock
LBB0_5:
	mov	w0, #0
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_RSF16_MINFREQ,4,2              ; @RSF16_MINFREQ
	.comm	_RSF16_MAXFREQ,4,2              ; @RSF16_MAXFREQ
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_vidioc_s_frequency
.subsections_via_symbols
