	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ov6650_set_selection
_ov6650_set_selection:                  ## @ov6650_set_selection
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	callq	_v4l2_get_subdevdata
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_to_ov6650
	movq	%rax, %r14
	movups	16(%rbx), %xmm0
	movaps	%xmm0, -48(%rbp)
	movq	(%rbx), %rax
	movq	_V4L2_SUBDEV_FORMAT_ACTIVE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movq	8(%rbx), %rax
	movq	_V4L2_SEL_TGT_CROP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.3:
	movq	_W_CIF@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdx
	leaq	-44(%rbp), %r8
	movq	_H_CIF@GOTPCREL(%rip), %r12
	subq	$8, %rsp
	leaq	-48(%rbp), %rdi
	movl	$2, %esi
	movl	$1, %ecx
	movl	$2, %r9d
	pushq	$0
	pushq	$1
	pushq	(%r12)
	callq	_v4l_bound_align_image
	addq	$32, %rsp
	leaq	-40(%rbp), %rdi
	movq	_DEF_HSTRT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%eax, %eax
	movslq	%eax, %rsi
	movq	(%rbx), %rdx
	addq	%rsi, %rdx
	movslq	-48(%rbp), %rax
	subq	%rax, %rdx
	leaq	-36(%rbp), %r8
	movq	_DEF_VSTRT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%eax, %eax
	movslq	%eax, %r9
	movq	(%r12), %rax
	addq	%r9, %rax
	movslq	-44(%rbp), %rcx
	subq	%rcx, %rax
	subq	$8, %rsp
                                        ## kill: def $esi killed $esi killed $rsi
	movl	$1, %ecx
                                        ## kill: def $r9d killed $r9d killed $r9
	pushq	$0
	pushq	$1
	pushq	%rax
	callq	_v4l_bound_align_image
	addq	$32, %rsp
	movq	_REG_HSTRT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-40(%rbp), %edx
	sarl	%edx
	movq	%r15, %rdi
	callq	_ov6650_reg_write
	testl	%eax, %eax
	jne	LBB0_8
## %bb.4:
	movl	-40(%rbp), %edx
	movl	%edx, (%r14)
	movq	_REG_HSTOP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	addl	-48(%rbp), %edx
	sarl	%edx
	movq	%r15, %rdi
	callq	_ov6650_reg_write
	testl	%eax, %eax
	jne	LBB0_8
## %bb.5:
	movl	-48(%rbp), %eax
	movl	%eax, 4(%r14)
	movq	_REG_VSTRT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-36(%rbp), %edx
	sarl	%edx
	movq	%r15, %rdi
	callq	_ov6650_reg_write
	testl	%eax, %eax
	jne	LBB0_8
## %bb.6:
	movl	-36(%rbp), %edx
	movl	%edx, 8(%r14)
	movq	_REG_VSTOP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	addl	-44(%rbp), %edx
	sarl	%edx
	movq	%r15, %rdi
	callq	_ov6650_reg_write
	testl	%eax, %eax
	jne	LBB0_8
