	.file	"extr_j2kenc.c_getcut.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	getcut, @function
getcut:
.LFB0:
	.cfi_startproc
	endbr64
	mov	eax, DWORD PTR [rdi]
	test	eax, eax
	jle	.L6
	push	rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	mov	ecx, DWORD PTR WMSEDEC_SHIFT[rip]
	lea	ebx, -1[rax]
	xor	r9d, r9d
	mov	r10, QWORD PTR 8[rdi]
	add	rbx, 2
	mov	edi, 1
	.p2align 4,,10
	.p2align 3
.L5:
	mov	r8d, DWORD PTR -8[r10+rdi*8]
	mov	eax, DWORD PTR -4[r10+rdi*8]
	test	r9d, r9d
	je	.L3
	movsx	r11, r9d
	lea	r11, -8[r10+r11*8]
	sub	r8d, DWORD PTR [r11]
	sub	eax, DWORD PTR 4[r11]
.L3:
	imul	eax, edx
	imul	r8d, esi
	sar	eax, cl
	imul	eax, edx
	cmp	eax, r8d
	cmovge	r9d, edi
	add	rdi, 1
	cmp	rbx, rdi
	jne	.L5
	mov	eax, r9d
	pop	rbx
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore 3
	xor	r9d, r9d
	mov	eax, r9d
	ret
	.cfi_endproc
.LFE0:
	.size	getcut, .-getcut
	.comm	WMSEDEC_SHIFT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_j2kenc.c_getcut.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	getcut, %function
getcut:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	ldr	r5, [r0]
	cmp	r5, #0
	ble	.L6
	mov	r3, r0
	mov	r0, #0
	mov	ip, r0
	ldr	lr, .L14
	ldr	r4, [r3, #4]
	ldr	r7, [lr]
	add	r6, r4, #4
.L5:
	cmp	r0, #0
	ldr	lr, [r4, ip, lsl #3]
	ldr	r3, [r6, ip, lsl #3]
	add	ip, ip, #1
	beq	.L3
	sub	r8, r0, #-536870911
	add	r9, r4, r8, lsl #3
	ldr	r9, [r9, #4]
	ldr	r8, [r4, r8, lsl #3]
	sub	r3, r3, r9
	sub	lr, lr, r8
.L3:
	mul	r3, r2, r3
	asr	r3, r3, r7
	mul	r3, r2, r3
	mul	lr, r1, lr
	cmp	r3, lr
	movge	r0, ip
	cmp	ip, r5
	bne	.L5
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L6:
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L15:
	.align	2
.L14:
	.word	WMSEDEC_SHIFT
	.size	getcut, .-getcut
	.comm	WMSEDEC_SHIFT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
