	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ov9640_set_fmt
_ov9640_set_fmt:                        ## @ov9640_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpq	$0, 8(%rdx)
	je	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_7
LBB0_2:
	movq	%rdx, %rbx
	movq	%rsi, %r12
	movq	%rdi, %r14
	leaq	16(%rdx), %r15
	leaq	32(%rdx), %rdi
	leaq	28(%rdx), %rsi
	callq	_ov9640_res_roundup
	movq	_V4L2_FIELD_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rbx)
	movl	16(%rbx), %eax
	addl	$-128, %eax
	cmpl	$3, %eax
	jae	LBB0_3
## %bb.4:
	cltq
	leaq	l_switch.table.ov9640_set_fmt(%rip), %rcx
	movq	(%rcx,%rax,8), %rax
	jmp	LBB0_5
LBB0_3:
	movl	$128, (%r15)
	movq	_V4L2_COLORSPACE_JPEG@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %eax
	movl	%eax, 20(%rbx)
	movq	(%rbx), %rax
	movq	_V4L2_SUBDEV_FORMAT_ACTIVE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.8:
	movq	%r14, %rdi
	movq	%r15, %rsi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ov9640_s_fmt                   ## TAILCALL
LBB0_6:
	movl	16(%r15), %eax
	movl	%eax, 16(%r12)
	movups	(%r15), %xmm0
	movups	%xmm0, (%r12)
	xorl	%eax, %eax
LBB0_7:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_V4L2_FIELD_NONE,4,2            ## @V4L2_FIELD_NONE
	.comm	_V4L2_COLORSPACE_SRGB,4,2       ## @V4L2_COLORSPACE_SRGB
	.comm	_V4L2_COLORSPACE_JPEG,4,2       ## @V4L2_COLORSPACE_JPEG
	.comm	_V4L2_SUBDEV_FORMAT_ACTIVE,8,3  ## @V4L2_SUBDEV_FORMAT_ACTIVE
	.no_dead_strip	_ov9640_set_fmt
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.ov9640_set_fmt
l_switch.table.ov9640_set_fmt:
	.quad	_V4L2_COLORSPACE_JPEG
	.quad	_V4L2_COLORSPACE_SRGB
	.quad	_V4L2_COLORSPACE_SRGB

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ov9640_set_fmt
_ov9640_set_fmt:                        ; @ov9640_set_fmt
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldr	x8, [x2, #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_8
LBB0_2:
	mov	x22, x2
	mov	x19, x1
	mov	x20, x0
	add	x21, x2, #16
	add	x0, x2, #32
	add	x1, x2, #28
	bl	_ov9640_res_roundup
Lloh3:
	adrp	x8, _V4L2_FIELD_NONE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _V4L2_FIELD_NONE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x22, #24]
	ldr	w8, [x22, #16]
	sub	w8, w8, #128
	cmp	w8, #3
	b.hs	LBB0_4
; %bb.3:
Lloh6:
	adrp	x9, l_switch.table.ov9640_set_fmt@PAGE
Lloh7:
	add	x9, x9, l_switch.table.ov9640_set_fmt@PAGEOFF
	ldr	x8, [x9, w8, sxtw #3]
	b	LBB0_5
LBB0_4:
	mov	w8, #128
	str	w8, [x21]
Lloh8:
	adrp	x8, _V4L2_COLORSPACE_JPEG@GOTPAGE
Lloh9:
	ldr	x8, [x8, _V4L2_COLORSPACE_JPEG@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	str	w8, [x22, #20]
	ldr	x8, [x22]
Lloh10:
	adrp	x9, _V4L2_SUBDEV_FORMAT_ACTIVE@GOTPAGE
Lloh11:
	ldr	x9, [x9, _V4L2_SUBDEV_FORMAT_ACTIVE@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.6:
	mov	x0, x20
	mov	x1, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_ov9640_s_fmt
LBB0_7:
	mov	w0, #0
	ldr	q0, [x21]
	ldr	w8, [x21, #16]
	str	w8, [x19, #16]
	str	q0, [x19]
LBB0_8:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_V4L2_FIELD_NONE,4,2            ; @V4L2_FIELD_NONE
	.comm	_V4L2_COLORSPACE_SRGB,4,2       ; @V4L2_COLORSPACE_SRGB
	.comm	_V4L2_COLORSPACE_JPEG,4,2       ; @V4L2_COLORSPACE_JPEG
	.comm	_V4L2_SUBDEV_FORMAT_ACTIVE,8,3  ; @V4L2_SUBDEV_FORMAT_ACTIVE
	.no_dead_strip	_ov9640_set_fmt
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.ov9640_set_fmt
l_switch.table.ov9640_set_fmt:
	.quad	_V4L2_COLORSPACE_JPEG
	.quad	_V4L2_COLORSPACE_SRGB
	.quad	_V4L2_COLORSPACE_SRGB

.subsections_via_symbols
