	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function png_do_write_invert_alpha
LCPI0_0:
	.long	255                             ## 0xff
	.long	255                             ## 0xff
	.long	255                             ## 0xff
	.long	255                             ## 0xff
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_png_do_write_invert_alpha
	.p2align	4, 0x90
_png_do_write_invert_alpha:             ## @png_do_write_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, %rbx
	movq	%rdi, %r14
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_png_debug
	movq	(%r14), %rax
	movq	_PNG_COLOR_TYPE_RGB_ALPHA@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_17
## %bb.1:
	cmpl	$8, 8(%r14)
	movq	16(%r14), %rax
	jne	LBB0_10
## %bb.2:
	testq	%rax, %rax
	jle	LBB0_34
## %bb.3:
	leaq	-1(%rax), %rdx
	movl	%eax, %ecx
	andl	$3, %ecx
	cmpq	$3, %rdx
	jae	LBB0_5
## %bb.4:
	movq	%rbx, %rdx
	jmp	LBB0_7
LBB0_17:
	movq	_PNG_COLOR_TYPE_GRAY_ALPHA@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_34
## %bb.18:
	cmpl	$8, 8(%r14)
	movq	16(%r14), %rax
	jne	LBB0_27
## %bb.19:
	testq	%rax, %rax
	jle	LBB0_34
## %bb.20:
	cmpq	$9, %rax
	jae	LBB0_22
## %bb.21:
	xorl	%ecx, %ecx
	jmp	LBB0_25
LBB0_10:
	testq	%rax, %rax
	jle	LBB0_34
## %bb.11:
	cmpq	$1, %rax
	jne	LBB0_13
## %bb.12:
	movq	%rbx, %rdx
	jmp	LBB0_15
LBB0_27:
	testq	%rax, %rax
	jle	LBB0_34
## %bb.28:
	cmpq	$1, %rax
	jne	LBB0_30
## %bb.29:
	movq	%rbx, %rdx
	jmp	LBB0_32
LBB0_5:
	andq	$-4, %rax
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	$255, %edx
	subl	12(%rbx), %edx
	movl	%edx, 12(%rbx)
	movl	$255, %edx
	subl	28(%rbx), %edx
	movl	%edx, 28(%rbx)
	movl	$255, %edx
	subl	44(%rbx), %edx
	movl	%edx, 44(%rbx)
	leaq	64(%rbx), %rdx
	movl	$255, %esi
	subl	60(%rbx), %esi
	movl	%esi, 60(%rbx)
	movq	%rdx, %rbx
	addq	$-4, %rax
	jne	LBB0_6
LBB0_7:
	testq	%rcx, %rcx
	je	LBB0_34
## %bb.8:
	shlq	$4, %rcx
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movl	$255, %esi
	subl	12(%rdx,%rax), %esi
	movl	%esi, 12(%rdx,%rax)
	addq	$16, %rax
	cmpq	%rax, %rcx
	jne	LBB0_9
	jmp	LBB0_34
LBB0_13:
	movq	%rax, %rcx
	andq	$-2, %rcx
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movl	$255, %edx
	subl	24(%rbx), %edx
	movl	%edx, 24(%rbx)
	movl	$255, %edx
	subl	28(%rbx), %edx
	movl	%edx, 28(%rbx)
	movl	$255, %edx
	subl	56(%rbx), %edx
	movl	%edx, 56(%rbx)
	leaq	64(%rbx), %rdx
	movl	$255, %esi
	subl	60(%rbx), %esi
	movl	%esi, 60(%rbx)
	movq	%rdx, %rbx
	addq	$-2, %rcx
	jne	LBB0_14
LBB0_15:
	testb	$1, %al
	je	LBB0_34
## %bb.16:
	movl	$255, %eax
	movl	$255, %ecx
	subl	24(%rdx), %ecx
	movl	%ecx, 24(%rdx)
	subl	28(%rdx), %eax
	movl	%eax, 28(%rdx)
	jmp	LBB0_34
