	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function apply_lut
_apply_lut:                             ## @apply_lut
	.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
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	testl	%ecx, %ecx
	jle	LBB0_16
## %bb.1:
	movq	%r8, %r15
	movslq	%esi, %rax
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %r14
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	shlq	$3, %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	movl	$2048, %r13d                    ## imm = 0x800
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	incl	%eax
	addq	-64(%rbp), %r14                 ## 8-byte Folded Reload
	cmpl	-48(%rbp), %eax                 ## 4-byte Folded Reload
	je	LBB0_6
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	jle	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%r14,%rbx,8), %rdi
	addq	%r13, %rdi
	movl	$15, %esi
	callq	_av_clip_uintp2
	movq	(%r15,%rax,8), %rax
	movq	%rax, (%r14,%rbx,8)
	incq	%rbx
	cmpq	%rbx, %r12
	jne	LBB0_4
	jmp	LBB0_5
LBB0_6:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rbx
	xorl	%eax, %eax
	movl	$2048, %r13d                    ## imm = 0x800
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	incl	%eax
	addq	-64(%rbp), %rbx                 ## 8-byte Folded Reload
	cmpl	-48(%rbp), %eax                 ## 4-byte Folded Reload
	je	LBB0_11
LBB0_7:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_9 Depth 2
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	jle	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_9:                                 ##   Parent Loop BB0_7 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%rbx,%r14,8), %rdi
	addq	%r13, %rdi
	movl	$15, %esi
	callq	_av_clip_uintp2
	movq	(%r15,%rax,8), %rax
	movq	%rax, (%rbx,%r14,8)
	incq	%r14
	cmpq	%r14, %r12
	jne	LBB0_9
	jmp	LBB0_10
LBB0_11:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	16(%rax), %rbx
	xorl	%eax, %eax
	movl	$2048, %r13d                    ## imm = 0x800
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_12 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	incl	%eax
	addq	-64(%rbp), %rbx                 ## 8-byte Folded Reload
	cmpl	-48(%rbp), %eax                 ## 4-byte Folded Reload
	je	LBB0_16
LBB0_12:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_14 Depth 2
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	jle	LBB0_15
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_14:                                ##   Parent Loop BB0_12 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%rbx,%r14,8), %rdi
	addq	%r13, %rdi
	movl	$15, %esi
	callq	_av_clip_uintp2
	movq	(%r15,%rax,8), %rax
	movq	%rax, (%rbx,%r14,8)
	incq	%r14
	cmpq	%r14, %r12
	jne	LBB0_14
	jmp	LBB0_15
LBB0_16:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_apply_lut
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function apply_lut
_apply_lut:                             ; @apply_lut
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
                                        ; kill: def $w1 killed $w1 def $x1
	cmp	w3, #1
	b.lt	LBB0_16
; %bb.1:
	mov	x19, x4
	mov	x20, x3
	mov	x21, x2
	mov	x22, x0
	mov	w25, #0
	sxtw	x8, w1
	ldr	x26, [x0]
	mov	w9, w2
	lsl	x23, x8, #3
	lsl	x24, x9, #3
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	w25, w25, #1
	add	x26, x26, x23
	cmp	w25, w20
	b.eq	LBB0_6
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
	cmp	w21, #1
	b.lt	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x27, #0
LBB0_5:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x26, x27]
	add	x0, x8, #2048
	mov	w1, #15
	bl	_av_clip_uintp2
	ldr	x8, [x19, x0, lsl #3]
	str	x8, [x26, x27]
	add	x27, x27, #8
	cmp	x24, x27
	b.ne	LBB0_5
	b	LBB0_2
LBB0_6:
	mov	w25, #0
	ldr	x26, [x22, #8]
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	add	w25, w25, #1
	add	x26, x26, x23
	cmp	w25, w20
	b.eq	LBB0_11
LBB0_8:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_10 Depth 2
	cmp	w21, #1
	b.lt	LBB0_7
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	mov	x27, #0
LBB0_10:                                ;   Parent Loop BB0_8 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x26, x27]
	add	x0, x8, #2048
	mov	w1, #15
	bl	_av_clip_uintp2
	ldr	x8, [x19, x0, lsl #3]
	str	x8, [x26, x27]
	add	x27, x27, #8
	cmp	x24, x27
	b.ne	LBB0_10
	b	LBB0_7
LBB0_11:
	mov	w25, #0
	ldr	x22, [x22, #16]
	b	LBB0_13
LBB0_12:                                ;   in Loop: Header=BB0_13 Depth=1
	add	w25, w25, #1
	add	x22, x22, x23
	cmp	w25, w20
	b.eq	LBB0_16
LBB0_13:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_15 Depth 2
	cmp	w21, #1
	b.lt	LBB0_12
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	mov	x26, #0
LBB0_15:                                ;   Parent Loop BB0_13 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x22, x26]
	add	x0, x8, #2048
	mov	w1, #15
	bl	_av_clip_uintp2
	ldr	x8, [x19, x0, lsl #3]
	str	x8, [x22, x26]
	add	x26, x26, #8
	cmp	x24, x26
	b.ne	LBB0_15
	b	LBB0_12
LBB0_16:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_apply_lut
.subsections_via_symbols
