	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function build_basis
LCPI0_0:
	.quad	0x3fe0000000000000              ## double 0.5
LCPI0_1:
	.quad	0x3fd0000000000000              ## double 0.25
LCPI0_2:
	.quad	0x3fe6a09e667f3bcd              ## double 0.70710678118654757
LCPI0_3:
	.quad	0x3fc0000000000000              ## double 0.125
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_build_basis:                           ## @build_basis
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, -80(%rbp)                 ## 8-byte Spill
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_emms_c
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_1 Depth=1
	incq	%rbx
	cmpq	$8, %rbx
	je	LBB0_12
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_2 Depth 2
                                        ##       Child Loop BB0_3 Depth 3
                                        ##         Child Loop BB0_4 Depth 4
	leaq	(,%rbx,8), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	xorps	%xmm0, %xmm0
	cvtsi2sd	%ebx, %xmm0
	movsd	%xmm0, -96(%rbp)                ## 8-byte Spill
	xorl	%edx, %edx
	movq	%rbx, -88(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=2
	incq	%rdx
	cmpq	$8, %rdx
	je	LBB0_11
LBB0_2:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_3 Depth 3
                                        ##         Child Loop BB0_4 Depth 4
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rdx,%rax), %r12
	xorps	%xmm0, %xmm0
	cvtsi2sd	%edx, %xmm0
	movsd	%xmm0, -104(%rbp)               ## 8-byte Spill
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	movq	%rdx, %r15
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=3
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	incq	%rax
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	addq	$4, %r13
	cmpq	$8, %rax
	je	LBB0_10
LBB0_3:                                 ##   Parent Loop BB0_1 Depth=1
                                        ##     Parent Loop BB0_2 Depth=2
                                        ## =>    This Loop Header: Depth=3
                                        ##         Child Loop BB0_4 Depth 4
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	xorps	%xmm0, %xmm0
	cvtsi2sd	%eax, %xmm0
	addsd	LCPI0_0(%rip), %xmm0
	movsd	%xmm0, -112(%rbp)               ## 8-byte Spill
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=4
	movsd	%xmm0, -48(%rbp)                ## 8-byte Spill
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movslq	(%rax,%r12,4), %rbx
	movq	_M_PI@GOTPCREL(%rip), %rax
	movsd	(%rax), %xmm1                   ## xmm1 = mem[0],zero
	mulsd	LCPI0_3(%rip), %xmm1
	movsd	%xmm1, -120(%rbp)               ## 8-byte Spill
	mulsd	-96(%rbp), %xmm1                ## 8-byte Folded Reload
	xorps	%xmm0, %xmm0
	cvtsi2sd	%r14d, %xmm0
	addsd	LCPI0_0(%rip), %xmm0
	mulsd	%xmm1, %xmm0
	callq	_cos
	mulsd	-48(%rbp), %xmm0                ## 8-byte Folded Reload
	movsd	%xmm0, -48(%rbp)                ## 8-byte Spill
	movsd	-120(%rbp), %xmm0               ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	mulsd	-104(%rbp), %xmm0               ## 8-byte Folded Reload
	mulsd	-112(%rbp), %xmm0               ## 8-byte Folded Reload
	callq	_cos
	mulsd	-48(%rbp), %xmm0                ## 8-byte Folded Reload
	callq	_lrintf
	movq	_basis@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rcx,%rbx,8), %rcx
	movl	%eax, (%rcx,%r13)
	incq	%r14
	addq	$32, %r13
	cmpq	$8, %r14
	movq	-88(%rbp), %rbx                 ## 8-byte Reload
	movq	%r15, %rdx
	je	LBB0_9
LBB0_4:                                 ##   Parent Loop BB0_1 Depth=1
                                        ##     Parent Loop BB0_2 Depth=2
                                        ##       Parent Loop BB0_3 Depth=3
                                        ## =>      This Inner Loop Header: Depth=4
	movq	_BASIS_SHIFT@GOTPCREL(%rip), %rax
	movzbl	(%rax), %ecx
	movl	$1, %eax
	shll	%cl, %eax
	xorps	%xmm0, %xmm0
	cvtsi2sd	%eax, %xmm0
	mulsd	LCPI0_1(%rip), %xmm0
	testq	%rbx, %rbx
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=4
	mulsd	LCPI0_2(%rip), %xmm0
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=4
	testq	%rdx, %rdx
	jne	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=4
	mulsd	LCPI0_2(%rip), %xmm0
	jmp	LBB0_8
