	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gsc_g_fmt_mplane               ## -- Begin function gsc_g_fmt_mplane
	.p2align	4, 0x90
_gsc_g_fmt_mplane:                      ## @gsc_g_fmt_mplane
	.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	%rsi, %r15
	movq	%rdi, %r14
	movl	40(%rsi), %esi
	callq	_ctx_get_frame
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_2:
	movl	(%rbx), %r11d
	movl	%r11d, (%r15)
	movl	4(%rbx), %ecx
	movl	%ecx, 4(%r15)
	movq	_V4L2_FIELD_NONE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%edx, 32(%r15)
	movq	8(%rbx), %rdx
	movl	16(%rdx), %esi
	movl	%esi, 28(%r15)
	movl	(%rdx), %r8d
	movl	%r8d, 8(%r15)
	movl	(%r14), %esi
	movl	%esi, 24(%r15)
	testl	%r8d, %r8d
	jle	LBB0_15
## %bb.3:
	movq	8(%rdx), %rsi
	movq	16(%r15), %rdi
	cmpl	$4, %r8d
	jb	LBB0_4
## %bb.5:
	leaq	(%rsi,%r8,4), %rdx
	cmpq	%rdx, %rdi
	jae	LBB0_8
## %bb.6:
	leaq	(%rdi,%r8,8), %rdx
	cmpq	%rdx, %rsi
	jae	LBB0_8
LBB0_4:
	xorl	%edx, %edx
LBB0_11:
	movq	%rdx, %r9
	notq	%r9
	testb	$1, %r8b
	je	LBB0_13
## %bb.12:
	movl	(%rsi,%rdx,4), %r10d
	imull	%r11d, %r10d
	leal	7(%r10), %ebx
	testl	%r10d, %r10d
	cmovnsl	%r10d, %ebx
	sarl	$3, %ebx
	movl	%ebx, (%rdi,%rdx,8)
	imull	%ecx, %ebx
	movl	%ebx, 4(%rdi,%rdx,8)
	orq	$1, %rdx
LBB0_13:
	addq	%r8, %r9
	je	LBB0_15
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rsi,%rdx,4), %ebx
	imull	%r11d, %ebx
	leal	7(%rbx), %eax
	testl	%ebx, %ebx
	cmovnsl	%ebx, %eax
	sarl	$3, %eax
	movl	%eax, (%rdi,%rdx,8)
	imull	%ecx, %eax
	movl	%eax, 4(%rdi,%rdx,8)
	movl	4(%rsi,%rdx,4), %eax
	imull	%r11d, %eax
	leal	7(%rax), %ebx
	testl	%eax, %eax
	cmovnsl	%eax, %ebx
	sarl	$3, %ebx
	movl	%ebx, 8(%rdi,%rdx,8)
	imull	%ecx, %ebx
	movl	%ebx, 12(%rdi,%rdx,8)
	addq	$2, %rdx
	cmpq	%rdx, %r8
	jne	LBB0_14
	jmp	LBB0_15
LBB0_8:
	movl	%r8d, %edx
	andl	$-4, %edx
	movd	%r11d, %xmm0
	pshufd	$80, %xmm0, %xmm0               ## xmm0 = xmm0[0,0,1,1]
	movd	%ecx, %xmm1
	pshufd	$80, %xmm1, %xmm1               ## xmm1 = xmm1[0,0,1,1]
	leaq	(,%r8,4), %r9
	andq	$-16, %r9
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rsi,%rbx), %xmm2              ## xmm2 = mem[0],zero
	movq	8(%rsi,%rbx), %xmm3             ## xmm3 = mem[0],zero
	pmulld	%xmm0, %xmm2
	pmulld	%xmm0, %xmm3
	movdqa	%xmm2, %xmm4
	psrad	$31, %xmm4
	psrld	$29, %xmm4
	paddd	%xmm2, %xmm4
	psrad	$3, %xmm4
	movdqa	%xmm3, %xmm2
	psrad	$31, %xmm2
	psrld	$29, %xmm2
	paddd	%xmm3, %xmm2
	psrad	$3, %xmm2
	movdqa	%xmm4, %xmm3
	pmulld	%xmm1, %xmm3
	movdqa	%xmm2, %xmm5
	pmulld	%xmm1, %xmm5
	punpckldq	%xmm3, %xmm4            ## xmm4 = xmm4[0],xmm3[0],xmm4[1],xmm3[1]
	movdqu	%xmm4, (%rdi,%rbx,2)
	punpckldq	%xmm5, %xmm2            ## xmm2 = xmm2[0],xmm5[0],xmm2[1],xmm5[1]
	movdqu	%xmm2, 16(%rdi,%rbx,2)
	addq	$16, %rbx
	cmpq	%rbx, %r9
	jne	LBB0_9
