	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function set_identity_matrix
LCPI0_0:
	.quad	0x3ff0000000000000              ## double 1
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4
LCPI0_1:
	.long	2                               ## 0x2
	.long	3                               ## 0x3
	.space	4
	.space	4
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_set_identity_matrix:                   ## @set_identity_matrix
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	(%rdi), %rbx
	callq	_allocate_3dlut
	testl	%eax, %eax
	js	LBB0_16
## %bb.1:
	testl	%r15d, %r15d
	jle	LBB0_15
## %bb.2:
	leal	-1(%r15), %eax
	cvtsi2sd	%eax, %xmm0
	movsd	LCPI0_0(%rip), %xmm1            ## xmm1 = mem[0],zero
	divsd	%xmm0, %xmm1
	xorps	%xmm0, %xmm0
	cvtsd2ss	%xmm1, %xmm0
	movq	(%rbx), %rax
	movl	%r15d, %r12d
	leaq	-1(%r12), %r14
	movl	%r15d, %ecx
	imull	%ecx, %ecx
	movl	%r12d, %r9d
	andl	$-4, %r9d
	movaps	%xmm0, %xmm1
	shufps	$0, %xmm0, %xmm1                ## xmm1 = xmm1[0,0],xmm0[0,0]
	xorl	%edx, %edx
	movdqa	LCPI0_1(%rip), %xmm8            ## xmm8 = <2,3,u,u>
	xorl	%esi, %esi
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_3 Depth=1
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	incl	%esi
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	addq	%rcx, %rdx
	cmpl	%r15d, %esi
	je	LBB0_15
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
                                        ##       Child Loop BB0_10 Depth 3
                                        ##       Child Loop BB0_12 Depth 3
	xorps	%xmm3, %xmm3
	cvtsi2ss	%esi, %xmm3
	movl	%ecx, %r11d
	mulss	%xmm0, %xmm3
	cvttss2si	%xmm3, %r10d
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	imull	%esi, %r11d
	movd	%r10d, %xmm3
	pshufd	$0, %xmm3, %xmm3                ## xmm3 = xmm3[0,0,0,0]
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	xorl	%r13d, %r13d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_4 Depth=2
	incl	%r13d
	addq	%r12, %rdx
	cmpl	%r15d, %r13d
	je	LBB0_14
