	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_res
_set_res:                               ## @set_res
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	callq	_to_mt9v011
	movq	%rax, %r14
	movl	$640, %eax                      ## imm = 0x280
	subl	(%r14), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%eax, %edx
	sarl	%edx
	addl	$20, %edx
	movq	_R02_MT9V011_COLSTART@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_mt9v011_write
	movq	_R04_MT9V011_WIDTH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r14), %edx
	movq	%rbx, %rdi
	callq	_mt9v011_write
	movq	_R05_MT9V011_HBLANK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$771, %edx                      ## imm = 0x303
	subl	(%r14), %edx
	movq	%rbx, %rdi
	callq	_mt9v011_write
	movl	$480, %eax                      ## imm = 0x1E0
	subl	4(%r14), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%eax, %edx
	sarl	%edx
	addl	$8, %edx
	movq	_R01_MT9V011_ROWSTART@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_mt9v011_write
	movq	_R03_MT9V011_HEIGHT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	4(%r14), %edx
	movq	%rbx, %rdi
	callq	_mt9v011_write
	movq	_R06_MT9V011_VBLANK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$508, %edx                      ## imm = 0x1FC
	subl	4(%r14), %edx
	movq	%rbx, %rdi
	callq	_mt9v011_write
	movq	%rbx, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_calc_fps                       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_R02_MT9V011_COLSTART,4,2       ## @R02_MT9V011_COLSTART
	.comm	_R04_MT9V011_WIDTH,4,2          ## @R04_MT9V011_WIDTH
	.comm	_R05_MT9V011_HBLANK,4,2         ## @R05_MT9V011_HBLANK
	.comm	_R01_MT9V011_ROWSTART,4,2       ## @R01_MT9V011_ROWSTART
	.comm	_R03_MT9V011_HEIGHT,4,2         ## @R03_MT9V011_HEIGHT
	.comm	_R06_MT9V011_VBLANK,4,2         ## @R06_MT9V011_VBLANK
	.no_dead_strip	_set_res
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_res
_set_res:                               ; @set_res
	.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	x19, x0
	bl	_to_mt9v011
	mov	x20, x0
	ldr	w8, [x0]
	mov	w9, #640
	sub	w9, w9, w8
	mov	w10, #641
	sub	w8, w10, w8
	cmp	w9, #0
	csel	w8, w8, w9, lt
	asr	w8, w8, #1
	add	w2, w8, #20
Lloh0:
	adrp	x8, _R02_MT9V011_COLSTART@GOTPAGE
Lloh1:
	ldr	x8, [x8, _R02_MT9V011_COLSTART@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_mt9v011_write
Lloh3:
	adrp	x8, _R04_MT9V011_WIDTH@GOTPAGE
Lloh4:
	ldr	x8, [x8, _R04_MT9V011_WIDTH@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	ldr	w2, [x20]
	mov	x0, x19
	bl	_mt9v011_write
Lloh6:
	adrp	x8, _R05_MT9V011_HBLANK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _R05_MT9V011_HBLANK@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	ldr	w8, [x20]
	mov	w9, #771
	sub	w2, w9, w8
	mov	x0, x19
	bl	_mt9v011_write
	ldr	w8, [x20, #4]
	mov	w9, #480
	sub	w9, w9, w8
	mov	w10, #481
	sub	w8, w10, w8
	cmp	w9, #0
	csel	w8, w8, w9, lt
	asr	w8, w8, #1
	add	w2, w8, #8
Lloh9:
	adrp	x8, _R01_MT9V011_ROWSTART@GOTPAGE
Lloh10:
	ldr	x8, [x8, _R01_MT9V011_ROWSTART@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_mt9v011_write
Lloh12:
	adrp	x8, _R03_MT9V011_HEIGHT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _R03_MT9V011_HEIGHT@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	ldr	w2, [x20, #4]
	mov	x0, x19
	bl	_mt9v011_write
Lloh15:
	adrp	x8, _R06_MT9V011_VBLANK@GOTPAGE
Lloh16:
	ldr	x8, [x8, _R06_MT9V011_VBLANK@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	ldr	w8, [x20, #4]
	mov	w9, #508
	sub	w2, w9, w8
	mov	x0, x19
	bl	_mt9v011_write
	mov	x0, x19
	mov	x1, #0
	mov	x2, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_calc_fps
	.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	_R02_MT9V011_COLSTART,4,2       ; @R02_MT9V011_COLSTART
	.comm	_R04_MT9V011_WIDTH,4,2          ; @R04_MT9V011_WIDTH
	.comm	_R05_MT9V011_HBLANK,4,2         ; @R05_MT9V011_HBLANK
	.comm	_R01_MT9V011_ROWSTART,4,2       ; @R01_MT9V011_ROWSTART
	.comm	_R03_MT9V011_HEIGHT,4,2         ; @R03_MT9V011_HEIGHT
	.comm	_R06_MT9V011_VBLANK,4,2         ; @R06_MT9V011_VBLANK
	.no_dead_strip	_set_res
.subsections_via_symbols
