	.file	"extr_dwt.c_opj_dwt_calc_explicit_stepsizes.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	opj_dwt_calc_explicit_stepsizes
	.type	opj_dwt_calc_explicit_stepsizes, @function
opj_dwt_calc_explicit_stepsizes:
.LFB0:
	.cfi_startproc
	endbr64
	mov	edx, DWORD PTR [rdi]
	lea	eax, [rdx+rdx*2]
	cmp	eax, 2
	jle	.L11
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	xor	r12d, r12d
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	lea	ebp, -3[rax]
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	ebx, esi
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L15:
	lea	ecx, -1[r12]
	movsx	rax, ecx
	mov	esi, ecx
	imul	rax, rax, 1431655766
	sar	esi, 31
	shr	rax, 32
	sub	eax, esi
	lea	esi, [rax+rax*2]
	add	eax, 1
	sub	ecx, esi
	sub	edx, eax
	cmp	QWORD PTR 8[r13], 0
	lea	esi, 1[rcx]
	je	.L8
	lea	r14d, 1[rbx]
	mov	ecx, 1
	cmp	esi, 3
	jne	.L3
	lea	r14d, 2[rbx]
	mov	ecx, 2
	.p2align 4,,10
	.p2align 3
.L3:
	mov	rax, QWORD PTR J2K_CCP_QNTSTY_NOQNT[rip]
	mov	edi, 8192
	cmp	QWORD PTR 16[r13], rax
	je	.L5
	mov	eax, 1
	movsx	rsi, esi
	pxor	xmm0, xmm0
	movsx	rdi, edx
	sal	eax, cl
	mov	rcx, QWORD PTR opj_dwt_norms_real[rip]
	cdq
	mov	rcx, QWORD PTR [rcx+rsi*8]
	idiv	DWORD PTR [rcx+rdi*4]
	cvtsi2sd	xmm0, eax
	mulsd	xmm0, QWORD PTR .LC0[rip]
	cvttsd2si	edi, xmm0
.L5:
	mov	rax, QWORD PTR 24[r13]
	lea	r15, [rax+r12*4]
	call	floor@PLT
	mov	rdx, r15
	mov	esi, r14d
	mov	rdi, rax
	call	opj_dwt_encode_stepsize@PLT
	lea	rax, 1[r12]
	cmp	r12, rbp
	je	.L1
	mov	edx, DWORD PTR 0[r13]
	mov	r12, rax
.L6:
	sub	edx, 1
	test	r12, r12
	jne	.L15
	mov	r14d, ebx
	xor	esi, esi
	xor	ecx, ecx
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L8:
	mov	r14d, ebx
	xor	ecx, ecx
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L1:
	add	rsp, 8
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	.cfi_restore 14
	.cfi_restore 15
	ret
	.cfi_endproc
.LFE0:
	.size	opj_dwt_calc_explicit_stepsizes, .-opj_dwt_calc_explicit_stepsizes
	.comm	opj_dwt_norms_real,8,8
	.comm	J2K_CCP_QNTSTY_NOQNT,8,8
	.section	.rodata.cst8,"aM",@progbits,8
	.align 8
.LC0:
	.long	0
	.long	1086324736
	.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_dwt.c_opj_dwt_calc_explicit_stepsizes.c"
	.text
	.global	__aeabi_idiv
	.global	__aeabi_i2d
	.global	__aeabi_dmul
	.global	__aeabi_d2iz
	.align	2
	.global	opj_dwt_calc_explicit_stepsizes
	.syntax unified
	.arm
	.fpu softvfp
	.type	opj_dwt_calc_explicit_stepsizes, %function
opj_dwt_calc_explicit_stepsizes:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r3, [r0]
	add	r7, r3, r3, lsl #1
	cmp	r7, #2
	pople	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
	mov	r5, r0
	mov	r8, r1
	mov	r4, #0
	ldr	r9, .L13
	ldr	fp, .L13+4
	ldr	r10, .L13+8
	sub	r7, r7, #2
	b	.L6
.L12:
	sub	r1, r4, #1
	umull	r0, r2, fp, r1
	ldr	r0, [r5, #4]
	bic	ip, r2, #1
	add	ip, ip, r2, lsr #1
	lsr	r2, r2, #1
	sub	r1, r1, ip
	add	r2, r2, #1
	cmp	r0, #0
	moveq	r6, r8
	add	r1, r1, #1
	sub	r3, r3, r2
	beq	.L3
	cmp	r1, #3
	moveq	r0, #2
	movne	r0, #1
	addeq	r6, r8, #2
	addne	r6, r8, #1
.L3:
	ldr	ip, [r5, #8]
	ldr	r2, [r9]
	cmp	ip, r2
	moveq	r0, #8192
	beq	.L5
	mov	ip, #1
	ldr	r2, [r10]
	lsl	r0, ip, r0
	ldr	r2, [r2, r1, lsl #2]
	ldr	r1, [r2, r3, lsl #2]
	bl	__aeabi_idiv
	bl	__aeabi_i2d
	mov	r2, #0
	ldr	r3, .L13+12
	bl	__aeabi_dmul
	bl	__aeabi_d2iz
.L5:
	bl	floor
	ldr	r2, [r5, #12]
	mov	r1, r6
	add	r2, r2, r4, lsl #2
	add	r4, r4, #1
	bl	opj_dwt_encode_stepsize
	cmp	r7, r4
	popeq	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
	ldr	r3, [r5]
.L6:
	cmp	r4, #0
	sub	r3, r3, #1
	bne	.L12
	mov	r6, r8
	mov	r1, r4
	mov	r0, r4
	b	.L3
.L14:
	.align	2
.L13:
	.word	J2K_CCP_QNTSTY_NOQNT
	.word	-1431655765
	.word	opj_dwt_norms_real
	.word	1086324736
	.size	opj_dwt_calc_explicit_stepsizes, .-opj_dwt_calc_explicit_stepsizes
	.comm	opj_dwt_norms_real,4,4
	.comm	J2K_CCP_QNTSTY_NOQNT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
