	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cio2_v4l2_try_fmt
_cio2_v4l2_try_fmt:                     ## @cio2_v4l2_try_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdx, %rbx
	leaq	52(%rdx), %rdi
	xorl	%esi, %esi
	callq	_cio2_find_format
	movq	_formats@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	_CIO2_IMAGE_MAX_WIDTH@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	cmpq	%rdx, (%rbx)
	jle	LBB0_2
## %bb.1:
	movq	%rdx, (%rbx)
LBB0_2:
	movq	_CIO2_IMAGE_MAX_LENGTH@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	cmpl	%edx, 8(%rbx)
	jle	LBB0_4
## %bb.3:
	movl	%edx, 8(%rbx)
LBB0_4:
	testq	%rax, %rax
	cmovneq	%rax, %rcx
	movl	$1, 12(%rbx)
	movl	(%rcx), %eax
	movl	%eax, 52(%rbx)
	movq	_V4L2_COLORSPACE_RAW@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 48(%rbx)
	movq	_V4L2_FIELD_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 44(%rbx)
	movl	40(%rbx), %edi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movq	(%rbx), %rdi
	callq	_cio2_bytesperline
	movq	32(%rbx), %rcx
	movl	%eax, (%rcx)
	imull	8(%rbx), %eax
	movl	%eax, 4(%rcx)
	movl	8(%rcx), %edi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	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)
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_formats,8,3                    ## @formats
	.comm	_CIO2_IMAGE_MAX_WIDTH,8,3       ## @CIO2_IMAGE_MAX_WIDTH
	.comm	_CIO2_IMAGE_MAX_LENGTH,4,2      ## @CIO2_IMAGE_MAX_LENGTH
	.comm	_V4L2_COLORSPACE_RAW,4,2        ## @V4L2_COLORSPACE_RAW
	.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
	.no_dead_strip	_cio2_v4l2_try_fmt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cio2_v4l2_try_fmt
_cio2_v4l2_try_fmt:                     ; @cio2_v4l2_try_fmt
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x2
	add	x0, x2, #52
	mov	x1, #0
	bl	_cio2_find_format
Lloh0:
	adrp	x8, _formats@GOTPAGE
Lloh1:
	ldr	x8, [x8, _formats@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	x10, [x19]
Lloh3:
	adrp	x9, _CIO2_IMAGE_MAX_WIDTH@GOTPAGE
Lloh4:
	ldr	x9, [x9, _CIO2_IMAGE_MAX_WIDTH@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x10, x9
	b.le	LBB0_2
; %bb.1:
	str	x9, [x19]
LBB0_2:
	ldr	w10, [x19, #8]
Lloh6:
	adrp	x9, _CIO2_IMAGE_MAX_LENGTH@GOTPAGE
Lloh7:
	ldr	x9, [x9, _CIO2_IMAGE_MAX_LENGTH@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	cmp	w10, w9
	b.le	LBB0_4
; %bb.3:
	str	w9, [x19, #8]
LBB0_4:
	cmp	x0, #0
	csel	x8, x8, x0, eq
	mov	w9, #1
	str	w9, [x19, #12]
	ldr	w8, [x8]
	str	w8, [x19, #52]
Lloh9:
	adrp	x8, _V4L2_COLORSPACE_RAW@GOTPAGE
Lloh10:
	ldr	x8, [x8, _V4L2_COLORSPACE_RAW@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x9, _V4L2_FIELD_NONE@GOTPAGE
Lloh13:
	ldr	x9, [x9, _V4L2_FIELD_NONE@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #44]
	ldr	w0, [x19, #40]
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	ldr	x0, [x19]
	bl	_cio2_bytesperline
	ldr	x8, [x19, #32]
	ldr	w9, [x19, #8]
	mul	w9, w9, w0
	stp	w0, w9, [x8]
	ldr	w0, [x8, #8]
	mov	w1, #0
	mov	w2, #4
	bl	_memset
Lloh15:
	adrp	x8, _V4L2_YCBCR_ENC_DEFAULT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _V4L2_YCBCR_ENC_DEFAULT@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	str	w8, [x19, #24]
Lloh18:
	adrp	x8, _V4L2_QUANTIZATION_DEFAULT@GOTPAGE
Lloh19:
	ldr	x8, [x8, _V4L2_QUANTIZATION_DEFAULT@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
Lloh21:
	adrp	x9, _V4L2_XFER_FUNC_DEFAULT@GOTPAGE
Lloh22:
	ldr	x9, [x9, _V4L2_XFER_FUNC_DEFAULT@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #16]
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_formats,8,3                    ; @formats
	.comm	_CIO2_IMAGE_MAX_WIDTH,8,3       ; @CIO2_IMAGE_MAX_WIDTH
	.comm	_CIO2_IMAGE_MAX_LENGTH,4,2      ; @CIO2_IMAGE_MAX_LENGTH
	.comm	_V4L2_COLORSPACE_RAW,4,2        ; @V4L2_COLORSPACE_RAW
	.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
	.no_dead_strip	_cio2_v4l2_try_fmt
.subsections_via_symbols
