	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_png_do_expand                  ## -- Begin function png_do_expand
	.p2align	4, 0x90
_png_do_expand:                         ## @png_do_expand
	.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
	movq	%rdx, %r12
	movq	%rsi, %r13
	movq	%rdi, %r15
	movl	(%rdi), %r14d
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_png_debug
	movq	8(%r15), %rax
	movq	_PNG_COLOR_TYPE_GRAY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_50
## %bb.1:
	testq	%r12, %r12
	je	LBB0_2
## %bb.3:
	movl	12(%r12), %ecx
	jmp	LBB0_4
LBB0_50:
	testq	%r12, %r12
	je	LBB0_72
## %bb.51:
	movq	_PNG_COLOR_TYPE_RGB@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_72
## %bb.52:
	movl	16(%r15), %eax
	movl	$2, %r10d
	movl	$4, %r8d
	movq	_PNG_COLOR_TYPE_RGB_ALPHA@GOTPCREL(%rip), %r11
	cmpl	$16, %eax
	je	LBB0_61
## %bb.53:
	cmpl	$8, %eax
	jne	LBB0_71
## %bb.54:
	testl	%r14d, %r14d
	jle	LBB0_71
## %bb.55:
	movzbl	(%r12), %eax
	movzbl	4(%r12), %ecx
	movzbl	8(%r12), %r9d
	leal	(,%r14,4), %edx
	movslq	%edx, %rdx
	leaq	-4(%r13,%rdx,4), %rsi
	movslq	24(%r15), %rdx
	leaq	-4(,%rdx,4), %rdi
	addq	%r13, %rdi
	movl	%r14d, %ebx
	jmp	LBB0_56
	.p2align	4, 0x90
LBB0_59:                                ##   in Loop: Header=BB0_56 Depth=1
	movl	$255, %edx
LBB0_60:                                ##   in Loop: Header=BB0_56 Depth=1
	movl	%edx, (%rsi)
	movl	(%rdi), %edx
	movl	%edx, -4(%rsi)
	movl	-4(%rdi), %edx
	movl	%edx, -8(%rsi)
	movl	-8(%rdi), %edx
	addq	$-12, %rdi
	movl	%edx, -12(%rsi)
	addq	$-16, %rsi
	decl	%ebx
	je	LBB0_71
LBB0_56:                                ## =>This Inner Loop Header: Depth=1
	cmpl	%eax, -8(%rdi)
	jne	LBB0_59
## %bb.57:                              ##   in Loop: Header=BB0_56 Depth=1
	cmpl	%ecx, -4(%rdi)
	jne	LBB0_59
## %bb.58:                              ##   in Loop: Header=BB0_56 Depth=1
	xorl	%edx, %edx
	cmpl	%r9d, (%rdi)
	jne	LBB0_59
	jmp	LBB0_60
LBB0_2:
	xorl	%ecx, %ecx
LBB0_4:
	movl	16(%r15), %eax
	cmpl	$7, %eax
	jg	LBB0_33
## %bb.5:
	cmpl	$4, %eax
	je	LBB0_24
## %bb.6:
	cmpl	$2, %eax
	je	LBB0_16
## %bb.7:
	cmpl	$1, %eax
	jne	LBB0_32
## %bb.8:
	movl	%ecx, %eax
	andl	$1, %eax
	movl	%eax, %ecx
	shll	$8, %ecx
	subl	%eax, %ecx
	testl	%r14d, %r14d
	jle	LBB0_32
## %bb.9:
	movl	%ecx, %r11d
	movl	%r14d, %eax
	negl	%eax
	andl	$7, %eax
	leaq	(,%r14,4), %rdi
	addq	%r13, %rdi
	leal	-1(%r14), %ecx
	movl	%ecx, %edx
	shrl	$3, %edx
	leaq	(,%rdx,4), %rbx
	addq	%r13, %rbx
	testl	%ecx, %ecx
	je	LBB0_10
