	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function decode_422_bitstream
_decode_422_bitstream:                  ## @decode_422_bitstream
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r13
	movq	_re@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r13, %rsi
	callq	_OPEN_READER
	movl	%r14d, %r12d
	shrl	$31, %r12d
	addl	%r14d, %r12d
	sarl	%r12d
	movq	%r13, %rdi
	callq	_get_bits_left
                                        ## kill: def $eax killed $eax def $rax
	leal	127(%rax), %r15d
	testl	%eax, %eax
	cmovnsl	%eax, %r15d
	sarl	$7, %r15d
	cmpl	%r15d, %r12d
	jge	LBB0_1
## %bb.10:
	cmpl	$2, %r14d
	jl	LBB0_19
## %bb.11:
	movl	%r12d, %r14d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r13), %rax
	movq	(%rax), %rcx
	movq	8(%rax), %rax
	movq	(%rcx,%rbx,2), %rdi
	movq	(%rax,%rbx), %rsi
	movl	$1, %edx
	callq	_READ_2PIX
	movq	8(%r13), %rax
	movq	(%rax), %rcx
	movq	16(%rax), %rax
	movq	8(%rcx,%rbx,2), %rdi
	movq	(%rax,%rbx), %rsi
	movl	$2, %edx
	callq	_READ_2PIX
	addq	$8, %rbx
	decq	%r14
	jne	LBB0_12
	jmp	LBB0_19
LBB0_1:
	xorl	%ebx, %ebx
	cmpl	$128, %eax
	jl	LBB0_5
## %bb.2:
	movl	%r15d, %r14d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r13), %rax
	movq	(%rax), %rcx
	movq	8(%rax), %rax
	movq	(%rcx,%rbx,2), %rdi
	movq	(%rax,%rbx), %rsi
	movl	$1, %edx
	callq	_READ_2PIX
	movq	8(%r13), %rax
	movq	(%rax), %rcx
	movq	16(%rax), %rax
	movq	8(%rcx,%rbx,2), %rdi
	movq	(%rax,%rbx), %rsi
	movl	$2, %edx
	callq	_READ_2PIX
	addq	$8, %rbx
	decq	%r14
	jne	LBB0_3
## %bb.4:
	movl	%r15d, %ebx
LBB0_5:
	cmpl	%r12d, %ebx
	jge	LBB0_13
## %bb.6:
	movl	%ebx, %ebx
	movl	%r12d, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	leaq	(,%rbx,8), %r15
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	_re@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	movq	%r13, %rsi
	callq	_BITS_LEFT
	testq	%rax, %rax
	jle	LBB0_13
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	8(%r13), %rax
	movq	(%rax), %rcx
	movq	8(%rax), %rax
	movq	(%rcx,%r15,2), %rdi
	movq	(%rax,%r15), %rsi
	movl	$1, %edx
	callq	_READ_2PIX
	movl	(%r14), %edi
	movq	%r13, %rsi
	callq	_BITS_LEFT
	testq	%rax, %rax
	jle	LBB0_13
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	8(%r13), %rax
	movq	(%rax), %rcx
	movq	16(%rax), %rax
	movq	8(%rcx,%r15,2), %rdi
	movq	(%rax,%r15), %rsi
	movl	$2, %edx
	callq	_READ_2PIX
	incq	%rbx
	addq	$8, %r15
	cmpq	%rbx, -48(%rbp)                 ## 8-byte Folded Reload
	jne	LBB0_7
	jmp	LBB0_19
LBB0_13:
	movl	%r12d, %esi
	subl	%ebx, %esi
	jle	LBB0_19
## %bb.14:
	movq	8(%r13), %rcx
	movq	16(%rcx), %r8
	movq	(%rcx), %rax
	movq	8(%rcx), %rdi
	movl	%ebx, %ecx
	leal	1(%rbx), %edx
	testb	$1, %sil
	je	LBB0_16
## %bb.15:
	movq	$0, (%r8,%rcx,8)
	movl	%ebx, %esi
	addl	%esi, %esi
	addl	%ebx, %ebx
	incl	%ebx
	movq	$0, (%rax,%rbx,8)
	movq	$0, (%rdi,%rcx,8)
	movq	$0, (%rax,%rsi,8)
	incq	%rcx
LBB0_16:
	cmpl	%edx, %r12d
	je	LBB0_19
