	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function S_TransferPaintBuffer
LCPI0_0:
	.quad	0x3fb999999999999a              ## double 0.10000000000000001
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_S_TransferPaintBuffer
	.p2align	4, 0x90
_S_TransferPaintBuffer:                 ## @S_TransferPaintBuffer
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %ebx
	movq	_dma@GOTPCREL(%rip), %rdx
	movq	16(%rdx), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	_s_testsound@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	$0, (%rax)
	je	LBB0_8
## %bb.1:
	movq	_s_paintedtime@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	movl	%ebx, %r14d
	subl	%eax, %r14d
	testl	%r14d, %r14d
	jle	LBB0_8
## %bb.2:
	cvtsi2sd	%eax, %xmm0
	mulsd	LCPI0_0(%rip), %xmm0
	cvttsd2si	%xmm0, %edi
	callq	_sin
	movq	_dma@GOTPCREL(%rip), %rdx
	imull	$5120000, %eax, %eax            ## imm = 0x4E2000
	movq	_paintbuffer@GOTPCREL(%rip), %r13
	movq	(%r13), %rcx
	movl	%eax, 4(%rcx)
	movl	%eax, (%rcx)
	cmpl	$1, %r14d
	je	LBB0_8
## %bb.3:
	movl	%r14d, %eax
	decq	%rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	$1, %r15d
	cmpl	$2, %r14d
	je	LBB0_6
## %bb.4:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	andq	$-2, %r14
	negq	%r14
	movl	$1, %r15d
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %eax
	addl	%r15d, %eax
	xorps	%xmm0, %xmm0
	cvtsi2sd	%eax, %xmm0
	movsd	LCPI0_0(%rip), %xmm1            ## xmm1 = mem[0],zero
	mulsd	%xmm1, %xmm0
	cvttsd2si	%xmm0, %edi
	callq	_sin
	imull	$5120000, %eax, %eax            ## imm = 0x4E2000
	movq	(%r13), %rcx
	movl	%eax, 4(%rcx,%r15,8)
	movl	%eax, (%rcx,%r15,8)
	movl	(%r12), %eax
	leal	1(%r15,%rax), %eax
	xorps	%xmm0, %xmm0
	cvtsi2sd	%eax, %xmm0
	mulsd	LCPI0_0(%rip), %xmm0
	cvttsd2si	%xmm0, %edi
	callq	_sin
	imull	$5120000, %eax, %eax            ## imm = 0x4E2000
	movq	(%r13), %rcx
	movl	%eax, 12(%rcx,%r15,8)
	movl	%eax, 8(%rcx,%r15,8)
	leaq	(%r14,%r15), %rax
	addq	$2, %rax
	addq	$2, %r15
	cmpq	$1, %rax
	jne	LBB0_5
LBB0_6:
	testb	$1, -48(%rbp)                   ## 1-byte Folded Reload
	movq	_dma@GOTPCREL(%rip), %rdx
	je	LBB0_8
## %bb.7:
	movl	(%r12), %eax
	addl	%r15d, %eax
	xorps	%xmm0, %xmm0
	cvtsi2sd	%eax, %xmm0
	mulsd	LCPI0_0(%rip), %xmm0
	cvttsd2si	%xmm0, %edi
	callq	_sin
	movq	_dma@GOTPCREL(%rip), %rdx
	imull	$5120000, %eax, %eax            ## imm = 0x4E2000
	movq	(%r13), %rcx
	movl	%eax, 4(%rcx,%r15,8)
	movl	%eax, (%rcx,%r15,8)
LBB0_8:
	movl	(%rdx), %esi
	movl	4(%rdx), %eax
	cmpl	$16, %esi
	jne	LBB0_10
## %bb.9:
	cmpl	$2, %eax
	jne	LBB0_10
## %bb.23:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%ebx, %esi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_S_TransferStereo16             ## TAILCALL
LBB0_10:
	movslq	%eax, %r8
	movq	_s_paintedtime@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	subl	%ecx, %ebx
	imull	%r8d, %ebx
	movslq	8(%rdx), %rax
	decq	%rax
	imull	%r8d, %ecx
	movslq	%ecx, %rdx
	andq	%rax, %rdx
	movq	_paintbuffer@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpl	$16, %esi
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	jne	LBB0_18
## %bb.11:
	testl	%ebx, %ebx
	je	LBB0_22
