	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function celt_enc_tf
_celt_enc_tf:                           ## @celt_enc_tf
	.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	%rsi, %r12
	movq	%rdi, %r15
	xorl	%eax, %eax
	cmpl	$0, (%rdi)
	sete	%al
	leal	(%rax,%rax), %ebx
	addl	$2, %ebx
	xorl	%r14d, %r14d
	cmpq	$0, 8(%rdi)
	je	LBB0_2
## %bb.1:
	movq	%r12, %rdi
	callq	_opus_rc_tell
	movl	%ebx, %ecx
	addq	%rax, %rcx
	cmpq	16(%r15), %rcx
	setl	%al
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	jmp	LBB0_3
LBB0_2:
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
LBB0_3:
	movslq	24(%r15), %r13
	movl	28(%r15), %eax
	cmpl	%eax, %r13d
	jge	LBB0_8
## %bb.4:
	movzbl	-44(%rbp), %eax                 ## 1-byte Folded Reload
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movl	$0, -48(%rbp)                   ## 4-byte Folded Spill
	xorl	%r14d, %r14d
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_6 Depth=1
	xorl	%ebx, %ebx
	cmpl	$0, (%r15)
	sete	%bl
	orl	$4, %ebx
	incq	%r13
	movslq	28(%r15), %rax
	cmpq	%rax, %r13
	jge	LBB0_8
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	callq	_opus_rc_tell
	movl	%ebx, %ecx
	addq	-72(%rbp), %rcx                 ## 8-byte Folded Reload
	addq	%rax, %rcx
	cmpq	16(%r15), %rcx
	jg	LBB0_5
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	-48(%rbp), %r15d                ## 4-byte Reload
	movl	%r15d, %eax
	xorl	$1, %eax
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	32(%rcx), %rcx
	movl	%r14d, -52(%rbp)                ## 4-byte Spill
	movq	%r12, %r14
	xorl	%r12d, %r12d
	cmpl	(%rcx,%r13,4), %eax
	sete	%r12b
	movq	%r14, %rdi
	movl	%r12d, %esi
	movl	%ebx, %edx
	callq	_ff_opus_rc_enc_log
	xorl	%r12d, %r15d
	movq	%r14, %r12
	movl	-52(%rbp), %r14d                ## 4-byte Reload
	movl	%r15d, -48(%rbp)                ## 4-byte Spill
	orl	%r15d, %r14d
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_5
LBB0_8:
	cmpb	$0, -44(%rbp)                   ## 1-byte Folded Reload
	je	LBB0_11
## %bb.9:
	movq	_ff_celt_tf_select@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	8(%r15), %rdx
	movq	(%rcx,%rdx,8), %rcx
	movslq	(%r15), %rdx
	movq	(%rcx,%rdx,8), %rcx
	movslq	%r14d, %rdx
	movq	(%rcx), %rsi
	movq	8(%rcx), %rcx
	movq	(%rsi,%rdx,8), %rsi
	cmpq	(%rcx,%rdx,8), %rsi
	jne	LBB0_12
LBB0_11:
	xorl	%ecx, %ecx
	jmp	LBB0_13
LBB0_12:
	movl	40(%r15), %esi
	movq	%r12, %rdi
	movl	$1, %edx
	callq	_ff_opus_rc_enc_log
	movslq	40(%r15), %rcx
	movl	28(%r15), %eax
LBB0_13:
	movslq	24(%r15), %rdx
	cmpl	%eax, %edx
	jge	LBB0_16
## %bb.14:
	movq	_ff_celt_tf_select@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	8(%r15), %rdi
	movq	32(%r15), %rax
	movq	(%rsi,%rdi,8), %rsi
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movslq	(%r15), %rdi
	movq	(%rsi,%rdi,8), %rdi
	movq	(%rdi,%rcx,8), %rdi
	movslq	(%rax,%rdx,4), %rbx
	movl	(%rdi,%rbx,8), %edi
	movl	%edi, (%rax,%rdx,4)
	incq	%rdx
	movslq	28(%r15), %rdi
	cmpq	%rdi, %rdx
	jl	LBB0_15
