	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function qtrle_decode_1bpp
LCPI0_0:
	.long	1                               ## 0x1
	.long	1                               ## 0x1
	.long	1                               ## 0x1
	.long	1                               ## 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_qtrle_decode_1bpp:                     ## @qtrle_decode_1bpp
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r13d
	incl	%r13d
	jne	LBB0_1
LBB0_13:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%rdi, %r12
	movq	16(%rdi), %rax
	movq	(%rax), %rcx
	movq	8(%rax), %rax
	movl	(%rcx), %ecx
	movq	(%rax), %rax
	movl	%esi, %r14d
	movl	%ecx, -56(%rbp)                 ## 4-byte Spill
	subl	%ecx, %r14d
	leaq	16(%rax), %rcx
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	addq	$48, %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	testl	%r13d, %r13d
	je	LBB0_13
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_11 Depth 2
                                        ##     Child Loop BB0_9 Depth 2
	movq	%r12, %rdi
	callq	_bytestream2_get_byte
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_bytestream2_get_byte
	testl	%eax, %eax
	je	LBB0_13
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%eax, %r15d
	testb	$-128, %bl
	jne	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	shll	$4, %ebx
	addl	%ebx, %r14d
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	decl	%r13d
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	addl	-56(%rbp), %eax                 ## 4-byte Folded Reload
	andl	$127, %ebx
	shll	$4, %ebx
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	addl	%eax, %ebx
	movl	%ebx, %r14d
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	xorl	%edi, %edi
	callq	_CHECK_PIXEL_PTR
	cmpl	$-1, %r15d
	je	LBB0_12
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movslq	%r14d, %rbx
	testl	%r15d, %r15d
	js	LBB0_8
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	movl	%r15d, %edi
	shll	$4, %edi
	callq	_CHECK_PIXEL_PTR
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%rbx,4), %rbx
	addl	%r15d, %r15d
	negl	%r15d
	.p2align	4, 0x90
LBB0_11:                                ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%r12, %rdi
	callq	_bytestream2_get_byte
	movl	%eax, %ecx
	shrl	$3, %ecx
	movl	%eax, %edx
	shrl	$2, %edx
	movl	%eax, %esi
	shrl	%esi
	movd	%ecx, %xmm0
	pinsrd	$1, %edx, %xmm0
	pinsrd	$2, %esi, %xmm0
	movl	%eax, %ecx
	movl	%eax, %edx
	movl	%eax, %esi
	pinsrd	$3, %eax, %xmm0
	shrl	$7, %eax
	andl	$1, %eax
	movl	%eax, -16(%rbx)
	shrl	$6, %ecx
	andl	$1, %ecx
	movl	%ecx, -12(%rbx)
	shrl	$5, %edx
	andl	$1, %edx
	movl	%edx, -8(%rbx)
	shrl	$4, %esi
	andl	$1, %esi
	movl	%esi, -4(%rbx)
	pand	LCPI0_0(%rip), %xmm0
	movdqu	%xmm0, (%rbx)
	addq	$32, %rbx
	addl	$8, %r14d
	incl	%r15d
	jne	LBB0_11
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	movl	%r15d, %ebx
	negl	%ebx
	movq	%r12, %rdi
	callq	_bytestream2_get_byte
	movl	%r13d, -52(%rbp)                ## 4-byte Spill
	movl	%eax, %r13d
	movq	%r12, %rdi
	callq	_bytestream2_get_byte
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	shll	$4, %ebx
	movl	%ebx, %edi
	callq	_CHECK_PIXEL_PTR
	movl	%r13d, %r8d
	shrl	$7, %r8d
	andl	$1, %r8d
	movl	%r13d, %r9d
	shrl	$6, %r9d
	andl	$1, %r9d
	movl	%r13d, %r10d
	shrl	$5, %r10d
	andl	$1, %r10d
	movl	%r13d, %r11d
	shrl	$4, %r11d
	movl	%r13d, %eax
	shrl	$3, %eax
	movl	%r13d, %ecx
	shrl	$2, %ecx
	movd	%eax, %xmm0
	movl	%r13d, %eax
	shrl	%eax
	pinsrd	$1, %ecx, %xmm0
	pinsrd	$2, %eax, %xmm0
	andl	$1, %r11d
	pinsrd	$3, %r13d, %xmm0
	movl	-52(%rbp), %r13d                ## 4-byte Reload
	movdqa	LCPI0_0(%rip), %xmm2            ## xmm2 = [1,1,1,1]
	pand	%xmm2, %xmm0
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	movl	%ecx, %edi
	shrl	$7, %edi
	andl	$1, %edi
	movl	%ecx, %ebx
	shrl	$6, %ebx
	movl	%ecx, %eax
	shrl	$3, %eax
	movd	%eax, %xmm1
	movl	%ecx, %eax
	shrl	$2, %eax
	pinsrd	$1, %eax, %xmm1
	andl	$1, %ebx
	movl	%ecx, %eax
	shrl	%eax
	pinsrd	$2, %eax, %xmm1
	movl	%ecx, %eax
	shrl	$5, %eax
	andl	$1, %eax
	pinsrd	$3, %ecx, %xmm1
	shrl	$4, %ecx
	andl	$1, %ecx
	pand	%xmm2, %xmm1
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	leaq	(%rdx,%rsi,4), %rdx
	.p2align	4, 0x90
