	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mtk_rdma_config
_mtk_rdma_config:                       ## @mtk_rdma_config
	.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
	movl	%ecx, %r12d
	movl	%edx, %r13d
	movl	%esi, %ebx
	movq	%rdi, %r15
	callq	_comp_to_rdma
	movq	%rax, %r14
	movq	_DISP_REG_RDMA_SIZE_CON_0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$4095, %edx                     ## imm = 0xFFF
	movl	%ebx, %ecx
	callq	_rdma_update_bits
	movq	_DISP_REG_RDMA_SIZE_CON_1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	$1048575, %edx                  ## imm = 0xFFFFF
	movl	%r13d, %ecx
	callq	_rdma_update_bits
	imull	%r13d, %ebx
	imull	%r12d, %ebx
	leal	(%rbx,%rbx,8), %eax
	leal	(%rax,%rax,2), %eax
	addl	%ebx, %eax
	imulq	$1125899907, %rax, %r12         ## imm = 0x431BDE83
	shrq	$50, %r12
	movq	_RDMA_FIFO_UNDERFLOW_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r14, %rdi
	callq	_RDMA_FIFO_SIZE
	movl	%eax, %edi
	callq	_RDMA_FIFO_PSEUDO_SIZE
	orl	%eax, %ebx
	movl	%r12d, %edi
	callq	_RDMA_OUTPUT_VALID_FIFO_THRESHOLD
	orl	%eax, %ebx
	movq	_DISP_REG_RDMA_FIFO_CON@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r15), %rsi
	movl	%ebx, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_writel                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_DISP_REG_RDMA_SIZE_CON_0,4,2   ## @DISP_REG_RDMA_SIZE_CON_0
	.comm	_DISP_REG_RDMA_SIZE_CON_1,4,2   ## @DISP_REG_RDMA_SIZE_CON_1
	.comm	_RDMA_FIFO_UNDERFLOW_EN,4,2     ## @RDMA_FIFO_UNDERFLOW_EN
	.comm	_DISP_REG_RDMA_FIFO_CON,8,3     ## @DISP_REG_RDMA_FIFO_CON
	.no_dead_strip	_mtk_rdma_config
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mtk_rdma_config
_mtk_rdma_config:                       ; @mtk_rdma_config
	.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
	mov	x19, x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	bl	_comp_to_rdma
	mov	x23, x0
Lloh0:
	adrp	x8, _DISP_REG_RDMA_SIZE_CON_0@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DISP_REG_RDMA_SIZE_CON_0@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x22
	mov	w2, #4095
	mov	x3, x21
	bl	_rdma_update_bits
Lloh3:
	adrp	x8, _DISP_REG_RDMA_SIZE_CON_1@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DISP_REG_RDMA_SIZE_CON_1@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x22
	mov	w2, #1048575
	mov	x3, x20
	bl	_rdma_update_bits
	mul	w8, w21, w20
	mul	w8, w8, w19
	mov	w9, #28
	mul	w8, w8, w9
	mov	w9, #56963
	movk	w9, #17179, lsl #16
	umull	x8, w8, w9
	lsr	x19, x8, #50
Lloh6:
	adrp	x8, _RDMA_FIFO_UNDERFLOW_EN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _RDMA_FIFO_UNDERFLOW_EN@GOTPAGEOFF]
Lloh8:
	ldr	w20, [x8]
	mov	x0, x23
	bl	_RDMA_FIFO_SIZE
	bl	_RDMA_FIFO_PSEUDO_SIZE
	orr	w20, w0, w20
	mov	x0, x19
	bl	_RDMA_OUTPUT_VALID_FIFO_THRESHOLD
	orr	w0, w20, w0
	ldr	x8, [x22]
Lloh9:
	adrp	x9, _DISP_REG_RDMA_FIFO_CON@GOTPAGE
Lloh10:
	ldr	x9, [x9, _DISP_REG_RDMA_FIFO_CON@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	add	x1, x9, x8
	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
	b	_writel
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_DISP_REG_RDMA_SIZE_CON_0,4,2   ; @DISP_REG_RDMA_SIZE_CON_0
	.comm	_DISP_REG_RDMA_SIZE_CON_1,4,2   ; @DISP_REG_RDMA_SIZE_CON_1
	.comm	_RDMA_FIFO_UNDERFLOW_EN,4,2     ; @RDMA_FIFO_UNDERFLOW_EN
	.comm	_DISP_REG_RDMA_FIFO_CON,8,3     ; @DISP_REG_RDMA_FIFO_CON
	.no_dead_strip	_mtk_rdma_config
.subsections_via_symbols
