	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_png_do_swap                    ## -- Begin function png_do_swap
	.p2align	4, 0x90
_png_do_swap:                           ## @png_do_swap
	.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
	cmpl	$16, (%r14)
	jne	LBB0_9
## %bb.1:
	movq	16(%r14), %rax
	imulq	8(%r14), %rax
	testq	%rax, %rax
	jle	LBB0_9
## %bb.2:
	cmpq	$4, %rax
	jae	LBB0_4
## %bb.3:
	xorl	%edx, %edx
	movq	%rbx, %rcx
	jmp	LBB0_7
LBB0_4:
	movq	%rax, %rdx
	andq	$-4, %rdx
	leaq	(%rbx,%rdx,8), %rcx
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movdqu	(%rbx,%rsi,8), %xmm0
	movdqu	16(%rbx,%rsi,8), %xmm1
	pshufd	$177, %xmm0, %xmm0              ## xmm0 = xmm0[1,0,3,2]
	movdqu	%xmm0, (%rbx,%rsi,8)
	pshufd	$177, %xmm1, %xmm0              ## xmm0 = xmm1[1,0,3,2]
	movdqu	%xmm0, 16(%rbx,%rsi,8)
	addq	$4, %rsi
	cmpq	%rsi, %rdx
	jne	LBB0_5
## %bb.6:
	cmpq	%rdx, %rax
	je	LBB0_9
LBB0_7:
	subq	%rdx, %rax
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	rolq	$32, (%rcx,%rdx,8)
	incq	%rdx
	cmpq	%rdx, %rax
	jne	LBB0_8
LBB0_9:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"in png_do_swap\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_png_do_swap                    ; -- Begin function png_do_swap
	.p2align	2
_png_do_swap:                           ; @png_do_swap
	.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	w8, [x20]
	cmp	w8, #16
	b.ne	LBB0_9
; %bb.1:
	ldp	x8, x9, [x20, #8]
	mul	x9, x9, x8
	cmp	x9, #1
	b.lt	LBB0_9
; %bb.2:
	cmp	x9, #8
	b.hs	LBB0_4
; %bb.3:
	mov	x10, #0
	mov	x8, x19
	b	LBB0_7
LBB0_4:
	and	x10, x9, #0xfffffffffffffff8
	add	x8, x19, x10, lsl #3
	add	x11, x19, #32
	mov	x12, x10
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	sub	x13, x11, #32
	ld2.4s	{ v0, v1 }, [x13]
	ld2.4s	{ v3, v4 }, [x11]
	mov.16b	v2, v0
	mov.16b	v5, v3
	st2.4s	{ v1, v2 }, [x13]
	st2.4s	{ v4, v5 }, [x11]
	add	x11, x11, #64
	subs	x12, x12, #8
	b.ne	LBB0_5
; %bb.6:
	cmp	x9, x10
	b.eq	LBB0_9
LBB0_7:
	sub	x9, x9, x10
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	d0, [x8]
	rev64.2s	v0, v0
	str	d0, [x8], #8
	subs	x9, x9, #1
	b.ne	LBB0_8
LBB0_9:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"in png_do_swap\n"

.subsections_via_symbols
