	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal4,4byte_literals
	.p2align	2                               ## -- Begin function xyz_to_cube6x1
LCPI0_0:
	.long	0x40c00000                      ## float 6
LCPI0_1:
	.long	0x3f800000                      ## float 1
LCPI0_2:
	.long	0x3f000000                      ## float 0.5
LCPI0_3:
	.long	0xbf000000                      ## float -0.5
LCPI0_4:
	.long	0xbf800000                      ## float -1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_xyz_to_cube6x1:                        ## @xyz_to_cube6x1
	.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	$120, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -120(%rbp)                 ## 8-byte Spill
	movq	%r8, -112(%rbp)                 ## 8-byte Spill
	movl	%ecx, %r15d
	movq	%rdi, %rbx
	movq	24(%rbp), %r14
	movq	16(%rbp), %r12
	movss	(%rdi), %xmm0                   ## xmm0 = mem[0],zero,zero,zero
	xorps	%xmm1, %xmm1
	ucomiss	%xmm1, %xmm0
	jbe	LBB0_2
## %bb.1:
	movss	4(%rbx), %xmm1                  ## xmm1 = mem[0],zero,zero,zero
	divss	LCPI0_0(%rip), %xmm1
	movsldup	%xmm0, %xmm0                    ## xmm0 = xmm0[0,0,2,2]
	insertps	$16, 12(%rbx), %xmm1            ## xmm1 = xmm1[0],mem[0],xmm1[2,3]
	divps	%xmm1, %xmm0
	jmp	LBB0_3
LBB0_2:
	movss	8(%rbx), %xmm0                  ## xmm0 = mem[0],zero,zero,zero
	movsldup	%xmm0, %xmm0                    ## xmm0 = xmm0[0,0,2,2]
