	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ov772x_set_fmt
_ov772x_set_fmt:                        ## @ov772x_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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movq	%rsi, %r15
	callq	_to_ov772x
	cmpq	$0, 8(%rbx)
	je	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_11
LBB0_2:
	movq	%rax, %r14
	leaq	16(%rbx), %r12
	leaq	-48(%rbp), %rsi
	leaq	-40(%rbp), %rdx
	movq	%r12, %rdi
	callq	_ov772x_select_params
	movq	-48(%rbp), %rax
	movl	4(%rax), %ecx
	movl	%ecx, 44(%rbx)
	movq	-40(%rbp), %rcx
	movl	4(%rcx), %edx
	movl	%edx, 40(%rbx)
	movl	(%rcx), %ecx
	movl	%ecx, 36(%rbx)
	movq	_V4L2_FIELD_NONE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 32(%rbx)
	movl	(%rax), %eax
	movl	%eax, 28(%rbx)
	movq	_V4L2_YCBCR_ENC_DEFAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rbx)
	movq	_V4L2_QUANTIZATION_DEFAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rbx)
	movq	_V4L2_XFER_FUNC_DEFAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	movq	(%rbx), %rax
	movq	_V4L2_SUBDEV_FORMAT_TRY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.3:
	movups	(%r12), %xmm0
	movups	16(%r12), %xmm1
	movups	%xmm1, 16(%r15)
	movups	%xmm0, (%r15)
	xorl	%ebx, %ebx
	jmp	LBB0_11
LBB0_4:
	movq	%r14, %r15
	addq	$8, %r15
	movq	%r15, %rdi
	callq	_mutex_lock
	cmpq	$0, 32(%r14)
	je	LBB0_6
## %bb.5:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_10
LBB0_6:
	cmpq	$0, (%r14)
	jle	LBB0_7
## %bb.8:
	movq	-48(%rbp), %rsi
	movq	-40(%rbp), %rdx
	movq	%r14, %rdi
	callq	_ov772x_set_params
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_9
	jmp	LBB0_10
LBB0_7:
	xorl	%ebx, %ebx
LBB0_9:
	movq	-40(%rbp), %rax
	movq	%rax, 24(%r14)
	movq	-48(%rbp), %rax
	movq	%rax, 16(%r14)
LBB0_10:
	movq	%r15, %rdi
	callq	_mutex_unlock
LBB0_11:
	movl	%ebx, %eax
	addq	$16, %rsp
	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_YCBCR_ENC_DEFAULT,4,2     ## @V4L2_YCBCR_ENC_DEFAULT
	.comm	_V4L2_QUANTIZATION_DEFAULT,4,2  ## @V4L2_QUANTIZATION_DEFAULT
	.comm	_V4L2_XFER_FUNC_DEFAULT,4,2     ## @V4L2_XFER_FUNC_DEFAULT
	.comm	_V4L2_SUBDEV_FORMAT_TRY,8,3     ## @V4L2_SUBDEV_FORMAT_TRY
	.comm	_EBUSY,4,2                      ## @EBUSY
	.no_dead_strip	_ov772x_set_fmt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ov772x_set_fmt
_ov772x_set_fmt:                        ; @ov772x_set_fmt
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x21, x2
	mov	x20, x1
	bl	_to_ov772x
	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	w21, w8
	b	LBB0_11
LBB0_2:
	mov	x19, x0
	add	x22, x21, #16
	add	x1, sp, #8
	mov	x2, sp
	mov	x0, x22
	bl	_ov772x_select_params
	ldr	x8, [sp, #8]
	ldr	w9, [x8, #4]
	str	w9, [x21, #44]
	ldr	x9, [sp]
	ldr	d0, [x9]
	stur	d0, [x21, #36]
Lloh3:
	adrp	x9, _V4L2_FIELD_NONE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _V4L2_FIELD_NONE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	str	w9, [x21, #32]
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _V4L2_YCBCR_ENC_DEFAULT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _V4L2_YCBCR_ENC_DEFAULT@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
Lloh9:
	adrp	x10, _V4L2_QUANTIZATION_DEFAULT@GOTPAGE
Lloh10:
	ldr	x10, [x10, _V4L2_QUANTIZATION_DEFAULT@GOTPAGEOFF]
	stp	w9, w8, [x21, #24]
Lloh11:
	ldr	w8, [x10]
Lloh12:
	adrp	x9, _V4L2_XFER_FUNC_DEFAULT@GOTPAGE
Lloh13:
	ldr	x9, [x9, _V4L2_XFER_FUNC_DEFAULT@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	stp	w9, w8, [x21, #16]
	ldr	x8, [x21]
Lloh15:
	adrp	x9, _V4L2_SUBDEV_FORMAT_TRY@GOTPAGE
Lloh16:
	ldr	x9, [x9, _V4L2_SUBDEV_FORMAT_TRY@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.3:
	mov	w21, #0
	ldp	q0, q1, [x22]
	stp	q0, q1, [x20]
	b	LBB0_11
LBB0_4:
	add	x20, x19, #8
	mov	x0, x20
	bl	_mutex_lock
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_6
; %bb.5:
Lloh18:
	adrp	x8, _EBUSY@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_10
LBB0_6:
	ldr	x8, [x19]
	cmp	x8, #1
	b.lt	LBB0_8
; %bb.7:
	ldp	x2, x1, [sp]
	mov	x0, x19
	bl	_ov772x_set_params
	mov	x21, x0
	tbz	w0, #31, LBB0_9
	b	LBB0_10
LBB0_8:
	mov	w21, #0
LBB0_9:
	ldp	x8, x9, [sp]
	stp	x9, x8, [x19, #16]
LBB0_10:
	mov	x0, x20
	bl	_mutex_unlock
LBB0_11:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.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	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_V4L2_FIELD_NONE,4,2            ; @V4L2_FIELD_NONE
	.comm	_V4L2_YCBCR_ENC_DEFAULT,4,2     ; @V4L2_YCBCR_ENC_DEFAULT
	.comm	_V4L2_QUANTIZATION_DEFAULT,4,2  ; @V4L2_QUANTIZATION_DEFAULT
	.comm	_V4L2_XFER_FUNC_DEFAULT,4,2     ; @V4L2_XFER_FUNC_DEFAULT
	.comm	_V4L2_SUBDEV_FORMAT_TRY,8,3     ; @V4L2_SUBDEV_FORMAT_TRY
	.comm	_EBUSY,4,2                      ; @EBUSY
	.no_dead_strip	_ov772x_set_fmt
.subsections_via_symbols