## %bb.17:
	movl	%ecx, %r9d
	andl	$2147483647, %r9d               ## imm = 0x7FFFFFFF
	addq	%r9, %r9
	leaq	(%rdi,%rcx,8), %r10
	addq	$8, %r10
	leaq	(%r8,%rcx,8), %rsi
	addq	$8, %rsi
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movq	$0, -8(%rsi,%rbx,4)
	leaq	(%r9,%rbx), %rdx
	leal	1(%rdx), %edi
	movq	$0, (%rax,%rdi,8)
	movq	$0, -8(%r10,%rbx,4)
	movl	%edx, %edi
	movq	$0, (%rax,%rdi,8)
	movq	$0, (%rsi,%rbx,4)
	leal	2(%rdx), %edi
	addl	$3, %edx
	movq	$0, (%rax,%rdx,8)
	movq	$0, (%r10,%rbx,4)
	movq	$0, (%rax,%rdi,8)
	addl	$2, %ecx
	addq	$4, %rbx
	cmpl	%ecx, %r12d
	jg	LBB0_18
LBB0_19:
	movq	_re@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r13, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_CLOSE_READER                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_re,4,2                         ## @re
	.no_dead_strip	_decode_422_bitstream
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function decode_422_bitstream
_decode_422_bitstream:                  ; @decode_422_bitstream
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x21, _re@GOTPAGE
Lloh1:
	ldr	x21, [x21, _re@GOTPAGEOFF]
	ldr	w0, [x21]
	mov	x1, x19
	bl	_OPEN_READER
	cmp	w20, #0
	cinc	w8, w20, lt
	asr	w22, w8, #1
	mov	x0, x19
	bl	_get_bits_left
	add	w8, w0, #127
	cmp	w0, #0
	csel	w8, w8, w0, lt
	asr	w23, w8, #7
	cmp	w22, w23
	b.ge	LBB0_4
; %bb.1:
	cmp	w20, #2
	b.lt	LBB0_29
