	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_v4l2_find_nearest_format       ## -- Begin function v4l2_find_nearest_format
	.p2align	4, 0x90
_v4l2_find_nearest_format:              ## @v4l2_find_nearest_format
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	.cfi_offset %rbx, -24
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.1:
	movl	(%rdi), %r8d
	testl	%r8d, %r8d
	jle	LBB0_6
## %bb.2:
	movq	8(%rdi), %r10
	movq	_UINT_MAX@GOTPCREL(%rip), %rax
	movq	(%rax), %r9
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r10), %r11
	movq	8(%r10), %rcx
	subq	%rsi, %rcx
	movq	%rcx, %rbx
	negq	%rbx
	cmovsq	%rcx, %rbx
	subq	%rdx, %r11
	movq	%r11, %rcx
	negq	%rcx
	cmovsq	%r11, %rcx
	leaq	(%rcx,%rbx), %rdi
	cmpq	%r9, %rdi
	cmovlq	%r10, %rax
	addq	%rbx, %rcx
	je	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpq	%r9, %rcx
	cmovlq	%rcx, %r9
	addq	$16, %r10
	decl	%r8d
	jne	LBB0_3
	jmp	LBB0_7
LBB0_6:
	xorl	%eax, %eax
LBB0_7:
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_UINT_MAX,8,3                   ## @UINT_MAX
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_v4l2_find_nearest_format       ; -- Begin function v4l2_find_nearest_format
	.p2align	2
_v4l2_find_nearest_format:              ; @v4l2_find_nearest_format
	.cfi_startproc
; %bb.0:
	cbz	x0, LBB0_5
; %bb.1:
	mov	x8, x0
	ldr	w9, [x0]
	cmp	w9, #1
	b.lt	LBB0_6
; %bb.2:
	mov	x0, #0
	ldr	x8, [x8, #8]
Lloh0:
	adrp	x10, _UINT_MAX@GOTPAGE
Lloh1:
	ldr	x10, [x10, _UINT_MAX@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
	fmov	d0, x2
	mov.d	v0[1], x1
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	q1, [x8]
	sub.2d	v1, v1, v0
	abs.2d	v1, v1
	addp.2d	d1, v1
	fmov	x11, d1
	cmp	x11, x10
	csel	x0, x8, x0, lt
	cbz	x11, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	fmov	x11, d1
	cmp	x11, x10
	csel	x10, x11, x10, lt
	add	x8, x8, #16
	subs	w9, w9, #1
	b.ne	LBB0_3
LBB0_5:
	ret
LBB0_6:
	mov	x0, #0
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_UINT_MAX,8,3                   ; @UINT_MAX
.subsections_via_symbols