LBB0_4:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_10 Depth 3
                                        ##       Child Loop BB0_12 Depth 3
	xorps	%xmm4, %xmm4
	cvtsi2ss	%r13d, %xmm4
	mulss	%xmm0, %xmm4
	cvttss2si	%xmm4, %edi
	cmpl	$4, %r15d
	jae	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=2
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_12:                                ##   Parent Loop BB0_3 Depth=1
                                        ##     Parent Loop BB0_4 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	leal	(%rdx,%rbx), %ecx
	movslq	%ecx, %rcx
	leaq	(%rcx,%rcx,2), %rcx
	xorps	%xmm2, %xmm2
	cvtsi2ss	%ebx, %xmm2
	movl	%r10d, (%rax,%rcx,4)
	mulss	%xmm0, %xmm2
	cvttss2si	%xmm2, %esi
	movl	%edi, 4(%rax,%rcx,4)
	movl	%esi, 8(%rax,%rcx,4)
	incq	%rbx
	cmpq	%rbx, %r12
	jne	LBB0_12
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=2
	movl	%r13d, %ebx
	imull	%r15d, %ebx
	addl	%r11d, %ebx
	leal	(%rbx,%r14), %r8d
	cmpl	%ebx, %r8d
	jl	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=2
	movq	%r14, %rbx
	shrq	$32, %rbx
	movl	$0, %ebx
	jne	LBB0_12
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=2
	movd	%edi, %xmm4
	pshufd	$0, %xmm4, %xmm4                ## xmm4 = xmm4[0,0,0,0]
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_10:                                ##   Parent Loop BB0_3 Depth=1
                                        ##     Parent Loop BB0_4 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	leal	1(%rbx), %ecx
	movd	%ebx, %xmm5
	pshufd	$80, %xmm5, %xmm6               ## xmm6 = xmm5[0,0,1,1]
	pinsrd	$1, %ecx, %xmm5
	por	%xmm8, %xmm6
	punpcklqdq	%xmm6, %xmm5            ## xmm5 = xmm5[0],xmm6[0]
	leal	(%rdx,%rbx), %ecx
	movslq	%ecx, %rcx
	cvtdq2ps	%xmm5, %xmm5
	mulps	%xmm1, %xmm5
	cvttps2dq	%xmm5, %xmm5
	leaq	(%rcx,%rcx,2), %rcx
	pshufd	$68, %xmm3, %xmm6               ## xmm6 = xmm3[0,1,0,1]
	pshufd	$80, %xmm4, %xmm7               ## xmm7 = xmm4[0,0,1,1]
	pblendw	$243, %xmm6, %xmm7              ## xmm7 = xmm6[0,1],xmm7[2,3],xmm6[4,5,6,7]
	pshufd	$68, %xmm5, %xmm6               ## xmm6 = xmm5[0,1,0,1]
	pblendw	$207, %xmm7, %xmm6              ## xmm6 = xmm7[0,1,2,3],xmm6[4,5],xmm7[6,7]
	movdqa	%xmm3, %xmm7
	shufps	$255, %xmm4, %xmm7              ## xmm7 = xmm7[3,3],xmm4[3,3]
	pshufd	$238, %xmm5, %xmm2              ## xmm2 = xmm5[2,3,2,3]
	pblendw	$60, %xmm7, %xmm2               ## xmm2 = xmm2[0,1],xmm7[2,3,4,5],xmm2[6,7]
	pshufd	$165, %xmm4, %xmm7              ## xmm7 = xmm4[1,1,2,2]
	pblendw	$48, %xmm3, %xmm7               ## xmm7 = xmm7[0,1,2,3],xmm3[4,5],xmm7[6,7]
	pblendw	$12, %xmm5, %xmm7               ## xmm7 = xmm7[0,1],xmm5[2,3],xmm7[4,5,6,7]
	movdqu	%xmm7, 16(%rax,%rcx,4)
	movdqu	%xmm2, 32(%rax,%rcx,4)
	movdqu	%xmm6, (%rax,%rcx,4)
	addq	$4, %rbx
	cmpq	%rbx, %r9
	jne	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_4 Depth=2
	movq	%r9, %rbx
	cmpq	%r12, %r9
	jne	LBB0_12
	jmp	LBB0_13
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=2
	xorl	%ebx, %ebx
	jmp	LBB0_12
LBB0_15:
	xorl	%eax, %eax
LBB0_16:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_set_identity_matrix
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ; -- Begin function set_identity_matrix
lCPI0_0:
	.long	0                               ; 0x0
	.long	1                               ; 0x1
	.long	2                               ; 0x2
	.long	3                               ; 0x3
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_set_identity_matrix:                   ; @set_identity_matrix
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x1
	ldr	x20, [x0]
	bl	_allocate_3dlut
	tbnz	w0, #31, LBB0_15
; %bb.1:
	cmp	w19, #1
	b.lt	LBB0_14
; %bb.2:
	mov	x8, #0
	mov	w9, #0
	sub	w10, w19, #1
	scvtf	d0, w10
	fmov	d1, #1.00000000
	fdiv	d0, d1, d0
	fcvt	s0, d0
	ldr	x10, [x20]
	mov	w11, w19
	sub	x12, x11, #1
	mul	w13, w19, w19
	and	x14, x11, #0xfffffff0
	dup.4s	v1, v0[0]
	mov	w15, #12
	lsr	x16, x12, #32
Lloh0:
	adrp	x17, lCPI0_0@PAGE
