	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function aspeed_video_set_parm
_aspeed_video_set_parm:                 ## @aspeed_video_set_parm
	.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
	movq	_V4L2_CAP_TIMEPERFRAME@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%rbx)
	movl	$3, (%rbx)
	movl	4(%rbx), %esi
	testl	%esi, %esi
	je	LBB0_1
## %bb.2:
	movl	8(%rbx), %ecx
	movl	%ecx, %eax
	xorl	%edx, %edx
	divl	%esi
	movq	_MAX_FRAME_RATE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	cmpl	%ecx, %esi
	ja	LBB0_4
## %bb.3:
	cmpl	%edx, %eax
	ja	LBB0_4
## %bb.5:
	cmpl	%eax, (%r14)
	je	LBB0_7
LBB0_6:
	movl	%eax, (%r14)
	movq	_VE_CTRL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r15d
	movq	_VE_CTRL_FRC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_FIELD_PREP
	movq	%r14, %rdi
	movl	%r15d, %esi
	movl	%ebx, %edx
	movl	%eax, %ecx
	callq	_aspeed_video_update
LBB0_7:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	_MAX_FRAME_RATE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
LBB0_4:
	movl	%edx, 8(%rbx)
	movl	$1, 4(%rbx)
	xorl	%eax, %eax
	cmpl	%eax, (%r14)
	jne	LBB0_6
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_CAP_TIMEPERFRAME,4,2      ## @V4L2_CAP_TIMEPERFRAME
	.comm	_MAX_FRAME_RATE,4,2             ## @MAX_FRAME_RATE
	.comm	_VE_CTRL,4,2                    ## @VE_CTRL
	.comm	_VE_CTRL_FRC,4,2                ## @VE_CTRL_FRC
	.no_dead_strip	_aspeed_video_set_parm
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function aspeed_video_set_parm
_aspeed_video_set_parm:                 ; @aspeed_video_set_parm
	.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
Lloh0:
	adrp	x8, _V4L2_CAP_TIMEPERFRAME@GOTPAGE
Lloh1:
	ldr	x8, [x8, _V4L2_CAP_TIMEPERFRAME@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x20, #12]
	mov	w8, #3
	str	w8, [x20]
	ldr	w9, [x20, #4]
	cbz	w9, LBB0_3
; %bb.1:
	ldr	w10, [x20, #8]
Lloh3:
	adrp	x8, _MAX_FRAME_RATE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAX_FRAME_RATE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w9, w10
	b.hi	LBB0_4
; %bb.2:
	udiv	w1, w10, w9
	cmp	w1, w8
	b.ls	LBB0_5
	b	LBB0_4
LBB0_3:
Lloh6:
	adrp	x8, _MAX_FRAME_RATE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MAX_FRAME_RATE@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
LBB0_4:
	mov	w1, #0
	mov	w9, #1
	stp	w9, w8, [x20, #4]
LBB0_5:
	ldr	w8, [x19]
	cmp	w8, w1
	b.eq	LBB0_7
; %bb.6:
	str	w1, [x19]
Lloh9:
	adrp	x8, _VE_CTRL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _VE_CTRL@GOTPAGEOFF]
Lloh11:
	ldr	w20, [x8]
Lloh12:
	adrp	x8, _VE_CTRL_FRC@GOTPAGE
Lloh13:
	ldr	x8, [x8, _VE_CTRL_FRC@GOTPAGEOFF]
Lloh14:
	ldr	w21, [x8]
	mov	x0, x21
	bl	_FIELD_PREP
	mov	x3, x0
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_aspeed_video_update
LBB0_7:
	mov	w0, #0
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_CAP_TIMEPERFRAME,4,2      ; @V4L2_CAP_TIMEPERFRAME
	.comm	_MAX_FRAME_RATE,4,2             ; @MAX_FRAME_RATE
	.comm	_VE_CTRL,4,2                    ; @VE_CTRL
	.comm	_VE_CTRL_FRC,4,2                ; @VE_CTRL_FRC
	.no_dead_strip	_aspeed_video_set_parm
.subsections_via_symbols
