	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vidioc_try_fmt
_vidioc_try_fmt:                        ## @vidioc_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	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	_V4L2_FIELD_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%rdi)
	movq	(%rdi), %rax
	movq	_V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movl	$1, 8(%r15)
	movq	32(%r15), %rax
	movl	$0, (%rax)
	jmp	LBB0_15
LBB0_2:
	movq	_V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.5:
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	leaq	12(%r15), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movl	12(%r15), %edi
	movq	_MTK_VDEC_MIN_H@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MTK_VDEC_MAX_H@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_clamp
	movl	%eax, 12(%r15)
	leaq	16(%r15), %r14
	movl	16(%r15), %edi
	movq	_MTK_VDEC_MIN_W@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	_MTK_VDEC_MAX_W@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	callq	_clamp
	movq	%rax, %r12
	movl	%r12d, 16(%r15)
	movl	12(%r15), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	(%rbx), %esi
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movl	(%r13), %edx
	movq	_MTK_VDEC_MIN_H@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r9d
	movq	_MTK_VDEC_MAX_H@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	subq	$8, %rsp
	movq	%r14, %rdi
	movl	$6, %ecx
	movq	%rbx, %r8
	pushq	$9
	pushq	$6
	pushq	%rax
	callq	_v4l_bound_align_image
	addq	$32, %rsp
	movl	16(%r15), %r8d
	cmpl	%r12d, %r8d
	jge	LBB0_6
## %bb.7:
	leal	64(%r8), %eax
	movq	_MTK_VDEC_MAX_W@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	jg	LBB0_9
## %bb.8:
	movl	%eax, (%r14)
	movl	%eax, %r8d
	jmp	LBB0_9
LBB0_3:
	movl	8(%r15), %ecx
	jmp	LBB0_4
LBB0_6:
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
LBB0_9:
	movl	(%rbx), %r9d
	cmpl	%ecx, %r9d
	jge	LBB0_10
## %bb.11:
	leal	64(%r9), %eax
	movq	_MTK_VDEC_MAX_H@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %eax
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	jg	LBB0_13
## %bb.12:
	movl	%eax, (%rbx)
	movl	%eax, %r9d
	jmp	LBB0_13
LBB0_10:
	movq	-56(%rbp), %r14                 ## 8-byte Reload
LBB0_13:
	movl	%r9d, %eax
	imull	%r8d, %eax
	subq	$8, %rsp
	leaq	L_.str(%rip), %rsi
	xorl	%edi, %edi
	movl	%r12d, %edx
                                        ## kill: def $r8d killed $r8d killed $r8
                                        ## kill: def $r9d killed $r9d killed $r9
	pushq	%rax
	callq	_mtk_v4l2_debug
	addq	$16, %rsp
	movl	(%r14), %ecx
	movl	%ecx, 8(%r15)
	movl	16(%r15), %eax
	movl	12(%r15), %esi
	imull	%eax, %esi
	movq	32(%r15), %rdx
	movl	%esi, 4(%rdx)
	movl	%eax, (%rdx)
	cmpl	$2, %ecx
	jne	LBB0_4
## %bb.14:
	movl	%esi, %ecx
	shrl	$31, %ecx
	addl	%esi, %ecx
	sarl	%ecx
	movl	%ecx, 20(%rdx)
	movl	%eax, 16(%rdx)
	jmp	LBB0_15
LBB0_4:
	testl	%ecx, %ecx
	jle	LBB0_17
LBB0_15:
	movl	$8, %r14d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movq	32(%r15), %rax
	movq	(%rax,%r14), %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	incq	%rbx
	movslq	8(%r15), %rax
	addq	$16, %r14
	cmpq	%rax, %rbx
	jl	LBB0_16
LBB0_17:
	movq	$0, 24(%r15)
	addq	$20, %r15
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_FIELD_NONE,4,2            ## @V4L2_FIELD_NONE
	.comm	_V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,8,3 ## @V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE,8,3 ## @V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE
	.comm	_MTK_VDEC_MIN_H,4,2             ## @MTK_VDEC_MIN_H
	.comm	_MTK_VDEC_MAX_H,4,2             ## @MTK_VDEC_MAX_H
	.comm	_MTK_VDEC_MIN_W,4,2             ## @MTK_VDEC_MIN_W
	.comm	_MTK_VDEC_MAX_W,4,2             ## @MTK_VDEC_MAX_W
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"before resize width=%d, height=%d, after resize width=%d, height=%d, sizeimage=%d"

	.no_dead_strip	_vidioc_try_fmt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vidioc_try_fmt
_vidioc_try_fmt:                        ; @vidioc_try_fmt
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
Lloh0:
	adrp	x8, _V4L2_FIELD_NONE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _V4L2_FIELD_NONE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x0, #40]
	ldr	x8, [x0]