LBB0_9:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%r8d, -48(%rdx)
	movl	%r9d, -44(%rdx)
	movl	%r10d, -40(%rdx)
	movl	%r11d, -36(%rdx)
	movdqu	%xmm0, -32(%rdx)
	movl	%edi, -16(%rdx)
	movl	%ebx, -12(%rdx)
	movl	%eax, -8(%rdx)
	movl	%ecx, -4(%rdx)
	movdqu	%xmm1, (%rdx)
	addq	$64, %rdx
	addl	$16, %r14d
	incl	%r15d
	jne	LBB0_9
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_qtrle_decode_1bpp
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ; -- Begin function qtrle_decode_1bpp
lCPI0_0:
	.long	4294967289                      ; 0xfffffff9
	.long	4294967290                      ; 0xfffffffa
	.long	4294967291                      ; 0xfffffffb
	.long	4294967292                      ; 0xfffffffc
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3
lCPI0_1:
	.long	4294967293                      ; 0xfffffffd
	.long	4294967294                      ; 0xfffffffe
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_qtrle_decode_1bpp:                     ; @qtrle_decode_1bpp
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	d9, d8, [sp, #32]               ; 16-byte Folded Spill
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	.cfi_offset b8, -104
	.cfi_offset b9, -112
	adds	w23, w2, #1
	b.lo	LBB0_2
LBB0_1:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #32]               ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_2:
	mov	x19, x0
	ldr	x8, [x0, #16]
	ldp	x9, x8, [x8]
	ldr	w24, [x9]
	ldr	x8, [x8]
	sub	w25, w1, w24
	add	x26, x8, #28
	add	x8, x8, #32
	str	x8, [sp, #8]                    ; 8-byte Folded Spill
Lloh0:
	adrp	x8, lCPI0_0@PAGE
Lloh1:
	ldr	q0, [x8, lCPI0_0@PAGEOFF]
	str	q0, [sp, #16]                   ; 16-byte Folded Spill
Lloh2:
	adrp	x8, lCPI0_1@PAGE
Lloh3:
	ldr	d8, [x8, lCPI0_1@PAGEOFF]
	movi.2s	v9, #1
	mov	x28, x25
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	cbz	w23, LBB0_1
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
                                        ;     Child Loop BB0_10 Depth 2
	mov	x0, x19
	bl	_bytestream2_get_byte
	mov	x21, x0
	mov	x0, x19
	bl	_bytestream2_get_byte
	cbz	w0, LBB0_1
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x20, x0
	add	w8, w28, w21, lsl #4
	sub	w9, w23, #1
	ubfiz	w10, w21, #4, #7
	add	w11, w25, w24
	add	w10, w10, w11
	tst	w21, #0x80
	csel	w28, w8, w10, eq
	csel	w23, w23, w9, eq
	csel	w25, w25, w11, eq
	mov	w0, #0
	bl	_CHECK_PIXEL_PTR
	cmn	w20, #1
	b.eq	LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	tbnz	w20, #31, LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	lsl	w0, w20, #4
	bl	_CHECK_PIXEL_PTR
	add	x21, x26, w28, sxtw #2
	neg	w20, w20, lsl #1
LBB0_8:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x19
	bl	_bytestream2_get_byte
	dup.4s	v0, w0
	ldr	q1, [sp, #16]                   ; 16-byte Folded Reload
	ushl.4s	v0, v0, v1
	movi.4s	v1, #1
	and.16b	v0, v0, v1
	stur	q0, [x21, #-28]
	dup.2s	v0, w0
	ushl.2s	v0, v0, v8
	and.8b	v0, v0, v9
	stur	d0, [x21, #-12]
	ubfx	w9, w0, #1, #1
	and	w8, w0, #0x1
	stp	w9, w8, [x21, #-4]
	add	x21, x21, #32
	add	w28, w28, #8
	adds	w20, w20, #1
	b.lo	LBB0_8
	b	LBB0_3
LBB0_9:                                 ;   in Loop: Header=BB0_4 Depth=1
	neg	w27, w20
	mov	x0, x19
	bl	_bytestream2_get_byte
	mov	x21, x0
	mov	x0, x19
	bl	_bytestream2_get_byte
	mov	x22, x0
	lsl	w0, w27, #4
	bl	_CHECK_PIXEL_PTR
	dup.4s	v0, w21
	ldr	q3, [sp, #16]                   ; 16-byte Folded Reload
	ushl.4s	v0, v0, v3
	movi.4s	v4, #1
	and.16b	v0, v0, v4
	dup.2s	v1, w21
	ushl.2s	v1, v1, v8
	and.8b	v1, v1, v9
	ubfx	w8, w21, #1, #1
	and	w9, w21, #0x1
	dup.4s	v2, w22
	ushl.4s	v2, v2, v3
	dup.2s	v3, w22
	and.16b	v2, v2, v4
	ushl.2s	v3, v3, v8
	and.8b	v3, v3, v9
	ubfx	w10, w22, #1, #1
	and	w11, w22, #0x1
	ldr	x12, [sp, #8]                   ; 8-byte Folded Reload
	add	x12, x12, w28, sxtw #2
LBB0_10:                                ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	stur	q0, [x12, #-32]
	stur	d1, [x12, #-16]
	stp	w8, w9, [x12, #-8]
	str	q2, [x12]
	str	d3, [x12, #16]
	stp	w10, w11, [x12, #24]
	add	x12, x12, #64
	add	w28, w28, #16
	adds	w20, w20, #1
	b.lo	LBB0_10
	b	LBB0_3
	.loh AdrpLdr	Lloh2, Lloh3
	.loh AdrpAdrp	Lloh0, Lloh2
	.loh AdrpLdr	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_qtrle_decode_1bpp
.subsections_via_symbols
