	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vidioc_vdec_g_fmt
_vidioc_vdec_g_fmt:                     ## @vidioc_vdec_g_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdx, %rbx
	movq	%rsi, %rdi
	callq	_fh_to_ctx
	movq	%rax, %r14
	movl	56(%rax), %edi
	movl	(%rbx), %esi
	callq	_v4l2_m2m_get_vq
	movl	(%rbx), %esi
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%r14, %rdi
	callq	_mtk_vdec_get_q_data
	movq	_V4L2_FIELD_NONE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 48(%rbx)
	movdqu	40(%r14), %xmm0
	movdqu	%xmm0, 32(%rbx)
	movl	(%rbx), %ecx
	movq	_V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	jne	LBB0_5
## %bb.3:
	movq	(%r14), %rdx
	movq	_MTK_STATE_HEADER@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rdx
	jge	LBB0_4
LBB0_5:
	movq	_V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	jne	LBB0_7
## %bb.6:
	movl	36(%rax), %ecx
	movl	%ecx, 28(%rbx)
	movl	32(%rax), %ecx
	movl	%ecx, 24(%rbx)
	movq	8(%rax), %rcx
	movl	(%rcx), %ecx
	movq	8(%rbx), %rdx
	movl	%ecx, 4(%rdx)
	movq	(%rax), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, (%rdx)
	movq	16(%rax), %rax
	movl	(%rax), %ecx
	movl	%ecx, 16(%rbx)
	movl	4(%rax), %eax
	movl	%eax, 20(%rbx)
	jmp	LBB0_8
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_mtk_v4l2_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_9
LBB0_7:
	movq	16(%rax), %rdx
	movq	24(%rax), %xmm0                 ## xmm0 = mem[0],zero
	movq	(%rdx), %xmm1                   ## xmm1 = mem[0],zero
	punpcklqdq	%xmm0, %xmm1            ## xmm1 = xmm1[0],xmm0[0]
	movdqu	%xmm1, 16(%rbx)
	movq	8(%rax), %rdx
	movl	(%rdx), %esi
	movq	8(%rbx), %rdi
	movl	%esi, 4(%rdi)
	movq	(%rax), %rax
	movl	(%rax), %esi
	movl	%esi, (%rdi)
	movl	4(%rdx), %edx
	movl	%edx, 12(%rdi)
	movl	4(%rax), %eax
	movl	%eax, 8(%rdi)
	movl	8(%r14), %edx
	movq	(%r14), %r8
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	callq	_mtk_v4l2_debug
	jmp	LBB0_8
LBB0_4:
	movq	32(%r14), %rdx
	movl	(%rdx), %esi
	movq	(%rax), %rcx
	movl	%esi, (%rcx)
	movl	4(%rdx), %edx
	movl	%edx, 4(%rcx)
	movl	16(%r14), %edx
	movq	8(%rax), %rsi
	movl	%edx, (%rsi)
	movl	16(%r14), %edx
	movl	%edx, 4(%rsi)
	movq	16(%rax), %r8
	movq	24(%r14), %rdx
	movq	%rdx, %xmm0
	movq	%rdx, %rdi
	shrq	$32, %rdi
	movl	%edi, 28(%rax)
	movl	%edx, 24(%rax)
	movq	(%r8), %rax
	movq	%rax, %xmm1
	punpcklqdq	%xmm0, %xmm1            ## xmm1 = xmm1[0],xmm0[0]
	movl	%eax, 12(%r14)
	movdqu	%xmm1, 16(%rbx)
	movl	(%rsi), %eax
	movq	8(%rbx), %rdx
	movl	%eax, 4(%rdx)
	movl	(%rcx), %eax
	movl	%eax, (%rdx)
	movl	4(%rsi), %eax
	movl	%eax, 12(%rdx)
	movl	4(%rcx), %eax
	movl	%eax, 8(%rdx)
LBB0_8:
	xorl	%eax, %eax
LBB0_9:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"no vb2 queue for type=%d"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_V4L2_FIELD_NONE,4,2            ## @V4L2_FIELD_NONE
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE,4,2 ## @V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE
	.comm	_MTK_STATE_HEADER,8,3           ## @MTK_STATE_HEADER
	.comm	_V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,4,2 ## @V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE
L_.str.1:                               ## @.str.1
	.asciz	"[%d] type=%d state=%d Format information could not be read, not ready yet!"

	.no_dead_strip	_vidioc_vdec_g_fmt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vidioc_vdec_g_fmt
_vidioc_vdec_g_fmt:                     ; @vidioc_vdec_g_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
	mov	x0, x1
	bl	_fh_to_ctx
	mov	x20, x0
	ldr	w0, [x0, #56]
	ldr	w1, [x19]
	bl	_v4l2_m2m_get_vq
	ldr	w1, [x19]
	cbz	x0, LBB0_5
; %bb.1:
	mov	x0, x20
	bl	_mtk_vdec_get_q_data
Lloh0:
	adrp	x8, _V4L2_FIELD_NONE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _V4L2_FIELD_NONE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x19, #48]
	ldur	q0, [x20, #40]
	str	q0, [x19, #32]
	ldr	w3, [x19]
Lloh3:
	adrp	x8, _V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w3, w8
	b.ne	LBB0_3
; %bb.2:
	ldr	x8, [x20]
Lloh6:
	adrp	x9, _MTK_STATE_HEADER@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MTK_STATE_HEADER@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ge	LBB0_7
LBB0_3:
Lloh9:
	adrp	x8, _V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cmp	w3, w8
	b.ne	LBB0_6
; %bb.4:
	mov	w8, #0
	ldr	d0, [x0, #32]
	str	d0, [x19, #24]
	ldp	x10, x9, [x0]
	ldr	w9, [x9]
	ldr	x11, [x19, #8]
	str	w9, [x11, #4]
	ldr	w9, [x10]
	str	w9, [x11]
	ldr	x9, [x0, #16]
	ldr	d0, [x9]
	str	d0, [x19, #16]
	b	LBB0_8
LBB0_5:
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	bl	_mtk_v4l2_err
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w8, w8
	b	LBB0_8
LBB0_6:
	ldr	x8, [x0, #16]
	ldr	d0, [x0, #24]
	ldr	d1, [x8]
	mov.d	v1[1], v0[0]
	str	q1, [x19, #16]
	ldp	x9, x8, [x0]
	ldr	w10, [x8]
	ldr	x11, [x19, #8]
	str	w10, [x11, #4]
	ldr	w10, [x9]
	str	w10, [x11]
	ldr	w8, [x8, #4]
	str	w8, [x11, #12]
	ldr	w8, [x9, #4]
	str	w8, [x11, #8]
	ldr	w2, [x20, #8]
	ldr	x4, [x20]
Lloh17:
	adrp	x1, l_.str.1@PAGE
Lloh18:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	bl	_mtk_v4l2_debug
	mov	w8, #0
	b	LBB0_8
LBB0_7:
	mov	w8, #0
	ldr	x9, [x20, #32]
	ldr	w10, [x9]
	ldp	x11, x12, [x0]
	str	w10, [x11]
	ldr	w9, [x9, #4]
	str	w9, [x11, #4]
	ldr	w9, [x20, #16]
	str	w9, [x12]
	ldr	w9, [x20, #16]
	str	w9, [x12, #4]
	ldr	d0, [x20, #24]
	str	d0, [x0, #24]
	ldr	x9, [x0, #16]
	ldr	d1, [x9]
	str	s1, [x20, #12]
	mov.d	v1[1], v0[0]
	str	q1, [x19, #16]
	ldr	w9, [x12]
	ldr	x10, [x19, #8]
	str	w9, [x10, #4]
	ldr	w9, [x11]
	str	w9, [x10]
	ldr	w9, [x12, #4]
	str	w9, [x10, #12]
	ldr	w9, [x11, #4]
	str	w9, [x10, #8]
LBB0_8:
	mov	x0, x8
	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	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"no vb2 queue for type=%d"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_V4L2_FIELD_NONE,4,2            ; @V4L2_FIELD_NONE
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE,4,2 ; @V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE
	.comm	_MTK_STATE_HEADER,8,3           ; @MTK_STATE_HEADER
	.comm	_V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,4,2 ; @V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE
l_.str.1:                               ; @.str.1
	.asciz	"[%d] type=%d state=%d Format information could not be read, not ready yet!"

	.no_dead_strip	_vidioc_vdec_g_fmt
.subsections_via_symbols