## %bb.12:
	testb	$1, %bl
	jne	LBB0_14
## %bb.13:
	movl	%ebx, %edi
	cmpl	$1, %ebx
	jne	LBB0_16
	jmp	LBB0_22
LBB0_18:
	cmpl	$8, %esi
	jne	LBB0_22
## %bb.19:
	testl	%ebx, %ebx
	je	LBB0_22
## %bb.20:
	shlq	$2, %r8
	movl	$12, %r10d
	subq	%r8, %r10
	movl	$-32768, %r8d                   ## imm = 0x8000
	movl	$255, %r9d
	.p2align	4, 0x90
LBB0_21:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rcx), %esi
	movl	%esi, %edi
	sarl	$8, %edi
	cmpl	$-32767, %edi                   ## imm = 0x8001
	cmovll	%r8d, %edi
	shrl	$8, %edi
	addb	$-128, %dil
	cmpl	$8388608, %esi                  ## imm = 0x800000
	movzbl	%dil, %esi
	cmovgel	%r9d, %esi
	movslq	%edx, %rdi
	incl	%edx
	andl	%eax, %edx
	addq	%r10, %rcx
	movb	%sil, (%r14,%rdi)
                                        ## kill: def $edx killed $edx def $rdx
	decl	%ebx
	jne	LBB0_21
	jmp	LBB0_22
LBB0_14:
	movl	$3, %r10d
	subq	%r8, %r10
	movl	(%rcx), %r9d
	movl	%r9d, %edi
	sarl	$8, %edi
	cmpl	$-32767, %edi                   ## imm = 0x8001
	movl	$-32768, %r11d                  ## imm = 0x8000
	cmovgel	%edi, %r11d
	leal	-1(%rbx), %edi
	cmpl	$8388608, %r9d                  ## imm = 0x800000
	movl	$32767, %esi                    ## imm = 0x7FFF
	cmovll	%r11d, %esi
	leaq	(%rcx,%r10,4), %rcx
	movw	%si, (%r14,%rdx,2)
	incl	%edx
	andl	%eax, %edx
	cmpl	$1, %ebx
	je	LBB0_22
LBB0_16:
	leaq	(,%r8,8), %rsi
	movl	$24, %r9d
	subq	%rsi, %r9
	shlq	$2, %r8
	movl	$12, %r11d
	subq	%r8, %r11
	movl	$-32768, %r8d                   ## imm = 0x8000
	movl	$32767, %r10d                   ## imm = 0x7FFF
	.p2align	4, 0x90
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rcx), %esi
	movl	%esi, %ebx
	sarl	$8, %ebx
	cmpl	$-32767, %ebx                   ## imm = 0x8001
	cmovll	%r8d, %ebx
	cmpl	$8388608, %esi                  ## imm = 0x800000
	cmovgel	%r10d, %ebx
	movslq	%edx, %rsi
	movw	%bx, (%r14,%rsi,2)
	incl	%esi
	andl	%eax, %esi
	movl	(%rcx,%r11), %edx
	movl	%edx, %ebx
	sarl	$8, %ebx
	cmpl	$-32767, %ebx                   ## imm = 0x8001
	cmovll	%r8d, %ebx
	cmpl	$8388608, %edx                  ## imm = 0x800000
	cmovgel	%r10d, %ebx
	leal	1(%rsi), %edx
	andl	%eax, %edx
	addq	%r9, %rcx
	movslq	%esi, %rsi
	movw	%bx, (%r14,%rsi,2)
	addl	$-2, %edi
	jne	LBB0_17
LBB0_22:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_dma,24,3                       ## @dma
	.comm	_s_testsound,8,3                ## @s_testsound
	.comm	_s_paintedtime,4,2              ## @s_paintedtime
	.comm	_paintbuffer,8,3                ## @paintbuffer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_S_TransferPaintBuffer          ; -- Begin function S_TransferPaintBuffer
	.p2align	2
_S_TransferPaintBuffer:                 ; @S_TransferPaintBuffer
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x0
Lloh0:
	adrp	x21, _dma@GOTPAGE
