	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function xyz_to_cube
LCPI0_0:
	.long	0x80000000                      ## float -0
	.long	0x80000000                      ## float -0
	.long	0x80000000                      ## float -0
	.long	0x80000000                      ## float -0
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_xyz_to_cube:                           ## @xyz_to_cube
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r13
	movq	%rcx, %r14
	movq	%rdx, %r12
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movss	(%rsi), %xmm0                   ## xmm0 = mem[0],zero,zero,zero
	movss	8(%rsi), %xmm1                  ## xmm1 = mem[0],zero,zero,zero
	xorps	LCPI0_0(%rip), %xmm1
	callq	_atan2f
	movss	%xmm0, -44(%rbp)                ## 4-byte Spill
	movss	4(%rbx), %xmm0                  ## xmm0 = mem[0],zero,zero,zero
	xorps	LCPI0_0(%rip), %xmm0
	callq	_asinf
	movss	-44(%rbp), %xmm5                ## 4-byte Reload
                                        ## xmm5 = mem[0],zero,zero,zero
	movss	%xmm0, -48(%rbp)                ## 4-byte Spill
	movq	_M_PI_4@GOTPCREL(%rip), %rax
	movss	(%rax), %xmm1                   ## xmm1 = mem[0],zero,zero,zero
	movaps	%xmm1, %xmm2
	xorps	LCPI0_0(%rip), %xmm2
	ucomiss	%xmm2, %xmm5
	jb	LBB0_3
## %bb.1:
	ucomiss	%xmm5, %xmm1
	jbe	LBB0_3
## %bb.2:
	movl	$131, (%r13)
	movaps	%xmm5, %xmm0
	jmp	LBB0_10
LBB0_3:
	movq	_M_PI_2@GOTPCREL(%rip), %rax
	movss	(%rax), %xmm0                   ## xmm0 = mem[0],zero,zero,zero
	movaps	%xmm1, %xmm3
	addss	%xmm0, %xmm3
	movaps	LCPI0_0(%rip), %xmm4            ## xmm4 = [-0.0E+0,-0.0E+0,-0.0E+0,-0.0E+0]
	xorps	%xmm3, %xmm4
	ucomiss	%xmm4, %xmm5
	jb	LBB0_6
## %bb.4:
	ucomiss	%xmm5, %xmm2
	jbe	LBB0_6
## %bb.5:
	movl	$130, (%r13)
	addss	%xmm0, %xmm5
	movaps	%xmm5, %xmm0
	jmp	LBB0_10
LBB0_6:
	ucomiss	%xmm1, %xmm5
	jb	LBB0_9
## %bb.7:
	ucomiss	%xmm5, %xmm3
	jbe	LBB0_9
## %bb.8:
	movl	$129, (%r13)
	subss	%xmm0, %xmm5
	movaps	%xmm5, %xmm0
	jmp	LBB0_10
LBB0_9:
	movl	$133, (%r13)
	movq	_M_PI@GOTPCREL(%rip), %rax
	movss	(%rax), %xmm1                   ## xmm1 = mem[0],zero,zero,zero
	movaps	LCPI0_0(%rip), %xmm2            ## xmm2 = [-0.0E+0,-0.0E+0,-0.0E+0,-0.0E+0]
	xorps	%xmm1, %xmm2
	xorps	%xmm0, %xmm0
	cmpltss	%xmm5, %xmm0
	movaps	%xmm0, %xmm3
	andnps	%xmm1, %xmm3
	andps	%xmm2, %xmm0
	orps	%xmm3, %xmm0
	addss	%xmm5, %xmm0
LBB0_10:
	callq	_cosf
	movl	%eax, %edi
	callq	_atanf
	movss	-48(%rbp), %xmm1                ## 4-byte Reload
                                        ## xmm1 = mem[0],zero,zero,zero
	ucomiss	%xmm0, %xmm1
	jbe	LBB0_13