LBB0_3:
	movss	LCPI0_1(%rip), %xmm1            ## xmm1 = mem[0],zero,zero,zero
	movaps	%xmm1, %xmm2
	subss	%xmm0, %xmm2
	movss	%xmm2, -64(%rbp)                ## 4-byte Spill
	xorps	%xmm2, %xmm2
	cvtsi2ss	%edx, %xmm2
	movshdup	%xmm0, %xmm0                    ## xmm0 = xmm0[1,1,3,3]
	subss	%xmm0, %xmm1
	movss	%xmm1, -60(%rbp)                ## 4-byte Spill
	divss	LCPI0_0(%rip), %xmm2
	movss	%xmm2, -52(%rbp)                ## 4-byte Spill
	leaq	-48(%rbp), %rdx
	leaq	-44(%rbp), %rcx
	leaq	-68(%rbp), %r8
	movq	%rbx, %rdi
	callq	_xyz_to_cube
	movss	-48(%rbp), %xmm0                ## xmm0 = mem[0],zero,zero,zero
	mulss	-64(%rbp), %xmm0                ## 4-byte Folded Reload
	movss	%xmm0, -48(%rbp)
	movss	-44(%rbp), %xmm0                ## xmm0 = mem[0],zero,zero,zero
	mulss	-60(%rbp), %xmm0                ## 4-byte Folded Reload
	movss	%xmm0, -44(%rbp)
	movq	16(%rbx), %rax
	movslq	-68(%rbp), %rcx
	movq	%rbx, -96(%rbp)                 ## 8-byte Spill
	movl	(%rax,%rcx,4), %ebx
	movl	%ebx, -56(%rbp)
	leal	1(%rbx), %eax
	xorps	%xmm0, %xmm0
	cvtsi2ss	%eax, %xmm0
	mulss	-52(%rbp), %xmm0                ## 4-byte Folded Reload
	callq	_ceilf
	movl	%eax, %r13d
	xorps	%xmm0, %xmm0
	cvtsi2ss	%ebx, %xmm0
	mulss	-52(%rbp), %xmm0                ## 4-byte Folded Reload
	callq	_ceilf
	subl	%eax, %r13d
	xorps	%xmm1, %xmm1
	cvtsi2ss	%r13d, %xmm1
	movss	LCPI0_2(%rip), %xmm2            ## xmm2 = mem[0],zero,zero,zero
	movss	%xmm1, -80(%rbp)                ## 4-byte Spill
	mulss	%xmm2, %xmm1
	movss	-48(%rbp), %xmm0                ## xmm0 = mem[0],zero,zero,zero
	movss	LCPI0_1(%rip), %xmm4            ## xmm4 = mem[0],zero,zero,zero
	addss	%xmm4, %xmm0
	mulss	%xmm1, %xmm0
	movss	LCPI0_3(%rip), %xmm1            ## xmm1 = mem[0],zero,zero,zero
	movl	%r15d, %ebx
	cvtsi2ss	%r15d, %xmm3
	addss	%xmm1, %xmm0
	movss	%xmm0, -48(%rbp)
	movss	%xmm3, -72(%rbp)                ## 4-byte Spill
	mulss	%xmm2, %xmm3
	movss	-44(%rbp), %xmm2                ## xmm2 = mem[0],zero,zero,zero
	addss	%xmm4, %xmm2
	movss	%xmm3, -76(%rbp)                ## 4-byte Spill
	mulss	%xmm3, %xmm2
	addss	%xmm1, %xmm2
	movss	%xmm2, -44(%rbp)
	callq	_floorf
	movl	%eax, %r15d
	movss	-44(%rbp), %xmm0                ## xmm0 = mem[0],zero,zero,zero
	callq	_floorf
	xorps	%xmm0, %xmm0
	cvtsi2ss	%r15d, %xmm0
	movss	-48(%rbp), %xmm1                ## xmm1 = mem[0],zero,zero,zero
	subss	%xmm0, %xmm1
	movss	%xmm1, (%r12)
	movss	-44(%rbp), %xmm0                ## xmm0 = mem[0],zero,zero,zero
	xorps	%xmm1, %xmm1
	cvtsi2ss	%eax, %xmm1
	subss	%xmm1, %xmm0
	movss	%xmm0, (%r14)
	movslq	%r15d, %rcx
	movslq	%r13d, %rdx
	movq	%rdx, -152(%rbp)                ## 8-byte Spill
	cltq
	movq	%rax, -128(%rbp)                ## 8-byte Spill
	movslq	%ebx, %rax
	movq	%rax, -144(%rbp)                ## 8-byte Spill
	decl	%ebx
	movl	%ebx, -84(%rbp)                 ## 4-byte Spill
	movq	-96(%rbp), %rbx                 ## 8-byte Reload
	leaq	-1(%rcx), %rax
	movq	%rax, -160(%rbp)                ## 8-byte Spill
	decl	%ecx
	movq	%rcx, -104(%rbp)                ## 8-byte Spill
	movq	$-1, %rcx
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_4 Depth=1
	addq	$16, -112(%rbp)                 ## 8-byte Folded Spill
	addq	$16, -120(%rbp)                 ## 8-byte Folded Spill
	movq	-136(%rbp), %rcx                ## 8-byte Reload
	cmpq	$3, %rcx
	je	LBB0_11