Lloh1:
	ldr	q2, [x17, lCPI0_0@PAGEOFF]
	movi.4s	v3, #4
	movi.4s	v4, #8
	movi.4s	v5, #12
	movi.4s	v6, #16
	mov	w17, #12
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	w9, w9, #1
	add	w17, w17, w13
	add	x8, x8, x13
	cmp	w9, w19
	b.eq	LBB0_14
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
                                        ;       Child Loop BB0_11 Depth 3
                                        ;       Child Loop BB0_13 Depth 3
	mov	w0, #0
	scvtf	s7, w9
	fmul	s7, s0, s7
	fcvtzs	w1, s7
	mul	w2, w13, w9
	dup.4s	v16, w1
	mov.16b	v19, v16
	mov	x3, x8
	mov	x4, x17
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=2
	add	w0, w0, #1
	add	w4, w4, w19
	add	x3, x3, x11
	cmp	w0, w19
	b.eq	LBB0_3
LBB0_6:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_11 Depth 3
                                        ;       Child Loop BB0_13 Depth 3
	scvtf	s7, w0
	fmul	s7, s0, s7
	fcvtzs	w5, s7
	cmp	w19, #16
	b.hs	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	mov	x6, #0
	b	LBB0_13
LBB0_8:                                 ;   in Loop: Header=BB0_6 Depth=2
	madd	w6, w0, w19, w2
	add	w7, w6, w12
	cmp	w7, w6
	ccmp	x16, #0, #0, ge
	b.eq	LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=2
	mov	x6, #0
	b	LBB0_13
LBB0_10:                                ;   in Loop: Header=BB0_6 Depth=2
	dup.4s	v23, w5
	mov	x6, x4
	mov	x7, x14
	mov.16b	v7, v2
LBB0_11:                                ;   Parent Loop BB0_4 Depth=1
                                        ;     Parent Loop BB0_6 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	add.4s	v25, v7, v3
	sub	w20, w6, #12
	scvtf.4s	v26, v7
	scvtf.4s	v25, v25
	fmul.4s	v26, v1, v26
	fmul.4s	v25, v1, v25
	fcvtzs.4s	v21, v26
	fcvtzs.4s	v24, v25
	smaddl	x20, w20, w15, x10
	mov.16b	v20, v23
	st3.4s	{ v19, v20, v21 }, [x20]
	add.4s	v25, v7, v4
	sub	w20, w6, #8
	sub	w21, w6, #4
	smaddl	x20, w20, w15, x10
	mov.16b	v22, v19
	st3.4s	{ v22, v23, v24 }, [x20]
	scvtf.4s	v25, v25
	fmul.4s	v25, v1, v25
	fcvtzs.4s	v27, v25
	smaddl	x20, w21, w15, x10
	mov.16b	v25, v19
	mov.16b	v26, v23
	st3.4s	{ v25, v26, v27 }, [x20]
	add.4s	v25, v7, v5
	scvtf.4s	v25, v25
	fmul.4s	v25, v25, v0[0]
	fcvtzs.4s	v18, v25
	smaddl	x20, w6, w15, x10
	mov.16b	v17, v23
	st3.4s	{ v16, v17, v18 }, [x20]
	add.4s	v7, v7, v6
	add	w6, w6, #16
	subs	x7, x7, #16
	b.ne	LBB0_11
; %bb.12:                               ;   in Loop: Header=BB0_6 Depth=2
	mov	x6, x14
	cmp	x14, x11
	b.eq	LBB0_5
LBB0_13:                                ;   Parent Loop BB0_4 Depth=1
                                        ;     Parent Loop BB0_6 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	add	w7, w3, w6
	smaddl	x7, w7, w15, x10
	stp	w1, w5, [x7]
	scvtf	s7, w6
	fmul	s7, s0, s7
	fcvtzs	w20, s7
	str	w20, [x7, #8]
	add	x6, x6, #1
	cmp	x11, x6
	b.ne	LBB0_13
	b	LBB0_5
LBB0_14:
	mov	w0, #0
LBB0_15:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdr	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_set_identity_matrix
.subsections_via_symbols
