	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function navi10_set_watermarks_table
_navi10_set_watermarks_table:           ## @navi10_set_watermarks_table
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rsi, %rsi
	je	LBB0_2
## %bb.1:
	movq	%rdx, %r12
	testq	%rdx, %rdx
	je	LBB0_2
## %bb.3:
	movl	(%r12), %ecx
	cmpl	$4, %ecx
	jg	LBB0_2
## %bb.4:
	movl	4(%r12), %eax
	cmpl	$4, %eax
	jle	LBB0_5
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_13:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	%rsi, %r14
	testl	%ecx, %ecx
	jle	LBB0_9
## %bb.6:
	movq	16(%r12), %rax
	xorl	%r15d, %r15d
	xorl	%ebx, %ebx
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movslq	(%rax,%rbx), %rax
	imulq	$274877907, %rax, %rdi          ## imm = 0x10624DD3
	movq	%rdi, %rax
	shrq	$63, %rax
	shrq	$32, %rdi
	sarl	$6, %edi
	addl	%eax, %edi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_cpu_to_le16
	movq	(%r14), %rcx
	movq	8(%rcx), %rcx
	movq	%rax, 32(%rcx,%r15)
	movq	16(%r12), %rax
	movslq	4(%rax,%rbx), %rax
	imulq	$274877907, %rax, %rdi          ## imm = 0x10624DD3
	movq	%rdi, %rax
	shrq	$63, %rax
	shrq	$32, %rdi
	sarl	$6, %edi
	addl	%eax, %edi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_cpu_to_le16
	movq	(%r14), %rcx
	movq	8(%rcx), %rcx
	movq	%rax, 24(%rcx,%r15)
	movq	16(%r12), %rax
	movslq	8(%rax,%rbx), %rax
	imulq	$274877907, %rax, %rdi          ## imm = 0x10624DD3
	movq	%rdi, %rax
	shrq	$63, %rax
	shrq	$32, %rdi
	sarl	$6, %edi
	addl	%eax, %edi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_cpu_to_le16
	movq	(%r14), %rcx
	movq	8(%rcx), %rcx
	movq	%rax, 16(%rcx,%r15)
	movq	16(%r12), %rax
	movslq	12(%rax,%rbx), %rax
	imulq	$274877907, %rax, %rdi          ## imm = 0x10624DD3
	movq	%rdi, %rax
	shrq	$63, %rax
	shrq	$32, %rdi
	sarl	$6, %edi
	addl	%eax, %edi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_cpu_to_le16
	movq	(%r14), %rcx
	movq	8(%rcx), %rdx
	movq	%rax, 8(%rdx,%r15)
	movq	16(%r12), %rax
	movq	16(%rax,%rbx), %rdx
	movq	8(%rcx), %rcx
	movq	%rdx, (%rcx,%r15)
	incq	%r13
	movslq	(%r12), %rcx
	addq	$24, %rbx
	addq	$40, %r15
	cmpq	%rcx, %r13
	jl	LBB0_7
## %bb.8:
	movl	4(%r12), %eax
LBB0_9:
	testl	%eax, %eax
	jle	LBB0_12
## %bb.10:
	movq	8(%r12), %rax
	xorl	%r13d, %r13d
	xorl	%ebx, %ebx
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movslq	(%rax,%rbx), %rax
	imulq	$274877907, %rax, %rdi          ## imm = 0x10624DD3
	movq	%rdi, %rax
	shrq	$63, %rax
	shrq	$32, %rdi
	sarl	$6, %edi
	addl	%eax, %edi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_cpu_to_le16
	movq	(%r14), %rcx
	movq	(%rcx), %rcx
	movq	%rax, 32(%rcx,%r13)
	movq	8(%r12), %rax
	movslq	4(%rax,%rbx), %rax
	imulq	$274877907, %rax, %rdi          ## imm = 0x10624DD3
	movq	%rdi, %rax
	shrq	$63, %rax
	shrq	$32, %rdi
	sarl	$6, %edi
	addl	%eax, %edi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_cpu_to_le16
	movq	(%r14), %rcx
	movq	(%rcx), %rcx
	movq	%rax, 24(%rcx,%r13)
	movq	8(%r12), %rax
	movslq	8(%rax,%rbx), %rax
	imulq	$274877907, %rax, %rdi          ## imm = 0x10624DD3
	movq	%rdi, %rax
	shrq	$63, %rax
	shrq	$32, %rdi
	sarl	$6, %edi
	addl	%eax, %edi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_cpu_to_le16
	movq	(%r14), %rcx
	movq	(%rcx), %rcx
	movq	%rax, 16(%rcx,%r13)
	movq	8(%r12), %rax
	movslq	12(%rax,%rbx), %rax
	imulq	$274877907, %rax, %rdi          ## imm = 0x10624DD3
	movq	%rdi, %rax
	shrq	$63, %rax
	shrq	$32, %rdi
	sarl	$6, %edi
	addl	%eax, %edi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_cpu_to_le16
	movq	(%r14), %rcx
	movq	(%rcx), %rdx
	movq	%rax, 8(%rdx,%r13)
	movq	8(%r12), %rax
	movq	16(%rax,%rbx), %rdx
	movq	(%rcx), %rcx
	movq	%rdx, (%rcx,%r13)
	incq	%r15
	movslq	4(%r12), %rcx
	addq	$24, %rbx
	addq	$40, %r13
	cmpq	%rcx, %r15
	jl	LBB0_11
