	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_png_do_read_invert_alpha       ## -- Begin function png_do_read_invert_alpha
	.p2align	4, 0x90
_png_do_read_invert_alpha:              ## @png_do_read_invert_alpha
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_png_debug
	movq	(%rbx), %rax
	movq	8(%rbx), %rcx
	movq	_PNG_COLOR_TYPE_RGB_ALPHA@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_13
## %bb.1:
	cmpl	$8, 16(%rbx)
	jne	LBB0_9
## %bb.2:
	testq	%rax, %rax
	jle	LBB0_28
## %bb.3:
	movslq	20(%rbx), %rcx
	leaq	(%r14,%rcx,4), %rcx
	leaq	-1(%rax), %rsi
	movl	%eax, %edx
	andl	$3, %edx
	cmpq	$3, %rsi
	jb	LBB0_6
## %bb.4:
	andq	$-4, %rax
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	$255, %esi
	subl	-4(%rcx), %esi
	movl	%esi, -4(%rcx)
	movl	$255, %esi
	subl	-20(%rcx), %esi
	movl	%esi, -20(%rcx)
	movl	$255, %esi
	subl	-36(%rcx), %esi
	movl	%esi, -36(%rcx)
	movl	$255, %esi
	subl	-52(%rcx), %esi
	movl	%esi, -52(%rcx)
	addq	$-64, %rcx
	addq	$-4, %rax
	jne	LBB0_5
LBB0_6:
	testq	%rdx, %rdx
	je	LBB0_28
## %bb.7:
	shlq	$4, %rdx
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movl	$255, %esi
	subl	-4(%rcx,%rax), %esi
	movl	%esi, -4(%rcx,%rax)
	addq	$-16, %rax
	movq	%rdx, %rsi
	addq	%rax, %rsi
	jne	LBB0_8
	jmp	LBB0_28
LBB0_13:
	movq	_PNG_COLOR_TYPE_GRAY_ALPHA@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_28
## %bb.14:
	cmpl	$8, 16(%rbx)
	jne	LBB0_22
## %bb.15:
	testq	%rax, %rax
	jle	LBB0_28
## %bb.16:
	movslq	20(%rbx), %rcx
	leaq	(%r14,%rcx,4), %rcx
	leaq	-1(%rax), %rsi
	movl	%eax, %edx
	andl	$3, %edx
	cmpq	$3, %rsi
	jb	LBB0_19
## %bb.17:
	andq	$-4, %rax
	.p2align	4, 0x90
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movl	$255, %esi
	subl	-4(%rcx), %esi
	movl	%esi, -4(%rcx)
	movl	$255, %esi
	subl	-12(%rcx), %esi
	movl	%esi, -12(%rcx)
	movl	$255, %esi
	subl	-20(%rcx), %esi
	movl	%esi, -20(%rcx)
	movl	$255, %esi
	subl	-28(%rcx), %esi
	movl	%esi, -28(%rcx)
	addq	$-32, %rcx
	addq	$-4, %rax
	jne	LBB0_18
LBB0_19:
	testq	%rdx, %rdx
	je	LBB0_28
## %bb.20:
	negq	%rdx
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_21:                                ## =>This Inner Loop Header: Depth=1
	movl	$255, %esi
	subl	-4(%rcx,%rax,8), %esi
	movl	%esi, -4(%rcx,%rax,8)
	decq	%rax
	cmpq	%rax, %rdx
	jne	LBB0_21
	jmp	LBB0_28
LBB0_9:
	testq	%rax, %rax
	jle	LBB0_28
## %bb.10:
	movslq	20(%rbx), %rcx
	leaq	(%r14,%rcx,4), %rcx
	cmpq	$1, %rax
	je	LBB0_26
## %bb.11:
	movq	%rax, %rdx
	andq	$-2, %rdx
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movl	$255, %esi
	subl	-4(%rcx), %esi
	movl	%esi, -4(%rcx)
	movl	$255, %esi
	subl	-8(%rcx), %esi
	movl	%esi, -8(%rcx)
	movl	$255, %esi
	subl	-36(%rcx), %esi
	movl	%esi, -36(%rcx)
	movl	$255, %esi
	subl	-40(%rcx), %esi
	movl	%esi, -40(%rcx)
	addq	$-64, %rcx
	addq	$-2, %rdx
	jne	LBB0_12
	jmp	LBB0_26
LBB0_22:
	testq	%rax, %rax
	jle	LBB0_28
