	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ov772x_set_frame_rate
_ov772x_set_frame_rate:                 ## @ov772x_set_frame_rate
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movq	%rdx, %rbx
	movl	%esi, %r15d
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	movl	4(%rdi), %edi
	callq	_clk_get_rate
	movq	_OFMT_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	(%rbx), %ecx
	cmpl	$130, %ecx
	setne	%cl
	movl	(%r14), %r12d
	shll	%cl, %r12d
	movq	%rax, %rbx
	movq	_ov772x_pll@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	imull	%r15d, %r12d
	xorl	%r13d, %r13d
	movl	$-1, -52(%rbp)                  ## 4-byte Folded Spill
	movl	$0, -48(%rbp)                   ## 4-byte Folded Spill
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	%r14d, %edi
	callq	_CLKRC_DIV
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_ov772x_pll@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	movl	4(%rdi,%r13,8), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	%ebx, -52(%rbp)                 ## 4-byte Spill
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movl	%r15d, %r12d
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%r13
	callq	_ARRAY_SIZE
	movl	%eax, %eax
	cmpq	%rax, %r13
	jae	LBB0_9
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rdi
	movl	(%rdi,%r13,8), %r15d
	imulq	%rbx, %r15
	cmpl	%r15d, %r12d
	ja	LBB0_8
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%r15d, %edi
	movl	%r12d, %esi
	callq	_DIV_ROUND_CLOSEST
	movl	%eax, %r14d
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_DIV_ROUND_CLOSEST
	movl	%r12d, %r15d
	subl	%eax, %r12d
	movl	%r12d, %ebx
	negl	%ebx
	cmovsl	%r12d, %ebx
	cmpl	-52(%rbp), %ebx                 ## 4-byte Folded Reload
	jb	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_ov772x_pll@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	jmp	LBB0_7
LBB0_1:
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	movl	$0, -48(%rbp)                   ## 4-byte Folded Spill
LBB0_9:
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movl	(%rbx), %edi
	movq	_COM4@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_COM4_RESERVED@GOTPCREL(%rip), %rax
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	orl	(%rax), %edx
	callq	_regmap_write
	testl	%eax, %eax
	js	LBB0_11
## %bb.10:
	movl	(%rbx), %edi
	movq	_CLKRC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_CLKRC_RESERVED@GOTPCREL(%rip), %rax
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	orl	(%rax), %edx
	callq	_regmap_write
	movl	%eax, %ecx
	sarl	$31, %ecx
	andl	%ecx, %eax
LBB0_11:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_OFMT_MASK,4,2                  ## @OFMT_MASK
	.comm	_ov772x_pll,8,3                 ## @ov772x_pll
	.comm	_COM4,4,2                       ## @COM4
	.comm	_COM4_RESERVED,4,2              ## @COM4_RESERVED
	.comm	_CLKRC,4,2                      ## @CLKRC
	.comm	_CLKRC_RESERVED,4,2             ## @CLKRC_RESERVED
	.no_dead_strip	_ov772x_set_frame_rate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ov772x_set_frame_rate
_ov772x_set_frame_rate:                 ; @ov772x_set_frame_rate
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x3
	mov	x23, x2
	mov	x22, x1
	str	x0, [sp, #8]                    ; 8-byte Folded Spill
	ldr	w0, [x0, #4]
	bl	_clk_get_rate
	mov	x21, x0
	ldr	w8, [x23]
Lloh0:
	adrp	x9, _OFMT_MASK@GOTPAGE
Lloh1:
	ldr	x9, [x9, _OFMT_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	and	w8, w9, w8
	cmp	w8, #130
	cset	w19, ne
	ldr	w23, [x20]
Lloh3:
	adrp	x25, _ov772x_pll@GOTPAGE
Lloh4:
	ldr	x25, [x25, _ov772x_pll@GOTPAGEOFF]
	ldr	x0, [x25]
	bl	_ARRAY_SIZE
	cbz	w0, LBB0_7
; %bb.1:
	mov	x26, #0
	mov	x27, #0
	mov	w28, #0
	mov	w20, #0
	lsl	w8, w23, w19
	mul	w22, w8, w22
	mov	w19, #-1
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x23
	bl	_CLKRC_DIV
	mov	x20, x0
	ldr	x0, [x25]
	add	x8, x0, x26
	ldr	w28, [x8, #4]
	mov	x19, x24
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x27, x27, #1
	bl	_ARRAY_SIZE
	add	x26, x26, #8
	cmp	x27, w0, uxtw
	b.hs	LBB0_8
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x25]
	ldr	w8, [x0, x26]
	mul	x24, x21, x8
	cmp	w22, w24
	b.hi	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	and	x0, x24, #0xffffffff
	mov	x1, x22
	bl	_DIV_ROUND_CLOSEST
	mov	x23, x0
	mov	x0, x24
	mov	x1, x23
	bl	_DIV_ROUND_CLOSEST
	subs	w8, w22, w0
	cneg	w24, w8, mi
	cmp	w24, w19
	b.lo	LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x0, [x25]
	b	LBB0_3
LBB0_7:
	mov	w20, #0
	mov	w28, #0
LBB0_8:
Lloh5:
	adrp	x8, _COM4@GOTPAGE
Lloh6:
	ldr	x8, [x8, _COM4@GOTPAGEOFF]
	ldr	x19, [sp, #8]                   ; 8-byte Folded Reload
	ldr	w0, [x19]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	adrp	x8, _COM4_RESERVED@GOTPAGE
Lloh9:
	ldr	x8, [x8, _COM4_RESERVED@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	orr	w2, w8, w28
	bl	_regmap_write
	tbnz	w0, #31, LBB0_10
; %bb.9:
Lloh11:
	adrp	x8, _CLKRC@GOTPAGE
Lloh12:
	ldr	x8, [x8, _CLKRC@GOTPAGEOFF]
	ldr	w0, [x19]
Lloh13:
	ldr	w1, [x8]
Lloh14:
	adrp	x8, _CLKRC_RESERVED@GOTPAGE
Lloh15:
	ldr	x8, [x8, _CLKRC_RESERVED@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	orr	w2, w8, w20
	bl	_regmap_write
	cmp	w0, #0
	csel	w0, w0, wzr, lt
LBB0_10:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_OFMT_MASK,4,2                  ; @OFMT_MASK
	.comm	_ov772x_pll,8,3                 ; @ov772x_pll
	.comm	_COM4,4,2                       ; @COM4
	.comm	_COM4_RESERVED,4,2              ; @COM4_RESERVED
	.comm	_CLKRC,4,2                      ; @CLKRC
	.comm	_CLKRC_RESERVED,4,2             ; @CLKRC_RESERVED
	.no_dead_strip	_ov772x_set_frame_rate
.subsections_via_symbols
