	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_jpegls_reset_coding_parameters ## -- Begin function ff_jpegls_reset_coding_parameters
	.p2align	4, 0x90
_ff_jpegls_reset_coding_parameters:     ## @ff_jpegls_reset_coding_parameters
	.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	%esi, %r14d
	movq	%rdi, %rbx
	testl	%esi, %esi
	jne	LBB0_2
## %bb.1:
	movl	(%rbx), %edi
	testl	%edi, %edi
	je	LBB0_2
## %bb.3:
	cmpl	$128, %edi
	jl	LBB0_13
LBB0_4:
	movl	$4095, %esi                     ## imm = 0xFFF
	callq	_FFMIN
	movl	%eax, %r15d
	subl	$-128, %r15d
	sarl	$8, %r15d
	testl	%r14d, %r14d
	jne	LBB0_6
## %bb.5:
	movl	8(%rbx), %esi
	testl	%esi, %esi
	jne	LBB0_7
LBB0_6:
	movl	(%rbx), %edx
	movl	12(%rbx), %esi
	leal	(%rsi,%rsi,2), %eax
	leal	(%r15,%rax), %edi
	addl	$2, %edi
	incl	%esi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_iso_clip
	movq	%rax, %rsi
	movl	%esi, 8(%rbx)
LBB0_7:
	testl	%r14d, %r14d
	jne	LBB0_9
## %bb.8:
	movl	16(%rbx), %eax
	testl	%eax, %eax
	jne	LBB0_10
LBB0_9:
	movl	(%rbx), %edx
	movl	12(%rbx), %eax
	leal	(%rax,%rax,4), %eax
	leal	(%rax,%r15,4), %edi
	addl	$3, %edi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_iso_clip
	movl	%eax, 16(%rbx)
LBB0_10:
	testl	%r14d, %r14d
	jne	LBB0_12
## %bb.11:
	movq	24(%rbx), %r8
	testq	%r8, %r8
	jne	LBB0_23
LBB0_12:
	movl	%r15d, %ecx
	shll	$4, %ecx
	addl	%r15d, %ecx
	movl	(%rbx), %edx
	movl	12(%rbx), %esi
	leal	(,%rsi,8), %edi
	subl	%esi, %edi
	addl	%ecx, %edi
	addl	$4, %edi
	movl	%eax, %esi
	jmp	LBB0_22
LBB0_2:
	movb	4(%rbx), %cl
	movl	$-1, %edi
	shll	%cl, %edi
	notl	%edi
	movl	%edi, (%rbx)
	cmpl	$128, %edi
	jge	LBB0_4
LBB0_13:
	incl	%edi
	movl	$256, %eax                      ## imm = 0x100
	xorl	%edx, %edx
	idivl	%edi
	movl	%eax, %r15d
	testl	%r14d, %r14d
	jne	LBB0_15
## %bb.14:
	cmpl	$0, 8(%rbx)
	jne	LBB0_16
LBB0_15:
	movw	$3, %ax
	xorl	%edx, %edx
	idivw	%r15w
	cwtl
	movl	12(%rbx), %ecx
	leal	(%rcx,%rcx,2), %esi
	addl	%eax, %esi
	movl	$2, %edi
	callq	_FFMAX
	movl	(%rbx), %edx
	movl	12(%rbx), %esi
	incl	%esi
	movl	%eax, %edi
	callq	_iso_clip
	movl	%eax, 8(%rbx)
LBB0_16:
	testl	%r14d, %r14d
	jne	LBB0_18
## %bb.17:
	cmpl	$0, 16(%rbx)
	jne	LBB0_19
LBB0_18:
	movw	$7, %ax
	xorl	%edx, %edx
	idivw	%r15w
	cwtl
	movl	12(%rbx), %ecx
	leal	(%rcx,%rcx,4), %esi
	addl	%eax, %esi
	movl	$3, %edi
	callq	_FFMAX
	movl	(%rbx), %edx
	movl	8(%rbx), %esi
	movl	%eax, %edi
	callq	_iso_clip
	movl	%eax, 16(%rbx)
LBB0_19:
	testl	%r14d, %r14d
	jne	LBB0_21
## %bb.20:
	movq	24(%rbx), %r8
	testq	%r8, %r8
	jne	LBB0_23
LBB0_21:
	movw	$21, %ax
	xorl	%edx, %edx
	idivw	%r15w
	cwtl
	movl	12(%rbx), %ecx
	leal	(,%rcx,8), %esi
	subl	%ecx, %esi
	addl	%eax, %esi
	movl	$4, %edi
	callq	_FFMAX
	movl	(%rbx), %edx
	movl	16(%rbx), %esi
	movl	%eax, %edi
LBB0_22:
	callq	_iso_clip
	movq	%rax, %r8
	movq	%rax, 24(%rbx)
LBB0_23:
	testl	%r14d, %r14d
	jne	LBB0_25
## %bb.24:
	cmpl	$0, 20(%rbx)
	jne	LBB0_26