LBB0_22:
	movl	%eax, %ecx
	andl	$7, %ecx
	testq	%rcx, %rcx
	movl	$8, %edx
	cmovneq	%rcx, %rdx
	movq	%rax, %rcx
	subq	%rdx, %rcx
	leaq	(%rbx,%rcx,8), %rdx
	xorl	%esi, %esi
	movdqa	LCPI0_0(%rip), %xmm0            ## xmm0 = [255,255,255,255]
	.p2align	4, 0x90
LBB0_23:                                ## =>This Inner Loop Header: Depth=1
	movups	4(%rbx,%rsi,8), %xmm1
	movups	20(%rbx,%rsi,8), %xmm2
	shufps	$136, %xmm2, %xmm1              ## xmm1 = xmm1[0,2],xmm2[0,2]
	movups	36(%rbx,%rsi,8), %xmm2
	movdqa	%xmm0, %xmm3
	psubd	%xmm1, %xmm3
	movups	52(%rbx,%rsi,8), %xmm1
	movd	%xmm3, 4(%rbx,%rsi,8)
	pextrd	$1, %xmm3, 12(%rbx,%rsi,8)
	pextrd	$2, %xmm3, 20(%rbx,%rsi,8)
	pextrd	$3, %xmm3, 28(%rbx,%rsi,8)
	shufps	$136, %xmm1, %xmm2              ## xmm2 = xmm2[0,2],xmm1[0,2]
	movdqa	%xmm0, %xmm1
	psubd	%xmm2, %xmm1
	movd	%xmm1, 36(%rbx,%rsi,8)
	pextrd	$1, %xmm1, 44(%rbx,%rsi,8)
	pextrd	$2, %xmm1, 52(%rbx,%rsi,8)
	pextrd	$3, %xmm1, 60(%rbx,%rsi,8)
	addq	$8, %rsi
	cmpq	%rsi, %rcx
	jne	LBB0_23
## %bb.24:
	movq	%rdx, %rbx
LBB0_25:
	subq	%rcx, %rax
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_26:                                ## =>This Inner Loop Header: Depth=1
	movl	$255, %edx
	subl	4(%rbx,%rcx,8), %edx
	movl	%edx, 4(%rbx,%rcx,8)
	incq	%rcx
	cmpq	%rcx, %rax
	jne	LBB0_26
	jmp	LBB0_34
LBB0_30:
	movq	%rax, %rcx
	andq	$-2, %rcx
	.p2align	4, 0x90
LBB0_31:                                ## =>This Inner Loop Header: Depth=1
	movl	$255, %edx
	subl	8(%rbx), %edx
	movl	%edx, 8(%rbx)
	movl	$255, %edx
	subl	12(%rbx), %edx
	movl	%edx, 12(%rbx)
	movl	$255, %edx
	subl	24(%rbx), %edx
	movl	%edx, 24(%rbx)
	leaq	32(%rbx), %rdx
	movl	$255, %esi
	subl	28(%rbx), %esi
	movl	%esi, 28(%rbx)
	movq	%rdx, %rbx
	addq	$-2, %rcx
	jne	LBB0_31
LBB0_32:
	testb	$1, %al
	je	LBB0_34
## %bb.33:
	movl	$255, %eax
	movl	$255, %ecx
	subl	8(%rdx), %ecx
	movl	%ecx, 8(%rdx)
	subl	12(%rdx), %eax
	movl	%eax, 12(%rdx)
LBB0_34:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"in png_do_write_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_write_invert_alpha      ; -- Begin function png_do_write_invert_alpha
	.p2align	2
_png_do_write_invert_alpha:             ; @png_do_write_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
	ldr	x8, [x20]
Lloh2:
	adrp	x9, _PNG_COLOR_TYPE_RGB_ALPHA@GOTPAGE