LBB0_12:
	xorl	%eax, %eax
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_navi10_set_watermarks_table
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function navi10_set_watermarks_table
_navi10_set_watermarks_table:           ; @navi10_set_watermarks_table
	.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
	cbz	x1, LBB0_4
; %bb.1:
	mov	x19, x2
	cbz	x2, LBB0_4
; %bb.2:
	ldr	w9, [x19]
	cmp	w9, #4
	b.gt	LBB0_4
; %bb.3:
	ldr	w8, [x19, #4]
	cmp	w8, #4
	b.le	LBB0_6
LBB0_4:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	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
LBB0_6:
	mov	x20, x1
	cmp	w9, #1
	b.lt	LBB0_10
; %bb.7:
	mov	x21, #0
	mov	x22, #0
	mov	x23, #0
	ldr	x8, [x19, #16]
	mov	w24, #19923
	movk	w24, #4194, lsl #16
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldrsw	x8, [x8, x22]
	mul	x8, x8, x24
	lsr	x9, x8, #32
	lsr	x8, x8, #63
	add	w0, w8, w9, asr #6
	bl	_cpu_to_le16
	ldr	x8, [x20]
	ldr	x8, [x8, #8]
	add	x8, x8, x21
	str	x0, [x8, #32]
	ldr	x8, [x19, #16]
	add	x8, x8, x22
	ldrsw	x8, [x8, #4]
	mul	x8, x8, x24
	lsr	x9, x8, #32
	lsr	x8, x8, #63
	add	w0, w8, w9, asr #6
	bl	_cpu_to_le16
	ldr	x8, [x20]
	ldr	x8, [x8, #8]
	add	x8, x8, x21
	str	x0, [x8, #24]
	ldr	x8, [x19, #16]
	add	x8, x8, x22
	ldrsw	x8, [x8, #8]
	mul	x8, x8, x24
	lsr	x9, x8, #32
	lsr	x8, x8, #63
	add	w0, w8, w9, asr #6
	bl	_cpu_to_le16
	ldr	x8, [x20]
	ldr	x8, [x8, #8]
	add	x8, x8, x21
	str	x0, [x8, #16]
	ldr	x8, [x19, #16]
	add	x8, x8, x22
	ldrsw	x8, [x8, #12]
	mul	x8, x8, x24
	lsr	x9, x8, #32
	lsr	x8, x8, #63
	add	w0, w8, w9, asr #6
	bl	_cpu_to_le16
	ldr	x9, [x20]
	ldr	x8, [x9, #8]
	add	x8, x8, x21
	str	x0, [x8, #8]
	ldr	x8, [x19, #16]
	add	x10, x8, x22
	ldr	x10, [x10, #16]
	ldr	x9, [x9, #8]
	str	x10, [x9, x21]
	add	x23, x23, #1
	ldrsw	x9, [x19]
	add	x22, x22, #24
	add	x21, x21, #40
	cmp	x23, x9
	b.lt	LBB0_8
; %bb.9:
	ldr	w8, [x19, #4]
LBB0_10:
	cmp	w8, #1
	b.lt	LBB0_13
; %bb.11:
	mov	x21, #0
	mov	x22, #0
	mov	x23, #0
	ldr	x8, [x19, #8]
	mov	w24, #19923
	movk	w24, #4194, lsl #16
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldrsw	x8, [x8, x22]
	mul	x8, x8, x24
	lsr	x9, x8, #32
	lsr	x8, x8, #63
	add	w0, w8, w9, asr #6
	bl	_cpu_to_le16
	ldr	x8, [x20]
	ldr	x8, [x8]
	add	x8, x8, x21
	str	x0, [x8, #32]
	ldr	x8, [x19, #8]
	add	x8, x8, x22
	ldrsw	x8, [x8, #4]
	mul	x8, x8, x24
	lsr	x9, x8, #32
	lsr	x8, x8, #63
	add	w0, w8, w9, asr #6
	bl	_cpu_to_le16
	ldr	x8, [x20]
	ldr	x8, [x8]
	add	x8, x8, x21
	str	x0, [x8, #24]
	ldr	x8, [x19, #8]
	add	x8, x8, x22
	ldrsw	x8, [x8, #8]
	mul	x8, x8, x24
	lsr	x9, x8, #32
	lsr	x8, x8, #63
	add	w0, w8, w9, asr #6
	bl	_cpu_to_le16
	ldr	x8, [x20]
	ldr	x8, [x8]
	add	x8, x8, x21
	str	x0, [x8, #16]
	ldr	x8, [x19, #8]
	add	x8, x8, x22
	ldrsw	x8, [x8, #12]
	mul	x8, x8, x24
	lsr	x9, x8, #32
	lsr	x8, x8, #63
	add	w0, w8, w9, asr #6
	bl	_cpu_to_le16
	ldr	x9, [x20]
	ldr	x8, [x9]
	add	x8, x8, x21
	str	x0, [x8, #8]
	ldr	x8, [x19, #8]
	add	x10, x8, x22
	ldr	x10, [x10, #16]
	ldr	x9, [x9]
	str	x10, [x9, x21]
	add	x23, x23, #1
	ldrsw	x9, [x19, #4]
	add	x22, x22, #24
	add	x21, x21, #40
	cmp	x23, x9
	b.lt	LBB0_12
LBB0_13:
	mov	w0, #0
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_navi10_set_watermarks_table
.subsections_via_symbols