## %bb.11:
	movl	$132, (%r13)
LBB0_12:
	movss	(%rbx), %xmm0                   ## xmm0 = mem[0],zero,zero,zero
	movaps	LCPI0_0(%rip), %xmm1            ## xmm1 = [-0.0E+0,-0.0E+0,-0.0E+0,-0.0E+0]
	xorps	%xmm1, %xmm0
	divss	4(%rbx), %xmm0
	movss	%xmm0, (%r12)
	movss	8(%rbx), %xmm0                  ## xmm0 = mem[0],zero,zero,zero
	xorps	%xmm1, %xmm0
	divss	4(%rbx), %xmm0
	movss	%xmm0, (%r14)
	movl	$132, %eax
	jmp	LBB0_23
LBB0_13:
	xorps	LCPI0_0(%rip), %xmm0
	ucomiss	%xmm1, %xmm0
	jbe	LBB0_16
## %bb.14:
	movl	$128, (%r13)
LBB0_15:
	movss	(%rbx), %xmm0                   ## xmm0 = mem[0],zero,zero,zero
	divss	4(%rbx), %xmm0
	movss	%xmm0, (%r12)
	movss	8(%rbx), %xmm0                  ## xmm0 = mem[0],zero,zero,zero
	xorps	LCPI0_0(%rip), %xmm0
	divss	4(%rbx), %xmm0
	movss	%xmm0, (%r14)
	movl	$128, %eax
LBB0_23:
	movq	(%r15), %rcx
	movq	16(%r15), %rdx
	movslq	(%rcx,%rax,4), %rax
	movl	(%rdx,%rax,4), %edx
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_rotate_cube_face
	movq	8(%r15), %rax
	movss	(%rax), %xmm0                   ## xmm0 = mem[0],zero,zero,zero
	mulss	(%r12), %xmm0
	movss	%xmm0, (%r12)
	movss	4(%rax), %xmm0                  ## xmm0 = mem[0],zero,zero,zero
	mulss	(%r14), %xmm0
	movss	%xmm0, (%r14)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	movl	(%r13), %eax
	addl	$-128, %eax
	cmpl	$5, %eax
	ja	LBB0_22
## %bb.17:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_18:
	movss	8(%rbx), %xmm0                  ## xmm0 = mem[0],zero,zero,zero
	divss	(%rbx), %xmm0
	movss	%xmm0, (%r12)
	movss	4(%rbx), %xmm0                  ## xmm0 = mem[0],zero,zero,zero
	xorps	LCPI0_0(%rip), %xmm0
	divss	(%rbx), %xmm0
	movss	%xmm0, (%r14)
	movl	$129, %eax
	jmp	LBB0_23
LBB0_19:
	movss	8(%rbx), %xmm0                  ## xmm0 = mem[0],zero,zero,zero
	divss	(%rbx), %xmm0
	movss	%xmm0, (%r12)
	movss	4(%rbx), %xmm0                  ## xmm0 = mem[0],zero,zero,zero
	divss	(%rbx), %xmm0
	movss	%xmm0, (%r14)
	movl	$130, %eax
	jmp	LBB0_23
LBB0_20:
	movss	(%rbx), %xmm0                   ## xmm0 = mem[0],zero,zero,zero
	xorps	LCPI0_0(%rip), %xmm0
	divss	8(%rbx), %xmm0
	movss	%xmm0, (%r12)
	movss	4(%rbx), %xmm0                  ## xmm0 = mem[0],zero,zero,zero
	divss	8(%rbx), %xmm0
	movss	%xmm0, (%r14)
	movl	$131, %eax
	jmp	LBB0_23
