	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vpe_g_fmt
_vpe_g_fmt:                             ## @vpe_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	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	callq	_file2ctx
	movq	%rax, %r15
	movl	(%rax), %edi
	movl	(%rbx), %esi
	callq	_v4l2_m2m_get_vq
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movl	(%rbx), %esi
	movq	%r15, %rdi
	callq	_get_q_data
	movq	%rax, %r14
	movl	44(%rax), %eax
	movl	%eax, 40(%rbx)
	movl	40(%r14), %eax
	movl	%eax, 36(%rbx)
	movq	32(%r14), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%rbx)
	movl	28(%r14), %eax
	movl	%eax, 28(%rbx)
	movl	(%rbx), %edi
	callq	_V4L2_TYPE_IS_OUTPUT
	movq	%rax, %rcx
	movq	%r14, %rax
	testq	%rcx, %rcx
	jne	LBB0_4
## %bb.3:
	movq	_V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_get_q_data
LBB0_4:
	movl	24(%rax), %eax
	movl	%eax, 24(%rbx)
	movl	(%r14), %r8d
	movl	%r8d, 8(%rbx)
	testl	%r8d, %r8d
	jle	LBB0_5
## %bb.6:
	movq	8(%r14), %rdx
	movq	16(%r14), %rsi
	movq	16(%rbx), %rdi
	cmpl	$4, %r8d
	jae	LBB0_8
## %bb.7:
	xorl	%ecx, %ecx
LBB0_17:
	movq	%rcx, %rbx
	notq	%rbx
	testb	$1, %r8b
	je	LBB0_19
## %bb.18:
	movl	(%rsi,%rcx,4), %eax
	movl	%eax, 4(%rdi,%rcx,8)
	movl	(%rdx,%rcx,4), %eax
	movl	%eax, (%rdi,%rcx,8)
	orq	$1, %rcx
LBB0_19:
	xorl	%eax, %eax
	addq	%r8, %rbx
	je	LBB0_21
	.p2align	4, 0x90
LBB0_20:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rsi,%rcx,4), %ebx
	movl	%ebx, 4(%rdi,%rcx,8)
	movl	(%rdx,%rcx,4), %ebx
	movl	%ebx, (%rdi,%rcx,8)
	movl	4(%rsi,%rcx,4), %ebx
	movl	%ebx, 12(%rdi,%rcx,8)
	movl	4(%rdx,%rcx,4), %ebx
	movl	%ebx, 8(%rdi,%rcx,8)
	addq	$2, %rcx
	cmpq	%rcx, %r8
	jne	LBB0_20
	jmp	LBB0_21
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_21
LBB0_5:
	xorl	%eax, %eax
LBB0_21:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	leaq	(%rdi,%r8,8), %rcx
	leaq	(%rsi,%r8,4), %rax
	leaq	(%rdx,%r8,4), %rbx
	cmpq	%rax, %rdi
	setb	%r9b
	cmpq	%rcx, %rsi
	setb	%r10b
	cmpq	%rbx, %rdi
	setb	%al
	cmpq	%rcx, %rdx
	setb	%bl
	xorl	%ecx, %ecx
	testb	%r10b, %r9b
	jne	LBB0_17
## %bb.9:
	andb	%bl, %al
	jne	LBB0_17
## %bb.10:
	movl	%r8d, %ecx
	andl	$-4, %ecx
	leaq	-4(%rcx), %rax
	movq	%rax, %r9
	shrq	$2, %r9
	incq	%r9
	testq	%rax, %rax
	je	LBB0_11
## %bb.12:
	movq	%r9, %rbx
	andq	$-2, %rbx
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movsd	(%rsi,%rax,4), %xmm0            ## xmm0 = mem[0],zero
	movsd	8(%rsi,%rax,4), %xmm1           ## xmm1 = mem[0],zero
	movsd	(%rdx,%rax,4), %xmm2            ## xmm2 = mem[0],zero
	unpcklps	%xmm0, %xmm2                    ## xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1]
	movsd	8(%rdx,%rax,4), %xmm0           ## xmm0 = mem[0],zero
	unpcklps	%xmm1, %xmm0                    ## xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
	movups	%xmm2, (%rdi,%rax,8)
	movups	%xmm0, 16(%rdi,%rax,8)
	movsd	16(%rsi,%rax,4), %xmm0          ## xmm0 = mem[0],zero
	movsd	24(%rsi,%rax,4), %xmm1          ## xmm1 = mem[0],zero
	movsd	16(%rdx,%rax,4), %xmm2          ## xmm2 = mem[0],zero
	unpcklps	%xmm0, %xmm2                    ## xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1]
	movsd	24(%rdx,%rax,4), %xmm0          ## xmm0 = mem[0],zero
	unpcklps	%xmm1, %xmm0                    ## xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
	movups	%xmm2, 32(%rdi,%rax,8)
	movups	%xmm0, 48(%rdi,%rax,8)
	addq	$8, %rax
	addq	$-2, %rbx
	jne	LBB0_13
