	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_png_do_pack                    ## -- Begin function png_do_pack
	.p2align	4, 0x90
_png_do_pack:                           ## @png_do_pack
	.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	%edx, %r14d
	movq	%rsi, %r12
	movq	%rdi, %r15
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_png_debug
	cmpl	$8, (%r15)
	jne	LBB0_57
## %bb.1:
	cmpl	$1, 4(%r15)
	jne	LBB0_57
## %bb.2:
	cmpl	$4, %r14d
	je	LBB0_39
## %bb.3:
	cmpl	$2, %r14d
	je	LBB0_23
## %bb.4:
	cmpl	$1, %r14d
	jne	LBB0_56
## %bb.5:
	movl	8(%r15), %r8d
	testl	%r8d, %r8d
	jle	LBB0_56
## %bb.6:
	cmpl	$1, %r8d
	jne	LBB0_8
## %bb.7:
	xorl	%esi, %esi
	movl	$128, %ecx
	movq	%r12, %rax
	jmp	LBB0_17
LBB0_39:
	movl	8(%r15), %eax
	testl	%eax, %eax
	jle	LBB0_56
## %bb.40:
	cmpl	$1, %eax
	jne	LBB0_42
## %bb.41:
	movl	$4, %ecx
	xorl	%esi, %esi
	movq	%r12, %rdx
LBB0_50:
	movl	%esi, %edi
	testb	$1, %al
	je	LBB0_54
## %bb.51:
	movl	(%rdx), %edi
	andl	$15, %edi
	shll	%cl, %edi
	orl	%esi, %edi
	testl	%ecx, %ecx
	je	LBB0_53
## %bb.52:
	addl	$-4, %ecx
	jmp	LBB0_54
LBB0_23:
	movl	8(%r15), %eax
	testl	%eax, %eax
	jle	LBB0_56
## %bb.24:
	cmpl	$1, %eax
	jne	LBB0_26
## %bb.25:
	movl	$6, %ecx
	xorl	%esi, %esi
	movq	%r12, %rdx
LBB0_34:
	movl	%esi, %edi
	testb	$1, %al
	je	LBB0_38
## %bb.35:
	movl	(%rdx), %edi
	andl	$3, %edi
	shll	%cl, %edi
	orl	%esi, %edi
	testl	%ecx, %ecx
	je	LBB0_37
## %bb.36:
	addl	$-2, %ecx
	jmp	LBB0_38
LBB0_8:
	movl	%r8d, %edi
	andl	$-2, %edi
	xorl	%esi, %esi
	movl	$128, %ecx
	movq	%r12, %rax
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_9 Depth=1
	shrl	%ecx
LBB0_15:                                ##   in Loop: Header=BB0_9 Depth=1
	leaq	8(%rbx), %r12
	addl	$-2, %edi
	je	LBB0_16
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rbx
	movl	(%r12), %edx
	testl	%edx, %edx
	cmovnel	%ecx, %edx
	orl	%esi, %edx
	cmpl	$2, %ecx
	jb	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	shrl	%ecx
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_9 Depth=1
	movl	%edx, (%rax)
	addq	$4, %rax
	movl	$128, %ecx
	xorl	%edx, %edx
LBB0_12:                                ##   in Loop: Header=BB0_9 Depth=1
	movl	4(%rbx), %esi
	testl	%esi, %esi
	cmovnel	%ecx, %esi
	orl	%edx, %esi
	cmpl	$1, %ecx
	ja	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	%esi, (%rax)
	addq	$4, %rax
	movl	$128, %ecx
	xorl	%esi, %esi
	jmp	LBB0_15
LBB0_42:
	movl	%eax, %edi
	andl	$-2, %edi
	movl	$4, %ecx
	xorl	%esi, %esi
	movq	%r12, %rdx
	jmp	LBB0_43
	.p2align	4, 0x90
LBB0_48:                                ##   in Loop: Header=BB0_43 Depth=1
	movl	%esi, (%r12)
	addq	$4, %r12
	xorl	%esi, %esi
	movl	$4, %ecx