LBB0_21:
	movss	(%rbx), %xmm0                   ## xmm0 = mem[0],zero,zero,zero
	movaps	LCPI0_0(%rip), %xmm1            ## xmm1 = [-0.0E+0,-0.0E+0,-0.0E+0,-0.0E+0]
	xorps	%xmm1, %xmm0
	divss	8(%rbx), %xmm0
	movss	%xmm0, (%r12)
	movss	4(%rbx), %xmm0                  ## xmm0 = mem[0],zero,zero,zero
	xorps	%xmm1, %xmm0
	divss	8(%rbx), %xmm0
	movss	%xmm0, (%r14)
	movl	$133, %eax
	jmp	LBB0_23
LBB0_22:
	xorl	%edi, %edi
	callq	_av_assert0
	movslq	(%r13), %rax
	jmp	LBB0_23
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_15, LBB0_15-LJTI0_0
.set L0_0_set_18, LBB0_18-LJTI0_0
.set L0_0_set_19, LBB0_19-LJTI0_0
.set L0_0_set_20, LBB0_20-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_21, LBB0_21-LJTI0_0
LJTI0_0:
	.long	L0_0_set_15
	.long	L0_0_set_18
	.long	L0_0_set_19
	.long	L0_0_set_20
	.long	L0_0_set_12
	.long	L0_0_set_21
	.end_data_region
                                        ## -- End function
	.comm	_M_PI_4,4,2                     ## @M_PI_4
	.comm	_M_PI_2,4,2                     ## @M_PI_2
	.comm	_M_PI,4,2                       ## @M_PI
	.no_dead_strip	_xyz_to_cube
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xyz_to_cube
_xyz_to_cube:                           ; @xyz_to_cube
	.cfi_startproc