Lloh3:
	ldr	x9, [x9, _PNG_COLOR_TYPE_RGB_ALPHA@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.1:
	ldr	w9, [x20, #8]
	ldr	x8, [x20, #16]
	cmp	w9, #8
	b.ne	LBB0_10
; %bb.2:
	cmp	x8, #1
	b.lt	LBB0_36
; %bb.3:
	cmp	x8, #4
	b.hs	LBB0_16
; %bb.4:
	mov	x9, #0
	mov	x10, x19
	b	LBB0_19
LBB0_5:
Lloh5:
	adrp	x9, _PNG_COLOR_TYPE_GRAY_ALPHA@GOTPAGE
Lloh6:
	ldr	x9, [x9, _PNG_COLOR_TYPE_GRAY_ALPHA@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_36
; %bb.6:
	ldr	w9, [x20, #8]
	ldr	x8, [x20, #16]
	cmp	w9, #8
	b.ne	LBB0_13
; %bb.7:
	cmp	x8, #1
	b.lt	LBB0_36
; %bb.8:
	cmp	x8, #4
	b.hs	LBB0_26
; %bb.9:
	mov	x9, #0
	mov	x10, x19
	b	LBB0_29
LBB0_10:
	cmp	x8, #1
	b.lt	LBB0_36
; %bb.11:
	b.ne	LBB0_21
; %bb.12:
	mov	x9, #0
	mov	x10, x19
	b	LBB0_24
LBB0_13:
	cmp	x8, #1
	b.lt	LBB0_36
; %bb.14:
	b.ne	LBB0_31
; %bb.15:
	mov	x9, #0
	mov	x10, x19
	b	LBB0_34
LBB0_16:
	and	x9, x8, #0xfffffffffffffffc
	add	x10, x19, x9, lsl #4
	add	x11, x19, #44
	mov	w12, #255
	mov	x13, x9
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	ldur	w14, [x11, #-32]
	ldur	w15, [x11, #-16]
	ldr	w16, [x11]
	ldr	w17, [x11, #16]
	sub	w14, w12, w14
	sub	w15, w12, w15
	sub	w16, w12, w16
	sub	w17, w12, w17
	stur	w14, [x11, #-32]
	stur	w15, [x11, #-16]
	str	w16, [x11]
	str	w17, [x11, #16]
	add	x11, x11, #64
	subs	x13, x13, #4
	b.ne	LBB0_17
; %bb.18:
	cmp	x8, x9
	b.eq	LBB0_36
LBB0_19:
	add	x10, x10, #12
	sub	x8, x8, x9
	mov	w9, #255
LBB0_20:                                ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x10]
	sub	w11, w9, w11
	str	w11, [x10], #16
	subs	x8, x8, #1
	b.ne	LBB0_20
	b	LBB0_36
LBB0_21:
	and	x9, x8, #0xfffffffffffffffe
	add	x10, x19, x9, lsl #5
	add	x11, x19, #56
	movi	d0, #0x0000ff000000ff
	mov	x12, x9
LBB0_22:                                ; =>This Inner Loop Header: Depth=1
	ldur	d1, [x11, #-32]
	sub.2s	v1, v0, v1
	stur	d1, [x11, #-32]
	ldr	d1, [x11]
	sub.2s	v1, v0, v1
	str	d1, [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
	add	x9, x10, #24
	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
	add	x10, x19, x9, lsl #3
	add	x11, x19, #20
	mov	w12, #255
	mov	x13, x9
LBB0_27:                                ; =>This Inner Loop Header: Depth=1
	ldur	w14, [x11, #-16]
	ldur	w15, [x11, #-8]
	ldr	w16, [x11]
	ldr	w17, [x11, #8]
	sub	w14, w12, w14
	sub	w15, w12, w15
	sub	w16, w12, w16
	sub	w17, w12, w17
	stur	w14, [x11, #-16]
	stur	w15, [x11, #-8]
	str	w16, [x11]
	str	w17, [x11, #8]
	add	x11, x11, #32
	subs	x13, x13, #4
	b.ne	LBB0_27
; %bb.28:
	cmp	x8, x9
	b.eq	LBB0_36
LBB0_29:
	sub	x8, x8, x9
	add	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
	add	x10, x19, x9, lsl #4
	add	x11, x19, #24
	movi	d0, #0x0000ff000000ff
	mov	x12, x9
LBB0_32:                                ; =>This Inner Loop Header: Depth=1
	ldur	d1, [x11, #-16]
	sub.2s	v1, v0, v1
	stur	d1, [x11, #-16]
	ldr	d1, [x11]
	sub.2s	v1, v0, v1
	str	d1, [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
	add	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_write_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