LBB0_4:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
	movq	-128(%rbp), %rax                ## 8-byte Reload
	leaq	(%rcx,%rax), %r14
	xorps	%xmm0, %xmm0
	cvtsi2ss	%r14d, %xmm0
	addss	%xmm0, %xmm0
	divss	-72(%rbp), %xmm0                ## 4-byte Folded Reload
	addss	LCPI0_4(%rip), %xmm0
	divss	-60(%rbp), %xmm0                ## 4-byte Folded Reload
	movss	%xmm0, -88(%rbp)                ## 4-byte Spill
	incq	%rcx
	movq	%rcx, -136(%rbp)                ## 8-byte Spill
	xorl	%r12d, %r12d
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_5 Depth=2
	movq	-104(%rbp), %rax                ## 8-byte Reload
	addl	%r12d, %eax
	xorps	%xmm0, %xmm0
	cvtsi2ss	%eax, %xmm0
	addss	%xmm0, %xmm0
	divss	-80(%rbp), %xmm0                ## 4-byte Folded Reload
	addss	LCPI0_4(%rip), %xmm0
	divss	-64(%rbp), %xmm0                ## 4-byte Folded Reload
	movss	%xmm0, -48(%rbp)
	movss	-88(%rbp), %xmm1                ## 4-byte Reload
                                        ## xmm1 = mem[0],zero,zero,zero
	movss	%xmm1, -44(%rbp)
	movl	-68(%rbp), %esi
	movq	%rbx, %rdi
	leaq	-48(%rbp), %rdx
	leaq	-44(%rbp), %rcx
	leaq	-56(%rbp), %r8
	callq	_process_cube_coordinates
	movss	-48(%rbp), %xmm0                ## xmm0 = mem[0],zero,zero,zero
	mulss	-64(%rbp), %xmm0                ## 4-byte Folded Reload
	movss	%xmm0, -48(%rbp)
	movss	-44(%rbp), %xmm0                ## xmm0 = mem[0],zero,zero,zero
	mulss	-60(%rbp), %xmm0                ## 4-byte Folded Reload
	movss	%xmm0, -44(%rbp)
	xorps	%xmm0, %xmm0
	cvtsi2ssl	-56(%rbp), %xmm0
	mulss	-52(%rbp), %xmm0                ## 4-byte Folded Reload
	callq	_ceilf
	movl	%eax, %r13d
	movl	-56(%rbp), %eax
	incl	%eax
	xorps	%xmm0, %xmm0
	cvtsi2ss	%eax, %xmm0
	mulss	-52(%rbp), %xmm0                ## 4-byte Folded Reload
	callq	_ceilf
	movl	%eax, %ebx
	subl	%r13d, %ebx
	xorps	%xmm1, %xmm1
	cvtsi2ss	%ebx, %xmm1
	mulss	LCPI0_2(%rip), %xmm1
	movss	-48(%rbp), %xmm0                ## xmm0 = mem[0],zero,zero,zero
	movss	LCPI0_1(%rip), %xmm2            ## xmm2 = mem[0],zero,zero,zero
	addss	%xmm2, %xmm0
	mulss	%xmm1, %xmm0
	callq	_roundf
	decl	%ebx
	movl	%eax, %edi
	xorl	%esi, %esi
	movl	%ebx, %edx
	movq	-96(%rbp), %rbx                 ## 8-byte Reload
	callq	_av_clip
	movl	%eax, %r15d
	movss	-44(%rbp), %xmm0                ## xmm0 = mem[0],zero,zero,zero
	addss	LCPI0_1(%rip), %xmm0
	mulss	-76(%rbp), %xmm0                ## 4-byte Folded Reload
	callq	_roundf
	movl	%eax, %edi
	xorl	%esi, %esi
	movl	-84(%rbp), %edx                 ## 4-byte Reload
	callq	_av_clip
LBB0_13:                                ##   in Loop: Header=BB0_5 Depth=2
	addl	%r13d, %r15d
	movq	-112(%rbp), %rcx                ## 8-byte Reload
	movl	%r15d, (%rcx,%r12,4)
	movq	-120(%rbp), %rcx                ## 8-byte Reload
	movl	%eax, (%rcx,%r12,4)
	incq	%r12
	cmpq	$4, %r12
	je	LBB0_10
LBB0_5:                                 ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	-160(%rbp), %rax                ## 8-byte Reload
	addq	%r12, %rax
	js	LBB0_12
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=2
	cmpq	-152(%rbp), %rax                ## 8-byte Folded Reload
	jge	LBB0_12
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=2
	testq	%r14, %r14
	js	LBB0_12
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=2
	cmpq	-144(%rbp), %r14                ## 8-byte Folded Reload
	jge	LBB0_12
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=2
	movq	16(%rbx), %rax
	movslq	-68(%rbp), %rcx
	movl	(%rax,%rcx,4), %eax
	movl	%eax, -56(%rbp)
	xorps	%xmm0, %xmm0
	cvtsi2ss	%eax, %xmm0
	mulss	-52(%rbp), %xmm0                ## 4-byte Folded Reload
	callq	_ceilf
	movl	%eax, %r13d
	movq	-104(%rbp), %rax                ## 8-byte Reload
	leal	(%rax,%r12), %r15d
	movl	%r14d, %eax
	jmp	LBB0_13