## %bb.14:
	testb	$1, %r9b
	je	LBB0_16
LBB0_15:
	movsd	(%rsi,%rax,4), %xmm0            ## xmm0 = mem[0],zero
	movsd	8(%rsi,%rax,4), %xmm1           ## xmm1 = mem[0],zero
	movsd	(%rdx,%rax,4), %xmm2            ## xmm2 = mem[0],zero
	unpcklps	%xmm0, %xmm2                    ## xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1]
	movsd	8(%rdx,%rax,4), %xmm0           ## xmm0 = mem[0],zero
	unpcklps	%xmm1, %xmm0                    ## xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
	leaq	(,%rax,8), %rbx
	orq	$16, %rbx
	movups	%xmm2, (%rdi,%rax,8)
	movups	%xmm0, (%rdi,%rbx)
LBB0_16:
	xorl	%eax, %eax
	cmpq	%r8, %rcx
	jne	LBB0_17
	jmp	LBB0_21
LBB0_11:
	xorl	%eax, %eax
	testb	$1, %r9b
	jne	LBB0_15
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,4,2 ## @V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE
	.no_dead_strip	_vpe_g_fmt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vpe_g_fmt
_vpe_g_fmt:                             ; @vpe_g_fmt
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x2
	bl	_file2ctx
	mov	x21, x0
	ldr	w0, [x0]
	ldr	w1, [x19]
	bl	_v4l2_m2m_get_vq
	cbz	x0, LBB0_6
; %bb.1:
	ldr	w1, [x19]
	mov	x0, x21
	bl	_get_q_data
	mov	x20, x0
	ldr	d0, [x0, #40]
	stur	d0, [x19, #36]
	ldr	x8, [x0, #32]
	ldr	w8, [x8]
	ldr	w9, [x0, #28]
	stp	w9, w8, [x19, #28]
	ldr	w0, [x19]
	bl	_V4L2_TYPE_IS_OUTPUT
	mov	x8, x0
	mov	x0, x20
	cbnz	x8, LBB0_3
; %bb.2:
Lloh0:
	adrp	x8, _V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_get_q_data
LBB0_3:
	ldr	w8, [x0, #24]
	str	w8, [x19, #24]
	ldr	w8, [x20]
	str	w8, [x19, #8]
	cmp	w8, #1
	b.lt	LBB0_14
; %bb.4:
	ldr	x9, [x19, #16]
	ldp	x11, x10, [x20, #8]
	cmp	w8, #8
	b.hs	LBB0_7
; %bb.5:
	mov	x12, #0
	b	LBB0_12
LBB0_6:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_15
LBB0_7:
	mov	x12, #0
	add	x14, x9, x8, lsl #3
	lsl	x13, x8, #2
	add	x15, x10, x13
	add	x13, x11, x13
	cmp	x9, x13
	ccmp	x11, x14, #2, lo
	cset	w13, lo
	cmp	x10, x14
	ccmp	x9, x15, #2, lo
	b.lo	LBB0_12
; %bb.8:
	tbnz	w13, #0, LBB0_12
; %bb.9:
	and	x12, x8, #0xfffffff8
	add	x13, x9, #32
	add	x14, x10, #16
	add	x15, x11, #16
	mov	x16, x12
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldp	q1, q3, [x14, #-16]
	ldp	q0, q2, [x15, #-16]
	sub	x17, x13, #32
	st2.4s	{ v0, v1 }, [x17]
	st2.4s	{ v2, v3 }, [x13]
	add	x13, x13, #64
	add	x14, x14, #32
	add	x15, x15, #32
	subs	x16, x16, #8
	b.ne	LBB0_10
; %bb.11:
	cmp	x12, x8
	b.eq	LBB0_14
LBB0_12:
	lsl	x13, x12, #2
	add	x11, x11, x13
	add	x10, x10, x13
	add	x9, x9, x12, lsl #3
	add	x9, x9, #4
	sub	x8, x8, x12
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	w12, [x10], #4
	str	w12, [x9]
	ldr	w12, [x11], #4
	stur	w12, [x9, #-4]
	add	x9, x9, #8
	subs	x8, x8, #1
	b.ne	LBB0_13
LBB0_14:
	mov	w0, #0
LBB0_15:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,4,2 ; @V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE
	.no_dead_strip	_vpe_g_fmt
.subsections_via_symbols
