	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ov965x_set_fmt
_ov965x_set_fmt:                        ## @ov965x_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	%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, %r12
	movq	%rsi, -80(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r15
	movq	_ov965x_formats@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	callq	_ARRAY_SIZE
	movl	%eax, %r13d
	leaq	8(%r12), %rbx
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	callq	_to_ov965x
	movq	%rax, %r15
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	$0, -64(%rbp)
	leaq	-64(%rbp), %rsi
	movq	%rbx, %rdi
	callq	___ov965x_try_frame_size
	movq	(%r14), %rcx
	decl	%r13d
	movl	%r13d, %r14d
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	subl	$1, %r14d
	jb	LBB0_2
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	%r13d, %eax
	shlq	$4, %rax
	movq	(%rcx,%rax), %rax
	movl	%r14d, %r13d
	cmpq	(%rbx), %rax
	jne	LBB0_1
## %bb.4:
	incl	%r14d
	jmp	LBB0_5
LBB0_2:
	movq	(%rcx), %rax
	xorl	%r14d, %r14d
LBB0_5:
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movq	_V4L2_COLORSPACE_JPEG@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 20(%r12)
	movq	%rax, 8(%r12)
	movq	_V4L2_FIELD_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r12)
	addq	$4, %r15
	movq	%r15, %rdi
	callq	_mutex_lock
	movq	(%r12), %rax
	movq	_V4L2_SUBDEV_FORMAT_TRY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.6:
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	testq	%rsi, %rsi
	je	LBB0_11
## %bb.7:
	movl	24(%r12), %edx
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_v4l2_subdev_get_try_format
	movups	(%rbx), %xmm0
	movups	%xmm0, (%rax)
	jmp	LBB0_11
LBB0_8:
	cmpq	$0, 40(%r13)
	je	LBB0_9
## %bb.10:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	testl	%ebx, %ebx
	je	LBB0_11
## %bb.14:
	negl	%ebx
	movq	%r15, %rdi
	callq	_mutex_unlock
	jmp	LBB0_15
LBB0_9:
	movq	-64(%rbp), %rax
	movq	%rax, 32(%r13)
	movups	(%rbx), %xmm0
	movups	%xmm0, 16(%r13)
	movq	_ov965x_formats@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	shlq	$4, %r14
	movl	8(%rax,%r14), %eax
	movl	%eax, 8(%r13)
	movl	$1, (%r13)
LBB0_11:
	movq	(%r12), %rax
	movq	_V4L2_SUBDEV_FORMAT_ACTIVE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_13
## %bb.12:
	movl	$0, -48(%rbp)
	leaq	-48(%rbp), %rsi
	movq	%r13, %rdi
	callq	___ov965x_set_frame_interval
LBB0_13:
	movq	%r15, %rdi
	callq	_mutex_unlock
	movq	%r13, %rdi
	callq	_ov965x_update_exposure_ctrl
	xorl	%ebx, %ebx
LBB0_15:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ov965x_formats,8,3             ## @ov965x_formats
	.comm	_V4L2_COLORSPACE_JPEG,4,2       ## @V4L2_COLORSPACE_JPEG
	.comm	_V4L2_FIELD_NONE,4,2            ## @V4L2_FIELD_NONE
	.comm	_V4L2_SUBDEV_FORMAT_TRY,8,3     ## @V4L2_SUBDEV_FORMAT_TRY
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_V4L2_SUBDEV_FORMAT_ACTIVE,8,3  ## @V4L2_SUBDEV_FORMAT_ACTIVE
	.no_dead_strip	_ov965x_set_fmt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ov965x_set_fmt
_ov965x_set_fmt:                        ; @ov965x_set_fmt
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x2
	mov	x22, x1
	mov	x23, x0
Lloh0:
	adrp	x25, _ov965x_formats@GOTPAGE