LBB0_11:
	addq	$120, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_xyz_to_cube6x1
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xyz_to_cube6x1
_xyz_to_cube6x1:                        ; @xyz_to_cube6x1
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #224
	.cfi_def_cfa_offset 224
	stp	d15, d14, [sp, #64]             ; 16-byte Folded Spill
	stp	d13, d12, [sp, #80]             ; 16-byte Folded Spill
	stp	d11, d10, [sp, #96]             ; 16-byte Folded Spill
	stp	d9, d8, [sp, #112]              ; 16-byte Folded Spill
	stp	x28, x27, [sp, #128]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #144]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #160]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #176]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #192]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #208]            ; 16-byte Folded Spill
	add	x29, sp, #208
	.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	x22, x7
	mov	x26, x6
	mov	x19, x5
	mov	x20, x4
	mov	x23, x3
	mov	x21, x0
	ldr	s1, [x0]
	fcmp	s1, #0.0
	b.le	LBB0_2
; %bb.1:
	ldr	s0, [x21, #4]
	fmov	s2, #6.00000000
	fdiv	s0, s0, s2
	fdiv	s0, s1, s0
	ldr	s2, [x21, #12]
	fdiv	s1, s1, s2
	b	LBB0_3
LBB0_2:
	ldr	s0, [x21, #8]
	fmov	s1, s0
LBB0_3:
	fmov	s9, #1.00000000
	fsub	s10, s9, s0
	fsub	s11, s9, s1
	scvtf	s0, w2
	fmov	s1, #6.00000000
	fdiv	s12, s0, s1
	add	x2, sp, #60
	add	x3, sp, #56
	add	x4, sp, #52
	mov	x0, x21
	bl	_xyz_to_cube
	ldr	s0, [sp, #60]
	fmul	s1, s10, s0
	ldr	s0, [sp, #56]
	fmul	s0, s11, s0
	stp	s0, s1, [sp, #56]
	ldr	x8, [x21, #16]
	ldrsw	x9, [sp, #52]
	ldr	w24, [x8, x9, lsl #2]
	str	w24, [sp, #48]
	add	w8, w24, #1
	scvtf	s0, w8
	fmul	s0, s12, s0
	bl	_ceilf
	mov	x25, x0
	scvtf	s0, w24
	fmul	s0, s12, s0
	bl	_ceilf
	sub	w25, w25, w0
	scvtf	s13, w25
	fmov	s3, #0.50000000
	fmul	s0, s13, s3
	ldr	s1, [sp, #60]
	fadd	s1, s1, s9
	fmov	s2, #-0.50000000
	fmadd	s0, s0, s1, s2
	scvtf	s1, w23
	str	s1, [sp, #20]                   ; 4-byte Folded Spill
	fmul	s15, s1, s3
	ldr	s1, [sp, #56]
	fadd	s1, s1, s9
	fmadd	s1, s15, s1, s2
	stp	s1, s0, [sp, #56]
	bl	_floorf
	mov	x24, x0
	ldr	s0, [sp, #56]
	bl	_floorf
                                        ; kill: def $w0 killed $w0 def $x0
	ldr	s0, [sp, #60]
	scvtf	s1, w24
	fsub	s0, s0, s1
	str	s0, [x26]
	scvtf	s0, w0
	ldr	s1, [sp, #56]
	fsub	s0, s1, s0
	str	s0, [x22]
	sub	w22, w23, #1
	sxtw	x8, w24
	sxtw	x10, w25
	sxtw	x9, w0
	str	x9, [sp, #8]                    ; 8-byte Folded Spill
	sxtw	x9, w23
	stp	x9, x10, [sp, #32]              ; 16-byte Folded Spill
	sub	x25, x8, #1
	sub	w27, w24, #1
	mov	x9, #-1
	fmov	s14, #-1.00000000
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x20, x20, #16
	add	x19, x19, #16
	ldr	x9, [sp, #24]                   ; 8-byte Folded Reload
	cmp	x9, #3
	b.eq	LBB0_13
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
	mov	x28, #0
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	add	x26, x9, x8
	scvtf	s0, w26
	fadd	s0, s0, s0
	ldr	s1, [sp, #20]                   ; 4-byte Folded Reload
	fdiv	s0, s0, s1
	fadd	s0, s0, s14
	fdiv	s8, s0, s11
	add	x9, x9, #1
	str	x9, [sp, #24]                   ; 8-byte Folded Spill
	b	LBB0_8
LBB0_6:                                 ;   in Loop: Header=BB0_8 Depth=2
	add	w8, w27, w28
	scvtf	s0, w8
	fadd	s0, s0, s0
	fdiv	s0, s0, s13
	fadd	s0, s0, s14
	fdiv	s0, s0, s10
	stp	s8, s0, [sp, #56]
	ldr	w1, [sp, #52]
	add	x2, sp, #60
	add	x3, sp, #56
	add	x4, sp, #48
	mov	x0, x21
	fmov	s1, s8
	bl	_process_cube_coordinates
	ldr	s0, [sp, #60]
	fmul	s2, s10, s0
	ldr	s0, [sp, #56]
	fmul	s0, s11, s0
	stp	s0, s2, [sp, #56]
	ldr	s0, [sp, #48]
	scvtf	s0, s0
	fmul	s0, s12, s0
	bl	_ceilf
	mov	x23, x0
	ldr	w8, [sp, #48]
	add	w8, w8, #1
	scvtf	s0, w8
	fmul	s0, s12, s0
	bl	_ceilf
	sub	w24, w0, w23
	scvtf	s0, w24
	fmov	s1, #0.50000000
	fmul	s0, s0, s1
	ldr	s1, [sp, #60]
	fadd	s1, s1, s9
	fmul	s0, s1, s0
	bl	_roundf
	sub	w2, w24, #1
	mov	w1, #0
	bl	_av_clip
	mov	x24, x0
	ldr	s0, [sp, #56]
	fadd	s0, s0, s9
	fmul	s0, s15, s0
	bl	_roundf
	mov	w1, #0
	mov	x2, x22
	bl	_av_clip
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=2
	add	w8, w23, w24
	lsl	x9, x28, #2
	str	w8, [x20, x9]
	str	w0, [x19, x9]
	add	x28, x28, #1
	cmp	x28, #4
	b.eq	LBB0_4
LBB0_8:                                 ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	adds	x8, x25, x28
	b.mi	LBB0_6
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=2
	ldr	x9, [sp, #40]                   ; 8-byte Folded Reload
	cmp	x8, x9
	b.ge	LBB0_6
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=2
	tbnz	x26, #63, LBB0_6
; %bb.11:                               ;   in Loop: Header=BB0_8 Depth=2
	ldr	x8, [sp, #32]                   ; 8-byte Folded Reload
	cmp	x26, x8
	b.ge	LBB0_6
; %bb.12:                               ;   in Loop: Header=BB0_8 Depth=2
	ldr	x8, [x21, #16]
	ldrsw	x9, [sp, #52]
	ldr	w8, [x8, x9, lsl #2]
	str	w8, [sp, #48]
	scvtf	s0, w8
	fmul	s0, s12, s0
	bl	_ceilf
	mov	x23, x0
	add	w24, w27, w28
	mov	x0, x26
	b	LBB0_7
LBB0_13:
	ldp	x29, x30, [sp, #208]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #192]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #176]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #160]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #144]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #128]            ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #112]              ; 16-byte Folded Reload
	ldp	d11, d10, [sp, #96]             ; 16-byte Folded Reload
	ldp	d13, d12, [sp, #80]             ; 16-byte Folded Reload
	ldp	d15, d14, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #224
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_xyz_to_cube6x1
.subsections_via_symbols