## %bb.11:
	movl	%r14d, %r10d
	andl	$-2, %r10d
	xorl	%r8d, %r8d
	movq	%rbx, %rcx
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %esi
	btl	%eax, %esi
	movl	$255, %esi
	cmovael	%r8d, %esi
	movl	%esi, -4(%rdi)
	leal	1(%rax), %esi
	xorl	%edx, %edx
	cmpl	$7, %eax
	cmovel	%r8d, %esi
	sete	%dl
	shlq	$2, %rdx
	subq	%rdx, %rcx
	negq	%rdx
	leaq	-8(%rdi), %r9
	movl	(%rbx,%rdx), %eax
	btl	%esi, %eax
	movl	$255, %eax
	cmovael	%r8d, %eax
	movl	%eax, -8(%rdi)
	leal	1(%rsi), %eax
	xorl	%edx, %edx
	cmpl	$7, %esi
	cmovel	%r8d, %eax
	sete	%dl
	shlq	$2, %rdx
	subq	%rdx, %rcx
	movq	%rcx, %rbx
	movq	%r9, %rdi
	addl	$-2, %r10d
	jne	LBB0_12
	jmp	LBB0_13
LBB0_61:
	testl	%r14d, %r14d
	jle	LBB0_71
## %bb.62:
	movl	(%r12), %eax
	movl	4(%r12), %ebx
	movzbl	%ah, %edx
	movzbl	%bh, %ecx
	movl	%ecx, %r9d
	movl	8(%r12), %ecx
	movzbl	%ch, %esi
	movl	%esi, -48(%rbp)                 ## 4-byte Spill
	movzbl	%al, %r12d
	movzbl	%bl, %eax
	movzbl	%cl, %ecx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	leal	(,%r14,8), %ecx
	movslq	%ecx, %rcx
	leaq	-4(,%rcx,4), %rsi
	addq	%r13, %rsi
	movslq	24(%r15), %rcx
	leaq	-4(,%rcx,4), %rbx
	addq	%r13, %rbx
	movl	%r14d, %edi
	.p2align	4, 0x90
LBB0_63:                                ## =>This Inner Loop Header: Depth=1
	cmpl	%edx, -20(%rbx)
	jne	LBB0_69
## %bb.64:                              ##   in Loop: Header=BB0_63 Depth=1
	cmpl	%r12d, -16(%rbx)
	jne	LBB0_69
## %bb.65:                              ##   in Loop: Header=BB0_63 Depth=1
	movl	%r9d, %ecx
	cmpl	%r9d, -12(%rbx)
	jne	LBB0_69
## %bb.66:                              ##   in Loop: Header=BB0_63 Depth=1
	cmpl	%eax, -8(%rbx)
	jne	LBB0_69
## %bb.67:                              ##   in Loop: Header=BB0_63 Depth=1
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	cmpl	%ecx, -4(%rbx)
	jne	LBB0_69
## %bb.68:                              ##   in Loop: Header=BB0_63 Depth=1
	xorl	%ecx, %ecx
	movl	%eax, %r13d
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	cmpl	%eax, (%rbx)
	movl	%r13d, %eax
	je	LBB0_70
	.p2align	4, 0x90
LBB0_69:                                ##   in Loop: Header=BB0_63 Depth=1
	movl	$255, %ecx
LBB0_70:                                ##   in Loop: Header=BB0_63 Depth=1
	movl	%ecx, (%rsi)
	movl	%ecx, -4(%rsi)
	movl	(%rbx), %ecx
	movl	%ecx, -8(%rsi)
	movl	-4(%rbx), %ecx
	movl	%ecx, -12(%rsi)
	movl	-8(%rbx), %ecx
	movl	%ecx, -16(%rsi)
	movl	-12(%rbx), %ecx
	movl	%ecx, -20(%rsi)
	movl	-16(%rbx), %ecx
	movl	%ecx, -24(%rsi)
	movl	-20(%rbx), %ecx
	addq	$-24, %rbx
	movl	%ecx, -28(%rsi)
	addq	$-32, %rsi
	decl	%edi
	jne	LBB0_63
	jmp	LBB0_71