LBB0_12:
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BASIS_SHIFT,4,2                ## @BASIS_SHIFT
	.comm	_M_PI,8,3                       ## @M_PI
	.comm	_basis,8,3                      ## @basis
	.no_dead_strip	_build_basis
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function build_basis
_build_basis:                           ; @build_basis
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #192
	.cfi_def_cfa_offset 192
	stp	d15, d14, [sp, #32]             ; 16-byte Folded Spill
	stp	d13, d12, [sp, #48]             ; 16-byte Folded Spill
	stp	d11, d10, [sp, #64]             ; 16-byte Folded Spill
	stp	d9, d8, [sp, #80]               ; 16-byte Folded Spill
	stp	x28, x27, [sp, #96]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #112]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #128]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #144]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #160]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #176]            ; 16-byte Folded Spill
	add	x29, sp, #176
	.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
	.cfi_offset b8, -104
	.cfi_offset b9, -112
	.cfi_offset b10, -120
	.cfi_offset b11, -128
	.cfi_offset b12, -136
	.cfi_offset b13, -144
	.cfi_offset b14, -152
	.cfi_offset b15, -160
	mov	x19, x0
	bl	_emms_c
	mov	x20, #0
	fmov	d8, #0.50000000
Lloh0:
	adrp	x24, _BASIS_SHIFT@GOTPAGE
Lloh1:
	ldr	x24, [x24, _BASIS_SHIFT@GOTPAGEOFF]
	mov	w9, #1
	fmov	d9, #0.25000000
	mov	x11, #15309
	movk	x11, #26239, lsl #16
	movk	x11, #41118, lsl #32
	movk	x11, #16358, lsl #48
Lloh2:
	adrp	x23, _M_PI@GOTPAGE
Lloh3:
	ldr	x23, [x23, _M_PI@GOTPAGEOFF]
	fmov	d10, #0.12500000
Lloh4:
	adrp	x25, _basis@GOTPAGE
Lloh5:
	ldr	x25, [x25, _basis@GOTPAGEOFF]
LBB0_1:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_2 Depth 2
                                        ;       Child Loop BB0_3 Depth 3
                                        ;         Child Loop BB0_4 Depth 4
	mov	x26, #0
	lsl	x12, x20, #3
	str	x12, [sp, #8]                   ; 8-byte Folded Spill
	scvtf	d11, w20
LBB0_2:                                 ;   Parent Loop BB0_1 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_3 Depth 3
                                        ;         Child Loop BB0_4 Depth 4
	mov	x21, #0
	mov	x13, #0
	ldr	x12, [sp, #8]                   ; 8-byte Folded Reload
	add	x28, x26, x12
	scvtf	d12, w26
LBB0_3:                                 ;   Parent Loop BB0_1 Depth=1
                                        ;     Parent Loop BB0_2 Depth=2
                                        ; =>    This Loop Header: Depth=3
                                        ;         Child Loop BB0_4 Depth 4
	mov	x27, #0
	stp	x13, x21, [sp, #16]             ; 16-byte Folded Spill
	scvtf	d0, w13
	fadd	d13, d0, d8
LBB0_4:                                 ;   Parent Loop BB0_1 Depth=1
                                        ;     Parent Loop BB0_2 Depth=2
                                        ;       Parent Loop BB0_3 Depth=3
                                        ; =>      This Inner Loop Header: Depth=4
	ldr	w8, [x24]
	lsl	w8, w9, w8
	scvtf	d0, w8
	fmul	d0, d0, d9
	ldrsw	x22, [x19, x28, lsl #2]
	fmov	d1, x11
	fmul	d2, d0, d1
	cmp	x20, #0
	fcsel	d0, d2, d0, eq
	fmul	d1, d0, d1
	cmp	x26, #0
	fcsel	d14, d1, d0, eq
	ldr	d0, [x23]
	fmul	d15, d0, d10
	fmul	d0, d15, d11
	scvtf	d1, w27
	fadd	d1, d1, d8
	fmul	d0, d1, d0
	bl	_cos
	fmul	d14, d0, d14
	fmul	d0, d15, d12
	fmul	d0, d13, d0
	bl	_cos
	fmul	d0, d0, d14
	bl	_lrintf
	mov	x11, #15309
	movk	x11, #26239, lsl #16
	movk	x11, #41118, lsl #32
	movk	x11, #16358, lsl #48
	mov	w9, #1
	ldr	x8, [x25]
	ldr	x8, [x8, x22, lsl #3]
	str	w0, [x8, x21]
	add	x27, x27, #1
	add	x21, x21, #32
	cmp	x27, #8
	b.ne	LBB0_4
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=3
	ldp	x13, x21, [sp, #16]             ; 16-byte Folded Reload
	add	x13, x13, #1
	add	x21, x21, #4
	cmp	x13, #8
	b.ne	LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_2 Depth=2
	add	x26, x26, #1
	cmp	x26, #8
	b.ne	LBB0_2
; %bb.7:                                ;   in Loop: Header=BB0_1 Depth=1
	add	x20, x20, #1
	cmp	x20, #8
	b.ne	LBB0_1
; %bb.8:
	ldp	x29, x30, [sp, #176]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #160]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #144]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #128]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #112]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #96]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #80]               ; 16-byte Folded Reload
	ldp	d11, d10, [sp, #64]             ; 16-byte Folded Reload
	ldp	d13, d12, [sp, #48]             ; 16-byte Folded Reload
	ldp	d15, d14, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #192
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_BASIS_SHIFT,4,2                ; @BASIS_SHIFT
	.comm	_M_PI,8,3                       ; @M_PI
	.comm	_basis,8,3                      ; @basis
	.no_dead_strip	_build_basis
.subsections_via_symbols
