	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal4,4byte_literals
	.p2align	2                               ## -- Begin function quantize_triangular_ns
LCPI0_0:
	.long	0xbfc00000                      ## float -1.5
LCPI0_1:
	.long	0x3fc00000                      ## float 1.5
LCPI0_2:
	.long	0x00000000                      ## float 0
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_quantize_triangular_ns:                ## @quantize_triangular_ns
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, %ebx
	movq	%rcx, %r15
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r13
	movq	%rdi, %r12
	movq	8(%rsi), %rcx
	movq	16(%rsi), %rax
	shlq	$2, %rcx
	addq	(%rsi), %rcx
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	cmpq	(%rdi), %rax
	jle	LBB0_2
## %bb.1:
	movq	24(%r13), %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
LBB0_2:
	testl	%ebx, %ebx
	jle	LBB0_10
## %bb.3:
	movl	%ebx, %eax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	16(%r13), %r8
	movq	32(%r13), %rcx
	movl	(%rcx), %eax
	xorl	%r14d, %r14d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_4 Depth=1
	incq	%r14
	cmpq	%r14, -72(%rbp)                 ## 8-byte Folded Reload
	je	LBB0_10
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rbx
	movq	16(%r12), %r9
	movq	24(%r13), %rsi
	imull	(%rbx), %eax
	movl	(%rsi), %edx
	movl	4(%rsi), %edi
	imull	(%r9), %edx
	subl	%edx, %eax
	xorps	%xmm0, %xmm0
	cvtsi2ss	%eax, %xmm0
	movl	4(%rcx), %eax
	imull	4(%rbx), %eax
	imull	4(%r9), %edi
	subl	%edi, %eax
	xorps	%xmm1, %xmm1
	cvtsi2ss	%eax, %xmm1
	movl	8(%rcx), %eax
	imull	8(%rbx), %eax
	addss	%xmm0, %xmm1
	movl	8(%rsi), %edx
	movl	8(%r9), %edi
	imull	%edx, %edi
	subl	%edi, %eax
	xorps	%xmm0, %xmm0
	cvtsi2ss	%eax, %xmm0
	movss	(%r15,%r14,4), %xmm2            ## xmm2 = mem[0],zero,zero,zero
	movl	12(%rcx), %eax
	imull	12(%rbx), %eax
	addss	%xmm1, %xmm0
	movl	12(%rsi), %edi
	imull	12(%r9), %edi
	subl	%edi, %eax
	xorps	%xmm1, %xmm1
	cvtsi2ss	%eax, %xmm1
	addss	%xmm0, %xmm1
	movq	_S16_SCALE@GOTPCREL(%rip), %rax
	mulss	(%rax), %xmm2
	movl	%edx, 12(%rsi)
	movl	8(%rcx), %eax
	movl	%eax, 12(%rcx)
	movl	4(%rsi), %eax
	movl	%eax, 8(%rsi)
	movl	4(%rcx), %eax
	movl	%eax, 8(%rcx)
	movl	(%rsi), %eax
	movl	%eax, 4(%rsi)
	movl	(%rcx), %eax
	movl	%eax, 4(%rcx)
	cvttss2si	%xmm1, %eax
	movl	%eax, (%rsi)
	subss	%xmm1, %xmm2
	cmpq	24(%r12), %r8
	jle	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movaps	%xmm2, %xmm0
	callq	_lrintf
	movl	%eax, %edi
	callq	_av_clip_int16
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx,%r14,4)
	movq	32(%r13), %rcx
	movl	$0, (%rcx)
	xorl	%eax, %eax
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movss	(%rax,%r14,4), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	addss	%xmm2, %xmm0
	movss	%xmm2, -44(%rbp)                ## 4-byte Spill
	callq	_lrintf
	movl	%eax, %edi
	callq	_av_clip_int16
	xorps	%xmm0, %xmm0
	cvtsi2ss	%eax, %xmm0
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx,%r14,4)
	subss	-44(%rbp), %xmm0                ## 4-byte Folded Reload
	cvttss2si	%xmm0, %edi
	movss	LCPI0_0(%rip), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	movss	LCPI0_1(%rip), %xmm1            ## xmm1 = mem[0],zero,zero,zero
	callq	_av_clipf
	movq	32(%r13), %rcx
	movl	%eax, (%rcx)
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	16(%r13), %r8
	incq	%r8
	movq	%r8, 16(%r13)
	movss	(%r15,%r14,4), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	ucomiss	LCPI0_2(%rip), %xmm0
	jne	LBB0_8
	jnp	LBB0_9
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	$0, 16(%r13)
	xorl	%r8d, %r8d
	jmp	LBB0_9