## %bb.10:
	cmpq	%r8, %rdx
	jne	LBB0_11
LBB0_15:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_FIELD_NONE,4,2            ## @V4L2_FIELD_NONE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gsc_g_fmt_mplane               ; -- Begin function gsc_g_fmt_mplane
	.p2align	2
_gsc_g_fmt_mplane:                      ; @gsc_g_fmt_mplane
	.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, x1
	mov	x20, x0
	ldr	w1, [x1, #40]
	bl	_ctx_get_frame
	mov	x21, x0
	bl	_IS_ERR
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x21
	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
	b	_PTR_ERR
LBB0_2:
	ldp	w8, w9, [x21]
	stp	w8, w9, [x19]
Lloh0:
	adrp	x10, _V4L2_FIELD_NONE@GOTPAGE
Lloh1:
	ldr	x10, [x10, _V4L2_FIELD_NONE@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
	str	w10, [x19, #32]
	ldr	x11, [x21, #8]
	ldr	w12, [x11, #16]
	ldr	w10, [x11]
	str	w10, [x19, #8]
	ldr	w13, [x20]
	stp	w13, w12, [x19, #24]
	cmp	w10, #1
	b.lt	LBB0_11
; %bb.3:
	ldr	x12, [x11, #8]
	ldr	x11, [x19, #16]
	cmp	w10, #4
	b.lo	LBB0_8
; %bb.4:
	add	x13, x12, x10, lsl #2
	add	x14, x11, x10, lsl #3
	cmp	x11, x13
	ccmp	x12, x14, #2, lo
	b.lo	LBB0_8
; %bb.5:
	dup.4s	v0, w8
	and	x13, x10, #0xfffffffc
	dup.4s	v1, w9
	mov	x14, x13
	mov	x15, x11
	mov	x16, x12
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	q2, [x16], #16
	mul.4s	v2, v2, v0
	cmlt.4s	v3, v2, #0
	usra.4s	v2, v3, #29
	sshr.4s	v2, v2, #3
	mul.4s	v3, v2, v1
	st2.4s	{ v2, v3 }, [x15], #32
	subs	x14, x14, #4
	b.ne	LBB0_6
; %bb.7:
	cmp	x13, x10
	b.ne	LBB0_9
	b	LBB0_11
LBB0_8:
	mov	x13, #0
LBB0_9:
	add	x12, x12, x13, lsl #2
	add	x11, x11, x13, lsl #3
	add	x11, x11, #4
	sub	x10, x10, x13
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	w13, [x12], #4
	mul	w13, w13, w8
	add	w14, w13, #7
	cmp	w13, #0
	csel	w13, w14, w13, lt
	asr	w13, w13, #3
	stur	w13, [x11, #-4]
	mul	w13, w13, w9
	str	w13, [x11], #8
	subs	x10, x10, #1
	b.ne	LBB0_10
LBB0_11:
	mov	w0, #0
	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
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_FIELD_NONE,4,2            ; @V4L2_FIELD_NONE
.subsections_via_symbols