Lloh3:
	adrp	x9, _V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	mov	w8, #1
	str	w8, [x19, #8]
	ldr	x8, [x19, #32]
	str	wzr, [x8]
	b	LBB0_13
LBB0_2:
Lloh6:
	adrp	x9, _V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.3:
	mov	x20, x1
	mov	x21, x19
	ldr	w0, [x21, #12]!
Lloh9:
	adrp	x27, _MTK_VDEC_MIN_H@GOTPAGE
Lloh10:
	ldr	x27, [x27, _MTK_VDEC_MIN_H@GOTPAGEOFF]
	ldr	w1, [x27]
Lloh11:
	adrp	x25, _MTK_VDEC_MAX_H@GOTPAGE
Lloh12:
	ldr	x25, [x25, _MTK_VDEC_MAX_H@GOTPAGEOFF]
	ldr	w2, [x25]
	bl	_clamp
	str	w0, [x21]
	mov	x24, x19
	ldr	w0, [x24, #16]!
Lloh13:
	adrp	x28, _MTK_VDEC_MIN_W@GOTPAGE
Lloh14:
	ldr	x28, [x28, _MTK_VDEC_MIN_W@GOTPAGEOFF]
	ldr	w1, [x28]
Lloh15:
	adrp	x26, _MTK_VDEC_MAX_W@GOTPAGE
Lloh16:
	ldr	x26, [x26, _MTK_VDEC_MAX_W@GOTPAGEOFF]
	ldr	w2, [x26]
	bl	_clamp
	mov	x22, x0
	str	w22, [x24]
	ldr	w23, [x21]
	ldr	w1, [x28]
	ldr	w2, [x26]
	ldr	w5, [x27]
	ldr	w6, [x25]
	mov	w8, #9
	str	w8, [sp]
	mov	x0, x24
	mov	w3, #6
	mov	x4, x21
	mov	w7, #6
	bl	_v4l_bound_align_image
	ldr	w4, [x24]
	cmp	w4, w22
	b.ge	LBB0_6
; %bb.4:
	add	w8, w4, #64
	ldr	w9, [x26]
	cmp	w8, w9
	b.gt	LBB0_6
; %bb.5:
	str	w8, [x24]
	mov	x4, x8
LBB0_6:
	ldr	w5, [x21]
	cmp	w5, w23
	b.ge	LBB0_9
; %bb.7:
	add	w8, w5, #64
	ldr	w9, [x25]
	cmp	w8, w9
	b.gt	LBB0_9
; %bb.8:
	str	w8, [x21]
	mov	x5, x8
LBB0_9:
	mul	w6, w5, w4
Lloh17:
	adrp	x1, l_.str@PAGE
Lloh18:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #0
	mov	x2, x22
	mov	x3, x23
	bl	_mtk_v4l2_debug
	ldr	w8, [x20]
	str	w8, [x19, #8]
	ldp	w10, w9, [x19, #12]
	mul	w11, w10, w9
	ldr	x10, [x19, #32]
	stp	w9, w11, [x10]
	cmp	w8, #2
	b.ne	LBB0_12
; %bb.10:
	cmp	w11, #0
	cinc	w8, w11, lt
	asr	w8, w8, #1
	stp	w9, w8, [x10, #16]
	b	LBB0_13
LBB0_11:
	ldr	w8, [x19, #8]
LBB0_12:
	cmp	w8, #1
	b.lt	LBB0_15
LBB0_13:
	mov	x20, #0
	mov	w21, #8
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #32]
	ldr	x0, [x8, x21]
	mov	w1, #0
	mov	w2, #8
	bl	_memset
	add	x20, x20, #1
	ldrsw	x8, [x19, #8]
	add	x21, x21, #16
	cmp	x20, x8
	b.lt	LBB0_14
LBB0_15:
	str	xzr, [x19, #24]
	add	x0, x19, #20
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	mov	w0, #0
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_FIELD_NONE,4,2            ; @V4L2_FIELD_NONE
	.comm	_V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,8,3 ; @V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE,8,3 ; @V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE
	.comm	_MTK_VDEC_MIN_H,4,2             ; @MTK_VDEC_MIN_H
	.comm	_MTK_VDEC_MAX_H,4,2             ; @MTK_VDEC_MAX_H
	.comm	_MTK_VDEC_MIN_W,4,2             ; @MTK_VDEC_MIN_W
	.comm	_MTK_VDEC_MAX_W,4,2             ; @MTK_VDEC_MAX_W
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"before resize width=%d, height=%d, after resize width=%d, height=%d, sizeimage=%d"

	.no_dead_strip	_vidioc_try_fmt
.subsections_via_symbols