LBB0_16:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ff_celt_tf_select,8,3          ## @ff_celt_tf_select
	.no_dead_strip	_celt_enc_tf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function celt_enc_tf
_celt_enc_tf:                           ; @celt_enc_tf
	.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
	mov	x20, x1
	mov	x19, x0
	ldr	w8, [x0]
	mov	w9, #2
	mov	w10, #4
	cmp	w8, #0
	csel	w21, w10, w9, eq
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x0, x20
	bl	_opus_rc_tell
	add	x8, x0, w21, uxtw
	ldr	x9, [x19, #16]
	cmp	x8, x9
	cset	w23, lt
	b	LBB0_3
LBB0_2:
	mov	w23, #0
LBB0_3:
	ldp	w25, w8, [x19, #24]
                                        ; kill: def $w25 killed $w25 def $x25
	sxtw	x25, w25
	cmp	w25, w8
	b.ge	LBB0_8
; %bb.4:
	mov	w26, #0
	mov	w24, #0
	mov	w27, #4
	mov	w28, w23
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x19]
	cmp	w8, #0
	cinc	w21, w27, eq
	add	x25, x25, #1
	ldrsw	x8, [x19, #28]
	cmp	x25, x8
	b.ge	LBB0_9
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_opus_rc_tell
	add	x8, x28, w21, uxtw
	ldr	x9, [x19, #16]
	add	x8, x8, x0
	cmp	x8, x9
	b.gt	LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	eor	w8, w26, #0x1
	ldr	x9, [x19, #32]
	ldr	w9, [x9, x25, lsl #2]
	cmp	w8, w9
	cset	w22, eq
	mov	x0, x20
	mov	x1, x22
	mov	x2, x21
	bl	_ff_opus_rc_enc_log
	eor	w26, w26, w22
	orr	w24, w26, w24
	b	LBB0_5
LBB0_8:
	mov	w24, #0
LBB0_9:
Lloh0:
	adrp	x21, _ff_celt_tf_select@GOTPAGE
Lloh1:
	ldr	x21, [x21, _ff_celt_tf_select@GOTPAGEOFF]
	tbz	w23, #0, LBB0_11
; %bb.10:
	ldr	x9, [x21]
	ldr	x10, [x19, #8]
	ldr	x9, [x9, x10, lsl #3]
	ldrsw	x10, [x19]
	ldr	x9, [x9, x10, lsl #3]
	sbfiz	x10, x24, #3, #32
	ldp	x11, x9, [x9]
	ldr	x11, [x11, x10]
	ldr	x9, [x9, x10]
	cmp	x11, x9
	b.ne	LBB0_12
LBB0_11:
	mov	x9, #0
	b	LBB0_13
LBB0_12:
	ldr	w1, [x19, #40]
	mov	x0, x20
	mov	w2, #1
	bl	_ff_opus_rc_enc_log
	ldrsw	x9, [x19, #40]
	ldr	w8, [x19, #28]
LBB0_13:
	ldrsw	x10, [x19, #24]
	cmp	w10, w8
	b.ge	LBB0_16
; %bb.14:
	ldr	x8, [x21]
	ldr	x11, [x19, #8]
	ldr	x8, [x8, x11, lsl #3]
	ldr	x11, [x19, #32]
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	ldrsw	x12, [x19]
	ldr	x12, [x8, x12, lsl #3]
	ldr	x12, [x12, x9, lsl #3]
	lsl	x13, x10, #2
	ldrsw	x14, [x11, x13]
	ldr	x12, [x12, x14, lsl #3]
	str	w12, [x11, x13]
	add	x10, x10, #1
	ldrsw	x12, [x19, #28]
	cmp	x10, x12
	b.lt	LBB0_15
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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_ff_celt_tf_select,8,3          ; @ff_celt_tf_select
	.no_dead_strip	_celt_enc_tf
.subsections_via_symbols
