	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function buf_set
_buf_set:                               ## @buf_set
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	cmpq	$0, 16(%rsi)
	movl	(%rdi), %r8d
	je	LBB0_15
## %bb.1:
	testl	%r8d, %r8d
	jle	LBB0_22
## %bb.2:
	movq	8(%rsi), %rcx
	movslq	4(%rdi), %rax
	movslq	%edx, %r10
	imulq	%rax, %r10
	movq	8(%rdi), %rsi
	xorl	%edi, %edi
	cmpl	$4, %r8d
	jb	LBB0_11
## %bb.3:
	movq	%rsi, %rax
	subq	%rcx, %rax
	cmpq	$32, %rax
	jb	LBB0_11
## %bb.4:
	movl	%r8d, %edi
	andl	$-4, %edi
	movq	%r10, %xmm0
	pshufd	$68, %xmm0, %xmm0               ## xmm0 = xmm0[0,1,0,1]
	leaq	-4(%rdi), %rax
	movq	%rax, %r9
	shrq	$2, %r9
	incq	%r9
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	%r9, %rdx
	andq	$-2, %rdx
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movdqu	(%rcx,%rax,8), %xmm1
	movdqu	16(%rcx,%rax,8), %xmm2
	paddq	%xmm0, %xmm1
	paddq	%xmm0, %xmm2
	movdqu	%xmm1, (%rsi,%rax,8)
	movdqu	%xmm2, 16(%rsi,%rax,8)
	movdqu	32(%rcx,%rax,8), %xmm1
	movdqu	48(%rcx,%rax,8), %xmm2
	paddq	%xmm0, %xmm1
	paddq	%xmm0, %xmm2
	movdqu	%xmm1, 32(%rsi,%rax,8)
	movdqu	%xmm2, 48(%rsi,%rax,8)
	addq	$8, %rax
	addq	$-2, %rdx
	jne	LBB0_7
## %bb.8:
	testb	$1, %r9b
	je	LBB0_10
LBB0_9:
	movdqu	(%rcx,%rax,8), %xmm1
	movdqu	16(%rcx,%rax,8), %xmm2
	paddq	%xmm0, %xmm1
	paddq	%xmm0, %xmm2
	movdqu	%xmm1, (%rsi,%rax,8)
	movdqu	%xmm2, 16(%rsi,%rax,8)
LBB0_10:
	cmpq	%r8, %rdi
	je	LBB0_22
LBB0_11:
	movq	%rdi, %r9
	notq	%r9
	addq	%r8, %r9
	movq	%r8, %rdx
	andq	$3, %rdx
	je	LBB0_13
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rcx,%rdi,8), %rax
	addq	%r10, %rax
	movq	%rax, (%rsi,%rdi,8)
	incq	%rdi
	decq	%rdx
	jne	LBB0_12
LBB0_13:
	cmpq	$3, %r9
	jb	LBB0_22
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rcx,%rdi,8), %rax
	addq	%r10, %rax
	movq	%rax, (%rsi,%rdi,8)
	movq	8(%rcx,%rdi,8), %rax
	addq	%r10, %rax
	movq	%rax, 8(%rsi,%rdi,8)
	movq	16(%rcx,%rdi,8), %rax
	addq	%r10, %rax
	movq	%rax, 16(%rsi,%rdi,8)
	movq	24(%rcx,%rdi,8), %rax
	addq	%r10, %rax
	movq	%rax, 24(%rsi,%rdi,8)
	addq	$4, %rdi
	cmpq	%rdi, %r8
	jne	LBB0_14
	jmp	LBB0_22
LBB0_15:
	testl	%r8d, %r8d
	jle	LBB0_22
## %bb.16:
	movq	8(%rsi), %r9
	imull	%r8d, %edx
	movslq	4(%rdi), %rsi
	movq	8(%rdi), %r11
	movslq	%edx, %r10
	testb	$1, %r8b
	jne	LBB0_18
## %bb.17:
	movq	%r8, %rcx
	cmpl	$1, %r8d
	jne	LBB0_20
	jmp	LBB0_22
LBB0_18:
	leaq	-1(%r8), %rcx
	leaq	(%r8,%r10), %rax
	decq	%rax
	imulq	%rsi, %rax
	addq	(%r9), %rax
	movq	%rax, -8(%r11,%r8,8)
	cmpl	$1, %r8d
	je	LBB0_22
LBB0_20:
	leaq	1(%rcx), %rax
	leaq	(%rcx,%r10), %rdx
	addq	$-2, %rdx
	imulq	%rsi, %rdx
	addq	%r10, %rcx
	decq	%rcx
	imulq	%rsi, %rcx
	addq	%rsi, %rsi
	.p2align	4, 0x90
LBB0_21:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r9), %rdi
	addq	%rcx, %rdi
	movq	%rdi, -16(%r11,%rax,8)
	movq	(%r9), %rdi
	addq	%rdx, %rdi
	movq	%rdi, -24(%r11,%rax,8)
	addq	$-2, %rax
	subq	%rsi, %rdx
	subq	%rsi, %rcx
	cmpq	$1, %rax
	ja	LBB0_21
LBB0_22:
	popq	%rbp
	retq
LBB0_5:
	xorl	%eax, %eax
	testb	$1, %r9b
	jne	LBB0_9
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_buf_set
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function buf_set
_buf_set:                               ; @buf_set
	.cfi_startproc
; %bb.0:
                                        ; kill: def $w2 killed $w2 def $x2
	ldr	x9, [x1, #16]
	ldr	w8, [x0]
	cmp	w8, #1
	cbz	x9, LBB0_9
; %bb.1:
	b.lt	LBB0_12
; %bb.2:
	mov	x10, #0
	ldr	x11, [x1, #8]
	ldrsw	x9, [x0, #4]
	sxtw	x12, w2
	mul	x9, x9, x12
	ldr	x12, [x0, #8]
	cmp	w8, #8
	b.lo	LBB0_7
; %bb.3:
	sub	x13, x12, x11
	cmp	x13, #64
	b.lo	LBB0_7
; %bb.4:
	and	x10, x8, #0xfffffff8
	dup.2d	v0, x9
	add	x13, x12, #32
	add	x14, x11, #32
	mov	x15, x10
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldp	q1, q2, [x14, #-32]
	ldp	q3, q4, [x14], #64
	add.2d	v1, v1, v0
	add.2d	v2, v2, v0
	add.2d	v3, v3, v0
	add.2d	v4, v4, v0
	stp	q1, q2, [x13, #-32]
	stp	q3, q4, [x13], #64
	subs	x15, x15, #8
	b.ne	LBB0_5
; %bb.6:
	cmp	x10, x8
	b.eq	LBB0_12
LBB0_7:
	lsl	x13, x10, #3
	add	x12, x12, x13
	add	x11, x11, x13
	sub	x8, x8, x10
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x11], #8
	add	x10, x10, x9
	str	x10, [x12], #8
	subs	x8, x8, #1
	b.ne	LBB0_8
	b	LBB0_12
LBB0_9:
	b.lt	LBB0_12
; %bb.10:
	ldr	x9, [x1, #8]
	mul	w12, w8, w2
	ldrsw	x10, [x0, #4]
	ldr	x11, [x0, #8]
	sub	x11, x11, #8
	add	x12, x8, w12, sxtw
	sub	x12, x12, #1
	mul	x12, x12, x10
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	x13, [x9]
	add	x13, x12, x13
	sub	x12, x12, x10
	str	x13, [x11, x8, lsl #3]
	subs	x8, x8, #1
	b.hi	LBB0_11
LBB0_12:
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_buf_set
.subsections_via_symbols