LBB0_10:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_S16_SCALE,4,2                  ## @S16_SCALE
	.no_dead_strip	_quantize_triangular_ns
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function quantize_triangular_ns
_quantize_triangular_ns:                ; @quantize_triangular_ns
	.cfi_startproc
; %bb.0:
	stp	d9, d8, [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 b8, -88
	.cfi_offset b9, -96
	mov	x23, x4
	mov	x19, x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	ldp	x24, x25, [x1]
	ldr	x8, [x1, #16]
	ldr	x9, [x0]
	cmp	x8, x9
	b.le	LBB0_2
; %bb.1:
	ldr	x0, [x21, #24]
	mov	w1, #0
	mov	w2, #8
	bl	_memset
LBB0_2:
	cmp	w23, #1
	b.lt	LBB0_10
; %bb.3:
	add	x24, x24, x25, lsl #2
	mov	w23, w23
	ldr	x8, [x21, #32]
	ldr	w0, [x8]
	ldr	x9, [x21, #16]
Lloh0:
	adrp	x25, _S16_SCALE@GOTPAGE
Lloh1:
	ldr	x25, [x25, _S16_SCALE@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x20, x20, #4
	add	x24, x24, #4
	add	x19, x19, #4
	subs	x23, x23, #1
	b.eq	LBB0_10
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldp	x10, x11, [x22, #8]
	ldr	x12, [x21, #24]
	ldp	w13, w14, [x10]
	mul	w13, w0, w13
	ldp	w15, w16, [x11]
	ldp	w17, w0, [x12]
	msub	w13, w17, w15, w13
	mul	w15, w0, w16
	neg	w15, w15
	ldp	w16, w17, [x8, #4]
	madd	w14, w16, w14, w15
	ldp	w15, w11, [x11, #8]
	ldp	w16, w0, [x12, #8]
	mul	w15, w16, w15
	neg	w15, w15
	ldp	w1, w10, [x10, #8]
	madd	w15, w17, w1, w15
	scvtf	s0, w13
	ldr	s1, [x19]
	scvtf	s2, w14
	ldr	s3, [x25]
	fadd	s0, s0, s2
	scvtf	s2, w15
	fadd	s0, s0, s2
	ldr	w13, [x8, #12]
	mul	w11, w0, w11
	neg	w11, w11
	madd	w10, w13, w10, w11
	scvtf	s2, w10
	fadd	s0, s0, s2
	str	w16, [x12, #12]
	ldr	w10, [x8, #8]
	str	w10, [x8, #12]
	ldr	w10, [x12, #4]
	str	w10, [x12, #8]
	ldr	w10, [x8, #4]
	str	w10, [x8, #8]
	ldr	w10, [x12]
	str	w10, [x12, #4]
	ldr	w10, [x8]
	str	w10, [x8, #4]
	fmul	s1, s1, s3
	fcvtzs	w8, s0
	str	w8, [x12]
	fsub	s8, s1, s0
	ldr	x8, [x22, #24]
	cmp	x9, x8
	b.le	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	fmov	s0, s8
	bl	_lrintf
	bl	_av_clip_int16
	mov	x8, x0
	mov	w0, #0
	str	w8, [x20]
	ldr	x8, [x21, #32]
	str	wzr, [x8]
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	s0, [x24]
	fadd	s0, s8, s0
	bl	_lrintf
	bl	_av_clip_int16
	str	w0, [x20]
	scvtf	s0, w0
	fsub	s0, s0, s8
	fcvtzs	w0, s0
	fmov	s0, #-1.50000000
	fmov	s1, #1.50000000
	bl	_av_clipf
	ldr	x8, [x21, #32]
	str	w0, [x8]
LBB0_8:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x9, [x21, #16]
	add	x9, x9, #1
	str	x9, [x21, #16]
	ldr	s0, [x19]
	fcmp	s0, #0.0
	b.eq	LBB0_4
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x9, #0
	str	xzr, [x21, #16]
	b	LBB0_4
LBB0_10:
	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	d9, d8, [sp], #96               ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_S16_SCALE,4,2                  ; @S16_SCALE
	.no_dead_strip	_quantize_triangular_ns
.subsections_via_symbols
