	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ls_encode_runterm
_ls_encode_runterm:                     ## @ls_encode_runterm
	.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, %eax
	movl	%ecx, %r12d
	movl	%edx, %r15d
	movq	%rsi, %r9
	movq	%rdi, %r13
	movslq	%edx, %rcx
	leaq	365(%rcx), %r14
	movq	8(%rdi), %rdx
	movl	1460(%rdx,%rcx,4), %esi
	movl	%esi, %edi
	sarl	%edi
	testl	%ecx, %ecx
	cmovel	%r15d, %edi
	movq	(%r13), %rbx
	addl	1460(%rbx,%rcx,4), %edi
	movl	$-1, %ecx
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	incl	%ecx
	movl	%esi, %edx
	shll	%cl, %edx
	cmpl	%edi, %edx
	jl	LBB0_1
## %bb.2:
	xorl	%edi, %edi
	testl	%r12d, %r12d
	je	LBB0_5
## %bb.3:
	testl	%ecx, %ecx
	jne	LBB0_5
## %bb.4:
	movq	16(%r13), %rdx
	movl	(%rdx,%r14,4), %edx
	addl	%edx, %edx
	xorl	%edi, %edi
	cmpl	%esi, %edx
	setl	%dil
LBB0_5:
	testl	%r12d, %r12d
	js	LBB0_6
## %bb.7:
	leal	(%r12,%r12), %ebx
	addl	%r15d, %edi
	subl	%edi, %ebx
	jmp	LBB0_8
LBB0_6:
	movl	%r15d, %ebx
	notl	%ebx
	subl	%r12d, %ebx
	subl	%r12d, %ebx
	addl	%edi, %ebx
LBB0_8:
	notl	%eax
	addl	24(%r13), %eax
	movl	28(%r13), %r8d
	movq	%r9, %rdi
	movl	%ebx, %esi
	movl	%ecx, %edx
	movl	%eax, %ecx
	callq	_set_ur_golomb_jpegls
	testl	%r12d, %r12d
	jns	LBB0_10
## %bb.9:
	movq	16(%r13), %rax
	incl	(%rax,%r14,4)
LBB0_10:
	subl	%r15d, %ebx
	incl	%ebx
	sarl	%ebx
	movq	(%r13), %rax
	addl	%ebx, (%rax,%r14,4)
	movq	%r13, %rdi
	movl	%r14d, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ff_jpegls_downscale_state      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_ls_encode_runterm
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ls_encode_runterm
_ls_encode_runterm:                     ; @ls_encode_runterm
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x22, x3
	mov	x20, x2
	mov	x19, x0
	add	w9, w2, #365
	sbfiz	x8, x9, #2, #32
	ldp	x10, x11, [x0]
	ldr	w10, [x10, x8]
	ldr	w8, [x11, x8]
	sxtw	x21, w9
	asr	w9, w8, #1
	cmp	w2, #0
	csel	w9, wzr, w9, eq
	add	w9, w10, w9
	mov	w2, #-1
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	add	w2, w2, #1
	lsl	w10, w8, w2
	cmp	w10, w9
	b.lt	LBB0_1
; %bb.2:
	mov	w9, #0
	cbz	w22, LBB0_5
; %bb.3:
	cbnz	w2, LBB0_5
; %bb.4:
	ldr	x9, [x19, #16]
	ldr	w9, [x9, x21, lsl #2]
	cmp	w8, w9, lsl #1
	cset	w9, gt
LBB0_5:
	lsl	w8, w22, #1
	add	w10, w9, w20
	sub	w8, w8, w10
	mvn	w10, w20
	sub	w10, w10, w22, lsl #1
	add	w9, w10, w9
	tst	w22, #0x80000000
	csel	w23, w8, w9, eq
	mvn	w8, w4
	ldp	w9, w4, [x19, #24]
	add	w3, w9, w8
	mov	x0, x1
	mov	x1, x23
	bl	_set_ur_golomb_jpegls
	lsl	x8, x21, #2
	tbz	w22, #31, LBB0_7
; %bb.6:
	ldr	x9, [x19, #16]
	ldr	w10, [x9, x8]
	add	w10, w10, #1
	str	w10, [x9, x8]
LBB0_7:
	sub	w9, w23, w20
	ldr	x10, [x19]
	ldr	w11, [x10, x8]
	add	w9, w9, #1
	add	w9, w11, w9, asr #1
	str	w9, [x10, x8]
	mov	x0, x19
	mov	x1, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_ff_jpegls_downscale_state
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_ls_encode_runterm
.subsections_via_symbols
