	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function calculate_viewport
_calculate_viewport:                    ## @calculate_viewport
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movdqu	8(%rdi), %xmm0
	movdqa	%xmm0, %xmm1
	psrld	$31, %xmm1
	paddd	%xmm0, %xmm1
	psrad	$1, %xmm1
	paddd	%xmm1, %xmm1
	movdqu	%xmm1, (%rsi)
	movdqu	%xmm1, (%rdx)
	movq	(%rdi), %rax
	movq	_PIXEL_FORMAT_420BPP8@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movq	8(%rsi), %xmm0                  ## xmm0 = mem[0],zero
	movdqa	%xmm0, %xmm1
	psrld	$31, %xmm1
	paddd	%xmm0, %xmm1
	psrad	$1, %xmm1
	paddd	%xmm1, %xmm1
	movdqa	%xmm0, %xmm2
	psubd	%xmm1, %xmm2
	paddd	%xmm0, %xmm2
	pextrd	$1, %xmm2, 12(%rsi)
	movd	%xmm2, 8(%rsi)
	movq	(%rsi), %xmm0                   ## xmm0 = mem[0],zero
	punpcklqdq	%xmm2, %xmm0            ## xmm0 = xmm0[0],xmm2[0]
	movdqa	%xmm0, %xmm1
	psrld	$31, %xmm1
	paddd	%xmm0, %xmm1
	psrad	$1, %xmm1
	movdqu	%xmm1, (%rdx)
LBB0_2:
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PIXEL_FORMAT_420BPP8,8,3       ## @PIXEL_FORMAT_420BPP8
	.no_dead_strip	_calculate_viewport
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function calculate_viewport
_calculate_viewport:                    ; @calculate_viewport
	.cfi_startproc
; %bb.0:
	ldp	w8, w9, [x0, #8]
	and	w10, w8, #0x1
	cmp	w8, #0
	cneg	w10, w10, lt
	sub	w8, w8, w10
	and	w10, w9, #0x1
	cmp	w9, #0
	cneg	w10, w10, lt
	sub	w9, w9, w10
	stp	w8, w9, [x1]
	ldp	w10, w11, [x0, #16]
	and	w12, w10, #0x1
	cmp	w10, #0
	cneg	w12, w12, lt
	sub	w10, w10, w12
	and	w12, w11, #0x1
	cmp	w11, #0
	cneg	w12, w12, lt
	sub	w11, w11, w12
	stp	w10, w11, [x1, #8]
	stp	w8, w9, [x2]
	stp	w10, w11, [x2, #8]
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _PIXEL_FORMAT_420BPP8@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PIXEL_FORMAT_420BPP8@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	ldp	w9, w8, [x1, #8]
	and	w10, w8, #0x1
	cmp	w8, #0
	cneg	w10, w10, lt
	add	w8, w10, w8
	and	w10, w9, #0x1
	cmp	w9, #0
	cneg	w10, w10, lt
	add	w9, w10, w9
	stp	w9, w8, [x1, #8]
	ldp	w10, w11, [x1]
	cmp	w10, #0
	cinc	w10, w10, lt
	asr	w10, w10, #1
	cmp	w11, #0
	cinc	w11, w11, lt
	asr	w11, w11, #1
	stp	w10, w11, [x2]
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w8, w8, #1
	cmp	w9, #0
	cinc	w9, w9, lt
	asr	w9, w9, #1
	stp	w9, w8, [x2, #8]
LBB0_2:
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_PIXEL_FORMAT_420BPP8,8,3       ; @PIXEL_FORMAT_420BPP8
	.no_dead_strip	_calculate_viewport
.subsections_via_symbols
