	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ov2680_set_fmt
_ov2680_set_fmt:                        ## @ov2680_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
	movq	%rdx, %r12
	callq	_to_ov2680_dev
	cmpq	$0, (%r12)
	je	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_10
LBB0_2:
	movq	%rax, %r15
	movq	%rax, %r14
	addq	$4, %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	cmpq	$0, 32(%r15)
	je	LBB0_5
## %bb.3:
	movq	_EBUSY@GOTPCREL(%rip), %rax
LBB0_4:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_9:
	movq	%r14, %rdi
	callq	_mutex_unlock
LBB0_10:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	_ov2680_mode_data@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%ebx, %edi
	callq	_ARRAY_SIZE
	movq	_width@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_height@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	24(%r12), %r9d
	movl	28(%r12), %r8d
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_v4l2_find_nearest_size
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movq	8(%r12), %rcx
	movq	_V4L2_SUBDEV_FORMAT_TRY@GOTPCREL(%rip), %rdx
	xorl	%ebx, %ebx
	cmpq	(%rdx), %rcx
	je	LBB0_9
## %bb.8:
	addq	$16, %r12
	movsd	(%rax), %xmm0                   ## xmm0 = mem[0],zero
	movsd	8(%r15), %xmm1                  ## xmm1 = mem[0],zero
	movlhps	%xmm0, %xmm1                    ## xmm1 = xmm1[0],xmm0[0]
	movups	%xmm1, (%r12)
	movq	%rax, 24(%r15)
	movups	(%r12), %xmm0
	movups	%xmm0, 8(%r15)
	movl	$1, (%r15)
	jmp	LBB0_9
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_ov2680_mode_data,4,2           ## @ov2680_mode_data
	.comm	_width,4,2                      ## @width
	.comm	_height,4,2                     ## @height
	.comm	_V4L2_SUBDEV_FORMAT_TRY,8,3     ## @V4L2_SUBDEV_FORMAT_TRY
	.no_dead_strip	_ov2680_set_fmt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ov2680_set_fmt
_ov2680_set_fmt:                        ; @ov2680_set_fmt
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x2
	bl	_to_ov2680_dev
	mov	x23, x21
	ldr	x8, [x23], #16
	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_6
LBB0_2:
	mov	x20, x0
	add	x19, x0, #4
	mov	x0, x19
	bl	_mutex_lock
	ldr	x8, [x20, #32]
	cbz	x8, LBB0_7
; %bb.3:
Lloh3:
	adrp	x8, _EBUSY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_5:
	mov	x0, x19
	bl	_mutex_unlock
LBB0_6:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_7:
Lloh5:
	adrp	x8, _ov2680_mode_data@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ov2680_mode_data@GOTPAGEOFF]
Lloh7:
	ldr	w22, [x8]
	mov	x0, x22
	bl	_ARRAY_SIZE
	mov	x1, x0
Lloh8:
	adrp	x8, _width@GOTPAGE
Lloh9:
	ldr	x8, [x8, _width@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
Lloh11:
	adrp	x8, _height@GOTPAGE
Lloh12:
	ldr	x8, [x8, _height@GOTPAGEOFF]
Lloh13:
	ldr	w3, [x8]
	ldp	w5, w4, [x21, #24]
	mov	x0, x22
	bl	_v4l2_find_nearest_size
	cbz	x0, LBB0_10
; %bb.8:
	ldr	x8, [x21, #8]
Lloh14:
	adrp	x9, _V4L2_SUBDEV_FORMAT_TRY@GOTPAGE
Lloh15:
	ldr	x9, [x9, _V4L2_SUBDEV_FORMAT_TRY@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.9:
	mov	w21, #0
	b	LBB0_5
LBB0_10:
Lloh17:
	adrp	x8, _EINVAL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_4
LBB0_11:
	mov	w21, #0
	ldr	d0, [x0]
	ldr	d1, [x20, #8]
	mov.d	v1[1], v0[0]
	str	q1, [x23]
	str	x0, [x20, #24]
	ldr	q0, [x23]
	stur	q0, [x20, #8]
	mov	w8, #1
	str	w8, [x20]
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_ov2680_mode_data,4,2           ; @ov2680_mode_data
	.comm	_width,4,2                      ; @width
	.comm	_height,4,2                     ; @height
	.comm	_V4L2_SUBDEV_FORMAT_TRY,8,3     ; @V4L2_SUBDEV_FORMAT_TRY
	.no_dead_strip	_ov2680_set_fmt
.subsections_via_symbols
