	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function calc_fps
_calc_fps:                              ## @calc_fps
	.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	%rdx, -64(%rbp)                 ## 8-byte Spill
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r13
	callq	_to_mt9v011
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_R03_MT9V011_HEIGHT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_mt9v011_read
	movl	%eax, %ebx
	movq	_R04_MT9V011_WIDTH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_mt9v011_read
	movl	%eax, %r14d
	movq	_R05_MT9V011_HBLANK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_mt9v011_read
	movl	%eax, %r15d
	movq	_R06_MT9V011_VBLANK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_mt9v011_read
	movl	%eax, %r12d
	movq	_R0A_MT9V011_CLK_SPEED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_mt9v011_read
	leal	(%r14,%r15), %ecx
	addl	$113, %ecx
	addl	$2, %eax
	addl	%r12d, %ebx
	incl	%ebx
	imull	%ecx, %ebx
	imull	%eax, %ebx
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	imull	$1000, (%rax), %r12d            ## imm = 0x3E8
	movl	%r12d, %edi
	movl	%ebx, %esi
	callq	_do_div
	movq	_debug@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	imulq	$274877907, %r12, %r8           ## imm = 0x10624DD3
	shrq	$38, %r8
	imull	$1000, %r8d, %eax               ## imm = 0x3E8
	movl	%r12d, %r9d
	subl	%eax, %r9d
	movl	%ebx, (%rsp)
	leaq	L_.str(%rip), %rcx
	movl	$1, %edi
	movq	%r13, %rdx
                                        ## kill: def $r8d killed $r8d killed $r8
	callq	_v4l2_dbg
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	testq	%rcx, %rcx
	je	LBB0_3
## %bb.1:
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movl	$1000, (%rcx)                   ## imm = 0x3E8
	movl	%r12d, (%rax)
LBB0_3:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_R03_MT9V011_HEIGHT,4,2         ## @R03_MT9V011_HEIGHT
	.comm	_R04_MT9V011_WIDTH,4,2          ## @R04_MT9V011_WIDTH
	.comm	_R05_MT9V011_HBLANK,4,2         ## @R05_MT9V011_HBLANK
	.comm	_R06_MT9V011_VBLANK,4,2         ## @R06_MT9V011_VBLANK
	.comm	_R0A_MT9V011_CLK_SPEED,4,2      ## @R0A_MT9V011_CLK_SPEED
	.comm	_debug,4,2                      ## @debug
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Programmed to %u.%03u fps (%d pixel clcks)\n"

	.no_dead_strip	_calc_fps
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function calc_fps
_calc_fps:                              ; @calc_fps
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	bl	_to_mt9v011
	mov	x22, x0
Lloh0:
	adrp	x8, _R03_MT9V011_HEIGHT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _R03_MT9V011_HEIGHT@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_mt9v011_read
	mov	x23, x0
Lloh3:
	adrp	x8, _R04_MT9V011_WIDTH@GOTPAGE
Lloh4:
	ldr	x8, [x8, _R04_MT9V011_WIDTH@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_mt9v011_read
	mov	x24, x0
Lloh6:
	adrp	x8, _R05_MT9V011_HBLANK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _R05_MT9V011_HBLANK@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_mt9v011_read
	mov	x25, x0
Lloh9:
	adrp	x8, _R06_MT9V011_VBLANK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _R06_MT9V011_VBLANK@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_mt9v011_read
	mov	x26, x0
Lloh12:
	adrp	x8, _R0A_MT9V011_CLK_SPEED@GOTPAGE
Lloh13:
	ldr	x8, [x8, _R0A_MT9V011_CLK_SPEED@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_mt9v011_read
	add	w8, w24, w25
	add	w8, w8, #113
	add	w9, w0, #2
	add	w10, w23, w26
	madd	w8, w8, w10, w8
	mul	w23, w8, w9
	ldr	w8, [x22]
	mov	w24, #1000
	mul	w22, w8, w24
	mov	x0, x22
	mov	x1, x23
	bl	_do_div
Lloh15:
	adrp	x8, _debug@GOTPAGE
Lloh16:
	ldr	x8, [x8, _debug@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	w8, #19923
	movk	w8, #4194, lsl #16
	umull	x8, w22, w8
	lsr	x4, x8, #38
	msub	w5, w4, w24, w22
Lloh18:
	adrp	x3, l_.str@PAGE
Lloh19:
	add	x3, x3, l_.str@PAGEOFF
	mov	w0, #1
	mov	x2, x21
                                        ; kill: def $w4 killed $w4 killed $x4
	mov	x6, x23
	bl	_v4l2_dbg
	cbz	x20, LBB0_3
; %bb.1:
	cbz	x19, LBB0_3
; %bb.2:
	mov	w8, #1000
	str	w8, [x20]
	str	w22, [x19]
LBB0_3:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_R03_MT9V011_HEIGHT,4,2         ; @R03_MT9V011_HEIGHT
	.comm	_R04_MT9V011_WIDTH,4,2          ; @R04_MT9V011_WIDTH
	.comm	_R05_MT9V011_HBLANK,4,2         ; @R05_MT9V011_HBLANK
	.comm	_R06_MT9V011_VBLANK,4,2         ; @R06_MT9V011_VBLANK
	.comm	_R0A_MT9V011_CLK_SPEED,4,2      ; @R0A_MT9V011_CLK_SPEED
	.comm	_debug,4,2                      ; @debug
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Programmed to %u.%03u fps (%d pixel clcks)\n"

	.no_dead_strip	_calc_fps
.subsections_via_symbols