## %bb.7:
	movl	-44(%rbp), %eax
	movl	%eax, 12(%r14)
	xorl	%eax, %eax
	jmp	LBB0_8
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_8:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_SUBDEV_FORMAT_ACTIVE,8,3  ## @V4L2_SUBDEV_FORMAT_ACTIVE
	.comm	_V4L2_SEL_TGT_CROP,8,3          ## @V4L2_SEL_TGT_CROP
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_W_CIF,8,3                      ## @W_CIF
	.comm	_H_CIF,8,3                      ## @H_CIF
	.comm	_DEF_HSTRT,4,2                  ## @DEF_HSTRT
	.comm	_DEF_VSTRT,4,2                  ## @DEF_VSTRT
	.comm	_REG_HSTRT,4,2                  ## @REG_HSTRT
	.comm	_REG_HSTOP,4,2                  ## @REG_HSTOP
	.comm	_REG_VSTRT,4,2                  ## @REG_VSTRT
	.comm	_REG_VSTOP,4,2                  ## @REG_VSTOP
	.no_dead_strip	_ov6650_set_selection
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ov6650_set_selection
_ov6650_set_selection:                  ; @ov6650_set_selection
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x21, x2
	bl	_v4l2_get_subdevdata
	mov	x20, x0
	bl	_to_ov6650
	ldr	q0, [x21, #16]
	str	q0, [sp, #16]
	ldr	x8, [x21]
Lloh0:
	adrp	x9, _V4L2_SUBDEV_FORMAT_ACTIVE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _V4L2_SUBDEV_FORMAT_ACTIVE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.1:
	ldr	x8, [x21, #8]
Lloh3:
	adrp	x9, _V4L2_SEL_TGT_CROP@GOTPAGE
Lloh4:
	ldr	x9, [x9, _V4L2_SEL_TGT_CROP@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.2:
	mov	x19, x0
Lloh6:
	adrp	x21, _W_CIF@GOTPAGE
Lloh7:
	ldr	x21, [x21, _W_CIF@GOTPAGEOFF]
	ldr	x2, [x21]
	add	x22, sp, #16
	orr	x4, x22, #0x4
Lloh8:
	adrp	x23, _H_CIF@GOTPAGE
Lloh9:
	ldr	x23, [x23, _H_CIF@GOTPAGEOFF]
	ldr	x6, [x23]
	str	wzr, [sp]
	add	x0, sp, #16
	mov	w1, #2
	mov	w3, #1
	mov	w5, #2
	mov	w7, #1
	bl	_v4l_bound_align_image
	orr	x0, x22, #0x8
Lloh10:
	adrp	x8, _DEF_HSTRT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _DEF_HSTRT@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	lsl	w1, w8, #1
	ldr	x8, [x21]
	add	x8, x8, w1, sxtw
	ldpsw	x9, x10, [sp, #16]
	sub	x2, x8, x9
Lloh13:
	adrp	x8, _DEF_VSTRT@GOTPAGE
Lloh14:
	ldr	x8, [x8, _DEF_VSTRT@GOTPAGEOFF]
	orr	x4, x22, #0xc
Lloh15:
	ldr	w8, [x8]
	lsl	w5, w8, #1
	ldr	x8, [x23]
	add	x8, x8, w5, sxtw
	sub	x6, x8, x10
	str	wzr, [sp]
	mov	w3, #1
	mov	w7, #1
	bl	_v4l_bound_align_image
Lloh16:
	adrp	x8, _REG_HSTRT@GOTPAGE
Lloh17:
	ldr	x8, [x8, _REG_HSTRT@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	ldr	w8, [sp, #24]
	asr	w2, w8, #1
	mov	x0, x20
	bl	_ov6650_reg_write
	cbnz	w0, LBB0_8
; %bb.3:
	ldr	w8, [sp, #24]
	str	w8, [x19]
Lloh19:
	adrp	x9, _REG_HSTOP@GOTPAGE
Lloh20:
	ldr	x9, [x9, _REG_HSTOP@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x9]
	ldr	w9, [sp, #16]
	add	w8, w9, w8
	asr	w2, w8, #1
	mov	x0, x20
	bl	_ov6650_reg_write
	cbnz	w0, LBB0_8
; %bb.4:
	ldr	w8, [sp, #16]
	str	w8, [x19, #4]
Lloh22:
	adrp	x8, _REG_VSTRT@GOTPAGE
Lloh23:
	ldr	x8, [x8, _REG_VSTRT@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	ldr	w8, [sp, #28]
	asr	w2, w8, #1
	mov	x0, x20
	bl	_ov6650_reg_write
	cbnz	w0, LBB0_8
; %bb.5:
	ldr	w8, [sp, #28]
	ldr	w9, [sp, #20]
	str	w8, [x19, #8]
Lloh25:
	adrp	x10, _REG_VSTOP@GOTPAGE
Lloh26:
	ldr	x10, [x10, _REG_VSTOP@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x10]
	add	w8, w9, w8
	asr	w2, w8, #1
	mov	x0, x20
	bl	_ov6650_reg_write
	cbnz	w0, LBB0_8
; %bb.6:
	ldr	w8, [sp, #20]
	str	w8, [x19, #12]
	b	LBB0_8
LBB0_7:
Lloh28:
	adrp	x8, _EINVAL@GOTPAGE
Lloh29:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_SUBDEV_FORMAT_ACTIVE,8,3  ; @V4L2_SUBDEV_FORMAT_ACTIVE
	.comm	_V4L2_SEL_TGT_CROP,8,3          ; @V4L2_SEL_TGT_CROP
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_W_CIF,8,3                      ; @W_CIF
	.comm	_H_CIF,8,3                      ; @H_CIF
	.comm	_DEF_HSTRT,4,2                  ; @DEF_HSTRT
	.comm	_DEF_VSTRT,4,2                  ; @DEF_VSTRT
	.comm	_REG_HSTRT,4,2                  ; @REG_HSTRT
	.comm	_REG_HSTOP,4,2                  ; @REG_HSTOP
	.comm	_REG_VSTRT,4,2                  ; @REG_VSTRT
	.comm	_REG_VSTOP,4,2                  ; @REG_VSTOP
	.no_dead_strip	_ov6650_set_selection
.subsections_via_symbols