LBB0_24:
	movl	%ecx, %eax
	andl	$15, %eax
	movl	%eax, %ecx
	shll	$4, %ecx
	orl	%eax, %ecx
	testl	%r14d, %r14d
	jle	LBB0_32
## %bb.25:
	movl	%ecx, %r9d
	leal	(,%r14,4), %ecx
	andl	$4, %ecx
	leaq	(,%r14,4), %r8
	addq	%r13, %r8
	leal	-1(%r14), %eax
	movl	%eax, %edx
	shrl	%edx
	leaq	(,%rdx,4), %rbx
	addq	%r13, %rbx
	testl	%eax, %eax
	je	LBB0_26
## %bb.27:
	movl	%r14d, %edx
	andl	$-2, %edx
	movq	%rbx, %rdi
	.p2align	4, 0x90
LBB0_28:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %eax
	sarl	%cl, %eax
	andl	$15, %eax
	movl	%eax, %esi
	shll	$4, %esi
	orl	%eax, %esi
	movl	%esi, -4(%r8)
	xorl	%esi, %esi
	xorl	%eax, %eax
	cmpl	$4, %ecx
	setne	%sil
	sete	%al
	leaq	(,%rax,4), %rcx
	subq	%rcx, %rdi
	negq	%rcx
	movl	(%rbx,%rcx), %ebx
	leal	(,%rsi,4), %ecx
                                        ## kill: def $cl killed $cl killed $ecx
	sarl	%cl, %ebx
	andl	$15, %ebx
	movl	%ebx, %ecx
	shll	$4, %ecx
	orl	%ebx, %ecx
	movl	%ecx, -8(%r8)
	addq	$-8, %r8
	shlq	$2, %rsi
	subq	%rsi, %rdi
	shll	$2, %eax
	movl	%eax, %ecx
	movq	%rdi, %rbx
	addl	$-2, %edx
	jne	LBB0_28
	jmp	LBB0_29
LBB0_16:
	andl	$3, %ecx
	imull	$85, %ecx, %ecx
	testl	%r14d, %r14d
	jle	LBB0_32
## %bb.17:
	movl	%ecx, %r10d
	leal	(%r14,%r14), %ecx
	addl	$6, %ecx
	notl	%ecx
	andl	$6, %ecx
	leaq	(,%r14,4), %r9
	addq	%r13, %r9
	leal	-1(%r14), %eax
	movl	%eax, %ebx
	andl	$-4, %ebx
	addq	%r13, %rbx
	testl	%eax, %eax
	je	LBB0_18
## %bb.19:
	movl	%r14d, %edx
	andl	$-2, %edx
	xorl	%r8d, %r8d
	movq	%rbx, %rdi
	.p2align	4, 0x90
LBB0_20:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %eax
	sarl	%cl, %eax
	andl	$3, %eax
	imull	$85, %eax, %eax
	movl	%eax, -4(%r9)
	leal	2(%rcx), %eax
	xorl	%esi, %esi
	cmpl	$6, %ecx
	sete	%sil
	cmovel	%r8d, %eax
	shlq	$2, %rsi
	subq	%rsi, %rdi
	negq	%rsi
	movl	(%rbx,%rsi), %esi
	movl	%eax, %ecx
	sarl	%cl, %esi
	andl	$3, %esi
	imull	$85, %esi, %ecx
	movl	%ecx, -8(%r9)
	addq	$-8, %r9
	leal	2(%rax), %ecx
	xorl	%esi, %esi
	cmpl	$6, %eax
	cmovel	%r8d, %ecx
	sete	%sil
	shlq	$2, %rsi
	subq	%rsi, %rdi
	movq	%rdi, %rbx
	addl	$-2, %edx
	jne	LBB0_20
	jmp	LBB0_21
LBB0_10:
	movq	%rbx, %rcx
	movq	%rdi, %r9
LBB0_13:
	testb	$1, %r14b
	je	LBB0_15
## %bb.14:
	movl	(%rcx), %ecx
	xorl	%edx, %edx
	btl	%eax, %ecx
	movl	$255, %eax
	cmovael	%edx, %eax
	movl	%eax, -4(%r9)