Lloh1:
	ldr	x25, [x25, _ov965x_formats@GOTPAGEOFF]
	ldr	x0, [x25]
	bl	_ARRAY_SIZE
	mov	x24, x0
	add	x21, x20, #8
	mov	x0, x23
	bl	_to_ov965x
	mov	x19, x0
	str	xzr, [sp, #8]
	add	x1, sp, #8
	mov	x0, x21
	bl	___ov965x_try_frame_size
	ldr	x9, [x25]
	sub	w10, w24, #1
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	cbz	w10, LBB0_4
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w8, w10
	lsl	x8, x8, #4
	ldr	x8, [x9, x8]
	ldr	x11, [x21]
	sub	w10, w10, #1
	cmp	x8, x11
	b.ne	LBB0_1
; %bb.3:
	add	w26, w10, #1
	b	LBB0_5
LBB0_4:
	mov	x26, #0
	ldr	x8, [x9]
LBB0_5:
Lloh2:
	adrp	x9, _V4L2_COLORSPACE_JPEG@GOTPAGE
Lloh3:
	ldr	x9, [x9, _V4L2_COLORSPACE_JPEG@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	str	x8, [x20, #8]
Lloh5:
	adrp	x8, _V4L2_FIELD_NONE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _V4L2_FIELD_NONE@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	stp	w8, w9, [x20, #16]
	add	x24, x19, #4
	mov	x0, x24
	bl	_mutex_lock
	ldr	x8, [x20]
Lloh8:
	adrp	x9, _V4L2_SUBDEV_FORMAT_TRY@GOTPAGE
Lloh9:
	ldr	x9, [x9, _V4L2_SUBDEV_FORMAT_TRY@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.6:
	cbz	x22, LBB0_12
; %bb.7:
	ldr	w2, [x20, #24]
	mov	x0, x23
	mov	x1, x22
	bl	_v4l2_subdev_get_try_format
	ldr	q0, [x21]
	str	q0, [x0]
	b	LBB0_12
LBB0_8:
	ldr	x8, [x19, #40]
	cbz	x8, LBB0_11
; %bb.9:
Lloh11:
	adrp	x8, _EBUSY@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	cbz	w8, LBB0_12
; %bb.10:
	neg	w19, w8
	mov	x0, x24
	bl	_mutex_unlock
	b	LBB0_15
LBB0_11:
	ldr	x8, [sp, #8]
	str	x8, [x19, #32]
	ldr	q0, [x21]
	str	q0, [x19, #16]
	ldr	x8, [x25]
	add	x8, x8, x26, lsl #4
	ldr	w8, [x8, #8]
	str	w8, [x19, #8]
	mov	w8, #1
	str	w8, [x19]
LBB0_12:
	ldr	x8, [x20]
Lloh14:
	adrp	x9, _V4L2_SUBDEV_FORMAT_ACTIVE@GOTPAGE
Lloh15:
	ldr	x9, [x9, _V4L2_SUBDEV_FORMAT_ACTIVE@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_14
; %bb.13:
	str	wzr, [sp]
	mov	x1, sp
	mov	x0, x19
	bl	___ov965x_set_frame_interval
LBB0_14:
	mov	x0, x24
	bl	_mutex_unlock
	mov	x0, x19
	bl	_ov965x_update_exposure_ctrl
	mov	w19, #0
LBB0_15:
	mov	x0, x19
	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
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_ov965x_formats,8,3             ; @ov965x_formats
	.comm	_V4L2_COLORSPACE_JPEG,4,2       ; @V4L2_COLORSPACE_JPEG
	.comm	_V4L2_FIELD_NONE,4,2            ; @V4L2_FIELD_NONE
	.comm	_V4L2_SUBDEV_FORMAT_TRY,8,3     ; @V4L2_SUBDEV_FORMAT_TRY
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_V4L2_SUBDEV_FORMAT_ACTIVE,8,3  ; @V4L2_SUBDEV_FORMAT_ACTIVE
	.no_dead_strip	_ov965x_set_fmt
.subsections_via_symbols
