	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal4,4byte_literals
	.p2align	2                               ## -- Begin function cube3x2_to_xyz
LCPI0_0:
	.long	0x40400000                      ## float 3
LCPI0_1:
	.long	0x3f000000                      ## float 0.5
LCPI0_2:
	.long	0x3f800000                      ## float 1
LCPI0_3:
	.long	0xbf800000                      ## float -1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_cube3x2_to_xyz:                        ## @cube3x2_to_xyz
	.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
	movq	%r9, -80(%rbp)                  ## 8-byte Spill
	movl	%edx, %ebx
	movl	%esi, %r14d
	movss	(%rdi), %xmm0                   ## xmm0 = mem[0],zero,zero,zero
	xorps	%xmm1, %xmm1
	ucomiss	%xmm1, %xmm0
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	jbe	LBB0_2
## %bb.1:
	movss	4(%rdi), %xmm2                  ## xmm2 = mem[0],zero,zero,zero
	movss	12(%rdi), %xmm3                 ## xmm3 = mem[0],zero,zero,zero
	divss	LCPI0_0(%rip), %xmm2
	movaps	%xmm0, %xmm1
	divss	%xmm2, %xmm1
	mulss	LCPI0_1(%rip), %xmm3
	divss	%xmm3, %xmm0
	jmp	LBB0_3
LBB0_2:
	movss	8(%rdi), %xmm1                  ## xmm1 = mem[0],zero,zero,zero
	movaps	%xmm1, %xmm0
LBB0_3:
	cvtsi2ss	%ecx, %xmm4
	movss	LCPI0_2(%rip), %xmm3            ## xmm3 = mem[0],zero,zero,zero
	movaps	%xmm3, %xmm2
	subss	%xmm0, %xmm2
	movss	%xmm2, -64(%rbp)                ## 4-byte Spill
	divss	LCPI0_0(%rip), %xmm4
	movss	%xmm4, -48(%rbp)                ## 4-byte Spill
	subss	%xmm1, %xmm3
	movss	%xmm3, -60(%rbp)                ## 4-byte Spill
	xorps	%xmm1, %xmm1
	cvtsi2ss	%r8d, %xmm1
	xorps	%xmm0, %xmm0
	cvtsi2ss	%r14d, %xmm0
	mulss	LCPI0_1(%rip), %xmm1
	movss	%xmm1, -44(%rbp)                ## 4-byte Spill
	divss	%xmm4, %xmm0
	cvttss2si	%xmm0, %edi
	callq	_floorf
	xorps	%xmm0, %xmm0
	cvtsi2ss	%ebx, %xmm0
	movl	%eax, %r13d
	divss	-44(%rbp), %xmm0                ## 4-byte Folded Reload
	cvttss2si	%xmm0, %edi
	callq	_floorf
	movl	%eax, %r15d
	leal	(%r15,%r15,2), %eax
	addl	%r13d, %eax
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	xorps	%xmm0, %xmm0
	cvtsi2ss	%r13d, %xmm0
	mulss	-48(%rbp), %xmm0                ## 4-byte Folded Reload
	callq	_ceilf
	movl	%eax, %r12d
	xorps	%xmm0, %xmm0
	cvtsi2ss	%r15d, %xmm0
	mulss	-44(%rbp), %xmm0                ## 4-byte Folded Reload
	callq	_ceilf
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	incl	%r13d
	xorps	%xmm0, %xmm0
	cvtsi2ss	%r13d, %xmm0
	mulss	-48(%rbp), %xmm0                ## 4-byte Folded Reload
	callq	_ceilf
	movl	%ebx, %r13d
	movl	%eax, %ebx
	subl	%r12d, %ebx
	incl	%r15d
	xorps	%xmm0, %xmm0
	cvtsi2ss	%r15d, %xmm0
	mulss	-44(%rbp), %xmm0                ## 4-byte Folded Reload
	callq	_ceilf
	subl	%r12d, %r14d
	xorps	%xmm0, %xmm0
	cvtsi2ss	%r14d, %xmm0
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	subl	%ecx, %eax
	xorps	%xmm1, %xmm1
	cvtsi2ss	%ebx, %xmm1
	movss	LCPI0_1(%rip), %xmm3            ## xmm3 = mem[0],zero,zero,zero
	addss	%xmm3, %xmm0
	addss	%xmm0, %xmm0
	divss	%xmm1, %xmm0
	movss	LCPI0_3(%rip), %xmm2            ## xmm2 = mem[0],zero,zero,zero
	subl	%ecx, %r13d
	xorps	%xmm1, %xmm1
	cvtsi2ss	%r13d, %xmm1
	addss	%xmm3, %xmm1
	xorps	%xmm3, %xmm3
	cvtsi2ss	%eax, %xmm3
	addss	%xmm2, %xmm0
	addss	%xmm1, %xmm1
	divss	%xmm3, %xmm1
	addss	%xmm2, %xmm1
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movl	-56(%rbp), %esi                 ## 4-byte Reload
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	movss	-60(%rbp), %xmm2                ## 4-byte Reload
                                        ## xmm2 = mem[0],zero,zero,zero
	movss	-64(%rbp), %xmm3                ## 4-byte Reload
                                        ## xmm3 = mem[0],zero,zero,zero
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_cube_to_xyz                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_cube3x2_to_xyz
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cube3x2_to_xyz
_cube3x2_to_xyz:                        ; @cube3x2_to_xyz
	.cfi_startproc