LBB0_49:                                ##   in Loop: Header=BB0_43 Depth=1
	addq	$8, %rdx
	addl	$-2, %edi
	je	LBB0_50
LBB0_43:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rdx), %ebx
	andl	$15, %ebx
	shll	%cl, %ebx
	orl	%esi, %ebx
	testl	%ecx, %ecx
	je	LBB0_44
## %bb.45:                              ##   in Loop: Header=BB0_43 Depth=1
	addl	$-4, %ecx
	jmp	LBB0_46
	.p2align	4, 0x90
LBB0_44:                                ##   in Loop: Header=BB0_43 Depth=1
	movl	%ebx, (%r12)
	addq	$4, %r12
	xorl	%ebx, %ebx
	movl	$4, %ecx
LBB0_46:                                ##   in Loop: Header=BB0_43 Depth=1
	movl	4(%rdx), %esi
	andl	$15, %esi
	shll	%cl, %esi
	orl	%ebx, %esi
	testl	%ecx, %ecx
	je	LBB0_48
## %bb.47:                              ##   in Loop: Header=BB0_43 Depth=1
	addl	$-4, %ecx
	jmp	LBB0_49
LBB0_26:
	movl	%eax, %edi
	andl	$-2, %edi
	movl	$6, %ecx
	xorl	%esi, %esi
	movq	%r12, %rdx
	jmp	LBB0_27
	.p2align	4, 0x90
LBB0_32:                                ##   in Loop: Header=BB0_27 Depth=1
	movl	%esi, (%r12)
	addq	$4, %r12
	xorl	%esi, %esi
	movl	$6, %ecx
LBB0_33:                                ##   in Loop: Header=BB0_27 Depth=1
	addq	$8, %rdx
	addl	$-2, %edi
	je	LBB0_34
LBB0_27:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rdx), %ebx
	andl	$3, %ebx
	shll	%cl, %ebx
	orl	%esi, %ebx
	testl	%ecx, %ecx
	je	LBB0_28
## %bb.29:                              ##   in Loop: Header=BB0_27 Depth=1
	addl	$-2, %ecx
	jmp	LBB0_30
	.p2align	4, 0x90
LBB0_28:                                ##   in Loop: Header=BB0_27 Depth=1
	movl	%ebx, (%r12)
	addq	$4, %r12
	xorl	%ebx, %ebx
	movl	$6, %ecx
LBB0_30:                                ##   in Loop: Header=BB0_27 Depth=1
	movl	4(%rdx), %esi
	andl	$3, %esi
	shll	%cl, %esi
	orl	%ebx, %esi
	testl	%ecx, %ecx
	je	LBB0_32
## %bb.31:                              ##   in Loop: Header=BB0_27 Depth=1
	addl	$-2, %ecx
	jmp	LBB0_33
LBB0_16:
	addq	$8, %rbx
	movq	%rbx, %r12
LBB0_17:
	movl	%esi, %edi
	testb	$1, %r8b
	je	LBB0_21
## %bb.18:
	movl	(%r12), %edi
	testl	%edi, %edi
	cmovnel	%ecx, %edi
	orl	%esi, %edi
	cmpl	$1, %ecx
	jbe	LBB0_19
## %bb.20:
	shrl	%ecx
	jmp	LBB0_21
LBB0_19:
	movl	%edi, (%rax)
	addq	$4, %rax
	movl	$128, %ecx
	xorl	%edi, %edi
LBB0_21:
	cmpl	$128, %ecx
	je	LBB0_56
## %bb.22:
	movl	%edi, (%rax)
	jmp	LBB0_56
LBB0_53:
	movl	%edi, (%r12)
	addq	$4, %r12
	xorl	%edi, %edi
	movl	$4, %ecx
LBB0_54:
	cmpl	$4, %ecx
	je	LBB0_56
LBB0_55:
	movl	%edi, (%r12)
LBB0_56:
	movl	%r14d, (%r15)
	imull	4(%r15), %r14d
	movl	%r14d, 12(%r15)
	movl	8(%r15), %esi
	movl	%r14d, %edi
	callq	_PNG_ROWBYTES
	movl	%eax, 16(%r15)
