	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_png_do_read_swap_alpha         ## -- Begin function png_do_read_swap_alpha
	.p2align	4, 0x90
_png_do_read_swap_alpha:                ## @png_do_read_swap_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_16
## %bb.1:
	cmpl	$8, 16(%rbx)
	jne	LBB0_9
## %bb.2:
	testq	%rax, %rax
	jle	LBB0_38
## %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
	movdqu	-64(%rcx), %xmm0
	movdqu	-48(%rcx), %xmm1
	movdqu	-32(%rcx), %xmm2
	movdqu	-16(%rcx), %xmm3
	pshufd	$147, %xmm3, %xmm3              ## xmm3 = xmm3[3,0,1,2]
	movdqu	%xmm3, -16(%rcx)
	pshufd	$147, %xmm2, %xmm2              ## xmm2 = xmm2[3,0,1,2]
	movdqu	%xmm2, -32(%rcx)
	pshufd	$147, %xmm1, %xmm1              ## xmm1 = xmm1[3,0,1,2]
	movdqu	%xmm1, -48(%rcx)
	pshufd	$147, %xmm0, %xmm0              ## xmm0 = xmm0[3,0,1,2]
	movdqu	%xmm0, -64(%rcx)
	addq	$-64, %rcx
	addq	$-4, %rax
	jne	LBB0_5
LBB0_6:
	testq	%rdx, %rdx
	je	LBB0_38
## %bb.7:
	shlq	$4, %rdx
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movdqu	-16(%rcx,%rax), %xmm0
	pshufd	$147, %xmm0, %xmm0              ## xmm0 = xmm0[3,0,1,2]
	movdqu	%xmm0, -16(%rcx,%rax)
	addq	$-16, %rax
	movq	%rdx, %rsi
	addq	%rax, %rsi
	jne	LBB0_8
	jmp	LBB0_38
LBB0_16:
	movq	_PNG_COLOR_TYPE_GRAY_ALPHA@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_38
## %bb.17:
	cmpl	$8, 16(%rbx)
	jne	LBB0_31
## %bb.18:
	testq	%rax, %rax
	jle	LBB0_38
## %bb.19:
	movslq	20(%rbx), %rdi
	leaq	(%r14,%rdi,4), %rcx
	cmpq	$1, %rax
	jne	LBB0_21
## %bb.20:
	xorl	%edx, %edx
	jmp	LBB0_29
LBB0_9:
	testq	%rax, %rax
	jle	LBB0_38
## %bb.10:
	movslq	20(%rbx), %rcx
	leaq	(%r14,%rcx,4), %rcx
	cmpq	$1, %rax
	jne	LBB0_12
## %bb.11:
	movq	%rcx, %rsi
	jmp	LBB0_14
LBB0_31:
	testq	%rax, %rax
	jle	LBB0_38
## %bb.32:
	movslq	20(%rbx), %rcx
	leaq	(%r14,%rcx,4), %rcx
	leaq	-1(%rax), %rsi
	movl	%eax, %edx
	andl	$3, %edx
	cmpq	$3, %rsi
	jb	LBB0_35
## %bb.33:
	andq	$-4, %rax
	.p2align	4, 0x90
LBB0_34:                                ## =>This Inner Loop Header: Depth=1
	movdqu	-64(%rcx), %xmm0
	movdqu	-48(%rcx), %xmm1
	movdqu	-32(%rcx), %xmm2
	movdqu	-16(%rcx), %xmm3
	pshufd	$78, %xmm3, %xmm3               ## xmm3 = xmm3[2,3,0,1]
	movdqu	%xmm3, -16(%rcx)
	pshufd	$78, %xmm2, %xmm2               ## xmm2 = xmm2[2,3,0,1]
	movdqu	%xmm2, -32(%rcx)
	pshufd	$78, %xmm1, %xmm1               ## xmm1 = xmm1[2,3,0,1]
	movdqu	%xmm1, -48(%rcx)
	pshufd	$78, %xmm0, %xmm0               ## xmm0 = xmm0[2,3,0,1]
	movdqu	%xmm0, -64(%rcx)
	addq	$-64, %rcx
	addq	$-4, %rax
	jne	LBB0_34
LBB0_35:
	testq	%rdx, %rdx
	je	LBB0_38