LBB0_25:
	movl	$64, 20(%rbx)
LBB0_26:
	movl	8(%rbx), %edx
	movl	16(%rbx), %ecx
	leaq	L_.str(%rip), %rsi
	xorl	%edi, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ff_dlog                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[JPEG-LS RESET] T=%i,%i,%i\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_jpegls_reset_coding_parameters ; -- Begin function ff_jpegls_reset_coding_parameters
	.p2align	2
_ff_jpegls_reset_coding_parameters:     ; @ff_jpegls_reset_coding_parameters
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x1
	mov	x19, x0
	cbnz	w1, LBB0_12
; %bb.1:
	ldr	w0, [x19]
	cbz	w0, LBB0_12
; %bb.2:
	cmp	w0, #128
	b.lt	LBB0_13
LBB0_3:
	mov	w1, #4095
	bl	_FFMIN
	add	w8, w0, #128
	asr	w21, w8, #8
	cbnz	w20, LBB0_5
; %bb.4:
	ldr	w8, [x19, #8]
	cbnz	w8, LBB0_6
LBB0_5:
	ldr	w8, [x19, #12]
	add	w9, w8, w8, lsl #1
	add	w9, w21, w9
	add	w0, w9, #2
	add	w1, w8, #1
	ldr	w2, [x19]
	bl	_iso_clip
	mov	x8, x0
	str	w8, [x19, #8]
LBB0_6:
	cbnz	w20, LBB0_8
; %bb.7:
	ldr	w1, [x19, #16]
	cbnz	w1, LBB0_9
LBB0_8:
	ldr	w9, [x19, #12]
	add	w9, w9, w9, lsl #2
	add	w9, w9, w21, lsl #2
	add	w0, w9, #3
	ldr	w2, [x19]
	mov	x1, x8
	bl	_iso_clip
	mov	x1, x0
	str	w1, [x19, #16]
LBB0_9:
	cbnz	w20, LBB0_11
; %bb.10:
	ldr	x4, [x19, #24]
	cbnz	x4, LBB0_23
LBB0_11:
	add	w8, w21, w21, lsl #4
	ldr	w9, [x19, #12]
	lsl	w10, w9, #3
	sub	w9, w10, w9
	add	w8, w8, w9
	add	w0, w8, #4
	ldr	w2, [x19]
                                        ; kill: def $w1 killed $w1 killed $x1
	b	LBB0_22
LBB0_12:
	ldr	w8, [x19, #4]
	mov	w9, #-1
	lsl	w8, w9, w8
	mvn	w0, w8
	str	w0, [x19]
	cmp	w0, #128
	b.ge	LBB0_3
LBB0_13:
	add	w8, w0, #1
	mov	w9, #256
	sdiv	w8, w9, w8
	sxth	w21, w8
	cbnz	w20, LBB0_15
; %bb.14:
	ldr	w8, [x19, #8]
	cbnz	w8, LBB0_16
LBB0_15:
	mov	w8, #3
	sdiv	w8, w8, w21
	ldr	w9, [x19, #12]
	add	w9, w9, w9, lsl #1
	add	w1, w9, w8, sxth
	mov	w0, #2
	bl	_FFMAX
	ldr	w8, [x19, #12]
	add	w1, w8, #1
	ldr	w2, [x19]
	bl	_iso_clip
	str	w0, [x19, #8]
LBB0_16:
	cbnz	w20, LBB0_18
; %bb.17:
	ldr	w8, [x19, #16]
	cbnz	w8, LBB0_19
LBB0_18:
	mov	w8, #7
	sdiv	w8, w8, w21
	ldr	w9, [x19, #12]
	add	w9, w9, w9, lsl #2
	add	w1, w9, w8, sxth
	mov	w0, #3
	bl	_FFMAX
	ldr	w1, [x19, #8]
	ldr	w2, [x19]
	bl	_iso_clip
	str	w0, [x19, #16]
LBB0_19:
	cbnz	w20, LBB0_21
; %bb.20:
	ldr	x4, [x19, #24]
	cbnz	x4, LBB0_23
LBB0_21:
	mov	w8, #21
	sdiv	w8, w8, w21
	ldr	w9, [x19, #12]
	lsl	w10, w9, #3
	sub	w9, w10, w9
	add	w1, w9, w8, sxth
	mov	w0, #4
	bl	_FFMAX
	ldr	w1, [x19, #16]
	ldr	w2, [x19]
LBB0_22:
	bl	_iso_clip
	mov	x4, x0
	str	x0, [x19, #24]
LBB0_23:
	cbnz	w20, LBB0_25
; %bb.24:
	ldr	w8, [x19, #20]
	cbnz	w8, LBB0_26
LBB0_25:
	mov	w8, #64
	str	w8, [x19, #20]
LBB0_26:
	ldr	w2, [x19, #8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	ldr	w3, [x19, #16]
	mov	x0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_ff_dlog
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[JPEG-LS RESET] T=%i,%i,%i\n"

.subsections_via_symbols
