	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ls_encode_run
_ls_encode_run:                         ## @ls_encode_run
	.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
	movl	%r8d, -44(%rbp)                 ## 4-byte Spill
	movl	%edx, %ebx
	movq	%rsi, %r14
	movq	%rdi, %r15
	movslq	%ecx, %r13
	movq	_ff_log2_run@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rdi), %rcx
	movq	(%rcx,%r13,8), %rcx
	movb	(%rax,%rcx,4), %cl
	movl	$1, %eax
	shll	%cl, %eax
	cmpl	%edx, %eax
	jle	LBB0_1
LBB0_4:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	testl	%eax, %eax
	jne	LBB0_7
## %bb.5:
	testl	%ebx, %ebx
	je	LBB0_7
## %bb.6:
	movq	%r14, %rdi
	movl	$1, %esi
	movl	$1, %edx
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	$1, %eax
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %eax
	cmpl	%eax, %ebx
	jl	LBB0_4
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %r12d
	movq	%r14, %rdi
	movl	$1, %esi
	movl	$1, %edx
	callq	_put_bits
	movq	_ff_log2_run@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%r15), %rdx
	movq	(%rdx,%r13,8), %rsi
	movl	(%rax,%rsi,4), %ecx
	movl	$-1, %ebx
	shll	%cl, %ebx
	addl	%r12d, %ebx
	cmpq	$30, %rsi
	ja	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	leaq	1(%rsi), %rcx
	movq	%rcx, (%rdx,%r13,8)
	movl	4(%rax,%rsi,4), %ecx
	jmp	LBB0_3
LBB0_7:
	testl	%eax, %eax
	je	LBB0_11
## %bb.8:
	movq	%r14, %rdi
	movl	$1, %esi
	xorl	%edx, %edx
	callq	_put_bits
	movq	_ff_log2_run@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%r15), %rcx
	movq	(%rcx,%r13,8), %rcx
	movl	(%rax,%rcx,4), %esi
	testl	%esi, %esi
	je	LBB0_11
## %bb.9:
	movq	%r14, %rdi
	movl	%ebx, %edx
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_put_bits                       ## TAILCALL
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ff_log2_run,8,3                ## @ff_log2_run
	.no_dead_strip	_ls_encode_run
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ls_encode_run
_ls_encode_run:                         ; @ls_encode_run
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [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 w25, -72
	.cfi_offset w26, -80
	mov	x22, x4
                                        ; kill: def $w3 killed $w3 def $x3
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	sxtw	x23, w3
Lloh0:
	adrp	x24, _ff_log2_run@GOTPAGE
Lloh1:
	ldr	x24, [x24, _ff_log2_run@GOTPAGEOFF]
	ldr	x8, [x0]
	ldr	x8, [x8, w3, sxtw #3]
	ldr	x9, [x24]
	ldr	w8, [x9, x8, lsl #2]
	mov	w25, #1
	lsl	w8, w25, w8
	cmp	w8, w2
	b.le	LBB0_4
LBB0_1:
	cbnz	w22, LBB0_8
; %bb.2:
	cbz	w19, LBB0_8
; %bb.3:
	mov	x0, x20
	mov	w1, #1
	mov	w2, #1
	b	LBB0_11
LBB0_4:
	mov	w26, #-1
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	lsl	w8, w26, w8
	lsl	w9, w25, w12
	add	w19, w8, w19
	cmp	w19, w9
	b.lt	LBB0_1
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	w1, #1
	mov	w2, #1
	bl	_put_bits
	ldr	x9, [x24]
	ldr	x10, [x21]
	ldr	x11, [x10, x23, lsl #3]
	ldr	w8, [x9, x11, lsl #2]
	mov	x12, x8
	cmp	x11, #30
	b.hi	LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	add	x11, x11, #1
	str	x11, [x10, x23, lsl #3]
	ldr	w12, [x9, x11, lsl #2]
	b	LBB0_5
LBB0_8:
	cbz	w22, LBB0_12
; %bb.9:
	mov	x0, x20
	mov	w1, #1
	mov	w2, #0
	bl	_put_bits
	ldr	x8, [x24]
	ldr	x9, [x21]
	ldr	x9, [x9, x23, lsl #3]
	ldr	w1, [x8, x9, lsl #2]
	cbz	w1, LBB0_12
; %bb.10:
	mov	x0, x20
	mov	x2, x19
LBB0_11:
	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	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_put_bits
LBB0_12:
	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	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_ff_log2_run,8,3                ; @ff_log2_run
	.no_dead_strip	_ls_encode_run
.subsections_via_symbols
