	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function scaledown
_scaledown:                             ## @scaledown
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
                                        ## kill: def $edx killed $edx def $rdx
	xorl	%ecx, %ecx
	cmpl	$8, %edx
	jl	LBB0_3
## %bb.1:
	leal	-7(%rdx), %r8d
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rsi,%rcx,8), %eax
	movl	%eax, (%rdi,%rcx,4)
	movl	8(%rsi,%rcx,8), %eax
	movl	%eax, 4(%rdi,%rcx,4)
	movl	16(%rsi,%rcx,8), %eax
	movl	%eax, 8(%rdi,%rcx,4)
	movl	24(%rsi,%rcx,8), %eax
	movl	%eax, 12(%rdi,%rcx,4)
	movl	32(%rsi,%rcx,8), %eax
	movl	%eax, 16(%rdi,%rcx,4)
	movl	40(%rsi,%rcx,8), %eax
	movl	%eax, 20(%rdi,%rcx,4)
	movl	48(%rsi,%rcx,8), %eax
	movl	%eax, 24(%rdi,%rcx,4)
	movl	56(%rsi,%rcx,8), %eax
	movl	%eax, 28(%rdi,%rcx,4)
	addq	$8, %rcx
	cmpq	%r8, %rcx
	jb	LBB0_2
LBB0_3:
	cmpl	%edx, %ecx
	jge	LBB0_11
## %bb.4:
	movl	%ecx, %r8d
	movl	%edx, %r10d
	subl	%ecx, %edx
	movq	%r8, %r9
	notq	%r9
	addq	%r10, %r9
	andq	$3, %rdx
	je	LBB0_8
## %bb.5:
	leaq	(%r8,%r8), %rax
	negq	%rdx
	xorl	%r11d, %r11d
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	%eax, %ecx
	andl	$-2, %ecx
	movl	(%rsi,%rcx,4), %ecx
	movl	%ecx, (%rdi,%rax,2)
	decq	%r11
	addq	$2, %rax
	cmpq	%r11, %rdx
	jne	LBB0_6
## %bb.7:
	subq	%r11, %r8
LBB0_8:
	cmpq	$3, %r9
	jb	LBB0_11
## %bb.9:
	subq	%r8, %r10
	leaq	(%r8,%r8), %rcx
	addq	$4, %rcx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	leal	-4(%rcx), %eax
	andl	$-2, %eax
	movl	(%rsi,%rax,4), %eax
	movl	%eax, -8(%rdi,%rcx,2)
	leal	-2(%rcx), %eax
	andl	$-2, %eax
	movl	(%rsi,%rax,4), %eax
	movl	%eax, -4(%rdi,%rcx,2)
	movl	%ecx, %eax
	andl	$-2, %eax
	movl	(%rsi,%rax,4), %eax
	movl	%eax, (%rdi,%rcx,2)
	leal	2(%rcx), %eax
	andl	$-2, %eax
	movl	(%rsi,%rax,4), %eax
	movl	%eax, 4(%rdi,%rcx,2)
	addq	$8, %rcx
	addq	$-4, %r10
	jne	LBB0_10
LBB0_11:
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_scaledown
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function scaledown
_scaledown:                             ; @scaledown
	.cfi_startproc
; %bb.0:
	cmp	w2, #8
	b.lt	LBB0_4
; %bb.1:
	mov	x8, #0
	sub	w9, w2, #7
	add	x10, x0, #16
	add	x11, x1, #32
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldur	w12, [x11, #-32]
	stur	w12, [x10, #-16]
	ldur	w12, [x11, #-24]
	stur	w12, [x10, #-12]
	ldur	w12, [x11, #-16]
	stur	w12, [x10, #-8]
	ldur	w12, [x11, #-8]
	stur	w12, [x10, #-4]
	ldr	w12, [x11]
	str	w12, [x10]
	ldr	w12, [x11, #8]
	str	w12, [x10, #4]
	ldr	w12, [x11, #16]
	str	w12, [x10, #8]
	ldr	w12, [x11, #24]
	str	w12, [x10, #12]
	add	x8, x8, #8
	add	x10, x10, #32
	add	x11, x11, #64
	cmp	x8, x9
	b.lo	LBB0_2
; %bb.3:
	cmp	w8, w2
	b.lt	LBB0_5
	b	LBB0_7
LBB0_4:
	mov	w8, #0
	cmp	w8, w2
	b.ge	LBB0_7
LBB0_5:
	mov	w10, w8
	mov	w11, w2
	lsl	x9, x10, #1
	sub	x10, x11, x10
	add	x8, x0, w8, uxtw #2
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	and	x11, x9, #0xfffffffe
	ldr	w11, [x1, x11, lsl #2]
	str	w11, [x8], #4
	add	x9, x9, #2
	subs	x10, x10, #1
	b.ne	LBB0_6
LBB0_7:
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_scaledown
.subsections_via_symbols
