	.file	"extr_navi10_ppt.c_navi10_set_watermarks_table.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	navi10_set_watermarks_table, @function
navi10_set_watermarks_table:
.LFB0:
	.cfi_startproc
	endbr64
	test	rsi, rsi
	je	.L14
	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
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdx
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	test	rdx, rdx
	je	.L5
	mov	eax, DWORD PTR [rdx]
	cmp	eax, 4
	jg	.L5
	mov	edx, DWORD PTR 4[rdx]
	cmp	edx, 4
	jg	.L5
	mov	rbp, rsi
	test	eax, eax
	jle	.L6
	mov	rcx, QWORD PTR 16[rbx]
	mov	rax, QWORD PTR [rsi]
	xor	r14d, r14d
	.p2align 4,,10
	.p2align 3
.L7:
	lea	rsi, [r14+r14*2]
	mov	rdx, QWORD PTR 8[rax]
	lea	r15, [r14+r14*4]
	add	r14, 1
	movsx	rdi, DWORD PTR [rcx+rsi*8]
	lea	r13, 0[0+r15*8]
	lea	r12, 0[0+rsi*8]
	add	rdx, r13
	mov	rax, rdi
	imul	rdi, rdi, 274877907
	mov	QWORD PTR 8[rsp], rdx
	sar	eax, 31
	sar	rdi, 38
	sub	edi, eax
	call	cpu_to_le16@PLT
	mov	rdx, QWORD PTR 8[rsp]
	mov	QWORD PTR 32[rdx], rax
	mov	rax, QWORD PTR 0[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR 16[rbx]
	movsx	rdi, DWORD PTR 4[rax+r12]
	add	rdx, r13
	mov	QWORD PTR 8[rsp], rdx
	mov	rax, rdi
	imul	rdi, rdi, 274877907
	sar	eax, 31
	sar	rdi, 38
	sub	edi, eax
	call	cpu_to_le16@PLT
	mov	rdx, QWORD PTR 8[rsp]
	mov	QWORD PTR 24[rdx], rax
	mov	rax, QWORD PTR 0[rbp]
	mov	rdx, QWORD PTR 8[rax]
	mov	rax, QWORD PTR 16[rbx]
	movsx	rdi, DWORD PTR 8[rax+r12]
	add	rdx, r13
	mov	QWORD PTR 8[rsp], rdx
	mov	rax, rdi
	imul	rdi, rdi, 274877907
	sar	eax, 31
	sar	rdi, 38
	sub	edi, eax
	call	cpu_to_le16@PLT
	mov	rdx, QWORD PTR 8[rsp]
	mov	QWORD PTR 16[rdx], rax
	mov	rax, QWORD PTR 0[rbp]
	add	r13, QWORD PTR 8[rax]
	mov	rax, QWORD PTR 16[rbx]
	movsx	rdi, DWORD PTR 12[rax+r12]
	mov	rax, rdi
	imul	rdi, rdi, 274877907
	sar	eax, 31
	sar	rdi, 38
	sub	edi, eax
	call	cpu_to_le16@PLT
	mov	rcx, QWORD PTR 16[rbx]
	mov	QWORD PTR 8[r13], rax
	mov	rax, QWORD PTR 0[rbp]
	mov	rsi, QWORD PTR 16[rcx+r12]
	mov	rdx, QWORD PTR 8[rax]
	mov	QWORD PTR [rdx+r15*8], rsi
	cmp	DWORD PTR [rbx], r14d
	jg	.L7
	mov	edx, DWORD PTR 4[rbx]
.L6:
	test	edx, edx
	jle	.L10
	mov	rcx, QWORD PTR 8[rbx]
	mov	rax, QWORD PTR 0[rbp]
	xor	r14d, r14d
	.p2align 4,,10
	.p2align 3
.L9:
	lea	rsi, [r14+r14*2]
	mov	rdx, QWORD PTR [rax]
	lea	r15, [r14+r14*4]
	add	r14, 1
	movsx	rdi, DWORD PTR [rcx+rsi*8]
	lea	r13, 0[0+r15*8]
	lea	r12, 0[0+rsi*8]
	add	rdx, r13
	mov	rax, rdi
	imul	rdi, rdi, 274877907
	mov	QWORD PTR 8[rsp], rdx
	sar	eax, 31
	sar	rdi, 38
	sub	edi, eax
	call	cpu_to_le16@PLT
	mov	rdx, QWORD PTR 8[rsp]
	mov	QWORD PTR 32[rdx], rax
	mov	rax, QWORD PTR 0[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR 8[rbx]
	movsx	rdi, DWORD PTR 4[rax+r12]
	add	rdx, r13
	mov	QWORD PTR 8[rsp], rdx
	mov	rax, rdi
	imul	rdi, rdi, 274877907
	sar	eax, 31
	sar	rdi, 38
	sub	edi, eax
	call	cpu_to_le16@PLT
	mov	rdx, QWORD PTR 8[rsp]
	mov	QWORD PTR 24[rdx], rax
	mov	rax, QWORD PTR 0[rbp]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR 8[rbx]
	movsx	rdi, DWORD PTR 8[rax+r12]
	add	rdx, r13
	mov	QWORD PTR 8[rsp], rdx
	mov	rax, rdi
	imul	rdi, rdi, 274877907
	sar	eax, 31
	sar	rdi, 38
	sub	edi, eax
	call	cpu_to_le16@PLT
	mov	rdx, QWORD PTR 8[rsp]
	mov	QWORD PTR 16[rdx], rax
	mov	rax, QWORD PTR 0[rbp]
	add	r13, QWORD PTR [rax]
	mov	rax, QWORD PTR 8[rbx]
	movsx	rdi, DWORD PTR 12[rax+r12]
	mov	rax, rdi
	imul	rdi, rdi, 274877907
	sar	eax, 31
	sar	rdi, 38
	sub	edi, eax
	call	cpu_to_le16@PLT
	mov	rcx, QWORD PTR 8[rbx]
	mov	QWORD PTR 8[r13], rax
	mov	rax, QWORD PTR 0[rbp]
	mov	rsi, QWORD PTR 16[rcx+r12]
	mov	rdx, QWORD PTR [rax]
	mov	QWORD PTR [rdx+r15*8], rsi
	cmp	DWORD PTR 4[rbx], r14d
	jg	.L9
.L10:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xor	eax, eax
	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
.L5:
	.cfi_restore_state
	mov	eax, DWORD PTR EINVAL[rip]
	add	rsp, 24
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	neg	eax
	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
.L14:
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	.cfi_restore 14
	.cfi_restore 15
	mov	eax, DWORD PTR EINVAL[rip]
	neg	eax
	ret
	.cfi_endproc
.LFE0:
	.size	navi10_set_watermarks_table, .-navi10_set_watermarks_table
	.comm	EINVAL,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_navi10_ppt.c_navi10_set_watermarks_table.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	navi10_set_watermarks_table, %function
navi10_set_watermarks_table:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	clz	r7, r2
	cmp	r1, #0
	lsr	r7, r7, #5
	moveq	r7, #1
	cmp	r7, #0
	bne	.L4
	ldr	r3, [r2]
	mov	r4, r2
	cmp	r3, #4
	bgt	.L4
	ldr	r2, [r2, #4]
	cmp	r2, #4
	bgt	.L4
	cmp	r3, #0
	mov	r6, r1
	ble	.L5
	ldr	r3, [r4, #12]
	ldr	r2, [r1]
	ldr	r9, .L14
.L6:
	add	r8, r7, r7, lsl #2
	ldr	r3, [r3, r8, lsl #2]
	ldr	r10, [r2, #4]
	smull	r2, r0, r9, r3
	asr	r3, r3, #31
	rsb	r0, r3, r0, asr #6
	bl	cpu_to_le16
	ldr	r3, [r4, #12]
	lsl	r5, r8, #2
	add	r3, r3, r5
	ldr	r3, [r3, #4]
	ldr	r1, [r6]
	smull	ip, r2, r9, r3
	add	r10, r10, r8, lsl #2
	asr	r3, r3, #31
	str	r0, [r10, #16]
	rsb	r0, r3, r2, asr #6
	ldr	r10, [r1, #4]
	bl	cpu_to_le16
	ldr	r3, [r4, #12]
	add	r10, r10, r5
	add	r3, r3, r5
	ldr	r3, [r3, #8]
	ldr	r2, [r6]
	str	r0, [r10, #12]
	smull	r1, r0, r9, r3
	asr	r3, r3, #31
	rsb	r0, r3, r0, asr #6
	ldr	r10, [r2, #4]
	bl	cpu_to_le16
	ldr	r3, [r4, #12]
	add	r10, r10, r5
	add	r3, r3, r5
	ldr	r3, [r3, #12]
	ldr	r2, [r6]
	str	r0, [r10, #8]
	smull	r1, r0, r9, r3
	asr	r3, r3, #31
	rsb	r0, r3, r0, asr #6
	ldr	r10, [r2, #4]
	bl	cpu_to_le16
	ldr	r3, [r4, #12]
	ldr	r2, [r6]
	add	r10, r10, r5
	str	r0, [r10, #4]
	ldr	ip, [r4]
	add	r5, r3, r5
	ldr	r1, [r2, #4]
	ldr	r0, [r5, #16]
	add	r7, r7, #1
	cmp	ip, r7
	str	r0, [r1, r8, lsl #2]
	bgt	.L6
	ldr	r2, [r4, #4]
.L5:
	cmp	r2, #0
	ble	.L9
	mov	r7, #0
	ldr	r3, [r4, #8]
	ldr	r2, [r6]
	ldr	r9, .L14
.L8:
	add	r8, r7, r7, lsl #2
	ldr	r3, [r3, r8, lsl #2]
	ldr	r10, [r2]
	smull	r2, r0, r9, r3
	asr	r3, r3, #31
	rsb	r0, r3, r0, asr #6
	bl	cpu_to_le16
	ldr	r3, [r4, #8]
	lsl	r5, r8, #2
	add	r3, r3, r5
	ldr	r3, [r3, #4]
	ldr	r1, [r6]
	smull	ip, r2, r9, r3
	add	r10, r10, r8, lsl #2
	asr	r3, r3, #31
	str	r0, [r10, #16]
	rsb	r0, r3, r2, asr #6
	ldr	r10, [r1]
	bl	cpu_to_le16
	ldr	r3, [r4, #8]
	add	r10, r10, r5
	add	r3, r3, r5
	ldr	r3, [r3, #8]
	ldr	r2, [r6]
	str	r0, [r10, #12]
	smull	r1, r0, r9, r3
	asr	r3, r3, #31
	rsb	r0, r3, r0, asr #6
	ldr	r10, [r2]
	bl	cpu_to_le16
	ldr	r3, [r4, #8]
	add	r10, r10, r5
	add	r3, r3, r5
	ldr	r3, [r3, #12]
	ldr	r2, [r6]
	str	r0, [r10, #8]
	smull	r1, r0, r9, r3
	asr	r3, r3, #31
	rsb	r0, r3, r0, asr #6
	ldr	r10, [r2]
	bl	cpu_to_le16
	ldr	r3, [r4, #8]
	ldr	r2, [r6]
	add	r10, r10, r5
	str	r0, [r10, #4]
	ldr	ip, [r4, #4]
	add	r5, r3, r5
	ldr	r1, [r2]
	ldr	r0, [r5, #16]
	add	r7, r7, #1
	cmp	ip, r7
	str	r0, [r1, r8, lsl #2]
	bgt	.L8
.L9:
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L4:
	ldr	r3, .L14+4
	ldr	r0, [r3]
	rsb	r0, r0, #0
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L15:
	.align	2
.L14:
	.word	274877907
	.word	EINVAL
	.size	navi10_set_watermarks_table, .-navi10_set_watermarks_table
	.comm	EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