## %bb.36:
	shlq	$4, %rdx
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_37:                                ## =>This Inner Loop Header: Depth=1
	movdqu	-16(%rcx,%rax), %xmm0
	pshufd	$78, %xmm0, %xmm0               ## xmm0 = xmm0[2,3,0,1]
	movdqu	%xmm0, -16(%rcx,%rax)
	addq	$-16, %rax
	movq	%rdx, %rsi
	addq	%rax, %rsi
	jne	LBB0_37
	jmp	LBB0_38
LBB0_12:
	movq	%rax, %rdx
	andq	$-2, %rdx
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movq	-8(%rcx), %xmm0                 ## xmm0 = mem[0],zero
	movups	-56(%rcx), %xmm1
	movups	-24(%rcx), %xmm2
	movups	%xmm2, -16(%rcx)
	movq	-32(%rcx), %xmm2                ## xmm2 = mem[0],zero
	punpcklqdq	%xmm2, %xmm0            ## xmm0 = xmm0[0],xmm2[0]
	movdqu	%xmm0, -32(%rcx)
	leaq	-64(%rcx), %rsi
	movq	-40(%rcx), %xmm0                ## xmm0 = mem[0],zero
	movups	%xmm1, -48(%rcx)
	movq	-64(%rcx), %xmm1                ## xmm1 = mem[0],zero
	punpcklqdq	%xmm1, %xmm0            ## xmm0 = xmm0[0],xmm1[0]
	movdqu	%xmm0, -64(%rcx)
	movq	%rsi, %rcx
	addq	$-2, %rdx
	jne	LBB0_13
LBB0_14:
	testb	$1, %al
	je	LBB0_38
## %bb.15:
	movq	-8(%rsi), %xmm0                 ## xmm0 = mem[0],zero
	movups	-24(%rsi), %xmm1
	movups	%xmm1, -16(%rsi)
	movq	-32(%rsi), %xmm1                ## xmm1 = mem[0],zero
	punpcklqdq	%xmm1, %xmm0            ## xmm0 = xmm0[0],xmm1[0]
	movdqu	%xmm0, -32(%rsi)
	jmp	LBB0_38
LBB0_21:
	movq	%rax, %rdx
	andq	$-2, %rdx
	leaq	-2(%rdx), %rsi
	movq	%rsi, %r8
	shrq	%r8
	incq	%r8
	testq	%rsi, %rsi
	je	LBB0_22
## %bb.23:
	movq	%r8, %rsi
	andq	$-2, %rsi
	leaq	(%r14,%rdi,4), %rbx
	addq	$-16, %rbx
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_24:                                ## =>This Inner Loop Header: Depth=1
	movdqu	-16(%rbx,%rdi,4), %xmm0
	movdqu	(%rbx,%rdi,4), %xmm1
	pshufd	$177, %xmm1, %xmm1              ## xmm1 = xmm1[1,0,3,2]
	movdqu	%xmm1, (%rbx,%rdi,4)
	pshufd	$177, %xmm0, %xmm0              ## xmm0 = xmm0[1,0,3,2]
	movdqu	%xmm0, -16(%rbx,%rdi,4)
	addq	$-8, %rdi
	addq	$-2, %rsi
	jne	LBB0_24
	jmp	LBB0_25
LBB0_22:
	xorl	%edi, %edi
LBB0_25:
	testb	$1, %r8b
	je	LBB0_27
## %bb.26:
	movdqu	-16(%rcx,%rdi,4), %xmm0
	pshufd	$177, %xmm0, %xmm0              ## xmm0 = xmm0[1,0,3,2]
	movdqu	%xmm0, -16(%rcx,%rdi,4)
LBB0_27:
	cmpq	%rdx, %rax
	je	LBB0_38
## %bb.28:
	leaq	(,%rdx,8), %rsi
	subq	%rsi, %rcx
LBB0_29:
	subq	%rax, %rdx
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_30:                                ## =>This Inner Loop Header: Depth=1
	rolq	$32, -8(%rcx,%rax,8)
	decq	%rax
	cmpq	%rax, %rdx
	jne	LBB0_30
LBB0_38:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"in png_do_read_swap_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_swap_alpha         ; -- Begin function png_do_read_swap_alpha
	.p2align	2