LBB0_15:
	movl	%r11d, %ecx
	jmp	LBB0_32
LBB0_26:
	movl	%ecx, %eax
	movq	%rbx, %rdi
LBB0_29:
	testb	$1, %r14b
	je	LBB0_31
## %bb.30:
	movl	(%rdi), %edx
	movl	%eax, %ecx
	sarl	%cl, %edx
	andl	$15, %edx
	movl	%edx, %eax
	shll	$4, %eax
	orl	%edx, %eax
	movl	%eax, -4(%r8)
LBB0_31:
	movl	%r9d, %ecx
	jmp	LBB0_32
LBB0_18:
	movq	%rbx, %rdi
LBB0_21:
	testb	$1, %r14b
	je	LBB0_23
## %bb.22:
	movl	(%rdi), %eax
                                        ## kill: def $cl killed $cl killed $rcx
	sarl	%cl, %eax
	andl	$3, %eax
	imull	$85, %eax, %eax
	movl	%eax, -4(%r9)
LBB0_23:
	movl	%r10d, %ecx
LBB0_32:
	movabsq	$34359738376, %rax              ## imm = 0x800000008
	movq	%rax, 16(%r15)
	movl	%r14d, 24(%r15)
	movl	$8, %eax
LBB0_33:
	testq	%r12, %r12
	je	LBB0_72
## %bb.34:
	movl	$1, %r10d
	movl	$2, %r8d
	movq	_PNG_COLOR_TYPE_GRAY_ALPHA@GOTPCREL(%rip), %r11
	cmpl	$16, %eax
	je	LBB0_44
## %bb.35:
	cmpl	$8, %eax
	jne	LBB0_71
## %bb.36:
	testl	%r14d, %r14d
	jle	LBB0_71
## %bb.37:
	movzbl	%cl, %edx
	leal	(%r14,%r14), %eax
	cltq
	cmpl	$1, %r14d
	jne	LBB0_39
## %bb.38:
	leaq	(,%rax,4), %rax
	addq	%r13, %rax
	leaq	(,%r14,4), %rcx
	addq	%r13, %rcx
	jmp	LBB0_42
LBB0_44:
	testl	%r14d, %r14d
	jle	LBB0_71
## %bb.45:
	movzbl	%ch, %eax
	movl	%eax, %r12d
	movzbl	%cl, %r9d
	movslq	24(%r15), %rax
	leal	(%rax,%rax), %ecx
	movslq	%ecx, %rcx
	leaq	-4(,%rcx,4), %rdx
	addq	%r13, %rdx
	leaq	-4(,%rax,4), %rsi
	addq	%r13, %rsi
	movl	%r14d, %edi
	negl	%edi
	xorl	%ebx, %ebx
	jmp	LBB0_46
	.p2align	4, 0x90
LBB0_48:                                ##   in Loop: Header=BB0_46 Depth=1
	movl	$255, %eax
LBB0_49:                                ##   in Loop: Header=BB0_46 Depth=1
	movl	%eax, (%rdx)
	movl	%eax, -4(%rdx)
	movl	(%rsi,%rcx,4), %eax
	movl	%eax, -8(%rdx)
	movl	-4(%rsi,%rcx,4), %eax
	movl	%eax, -12(%rdx)
	decq	%rbx
	addq	$-16, %rdx
	cmpl	%ebx, %edi
	je	LBB0_71
LBB0_46:                                ## =>This Inner Loop Header: Depth=1
	leaq	(%rbx,%rbx), %rcx
	movl	%r12d, %eax
	cmpl	%r12d, -4(%rsi,%rbx,8)
	jne	LBB0_48
## %bb.47:                              ##   in Loop: Header=BB0_46 Depth=1
	xorl	%eax, %eax
	cmpl	%r9d, (%rsi,%rcx,4)
	jne	LBB0_48
	jmp	LBB0_49