; %bb.0:
	stp	d13, d12, [sp, #-144]!          ; 16-byte Folded Spill
	.cfi_def_cfa_offset 144
	stp	d11, d10, [sp, #16]             ; 16-byte Folded Spill
	stp	d9, d8, [sp, #32]               ; 16-byte Folded Spill
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	mov	x19, x5
	mov	x21, x2
	mov	x22, x1
	mov	x20, x0
	ldr	s1, [x0]
	fcmp	s1, #0.0
	b.le	LBB0_2
; %bb.1:
	ldr	s0, [x20, #4]
	fmov	s2, #3.00000000
	fdiv	s0, s0, s2
	fdiv	s0, s1, s0
	ldr	s2, [x20, #12]
	fmov	s3, #0.50000000
	fmul	s2, s2, s3
	fdiv	s1, s1, s2
	b	LBB0_3
LBB0_2:
	ldr	s0, [x20, #8]
	fmov	s1, s0
LBB0_3:
	fmov	s2, #1.00000000
	fsub	s8, s2, s1
	scvtf	s1, w3
	fsub	s9, s2, s0
	fmov	s0, #3.00000000
	fdiv	s10, s1, s0
	scvtf	s0, w4
	fmov	s11, #0.50000000
	fmul	s12, s0, s11
	scvtf	s0, w22
	fdiv	s0, s0, s10
	fcvtzs	w0, s0
	bl	_floorf
	mov	x23, x0
	scvtf	s0, w21
	fdiv	s0, s0, s12
	fcvtzs	w0, s0
	bl	_floorf
	mov	x24, x0
	add	w8, w0, w0, lsl #1
	add	w25, w8, w23
	scvtf	s0, w23
	fmul	s0, s10, s0
	bl	_ceilf
	mov	x26, x0
	scvtf	s0, w24
	fmul	s0, s12, s0
	bl	_ceilf
	mov	x27, x0
	add	w8, w23, #1
	scvtf	s0, w8
	fmul	s0, s10, s0
	bl	_ceilf
	sub	w23, w0, w26
	add	w8, w24, #1
	scvtf	s0, w8
	fmul	s0, s12, s0
	bl	_ceilf
	sub	w8, w22, w26
	scvtf	s0, w8
	sub	w8, w0, w27
	fadd	s0, s0, s11
	fadd	s0, s0, s0
	scvtf	s1, w23
	fdiv	s0, s0, s1
	fmov	s1, #-1.00000000
	fadd	s0, s0, s1
	sub	w9, w21, w27
	scvtf	s2, w9
	fadd	s2, s2, s11
	fadd	s2, s2, s2
	scvtf	s3, w8
	fdiv	s2, s2, s3
	fadd	s1, s2, s1
	mov	x0, x20
	mov	x1, x25
	fmov	s2, s9
	fmov	s3, s8
	mov	x2, x19
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #32]               ; 16-byte Folded Reload
	ldp	d11, d10, [sp, #16]             ; 16-byte Folded Reload
	ldp	d13, d12, [sp], #144            ; 16-byte Folded Reload
	b	_cube_to_xyz
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_cube3x2_to_xyz
.subsections_via_symbols