_png_do_read_swap_alpha:                ; @png_do_read_swap_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_31
; %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_31
; %bb.6:
	ldr	w9, [x20, #16]
	cmp	w9, #8
	b.ne	LBB0_13
; %bb.7:
	cmp	x8, #1
	b.lt	LBB0_31
; %bb.8:
	ldrsw	x9, [x20, #20]
	add	x11, x19, x9, lsl #2
	cmp	x8, #8
	b.hs	LBB0_21
; %bb.9:
	mov	x9, #0
	mov	x10, x11
	b	LBB0_24
LBB0_10:
	cmp	x8, #1
	b.lt	LBB0_31
; %bb.11:
	ldrsw	x9, [x20, #20]
	add	x9, x19, x9, lsl #2
	sub	x9, x9, #32
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	d0, [x9, #24]
	ldur	q1, [x9, #8]
	ldr	d2, [x9]
	mov.d	v0[1], v2[0]
	stp	q0, q1, [x9], #-32
	sub	x8, x8, #1
	cbnz	x8, LBB0_12
	b	LBB0_31
LBB0_13:
	cmp	x8, #1
	b.lt	LBB0_31
; %bb.14:
	ldrsw	x9, [x20, #20]
	add	x11, x19, x9, lsl #2
	cmp	x8, #4
	b.hs	LBB0_26
; %bb.15:
	mov	x9, #0
	mov	x10, x11
	b	LBB0_29
LBB0_16:
	and	x9, x8, #0xfffffffffffffffc
	sub	x10, x11, x9, lsl #4
	sub	x11, x11, #64
	mov	x12, x9
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	ld4.4s	{ v0, v1, v2, v3 }, [x11]
	mov.16b	v4, v3
	mov.16b	v5, v0
	mov.16b	v6, v1
	mov.16b	v7, v2
	st4.4s	{ v4, v5, v6, v7 }, [x11]
	sub	x11, x11, #64
	subs	x12, x12, #4
	b.ne	LBB0_17
; %bb.18:
	cmp	x8, x9
	b.eq	LBB0_31
LBB0_19:
	sub	x10, x10, #16
	sub	x8, x8, x9
LBB0_20:                                ; =>This Inner Loop Header: Depth=1
	ldr	q0, [x10]
	ext.16b	v0, v0, v0, #12
	str	q0, [x10], #-16
	subs	x8, x8, #1
	b.ne	LBB0_20
	b	LBB0_31
LBB0_21:
	and	x9, x8, #0xfffffffffffffff8
	sub	x10, x11, x9, lsl #3
	sub	x11, x11, #32
	mov	x12, x9
LBB0_22:                                ; =>This Inner Loop Header: Depth=1
	ld2.4s	{ v0, v1 }, [x11]
	sub	x13, x11, #32
	ld2.4s	{ v3, v4 }, [x13]
	mov.16b	v2, v0
	mov.16b	v5, v3
	st2.4s	{ v1, v2 }, [x11]
	st2.4s	{ v4, v5 }, [x13]
	sub	x11, x11, #64
	subs	x12, x12, #8
	b.ne	LBB0_22
; %bb.23:
	cmp	x8, x9
	b.eq	LBB0_31
LBB0_24:
	sub	x8, x8, x9
	sub	x9, x10, #8
LBB0_25:                                ; =>This Inner Loop Header: Depth=1
	ldr	d0, [x9]
	rev64.2s	v0, v0
	str	d0, [x9], #-8
	subs	x8, x8, #1
	b.ne	LBB0_25
	b	LBB0_31
LBB0_26:
	and	x9, x8, #0xfffffffffffffffc
	sub	x10, x11, x9, lsl #4
	sub	x11, x11, #64
	mov	x12, x9
LBB0_27:                                ; =>This Inner Loop Header: Depth=1
	ld4.4s	{ v0, v1, v2, v3 }, [x11]
	mov.16b	v4, v2
	mov.16b	v5, v3
	mov.16b	v6, v0
	mov.16b	v7, v1
	st4.4s	{ v4, v5, v6, v7 }, [x11]
	sub	x11, x11, #64
	subs	x12, x12, #4
	b.ne	LBB0_27
; %bb.28:
	cmp	x8, x9
	b.eq	LBB0_31
LBB0_29:
	sub	x8, x8, x9
	sub	x9, x10, #16
LBB0_30:                                ; =>This Inner Loop Header: Depth=1
	ldr	q0, [x9]
	ext.16b	v0, v0, v0, #8
	str	q0, [x9], #-16
	subs	x8, x8, #1
	b.ne	LBB0_30
LBB0_31:
	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_swap_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