## %bb.23:
	movslq	20(%rbx), %rcx
	leaq	(%r14,%rcx,4), %rcx
	cmpq	$1, %rax
	je	LBB0_26
## %bb.24:
	movq	%rax, %rdx
	andq	$-2, %rdx
	.p2align	4, 0x90
LBB0_25:                                ## =>This Inner Loop Header: Depth=1
	movl	$255, %esi
	subl	-4(%rcx), %esi
	movl	%esi, -4(%rcx)
	movl	$255, %esi
	subl	-8(%rcx), %esi
	movl	%esi, -8(%rcx)
	movl	$255, %esi
	subl	-20(%rcx), %esi
	movl	%esi, -20(%rcx)
	movl	$255, %esi
	subl	-24(%rcx), %esi
	movl	%esi, -24(%rcx)
	addq	$-32, %rcx
	addq	$-2, %rdx
	jne	LBB0_25
LBB0_26:
	testb	$1, %al
	je	LBB0_28
## %bb.27:
	movl	$255, %eax
	movl	$255, %edx
	subl	-4(%rcx), %edx
	movl	%edx, -4(%rcx)
	subl	-8(%rcx), %eax
	movl	%eax, -8(%rcx)
LBB0_28:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"in png_do_read_invert_alpha\n"

	.comm	_PNG_COLOR_TYPE_RGB_ALPHA,8,3   ## @PNG_COLOR_TYPE_RGB_ALPHA
	.comm	_PNG_COLOR_TYPE_GRAY_ALPHA,8,3  ## @PNG_COLOR_TYPE_GRAY_ALPHA
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_png_do_read_invert_alpha       ; -- Begin function png_do_read_invert_alpha
	.p2align	2
_png_do_read_invert_alpha:              ; @png_do_read_invert_alpha
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_png_debug
	ldp	x8, x9, [x20]
Lloh2:
	adrp	x10, _PNG_COLOR_TYPE_RGB_ALPHA@GOTPAGE
Lloh3:
	ldr	x10, [x10, _PNG_COLOR_TYPE_RGB_ALPHA@GOTPAGEOFF]