; %bb.2:
	mov	x20, #0
	mov	x23, #0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldp	x9, x8, [x8]
	ldr	x0, [x9, x20]
	lsl	x24, x23, #3
	ldr	x1, [x8, x24]
	mov	w2, #1
	bl	_READ_2PIX
	ldr	x8, [x19, #8]
	ldr	x9, [x8]
	add	x9, x9, x20
	ldr	x0, [x9, #8]
	ldr	x8, [x8, #16]
	ldr	x1, [x8, x24]
	mov	w2, #2
	bl	_READ_2PIX
	add	x23, x23, #1
	add	x20, x20, #16
	cmp	x22, x23
	b.ne	LBB0_3
	b	LBB0_29
LBB0_4:
	cmp	w0, #128
	b.lt	LBB0_9
; %bb.5:
	mov	x20, #0
	mov	x24, #0
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldp	x9, x8, [x8]
	ldr	x0, [x9, x20]
	lsl	x25, x24, #3
	ldr	x1, [x8, x25]
	mov	w2, #1
	bl	_READ_2PIX
	ldr	x8, [x19, #8]
	ldr	x9, [x8]
	add	x9, x9, x20
	ldr	x0, [x9, #8]
	ldr	x8, [x8, #16]
	ldr	x1, [x8, x25]
	mov	w2, #2
	bl	_READ_2PIX
	add	x24, x24, #1
	add	x20, x20, #16
	cmp	x23, x24
	b.ne	LBB0_6
; %bb.7:
	cmp	w23, w22
	b.lt	LBB0_10
LBB0_8:
	cmp	w23, w22
	b.lt	LBB0_15
	b	LBB0_29
LBB0_9:
	mov	w23, #0
	cmp	w23, w22
	b.ge	LBB0_8
LBB0_10:
	mov	w23, w23
	lsl	x20, x23, #4
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x21]
	mov	x1, x19
	bl	_BITS_LEFT
	cmp	x0, #1
	b.lt	LBB0_14
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	x8, [x19, #8]
	ldp	x9, x8, [x8]
	ldr	x0, [x9, x20]
	ldr	x1, [x8, x23, lsl #3]
	mov	w2, #1
	bl	_READ_2PIX
	ldr	w0, [x21]
	mov	x1, x19
	bl	_BITS_LEFT
	cmp	x0, #1
	b.lt	LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	x8, [x19, #8]
	ldr	x9, [x8]
	add	x9, x9, x20
	ldr	x0, [x9, #8]
	ldr	x8, [x8, #16]
	ldr	x1, [x8, x23, lsl #3]
	mov	w2, #2
	bl	_READ_2PIX
	add	x23, x23, #1
	add	x20, x20, #16
	cmp	x22, x23
	b.ne	LBB0_11
	b	LBB0_29
LBB0_14:
                                        ; kill: def $w23 killed $w23 killed $x23 def $x23
	cmp	w23, w22
	b.ge	LBB0_29
LBB0_15:
	ldr	x10, [x19, #8]
	ldr	x9, [x10]
	ldp	x10, x8, [x10, #8]
	mov	w11, w23
	mvn	w12, w23
	add	w13, w22, w12
	cmp	w13, #7
	b.lo	LBB0_27
; %bb.16:
	lsl	w12, w23, #1
	adds	w16, w13, w13
	cset	w14, hs
	eor	w17, w12, #0xfffffffe
	cmn	w12, w16
	cset	w15, hs
	cmp	w17, w16
	b.lo	LBB0_27
; %bb.17:
	tbnz	w14, #0, LBB0_27
; %bb.18:
	tbnz	w15, #0, LBB0_27
; %bb.19:
	tbnz	w14, #0, LBB0_27
; %bb.20:
	add	x14, x9, w12, uxtw #3
	add	x15, x14, #8
	lsl	x16, x13, #4
	add	x17, x14, x16
	add	x16, x15, x16
	cmp	x16, x15
	ccmp	x17, x14, #0, hs
	b.lo	LBB0_27
; %bb.21:
	lsl	x15, x11, #3
	mvn	w16, w23
	add	w16, w22, w16
	add	x17, x11, x16
	lsl	x17, x17, #3
	add	x17, x17, #8
	add	x16, x12, w16, uxtw #1
	add	x16, x9, x16, lsl #3
	add	x0, x16, #16
	add	x1, x10, x15
	add	x2, x8, x17
	add	x17, x10, x17
	add	x3, x8, x15
	cmp	x3, x0
	ccmp	x14, x2, #2, lo
	cset	w16, lo
	cmp	x1, x0
	ccmp	x14, x17, #2, lo
	cset	w14, lo
	cmp	x1, x2
	ccmp	x3, x17, #2, lo
	b.lo	LBB0_27
; %bb.22:
	tbnz	w16, #0, LBB0_27
; %bb.23:
	tbnz	w14, #0, LBB0_27
; %bb.24:
	add	x13, x13, #1
	and	x14, x13, #0x1fffffff8
	add	x11, x14, x11
	add	x16, x15, #32
	add	x15, x10, x16
	add	x16, x8, x16
	movi.2d	v0, #0000000000000000
	mov	x17, x14
LBB0_25:                                ; =>This Inner Loop Header: Depth=1
	stp	q0, q0, [x16, #-32]
	stp	q0, q0, [x16], #64
	add	w0, w12, #4
	add	w1, w12, #8
	add	w2, w12, #12
	stp	q0, q0, [x15, #-32]
	stp	q0, q0, [x15], #64
	add	x3, x9, w12, uxtw #3
	add	x0, x9, w0, uxtw #3
	add	x1, x9, w1, uxtw #3
	add	x2, x9, w2, uxtw #3
	stp	q0, q0, [x3]
	stp	q0, q0, [x0]
	stp	q0, q0, [x1]
	add	w12, w12, #16
	stp	q0, q0, [x2]
	subs	x17, x17, #8
	b.ne	LBB0_25
; %bb.26:
	cmp	x13, x14
	b.eq	LBB0_29
LBB0_27:
	lsl	w12, w11, #1
LBB0_28:                                ; =>This Inner Loop Header: Depth=1
	lsl	x13, x11, #3
	str	xzr, [x8, x13]
	add	w14, w12, #1
	str	xzr, [x9, w14, uxtw #3]
	str	xzr, [x10, x13]
	add	x11, x11, #1
	str	xzr, [x9, w12, uxtw #3]
	add	w12, w12, #2
	cmp	w22, w11
	b.gt	LBB0_28
LBB0_29:
	ldr	w0, [x21]
	mov	x1, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_CLOSE_READER
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_re,4,2                         ; @re
	.no_dead_strip	_decode_422_bitstream
.subsections_via_symbols