LBB0_39:
	movl	%r14d, %esi
	andl	$-2, %esi
	leaq	(,%r14,4), %rcx
	shlq	$2, %rax
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_40:                                ## =>This Inner Loop Header: Depth=1
	cmpl	%edx, -4(%r13,%rcx)
	movl	$255, %ebx
	cmovel	%edi, %ebx
	movl	%ebx, -4(%r13,%rax)
	movl	-4(%r13,%rcx), %ebx
	movl	%ebx, -8(%r13,%rax)
	cmpl	%edx, -8(%r13,%rcx)
	movl	$255, %ebx
	cmovel	%edi, %ebx
	movl	%ebx, -12(%r13,%rax)
	movl	-8(%r13,%rcx), %ebx
	movl	%ebx, -16(%r13,%rax)
	addq	$-8, %rcx
	addq	$-16, %rax
	addl	$-2, %esi
	jne	LBB0_40
## %bb.41:
	addq	%r13, %rcx
	addq	%r13, %rax
LBB0_42:
	testb	$1, %r14b
	je	LBB0_71
## %bb.43:
	xorl	%esi, %esi
	cmpl	%edx, -4(%rcx)
	movl	$255, %edx
	cmovel	%esi, %edx
	movl	%edx, -4(%rax)
	movl	-4(%rcx), %ecx
	movl	%ecx, -8(%rax)
LBB0_71:
	movq	(%r11), %rax
	movq	%rax, 8(%r15)
	movl	%r8d, 28(%r15)
	movl	16(%r15), %edi
	movl	%r10d, %ecx
	shll	%cl, %edi
	movl	%edi, 20(%r15)
	movl	%r14d, %esi
	callq	_PNG_ROWBYTES
	movl	%eax, 24(%r15)
LBB0_72:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"in png_do_expand\n"

	.comm	_PNG_COLOR_TYPE_GRAY,8,3        ## @PNG_COLOR_TYPE_GRAY
	.comm	_PNG_COLOR_TYPE_GRAY_ALPHA,8,3  ## @PNG_COLOR_TYPE_GRAY_ALPHA
	.comm	_PNG_COLOR_TYPE_RGB,8,3         ## @PNG_COLOR_TYPE_RGB
	.comm	_PNG_COLOR_TYPE_RGB_ALPHA,8,3   ## @PNG_COLOR_TYPE_RGB_ALPHA
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_png_do_expand                  ; -- Begin function png_do_expand
	.p2align	2