Lloh4:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_5
; %bb.1:
	ldr	w9, [x20, #16]
	cmp	w9, #8
	b.ne	LBB0_10
; %bb.2:
	cmp	x8, #1
	b.lt	LBB0_36
; %bb.3:
	ldrsw	x9, [x20, #20]
	add	x11, x19, x9, lsl #2
	cmp	x8, #4
	b.hs	LBB0_16
; %bb.4:
	mov	x9, #0
	mov	x10, x11
	b	LBB0_19
LBB0_5:
Lloh5:
	adrp	x10, _PNG_COLOR_TYPE_GRAY_ALPHA@GOTPAGE
Lloh6:
	ldr	x10, [x10, _PNG_COLOR_TYPE_GRAY_ALPHA@GOTPAGEOFF]
Lloh7:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_36
; %bb.6:
	ldr	w9, [x20, #16]
	cmp	w9, #8
	b.ne	LBB0_13
; %bb.7:
	cmp	x8, #1
	b.lt	LBB0_36
; %bb.8:
	ldrsw	x9, [x20, #20]
	add	x11, x19, x9, lsl #2
	cmp	x8, #4
	b.hs	LBB0_26
; %bb.9:
	mov	x9, #0
	mov	x10, x11
	b	LBB0_29
LBB0_10:
	cmp	x8, #1
	b.lt	LBB0_36
; %bb.11:
	ldrsw	x9, [x20, #20]
	add	x11, x19, x9, lsl #2
	cmp	x8, #1
	b.ne	LBB0_21
; %bb.12:
	mov	x9, #0
	mov	x10, x11
	b	LBB0_24
LBB0_13:
	cmp	x8, #1
	b.lt	LBB0_36
; %bb.14:
	ldrsw	x9, [x20, #20]
	add	x11, x19, x9, lsl #2
	cmp	x8, #1
	b.ne	LBB0_31
; %bb.15:
	mov	x9, #0
	mov	x10, x11
	b	LBB0_34
LBB0_16:
	and	x9, x8, #0xfffffffffffffffc
	sub	x10, x11, x9, lsl #4
	sub	x11, x11, #20
	mov	w12, #255
	mov	x13, x9
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	ldr	w14, [x11, #16]
	ldr	w15, [x11]
	ldur	w16, [x11, #-16]
	ldur	w17, [x11, #-32]
	sub	w14, w12, w14
	sub	w15, w12, w15
	sub	w16, w12, w16
	sub	w17, w12, w17
	str	w14, [x11, #16]
	str	w15, [x11]
	stur	w16, [x11, #-16]
	stur	w17, [x11, #-32]
	sub	x11, x11, #64
	sub	x13, x13, #4
	cbnz	x13, LBB0_17
; %bb.18:
	cmp	x8, x9
	b.eq	LBB0_36
LBB0_19:
	sub	x8, x8, x9
	sub	x9, x10, #4
	mov	w10, #255
LBB0_20:                                ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x9]
	sub	w11, w10, w11
	str	w11, [x9], #-16
	subs	x8, x8, #1
	b.ne	LBB0_20
	b	LBB0_36
LBB0_21:
	and	x9, x8, #0xfffffffffffffffe
	sub	x10, x11, x9, lsl #5
	sub	x11, x11, #8
	movi	d0, #0x0000ff000000ff
	mov	x12, x9
LBB0_22:                                ; =>This Inner Loop Header: Depth=1
	ldur	d1, [x11, #-32]
	sub.2s	v1, v0, v1
	ldr	d2, [x11]
	sub.2s	v2, v0, v2
	str	d2, [x11]
	stur	d1, [x11, #-32]
	sub	x11, x11, #64
	subs	x12, x12, #2
	b.ne	LBB0_22
; %bb.23:
	cmp	x8, x9
	b.eq	LBB0_36
LBB0_24:
	sub	x8, x8, x9
	sub	x9, x10, #8
	movi	d0, #0x0000ff000000ff
LBB0_25:                                ; =>This Inner Loop Header: Depth=1
	ldr	d1, [x9]
	sub.2s	v1, v0, v1
	str	d1, [x9], #-32
	subs	x8, x8, #1
	b.ne	LBB0_25
	b	LBB0_36
LBB0_26:
	and	x9, x8, #0xfffffffffffffffc
	sub	x10, x11, x9, lsl #3
	sub	x11, x11, #12
	mov	w12, #255
	mov	x13, x9
LBB0_27:                                ; =>This Inner Loop Header: Depth=1
	ldr	w14, [x11, #8]
	ldr	w15, [x11]
	ldur	w16, [x11, #-8]
	ldur	w17, [x11, #-16]
	sub	w14, w12, w14
	sub	w15, w12, w15
	sub	w16, w12, w16
	sub	w17, w12, w17
	str	w14, [x11, #8]
	str	w15, [x11]
	stur	w16, [x11, #-8]
	stur	w17, [x11, #-16]
	sub	x11, x11, #32
	sub	x13, x13, #4
	cbnz	x13, LBB0_27
; %bb.28:
	cmp	x8, x9
	b.eq	LBB0_36
LBB0_29:
	sub	x8, x8, x9
	sub	x9, x10, #4
	mov	w10, #255
LBB0_30:                                ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x9]
	sub	w11, w10, w11
	str	w11, [x9], #-8
	subs	x8, x8, #1
	b.ne	LBB0_30
	b	LBB0_36
LBB0_31:
	and	x9, x8, #0xfffffffffffffffe
	sub	x10, x11, x9, lsl #4
	sub	x11, x11, #8
	movi	d0, #0x0000ff000000ff
	mov	x12, x9
LBB0_32:                                ; =>This Inner Loop Header: Depth=1
	ldur	d1, [x11, #-16]
	sub.2s	v1, v0, v1
	ldr	d2, [x11]
	sub.2s	v2, v0, v2
	str	d2, [x11]
	stur	d1, [x11, #-16]
	sub	x11, x11, #32
	subs	x12, x12, #2
	b.ne	LBB0_32
; %bb.33:
	cmp	x8, x9
	b.eq	LBB0_36
LBB0_34:
	sub	x8, x8, x9
	sub	x9, x10, #8
	movi	d0, #0x0000ff000000ff
LBB0_35:                                ; =>This Inner Loop Header: Depth=1
	ldr	d1, [x9]
	sub.2s	v1, v0, v1
	str	d1, [x9], #-16
	subs	x8, x8, #1
	b.ne	LBB0_35
LBB0_36:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"in png_do_read_invert_alpha\n"

	.comm	_PNG_COLOR_TYPE_RGB_ALPHA,8,3   ; @PNG_COLOR_TYPE_RGB_ALPHA
	.comm	_PNG_COLOR_TYPE_GRAY_ALPHA,8,3  ; @PNG_COLOR_TYPE_GRAY_ALPHA
.subsections_via_symbols