; %bb.0:
	stp	d9, d8, [sp, #-80]!             ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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 b8, -72
	.cfi_offset b9, -80
	mov	x23, x4
	mov	x19, x3
	mov	x20, x2
	mov	x22, x1
	mov	x21, x0
	ldr	s0, [x1]
	ldr	s1, [x1, #8]
	fneg	s1, s1
	bl	_atan2f
	fmov	s9, s0
	ldr	s0, [x22, #4]
	fneg	s0, s0
	bl	_asinf
	fmov	s8, s0
Lloh0:
	adrp	x8, _M_PI_4@GOTPAGE
Lloh1:
	ldr	x8, [x8, _M_PI_4@GOTPAGEOFF]
Lloh2:
	ldr	s1, [x8]
	fneg	s2, s1
	fcmp	s9, s2
	fccmp	s9, s1, #0, ge
	b.mi	LBB0_4
; %bb.1:
Lloh3:
	adrp	x8, _M_PI_2@GOTPAGE
Lloh4:
	ldr	x8, [x8, _M_PI_2@GOTPAGEOFF]
Lloh5:
	ldr	s0, [x8]
	fadd	s3, s1, s0
	fneg	s4, s3
	fcmp	s9, s4
	fccmp	s9, s2, #0, ge
	b.mi	LBB0_5
; %bb.2:
	fcmp	s9, s1
	fccmp	s9, s3, #0, ge
	b.mi	LBB0_7
; %bb.3:
	mov	w8, #133
Lloh6:
	adrp	x9, _M_PI@GOTPAGE
Lloh7:
	ldr	x9, [x9, _M_PI@GOTPAGEOFF]
	str	w8, [x23]
Lloh8:
	ldr	s0, [x9]
	fneg	s1, s0
	fcmp	s9, #0.0
	fcsel	s0, s1, s0, gt
	b	LBB0_6
LBB0_4:
	mov	w8, #131
	str	w8, [x23]
	b	LBB0_8
LBB0_5:
	mov	w8, #130
	str	w8, [x23]
LBB0_6:
	fadd	s9, s9, s0
	b	LBB0_8
LBB0_7:
	mov	w8, #129
	str	w8, [x23]
	fsub	s9, s9, s0
LBB0_8:
	fmov	s0, s9
	bl	_cosf
	bl	_atanf
	fcmp	s8, s0
	b.le	LBB0_11
; %bb.9:
	mov	w8, #132
	str	w8, [x23]
LBB0_10:
	ldp	s0, s1, [x22]
	fneg	s0, s0
	fdiv	s0, s0, s1
	str	s0, [x20]
	ldp	s1, s0, [x22, #4]
	fneg	s0, s0
	fdiv	s0, s0, s1
	str	s0, [x19]
	mov	w8, #132
	b	LBB0_14
LBB0_11:
	fneg	s0, s0
	fcmp	s8, s0
	b.pl	LBB0_15
; %bb.12:
	mov	w8, #128
	str	w8, [x23]
LBB0_13:
	ldp	s0, s1, [x22]
	fdiv	s0, s0, s1
	str	s0, [x20]
	ldp	s1, s0, [x22, #4]
	fneg	s0, s0
	fdiv	s0, s0, s1
	str	s0, [x19]
	mov	w8, #128
LBB0_14:
	ldr	x9, [x21]
	ldrsw	x8, [x9, x8, lsl #2]
	ldr	x9, [x21, #16]
	ldr	w2, [x9, x8, lsl #2]
	mov	x0, x20
	mov	x1, x19
	bl	_rotate_cube_face
	ldr	x8, [x21, #8]
	ldr	s0, [x8]
	ldr	s1, [x20]
	fmul	s0, s0, s1
	str	s0, [x20]
	ldr	s0, [x8, #4]
	ldr	s1, [x19]
	fmul	s0, s0, s1
	str	s0, [x19]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp], #80               ; 16-byte Folded Reload
	ret
LBB0_15:
	ldr	w8, [x23]
	sub	w8, w8, #128
	cmp	w8, #5
	b.hi	LBB0_21
; %bb.16:
Lloh9:
	adrp	x9, lJTI0_0@PAGE
Lloh10:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_10
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_17:
	ldr	s0, [x22, #8]
	ldr	s1, [x22]
	fdiv	s0, s0, s1
	str	s0, [x20]
	ldp	s1, s0, [x22]
	fneg	s0, s0
	fdiv	s0, s0, s1
	str	s0, [x19]
	mov	w8, #129
	b	LBB0_14
LBB0_18:
	ldr	s0, [x22, #8]
	ldr	s1, [x22]
	fdiv	s0, s0, s1
	str	s0, [x20]
	ldp	s1, s0, [x22]
	fdiv	s0, s0, s1
	str	s0, [x19]
	mov	w8, #130
	b	LBB0_14
LBB0_19:
	ldr	s0, [x22]
	fneg	s0, s0
	ldr	s1, [x22, #8]
	fdiv	s0, s0, s1
	str	s0, [x20]
	ldp	s0, s1, [x22, #4]
	fdiv	s0, s0, s1
	str	s0, [x19]
	mov	w8, #131
	b	LBB0_14
LBB0_20:
	ldr	s0, [x22]
	fneg	s0, s0
	ldr	s1, [x22, #8]
	fdiv	s0, s0, s1
	str	s0, [x20]
	ldp	s0, s1, [x22, #4]
	fneg	s0, s0
	fdiv	s0, s0, s1
	str	s0, [x19]
	mov	w8, #133
	b	LBB0_14
LBB0_21:
	mov	w0, #0
	bl	_av_assert0
	ldrsw	x8, [x23]
	b	LBB0_14
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_13-LBB0_10)>>2
	.byte	(LBB0_17-LBB0_10)>>2
	.byte	(LBB0_18-LBB0_10)>>2
	.byte	(LBB0_19-LBB0_10)>>2
	.byte	(LBB0_10-LBB0_10)>>2
	.byte	(LBB0_20-LBB0_10)>>2
                                        ; -- End function
	.comm	_M_PI_4,4,2                     ; @M_PI_4
	.comm	_M_PI_2,4,2                     ; @M_PI_2
	.comm	_M_PI,4,2                       ; @M_PI
	.no_dead_strip	_xyz_to_cube
.subsections_via_symbols