LBB0_57:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_37:
	movl	%edi, (%r12)
	addq	$4, %r12
	xorl	%edi, %edi
	movl	$6, %ecx
LBB0_38:
	cmpl	$6, %ecx
	jne	LBB0_55
	jmp	LBB0_56
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"in png_do_pack\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_png_do_pack                    ; -- Begin function png_do_pack
	.p2align	2
_png_do_pack:                           ; @png_do_pack
	.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, x2
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_png_debug
	ldr	w8, [x19]
	cmp	w8, #8
	b.ne	LBB0_27
; %bb.1:
	ldr	w8, [x19, #4]
	cmp	w8, #1
	b.ne	LBB0_27
; %bb.2:
	cmp	w20, #4
	b.eq	LBB0_12
; %bb.3:
	cmp	w20, #2
	b.eq	LBB0_18
; %bb.4:
	cmp	w20, #1
	b.ne	LBB0_26
; %bb.5:
	ldr	w8, [x19, #8]
	cmp	w8, #1
	b.lt	LBB0_26
; %bb.6:
	mov	w9, #0
	mov	w11, #128
	mov	x10, x21
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	lsr	w11, w11, #1
	subs	w8, w8, #1
	b.eq	LBB0_10
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w12, [x21], #4
	cmp	w12, #0
	csel	w12, wzr, w11, eq
	orr	w9, w12, w9
	cmp	w11, #2
	b.hs	LBB0_7
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	str	w9, [x10], #4
	mov	w11, #128
	mov	w9, #0
	subs	w8, w8, #1
	b.ne	LBB0_8
LBB0_10:
	cmp	w11, #128
	b.eq	LBB0_26
; %bb.11:
	str	w9, [x10]
	b	LBB0_26
LBB0_12:
	ldr	w8, [x19, #8]
	cmp	w8, #1
	b.lt	LBB0_26
; %bb.13:
	mov	w9, #0
	mov	w10, #4
	mov	x11, x21
	b	LBB0_16
LBB0_14:                                ;   in Loop: Header=BB0_16 Depth=1
	sub	w10, w10, #4
LBB0_15:                                ;   in Loop: Header=BB0_16 Depth=1
	add	x11, x11, #4
	subs	w8, w8, #1
	b.eq	LBB0_24
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	ldr	w12, [x11]
	and	w12, w12, #0xf
	lsl	w12, w12, w10
	orr	w9, w12, w9
	cbnz	w10, LBB0_14
; %bb.17:                               ;   in Loop: Header=BB0_16 Depth=1
	str	w9, [x21], #4
	mov	w10, #4
	mov	w9, #0
	b	LBB0_15
LBB0_18:
	ldr	w8, [x19, #8]
	cmp	w8, #1
	b.lt	LBB0_26
; %bb.19:
	mov	w9, #0
	mov	w10, #6
	mov	x11, x21
	b	LBB0_22
LBB0_20:                                ;   in Loop: Header=BB0_22 Depth=1
	sub	w10, w10, #2
LBB0_21:                                ;   in Loop: Header=BB0_22 Depth=1
	add	x11, x11, #4
	subs	w8, w8, #1
	b.eq	LBB0_28
LBB0_22:                                ; =>This Inner Loop Header: Depth=1
	ldr	w12, [x11]
	and	w12, w12, #0x3
	lsl	w12, w12, w10
	orr	w9, w12, w9
	cbnz	w10, LBB0_20
; %bb.23:                               ;   in Loop: Header=BB0_22 Depth=1
	str	w9, [x21], #4
	mov	w10, #6
	mov	w9, #0
	b	LBB0_21
LBB0_24:
	cmp	w10, #4
	b.eq	LBB0_26
LBB0_25:
	str	w9, [x21]
LBB0_26:
	str	w20, [x19]
	ldp	w8, w1, [x19, #4]
	mul	w0, w8, w20
	str	w0, [x19, #12]
	bl	_PNG_ROWBYTES
	str	w0, [x19, #16]
LBB0_27:
	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
LBB0_28:
	cmp	w10, #6
	b.ne	LBB0_25
	b	LBB0_26
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"in png_do_pack\n"

.subsections_via_symbols
