	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ff_jpegls_update_state_regular
_ff_jpegls_update_state_regular:        ## @ff_jpegls_update_state_regular
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movl	%edx, %edi
	callq	_FFABS
	movl	%eax, %ecx
	movl	$-65536, %eax                   ## imm = 0xFFFF0000
	cmpl	$65535, %ecx                    ## imm = 0xFFFF
	jg	LBB0_9
## %bb.1:
	movl	%r14d, %edi
	callq	_FFABS
	movq	(%rbx), %rcx
	movslq	%r15d, %r15
	addl	%eax, (%rcx,%r15,4)
	imull	8(%rbx), %r14d
	movq	16(%rbx), %rax
	addl	%r14d, (%rax,%r15,4)
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_ff_jpegls_downscale_state
	movq	16(%rbx), %rax
	movq	24(%rbx), %rcx
	movl	(%rax,%r15,4), %edi
	movl	(%rcx,%r15,4), %eax
	movl	%eax, %ecx
	negl	%ecx
	cmpl	%ecx, %edi
	jle	LBB0_2
## %bb.4:
	testl	%edi, %edi
	jle	LBB0_8
## %bb.5:
	subl	%eax, %edi
	xorl	%esi, %esi
	callq	_FFMIN
	movq	16(%rbx), %rcx
	movl	%eax, (%rcx,%r15,4)
	movq	32(%rbx), %rax
	movl	(%rax,%r15,4), %ecx
	cmpl	$126, %ecx
	jg	LBB0_8
## %bb.6:
	incl	%ecx
	jmp	LBB0_7
LBB0_2:
	addl	%eax, %edi
	movl	$1, %esi
	subl	%eax, %esi
	callq	_FFMAX
	movq	16(%rbx), %rcx
	movl	%eax, (%rcx,%r15,4)
	movq	32(%rbx), %rax
	movl	(%rax,%r15,4), %ecx
	cmpl	$-127, %ecx
	jl	LBB0_8
## %bb.3:
	decl	%ecx
LBB0_7:
	movl	%ecx, (%rax,%r15,4)
LBB0_8:
	movl	%r14d, %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_ff_jpegls_update_state_regular
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ff_jpegls_update_state_regular
_ff_jpegls_update_state_regular:        ; @ff_jpegls_update_state_regular
	.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	x19, x2
	mov	x21, x1
	mov	x20, x0
	mov	x0, x2
	bl	_FFABS
	cmp	w0, #16, lsl #12                ; =65536
	b.lt	LBB0_2
; %bb.1:
	mov	w19, #-65536
	b	LBB0_9
LBB0_2:
	mov	x0, x19
	bl	_FFABS
	ldr	x8, [x20]
	sbfiz	x23, x21, #2, #32
	ldr	w9, [x8, x23]
	sxtw	x22, w21
	add	w9, w9, w0
	str	w9, [x8, x23]
	ldr	w8, [x20, #8]
	mul	w19, w8, w19
	ldr	x8, [x20, #16]
	ldr	w9, [x8, x23]
	add	w9, w9, w19
	str	w9, [x8, x23]
	mov	x0, x20
	mov	x1, x21
	bl	_ff_jpegls_downscale_state
	ldp	x8, x10, [x20, #16]
	ldr	w9, [x8, x23]
	ldr	w8, [x10, x23]
	neg	w10, w8
	cmp	w9, w10
	b.le	LBB0_6
; %bb.3:
	cmp	w9, #1
	b.lt	LBB0_9
; %bb.4:
	sub	w0, w9, w8
	mov	w1, #0
	bl	_FFMIN
	ldr	x8, [x20, #16]
	lsl	x9, x22, #2
	str	w0, [x8, x9]
	ldr	x8, [x20, #32]
	ldr	w9, [x8, x9]
	cmp	w9, #126
	b.gt	LBB0_9
; %bb.5:
	add	w9, w9, #1
	b	LBB0_8
LBB0_6:
	add	w0, w8, w9
	mov	w9, #1
	sub	w1, w9, w8
	bl	_FFMAX
	ldr	x8, [x20, #16]
	lsl	x9, x22, #2
	str	w0, [x8, x9]
	ldr	x8, [x20, #32]
	ldr	w9, [x8, x9]
	cmn	w9, #127
	b.lt	LBB0_9
; %bb.7:
	sub	w9, w9, #1
LBB0_8:
	str	w9, [x8, x22, lsl #2]
LBB0_9:
	mov	x0, x19
	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
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_ff_jpegls_update_state_regular
.subsections_via_symbols
