	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bitplanar2chunky
_bitplanar2chunky:                      ## @bitplanar2chunky
	.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
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movl	%esi, %ebx
	movq	%rdi, %r15
	movl	16(%rdi), %edx
	movl	20(%rdi), %esi
	leaq	-44(%rbp), %rdi
	callq	_init_get_bits8
	testq	%rax, %rax
	js	LBB0_11
## %bb.1:
	movl	(%r15), %ecx
	testl	%ecx, %ecx
	jle	LBB0_11
## %bb.2:
	movslq	%ebx, %rdx
	movq	8(%r15), %rax
	shlq	$2, %rdx
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	xorl	%ebx, %ebx
	leaq	-44(%rbp), %r12
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	(%r15), %ecx
LBB0_10:                                ##   in Loop: Header=BB0_3 Depth=1
	incl	%ebx
	cmpl	%ecx, %ebx
	jge	LBB0_11
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
                                        ##       Child Loop BB0_7 Depth 3
	cmpl	$0, (%rax)
	jle	LBB0_10
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	xorl	%edx, %edx
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=2
	movl	4(%r15), %esi
	movq	%r12, %rdi
	callq	_skip_bits
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	incq	%rdx
	movq	8(%r15), %rax
	movslq	(%rax), %rcx
	addq	-64(%rbp), %r14                 ## 8-byte Folded Reload
	cmpq	%rcx, %rdx
	jge	LBB0_9
LBB0_5:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_7 Depth 3
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	cmpl	$0, 4(%rax)
	jle	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=2
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_7:                                 ##   Parent Loop BB0_3 Depth=1
                                        ##     Parent Loop BB0_5 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movq	%r12, %rdi
	callq	_get_bits1
	movl	%ebx, %ecx
	shll	%cl, %eax
	orl	%eax, (%r14,%r13,4)
	incq	%r13
	movq	8(%r15), %rax
	movslq	4(%rax), %rax
	cmpq	%rax, %r13
	jl	LBB0_7
	jmp	LBB0_8
LBB0_11:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_bitplanar2chunky
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bitplanar2chunky
_bitplanar2chunky:                      ; @bitplanar2chunky
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x19, x2
	mov	x21, x1
	mov	x20, x0
	ldp	w2, w1, [x0, #16]
	add	x0, sp, #12
	bl	_init_get_bits8
	tbnz	x0, #63, LBB0_11
; %bb.1:
	ldr	w9, [x20]
	cmp	w9, #1
	b.lt	LBB0_11
; %bb.2:
	mov	w22, #0
	ldr	x8, [x20, #8]
	sbfiz	x21, x21, #2, #32
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w9, [x20]
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	w22, w22, #1
	cmp	w22, w9
	b.ge	LBB0_11
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
                                        ;       Child Loop BB0_10 Depth 3
	ldr	w10, [x8]
	cmp	w10, #1
	b.lt	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x23, #0
	mov	x24, x19
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=2
	ldr	w1, [x20, #4]
	add	x0, sp, #12
	bl	_skip_bits
	add	x23, x23, #1
	ldr	x8, [x20, #8]
	ldrsw	x9, [x8]
	add	x24, x24, x21
	cmp	x23, x9
	b.ge	LBB0_3
LBB0_8:                                 ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_10 Depth 3
	ldr	w8, [x8, #4]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=2
	mov	x25, #0
LBB0_10:                                ;   Parent Loop BB0_5 Depth=1
                                        ;     Parent Loop BB0_8 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	add	x0, sp, #12
	bl	_get_bits1
	lsl	w8, w0, w22
	lsl	x9, x25, #2
	ldr	w10, [x24, x9]
	orr	w8, w10, w8
	str	w8, [x24, x9]
	add	x25, x25, #1
	ldr	x8, [x20, #8]
	ldrsw	x8, [x8, #4]
	cmp	x25, x8
	b.lt	LBB0_10
	b	LBB0_7
LBB0_11:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_bitplanar2chunky
.subsections_via_symbols
