	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ov6650_set_fmt
_ov6650_set_fmt:                        ## @ov6650_set_fmt
	.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
	movq	%rsi, %r14
	movq	%rdi, %r15
	callq	_v4l2_get_subdevdata
	movq	%rax, %rdi
	callq	_to_ov6650
	cmpq	$0, 8(%rbx)
	je	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_12
LBB0_2:
	movl	28(%rbx), %esi
	movl	32(%rbx), %edi
	movq	%rax, %rdx
	callq	_is_unscaled_ok
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	leaq	32(%rbx), %rdi
	leaq	28(%rbx), %r8
	movq	_W_CIF@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_H_CIF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	subq	$8, %rsp
	movl	$2, %esi
	movl	$1, %ecx
	movl	$2, %r9d
	pushq	$0
	pushq	$1
	pushq	%rax
	callq	_v4l_bound_align_image
	addq	$32, %rsp
LBB0_4:
	leaq	16(%rbx), %rsi
	movq	_V4L2_FIELD_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rbx)
	movl	16(%rbx), %ecx
	addl	$-128, %ecx
	cmpl	$6, %ecx
	ja	LBB0_8
## %bb.5:
	movq	_V4L2_COLORSPACE_JPEG@GOTPCREL(%rip), %rax
	movl	$55, %edx
	btl	%ecx, %edx
	jb	LBB0_10
## %bb.6:
	cmpl	$3, %ecx
	jne	LBB0_9
## %bb.7:
	movl	$130, (%rsi)
	jmp	LBB0_10
LBB0_8:
	movl	$134, (%rsi)
LBB0_9:
	movq	_V4L2_COLORSPACE_SRGB@GOTPCREL(%rip), %rax
LBB0_10:
	movl	(%rax), %eax
	movl	%eax, 20(%rbx)
	movq	(%rbx), %rax
	movq	_V4L2_SUBDEV_FORMAT_ACTIVE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_11
## %bb.13:
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ov6650_s_fmt                   ## TAILCALL
LBB0_11:
	movl	16(%rsi), %eax
	movl	%eax, 16(%r14)
	movups	(%rsi), %xmm0
	movups	%xmm0, (%r14)
	xorl	%eax, %eax
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_W_CIF,4,2                      ## @W_CIF
	.comm	_H_CIF,4,2                      ## @H_CIF
	.comm	_V4L2_FIELD_NONE,4,2            ## @V4L2_FIELD_NONE
	.comm	_V4L2_COLORSPACE_JPEG,4,2       ## @V4L2_COLORSPACE_JPEG
	.comm	_V4L2_COLORSPACE_SRGB,4,2       ## @V4L2_COLORSPACE_SRGB
	.comm	_V4L2_SUBDEV_FORMAT_ACTIVE,8,3  ## @V4L2_SUBDEV_FORMAT_ACTIVE
	.no_dead_strip	_ov6650_set_fmt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ov6650_set_fmt
_ov6650_set_fmt:                        ; @ov6650_set_fmt
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
	bl	_v4l2_get_subdevdata
	bl	_to_ov6650
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_14
LBB0_2:
	mov	x2, x0
	mov	x22, x21
	ldr	w1, [x22, #28]!
	mov	x23, x22
	ldr	w0, [x23, #4]!
	bl	_is_unscaled_ok
	cbz	x0, LBB0_4
; %bb.3:
Lloh3:
	adrp	x8, _W_CIF@GOTPAGE
Lloh4:
	ldr	x8, [x8, _W_CIF@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
Lloh6:
	adrp	x8, _H_CIF@GOTPAGE
Lloh7:
	ldr	x8, [x8, _H_CIF@GOTPAGEOFF]
Lloh8:
	ldr	w6, [x8]
	str	wzr, [sp]
	mov	x0, x23
	mov	w1, #2
	mov	w3, #1
	mov	x4, x22
	mov	w5, #2
	mov	w7, #1
	bl	_v4l_bound_align_image
LBB0_4:
Lloh9:
	adrp	x8, _V4L2_FIELD_NONE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _V4L2_FIELD_NONE@GOTPAGEOFF]
	add	x1, x21, #16
Lloh11:
	ldr	w8, [x8]
	str	w8, [x21, #24]
	ldr	w8, [x21, #16]
	sub	w8, w8, #128
	cmp	w8, #6
	b.hi	LBB0_9
; %bb.5:
	mov	w9, #1
	lsl	w9, w9, w8
	mov	w10, #55
	tst	w9, w10
	b.eq	LBB0_7
LBB0_6:
Lloh12:
	adrp	x8, _V4L2_COLORSPACE_JPEG@GOTPAGE
Lloh13:
	ldr	x8, [x8, _V4L2_COLORSPACE_JPEG@GOTPAGEOFF]
	b	LBB0_11
LBB0_7:
	cmp	w8, #3
	b.ne	LBB0_10
; %bb.8:
	mov	w8, #130
	str	w8, [x1]
	b	LBB0_6
LBB0_9:
	mov	w8, #134
	str	w8, [x1]
LBB0_10:
Lloh14:
	adrp	x8, _V4L2_COLORSPACE_SRGB@GOTPAGE
Lloh15:
	ldr	x8, [x8, _V4L2_COLORSPACE_SRGB@GOTPAGEOFF]
LBB0_11:
	ldr	w8, [x8]
	str	w8, [x21, #20]
	ldr	x8, [x21]
Lloh16:
	adrp	x9, _V4L2_SUBDEV_FORMAT_ACTIVE@GOTPAGE
Lloh17:
	ldr	x9, [x9, _V4L2_SUBDEV_FORMAT_ACTIVE@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_13
; %bb.12:
	mov	x0, x20
	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
	add	sp, sp, #80
	b	_ov6650_s_fmt
LBB0_13:
	mov	w0, #0
	ldr	q0, [x1]
	ldr	w8, [x1, #16]
	str	w8, [x19, #16]
	str	q0, [x19]
LBB0_14:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_W_CIF,4,2                      ; @W_CIF
	.comm	_H_CIF,4,2                      ; @H_CIF
	.comm	_V4L2_FIELD_NONE,4,2            ; @V4L2_FIELD_NONE
	.comm	_V4L2_COLORSPACE_JPEG,4,2       ; @V4L2_COLORSPACE_JPEG
	.comm	_V4L2_COLORSPACE_SRGB,4,2       ; @V4L2_COLORSPACE_SRGB
	.comm	_V4L2_SUBDEV_FORMAT_ACTIVE,8,3  ; @V4L2_SUBDEV_FORMAT_ACTIVE
	.no_dead_strip	_ov6650_set_fmt
.subsections_via_symbols