_png_do_expand:                         ; @png_do_expand
	.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	x22, x2
	mov	x21, x1
	mov	x19, x0
	ldr	w20, [x0]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_png_debug
	ldr	x8, [x19, #8]
Lloh2:
	adrp	x9, _PNG_COLOR_TYPE_GRAY@GOTPAGE
Lloh3:
	ldr	x9, [x9, _PNG_COLOR_TYPE_GRAY@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.1:
	cbz	x22, LBB0_15
; %bb.2:
	ldr	w8, [x22, #12]
	b	LBB0_16
LBB0_3:
	cbz	x22, LBB0_59
; %bb.4:
Lloh5:
	adrp	x9, _PNG_COLOR_TYPE_RGB@GOTPAGE
Lloh6:
	ldr	x9, [x9, _PNG_COLOR_TYPE_RGB@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_59
; %bb.5:
	ldr	w8, [x19, #16]
	cmp	w8, #16
	b.eq	LBB0_23
; %bb.6:
	cmp	w8, #8
	b.ne	LBB0_35
; %bb.7:
	cmp	w20, #1
	b.lt	LBB0_35
; %bb.8:
	ldrb	w9, [x22]
	ldrb	w10, [x22, #4]
	ldrb	w11, [x22, #8]
	lsl	w8, w20, #2
	add	x8, x21, w8, sxtw #2
	sub	x12, x8, #4
	ldrsw	x8, [x19, #24]
	add	x8, x21, x8, lsl #2
	sub	x14, x8, #4
Lloh8:
	adrp	x8, _PNG_COLOR_TYPE_RGB_ALPHA@GOTPAGE
Lloh9:
	ldr	x8, [x8, _PNG_COLOR_TYPE_RGB_ALPHA@GOTPAGEOFF]
	mov	x13, x20
	b	LBB0_11
LBB0_9:                                 ;   in Loop: Header=BB0_11 Depth=1
	mov	w15, #255
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	str	w15, [x12]
	ldr	w15, [x14]
	stur	w15, [x12, #-4]
	ldur	w15, [x14, #-4]
	stur	w15, [x12, #-8]
	ldur	w15, [x14, #-8]
	sub	x14, x14, #12
	stur	w15, [x12, #-12]
	sub	x12, x12, #16
	sub	w13, w13, #1
	cbz	w13, LBB0_34
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldur	w15, [x14, #-8]
	cmp	w15, w9
	b.ne	LBB0_9
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	ldur	w15, [x14, #-4]
	cmp	w15, w10
	b.ne	LBB0_9
; %bb.13:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	w15, [x14]
	cmp	w15, w11
	b.ne	LBB0_9
; %bb.14:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	w15, #0
	b	LBB0_10
LBB0_15:
	mov	w8, #0
LBB0_16:
	ldr	w9, [x19, #16]
	cmp	w9, #7
	b.gt	LBB0_43
; %bb.17:
	cmp	w9, #4
	b.eq	LBB0_36
; %bb.18:
	cmp	w9, #2
	b.eq	LBB0_39
; %bb.19:
	cmp	w9, #1
	b.ne	LBB0_42
; %bb.20:
	and	w8, w8, #0x1
	lsl	w9, w8, #8
	sub	w8, w9, w8
	subs	w10, w20, #1
	b.lt	LBB0_42
; %bb.21:
	neg	w9, w20
	and	w9, w9, #0x7
	lsr	w10, w10, #3
	add	x10, x21, w10, uxtw #2
	sub	x11, x21, #4
	mov	x12, #-4
	mov	x13, x20
LBB0_22:                                ; =>This Inner Loop Header: Depth=1
	ldr	w14, [x10]
	lsr	w14, w14, w9
	sbfx	w14, w14, #0, #1
	and	w14, w14, #0xff
	str	w14, [x11, x13, lsl #2]
	cmp	w9, #7
	csel	x14, x12, xzr, eq
	add	x10, x10, x14
	csinc	w9, wzr, w9, eq
	sub	x13, x13, #1
	cbnz	w13, LBB0_22
	b	LBB0_42
LBB0_23:
	cmp	w20, #1
	b.lt	LBB0_35
; %bb.24:
	ldp	w8, w13, [x22]
	ubfx	w9, w8, #8, #8
	ubfx	w10, w13, #8, #8
	ldr	w14, [x22, #8]
	ubfx	w11, w14, #8, #8
	and	w12, w8, #0xff
	and	w13, w13, #0xff
	and	w14, w14, #0xff
	lsl	w8, w20, #3
	add	x8, x21, w8, sxtw #2
	sub	x15, x8, #4
	ldrsw	x8, [x19, #24]
	add	x8, x21, x8, lsl #2
	sub	x16, x8, #12
Lloh10:
	adrp	x8, _PNG_COLOR_TYPE_RGB_ALPHA@GOTPAGE
Lloh11:
	ldr	x8, [x8, _PNG_COLOR_TYPE_RGB_ALPHA@GOTPAGEOFF]
	mov	x17, x20
LBB0_25:                                ; =>This Inner Loop Header: Depth=1
	ldur	w0, [x16, #-12]
	cmp	w0, w9
	b.ne	LBB0_32
; %bb.26:                               ;   in Loop: Header=BB0_25 Depth=1
	ldur	w0, [x16, #-8]
	cmp	w0, w12
	b.ne	LBB0_32
; %bb.27:                               ;   in Loop: Header=BB0_25 Depth=1
	ldur	w0, [x16, #-4]
	cmp	w0, w10
	b.ne	LBB0_32
; %bb.28:                               ;   in Loop: Header=BB0_25 Depth=1
	ldr	w0, [x16]
	cmp	w0, w13
	b.ne	LBB0_32
; %bb.29:                               ;   in Loop: Header=BB0_25 Depth=1
	ldr	w0, [x16, #4]
	cmp	w0, w11
	b.ne	LBB0_32
; %bb.30:                               ;   in Loop: Header=BB0_25 Depth=1
	ldr	w0, [x16, #8]
	cmp	w0, w14
	b.ne	LBB0_32
; %bb.31:                               ;   in Loop: Header=BB0_25 Depth=1
	mov	w0, #0
	b	LBB0_33
LBB0_32:                                ;   in Loop: Header=BB0_25 Depth=1
	mov	w0, #255
LBB0_33:                                ;   in Loop: Header=BB0_25 Depth=1
	stp	w0, w0, [x15, #-4]
	ldr	w0, [x16, #8]
	stur	w0, [x15, #-8]
	ldr	w0, [x16, #4]
	stur	w0, [x15, #-12]
	ldr	w0, [x16]
	stur	w0, [x15, #-16]
	ldur	w0, [x16, #-4]
	stur	w0, [x15, #-20]
	ldur	w0, [x16, #-8]
	stur	w0, [x15, #-24]
	ldur	w0, [x16, #-12]
	stur	w0, [x15, #-28]
	sub	x16, x16, #24
	sub	x15, x15, #32
	sub	w17, w17, #1
	cbnz	w17, LBB0_25
LBB0_34:
	mov	w9, #2
	mov	w10, #4
	b	LBB0_58
LBB0_35:
	mov	w9, #2
	mov	w10, #4
Lloh12:
	adrp	x8, _PNG_COLOR_TYPE_RGB_ALPHA@GOTPAGE
Lloh13:
	ldr	x8, [x8, _PNG_COLOR_TYPE_RGB_ALPHA@GOTPAGEOFF]
	b	LBB0_58
LBB0_36:
	and	w8, w8, #0xf
	bfi	w8, w8, #4, #4
	subs	w9, w20, #1
	b.lt	LBB0_42
; %bb.37:
	ubfiz	w13, w20, #2, #1
	lsr	w9, w9, #1
	add	x9, x21, w9, uxtw #2
	sub	x10, x21, #4
	mov	x11, #-4
	mov	x12, x20
LBB0_38:                                ; =>This Inner Loop Header: Depth=1
	ldr	w14, [x9]
	asr	w14, w14, w13
	cmp	w13, #4
	cset	w13, ne
	and	w14, w14, #0xf
	bfi	w14, w14, #4, #4
	str	w14, [x10, x12, lsl #2]
	csel	x14, x11, xzr, eq
	add	x9, x9, x14
	lsl	w13, w13, #2
	sub	x12, x12, #1
	cbnz	w12, LBB0_38
	b	LBB0_42
LBB0_39:
	and	w8, w8, #0x3
	mov	w9, #85
	mul	w8, w8, w9
	subs	w10, w20, #1
	b.lt	LBB0_42
; %bb.40:
	lsl	w11, w20, #1
	add	w11, w11, #6
	mvn	w11, w11
	and	w12, w11, #0x6
	and	w10, w10, #0xfffffffc
	add	x10, x21, x10
	sub	x11, x21, #4
	mov	x13, #-4
	mov	x14, x20
LBB0_41:                                ; =>This Inner Loop Header: Depth=1
	ldr	w15, [x10]
	asr	w15, w15, w12
	and	w15, w15, #0x3
	mul	w15, w15, w9
	str	w15, [x11, x14, lsl #2]
	add	w15, w12, #2
	cmp	w12, #6
	csel	w12, wzr, w15, eq
	csel	x15, x13, xzr, eq
	add	x10, x10, x15
	sub	x14, x14, #1
	cbnz	w14, LBB0_41
LBB0_42:
	movi.2s	v0, #8
	str	d0, [x19, #16]
	str	w20, [x19, #24]
	mov	w9, #8
LBB0_43:
	cbz	x22, LBB0_59
; %bb.44:
	cmp	w9, #16
	b.eq	LBB0_50
; %bb.45:
	cmp	w9, #8
	b.ne	LBB0_57
; %bb.46:
	cmp	w20, #1
	b.lt	LBB0_57
; %bb.47:
	and	w9, w8, #0xff
	lsl	w8, w20, #1
	sub	x10, x21, #8
	add	x8, x21, w8, sxtw #2
	sub	x11, x8, #4
	mov	w12, #255
Lloh14:
	adrp	x8, _PNG_COLOR_TYPE_GRAY_ALPHA@GOTPAGE
Lloh15:
	ldr	x8, [x8, _PNG_COLOR_TYPE_GRAY_ALPHA@GOTPAGEOFF]
	mov	x13, x20
LBB0_48:                                ; =>This Inner Loop Header: Depth=1
	add	x14, x10, x13, lsl #2
	ldr	w15, [x14, #4]
	cmp	w15, w9
	csel	w15, wzr, w12, eq
	str	w15, [x11]
	ldr	w14, [x14, #4]
	stur	w14, [x11, #-4]
	sub	x11, x11, #8
	sub	x13, x13, #1
	cbnz	w13, LBB0_48
LBB0_49:
	mov	w9, #1
	mov	w10, #2
	b	LBB0_58
LBB0_50:
	cmp	w20, #1
	b.lt	LBB0_57
; %bb.51:
	ubfx	w9, w8, #8, #8
	and	w10, w8, #0xff
	ldrsw	x8, [x19, #24]
	lsl	w11, w8, #1
	add	x11, x21, w11, sxtw #2
	sub	x11, x11, #4
	add	x8, x21, x8, lsl #2
	sub	x13, x8, #4
Lloh16:
	adrp	x8, _PNG_COLOR_TYPE_GRAY_ALPHA@GOTPAGE
Lloh17:
	ldr	x8, [x8, _PNG_COLOR_TYPE_GRAY_ALPHA@GOTPAGEOFF]
	mov	x12, x20
	b	LBB0_54
LBB0_52:                                ;   in Loop: Header=BB0_54 Depth=1
	mov	w14, #255
LBB0_53:                                ;   in Loop: Header=BB0_54 Depth=1
	stp	w14, w14, [x11, #-4]
	ldr	w14, [x13]
	stur	w14, [x11, #-8]
	ldur	w14, [x13, #-4]
	sub	x13, x13, #8
	stur	w14, [x11, #-12]
	sub	x11, x11, #16
	sub	w12, w12, #1
	cbz	w12, LBB0_49
LBB0_54:                                ; =>This Inner Loop Header: Depth=1
	ldur	w14, [x13, #-4]
	cmp	w14, w9
	b.ne	LBB0_52
; %bb.55:                               ;   in Loop: Header=BB0_54 Depth=1
	ldr	w14, [x13]
	cmp	w14, w10
	b.ne	LBB0_52
; %bb.56:                               ;   in Loop: Header=BB0_54 Depth=1
	mov	w14, #0
	b	LBB0_53
LBB0_57:
	mov	w9, #1
	mov	w10, #2
Lloh18:
	adrp	x8, _PNG_COLOR_TYPE_GRAY_ALPHA@GOTPAGE
Lloh19:
	ldr	x8, [x8, _PNG_COLOR_TYPE_GRAY_ALPHA@GOTPAGEOFF]
LBB0_58:
	ldr	x8, [x8]
	str	x8, [x19, #8]
	str	w10, [x19, #28]
	ldr	w8, [x19, #16]
	lsl	w0, w8, w9
	str	w0, [x19, #20]
	mov	x1, x20
	bl	_PNG_ROWBYTES
	str	w0, [x19, #24]
LBB0_59:
	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
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"in png_do_expand\n"

	.comm	_PNG_COLOR_TYPE_GRAY,8,3        ; @PNG_COLOR_TYPE_GRAY
	.comm	_PNG_COLOR_TYPE_GRAY_ALPHA,8,3  ; @PNG_COLOR_TYPE_GRAY_ALPHA
	.comm	_PNG_COLOR_TYPE_RGB,8,3         ; @PNG_COLOR_TYPE_RGB
	.comm	_PNG_COLOR_TYPE_RGB_ALPHA,8,3   ; @PNG_COLOR_TYPE_RGB_ALPHA
.subsections_via_symbols
