	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function decode_gray_bitstream
_decode_gray_bitstream:                 ## @decode_gray_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r12
	movq	_re@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movq	%r12, %rsi
	callq	_OPEN_READER
	movl	%r14d, %ebx
	shrl	$31, %ebx
	addl	%r14d, %ebx
	sarl	%ebx
	movq	%r12, %rdi
	callq	_get_bits_left
                                        ## kill: def $eax killed $eax def $rax
	leal	63(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$6, %ecx
	cmpl	%ecx, %ebx
	jge	LBB0_1
## %bb.5:
	cmpl	$2, %r14d
	jl	LBB0_8
## %bb.6:
	movl	%ebx, %r14d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rax
	movq	(%rax), %rax
	movl	(%rax,%rbx,8), %edi
	movl	4(%rax,%rbx,8), %esi
	xorl	%edx, %edx
	callq	_READ_2PIX
	incq	%rbx
	cmpq	%rbx, %r14
	jne	LBB0_7
	jmp	LBB0_8
LBB0_1:
	cmpl	$2, %r14d
	jl	LBB0_8
## %bb.2:
	movl	%ebx, %r14d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %edi
	movq	%r12, %rsi
	callq	_BITS_LEFT
	testq	%rax, %rax
	jle	LBB0_8
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	8(%r12), %rax
	movq	(%rax), %rax
	movl	(%rax,%rbx,8), %edi
	movl	4(%rax,%rbx,8), %esi
	xorl	%edx, %edx
	callq	_READ_2PIX
	incq	%rbx
	cmpq	%rbx, %r14
	jne	LBB0_3
LBB0_8:
	movl	(%r15), %edi
	movq	%r12, %rsi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_CLOSE_READER                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_re,4,2                         ## @re
	.no_dead_strip	_decode_gray_bitstream
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function decode_gray_bitstream
_decode_gray_bitstream:                 ; @decode_gray_bitstream
	.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	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, #63
	cmp	w0, #0
	csel	w8, w8, w0, lt
	cmp	w22, w8, asr #6
	b.ge	LBB0_4
; %bb.1:
	cmp	w20, #2
	b.lt	LBB0_8
; %bb.2:
	mov	x20, #0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	add	x8, x8, x20
	ldp	w0, w1, [x8]
	mov	w2, #0
	bl	_READ_2PIX
	add	x20, x20, #8
	subs	x22, x22, #1
	b.ne	LBB0_3
	b	LBB0_8
LBB0_4:
	cmp	w20, #2
	b.lt	LBB0_8
; %bb.5:
	mov	x20, #0
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x21]
	mov	x1, x19
	bl	_BITS_LEFT
	cmp	x0, #1
	b.lt	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	add	x8, x8, x20
	ldp	w0, w1, [x8]
	mov	w2, #0
	bl	_READ_2PIX
	add	x20, x20, #8
	subs	x22, x22, #1
	b.ne	LBB0_6
LBB0_8:
	ldr	w0, [x21]
	mov	x1, x19
	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	_CLOSE_READER
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_re,4,2                         ; @re
	.no_dead_strip	_decode_gray_bitstream
.subsections_via_symbols