Lloh1:
	ldr	x21, [x21, _dma@GOTPAGEOFF]
	ldr	x19, [x21, #16]
Lloh2:
	adrp	x8, _s_testsound@GOTPAGE
Lloh3:
	ldr	x8, [x8, _s_testsound@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	ldr	x8, [x8]
Lloh5:
	adrp	x22, _s_paintedtime@GOTPAGE
Lloh6:
	ldr	x22, [x22, _s_paintedtime@GOTPAGEOFF]
	cbz	x8, LBB0_5
; %bb.1:
	ldr	w8, [x22]
	sub	w23, w20, w8
	cmp	w23, #1
	b.lt	LBB0_5
; %bb.2:
	scvtf	d0, w8
	mov	w24, #8192
	movk	w24, #78, lsl #16
	mov	x8, #-7378697629483820647
	movk	x8, #39322
	movk	x8, #16313, lsl #48
	fmov	d1, x8
	fmul	d0, d0, d1
	fcvtzs	w0, d0
	bl	_sin
Lloh7:
	adrp	x25, _paintbuffer@GOTPAGE
Lloh8:
	ldr	x25, [x25, _paintbuffer@GOTPAGEOFF]
	ldr	x8, [x25]
	mul	w9, w0, w24
	stp	w9, w9, [x8]
	cmp	w23, #1
	b.eq	LBB0_5
; %bb.3:
	mov	x26, #0
	mov	w27, #1
	mov	x28, #-7378697629483820647
	movk	x28, #39322
	movk	x28, #16313, lsl #48
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x22]
	add	w8, w27, w8
	scvtf	d0, w8
	fmov	d1, x28
	fmul	d0, d0, d1
	fcvtzs	w0, d0
	bl	_sin
	mul	w8, w0, w24
	ldr	x9, [x25]
	add	x9, x9, x26
	stp	w8, w8, [x9, #8]
	add	x27, x27, #1
	add	x26, x26, #8
	cmp	x23, x27
	b.ne	LBB0_4
LBB0_5:
	ldp	w13, w8, [x21]
	cmp	w13, #16
	ccmp	w8, #2, #0, eq
	b.eq	LBB0_10
; %bb.6:
	sxtw	x12, w8
Lloh9:
	adrp	x8, _paintbuffer@GOTPAGE
Lloh10:
	ldr	x8, [x8, _paintbuffer@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	ldr	w11, [x22]
	sub	w9, w20, w11
	mul	w9, w9, w12
	ldr	w10, [x21, #8]
	sub	w10, w10, #1
	mul	w11, w11, w12
	and	w11, w10, w11
	cmp	w13, #16
	b.ne	LBB0_11
; %bb.7:
	cbz	w9, LBB0_14
; %bb.8:
	mov	w13, #12
	sub	x12, x13, x12, lsl #2
	mov	w13, #-32768
	mov	w14, #32767
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w15, [x8]
	asr	w16, w15, #8
	cmn	w16, #8, lsl #12                ; =32768
	csel	w16, w16, w13, gt
	cmp	w15, #2048, lsl #12             ; =8388608
	csel	w15, w14, w16, ge
	strh	w15, [x19, w11, sxtw #1]
	add	w11, w11, #1
	and	w11, w11, w10
	add	x8, x8, x12
	sub	w9, w9, #1
	cbnz	w9, LBB0_9
	b	LBB0_14
LBB0_10:
	mov	x0, x19
	mov	x1, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_S_TransferStereo16
LBB0_11:
	cmp	w13, #8
	ccmp	w9, #0, #4, eq
	b.eq	LBB0_14
; %bb.12:
	mov	w13, #12
	sub	x12, x13, x12, lsl #2
	mov	w13, #-32768
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	w14, [x8]
	asr	w15, w14, #8
	cmn	w15, #8, lsl #12                ; =32768
	csel	w15, w15, w13, gt
	lsr	w15, w15, #8
	eor	w15, w15, #0x80
	cmp	w14, #2048, lsl #12             ; =8388608
	csinv	w14, w15, wzr, lt
	strb	w14, [x19, w11, sxtw]
	add	w11, w11, #1
	and	w11, w11, w10
	add	x8, x8, x12
	sub	w9, w9, #1
	cbnz	w9, LBB0_13
LBB0_14:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_dma,24,3                       ; @dma
	.comm	_s_testsound,8,3                ; @s_testsound
	.comm	_s_paintedtime,4,2              ; @s_paintedtime
	.comm	_paintbuffer,8,3                ; @paintbuffer
.subsections_via_symbols
