	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sun6i_video_try_fmt
_sun6i_video_try_fmt:                   ## @sun6i_video_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	%rsi, %rbx
	movl	40(%rsi), %edi
	callq	_is_pixformat_valid
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movq	_supported_pixformats@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%rbx)
LBB0_2:
	movq	_MIN_WIDTH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MAX_WIDTH@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	4(%rbx), %r8
	movq	_MIN_HEIGHT@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	subq	$8, %rsp
	movq	%rbx, %rdi
	movl	$1, %ecx
	pushq	$1
	pushq	$1
	pushq	%rdx
	callq	_v4l_bound_align_image
	addq	$32, %rsp
	movl	40(%rbx), %edi
	callq	_sun6i_csi_get_bpp
	imull	(%rbx), %eax
	sarl	$3, %eax
	movl	%eax, 8(%rbx)
	imull	4(%rbx), %eax
	movl	%eax, 12(%rbx)
	movq	16(%rbx), %rax
	movq	_V4L2_FIELD_ANY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.3:
	movq	_V4L2_FIELD_NONE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 16(%rbx)
LBB0_4:
	movq	_V4L2_COLORSPACE_RAW@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 36(%rbx)
	movq	_V4L2_YCBCR_ENC_DEFAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%rbx)
	movq	_V4L2_QUANTIZATION_DEFAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 28(%rbx)
	movq	_V4L2_XFER_FUNC_DEFAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rbx)
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_supported_pixformats,8,3       ## @supported_pixformats
	.comm	_MIN_WIDTH,4,2                  ## @MIN_WIDTH
	.comm	_MAX_WIDTH,4,2                  ## @MAX_WIDTH
	.comm	_MIN_HEIGHT,4,2                 ## @MIN_HEIGHT
	.comm	_V4L2_FIELD_ANY,8,3             ## @V4L2_FIELD_ANY
	.comm	_V4L2_FIELD_NONE,8,3            ## @V4L2_FIELD_NONE
	.comm	_V4L2_COLORSPACE_RAW,4,2        ## @V4L2_COLORSPACE_RAW
	.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	_sun6i_video_try_fmt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sun6i_video_try_fmt
_sun6i_video_try_fmt:                   ; @sun6i_video_try_fmt
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	ldr	w0, [x1, #40]
	bl	_is_pixformat_valid
	cbnz	w0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _supported_pixformats@GOTPAGE
Lloh1:
	ldr	x8, [x8, _supported_pixformats@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	w8, [x8]
	str	w8, [x19, #40]
LBB0_2:
Lloh3:
	adrp	x8, _MIN_WIDTH@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MIN_WIDTH@GOTPAGEOFF]
Lloh5:
	adrp	x9, _MAX_WIDTH@GOTPAGE
Lloh6:
	ldr	x9, [x9, _MAX_WIDTH@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	ldr	w2, [x9]
	add	x4, x19, #4
Lloh9:
	adrp	x8, _MIN_HEIGHT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MIN_HEIGHT@GOTPAGEOFF]
Lloh11:
	ldr	w5, [x8]
	mov	w8, #1
	str	w8, [sp]
	mov	x0, x19
	mov	w3, #1
	mov	x6, x2
	mov	w7, #1
	bl	_v4l_bound_align_image
	ldr	w0, [x19, #40]
	bl	_sun6i_csi_get_bpp
	ldp	w8, w9, [x19]
	mul	w8, w8, w0
	asr	w8, w8, #3
	mul	w9, w8, w9
	stp	w8, w9, [x19, #8]
	ldr	x8, [x19, #16]
Lloh12:
	adrp	x9, _V4L2_FIELD_ANY@GOTPAGE
Lloh13:
	ldr	x9, [x9, _V4L2_FIELD_ANY@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.3:
Lloh15:
	adrp	x8, _V4L2_FIELD_NONE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _V4L2_FIELD_NONE@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
	str	x8, [x19, #16]
LBB0_4:
Lloh18:
	adrp	x8, _V4L2_COLORSPACE_RAW@GOTPAGE
Lloh19:
	ldr	x8, [x8, _V4L2_COLORSPACE_RAW@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
Lloh21:
	adrp	x9, _V4L2_YCBCR_ENC_DEFAULT@GOTPAGE
Lloh22:
	ldr	x9, [x9, _V4L2_YCBCR_ENC_DEFAULT@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #32]
Lloh24:
	adrp	x8, _V4L2_QUANTIZATION_DEFAULT@GOTPAGE
Lloh25:
	ldr	x8, [x8, _V4L2_QUANTIZATION_DEFAULT@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
Lloh27:
	adrp	x9, _V4L2_XFER_FUNC_DEFAULT@GOTPAGE
Lloh28:
	ldr	x9, [x9, _V4L2_XFER_FUNC_DEFAULT@GOTPAGEOFF]
Lloh29:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #24]
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_supported_pixformats,8,3       ; @supported_pixformats
	.comm	_MIN_WIDTH,4,2                  ; @MIN_WIDTH
	.comm	_MAX_WIDTH,4,2                  ; @MAX_WIDTH
	.comm	_MIN_HEIGHT,4,2                 ; @MIN_HEIGHT
	.comm	_V4L2_FIELD_ANY,8,3             ; @V4L2_FIELD_ANY
	.comm	_V4L2_FIELD_NONE,8,3            ; @V4L2_FIELD_NONE
	.comm	_V4L2_COLORSPACE_RAW,4,2        ; @V4L2_COLORSPACE_RAW
	.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	_sun6i_video_try_fmt
.subsections_via_symbols
