	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mtk_rdma_layer_config
_mtk_rdma_layer_config:                 ## @mtk_rdma_layer_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
	movq	%rdx, %rbx
	movq	%rdi, %r12
	callq	_comp_to_rdma
	movl	(%rbx), %r15d
	movl	8(%rbx), %r13d
	movzwl	4(%rbx), %r14d
	movq	%rax, %rdi
	movl	%r13d, %esi
	callq	_rdma_fmt_convert
	movq	_DISP_RDMA_MEM_CON@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	addq	(%r12), %rsi
	movl	%eax, %edi
	callq	_writel_relaxed
	movq	_DRM_FORMAT_UYVY@GOTPCREL(%rip), %rax
	movq	_DISP_REG_RDMA_SIZE_CON_0@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	_RDMA_MATRIX_ENABLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	cmpl	(%rax), %r13d
	je	LBB0_2
## %bb.1:
	movq	_DRM_FORMAT_YUYV@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r13d
	je	LBB0_2
## %bb.3:
	movq	%r12, %rdi
	xorl	%ecx, %ecx
	jmp	LBB0_4
LBB0_2:
	movq	%r12, %rdi
	movl	%edx, %ecx
	callq	_rdma_update_bits
	movl	(%rbx), %esi
	movq	_RDMA_MATRIX_INT_MTX_SEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_RDMA_MATRIX_INT_MTX_BT601_to_RGB@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r12, %rdi
LBB0_4:
	callq	_rdma_update_bits
	movq	_DISP_RDMA_MEM_START_ADDR@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r12), %rsi
	movl	%r15d, %edi
	callq	_writel_relaxed
	movq	_DISP_RDMA_MEM_SRC_PITCH@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r12), %rsi
	movl	%r14d, %edi
	callq	_writel_relaxed
	movq	_RDMA_MEM_GMC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_DISP_RDMA_MEM_GMC_SETTING_0@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r12), %rsi
	callq	_writel
	movq	_DISP_REG_RDMA_GLOBAL_CON@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_RDMA_MODE_MEMORY@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r12, %rdi
	movl	%ecx, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_rdma_update_bits               ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_DISP_RDMA_MEM_CON,8,3          ## @DISP_RDMA_MEM_CON
	.comm	_DRM_FORMAT_UYVY,4,2            ## @DRM_FORMAT_UYVY
	.comm	_DRM_FORMAT_YUYV,4,2            ## @DRM_FORMAT_YUYV
	.comm	_DISP_REG_RDMA_SIZE_CON_0,4,2   ## @DISP_REG_RDMA_SIZE_CON_0
	.comm	_RDMA_MATRIX_ENABLE,4,2         ## @RDMA_MATRIX_ENABLE
	.comm	_RDMA_MATRIX_INT_MTX_SEL,4,2    ## @RDMA_MATRIX_INT_MTX_SEL
	.comm	_RDMA_MATRIX_INT_MTX_BT601_to_RGB,4,2 ## @RDMA_MATRIX_INT_MTX_BT601_to_RGB
	.comm	_DISP_RDMA_MEM_START_ADDR,8,3   ## @DISP_RDMA_MEM_START_ADDR
	.comm	_DISP_RDMA_MEM_SRC_PITCH,8,3    ## @DISP_RDMA_MEM_SRC_PITCH
	.comm	_RDMA_MEM_GMC,4,2               ## @RDMA_MEM_GMC
	.comm	_DISP_RDMA_MEM_GMC_SETTING_0,8,3 ## @DISP_RDMA_MEM_GMC_SETTING_0
	.comm	_DISP_REG_RDMA_GLOBAL_CON,4,2   ## @DISP_REG_RDMA_GLOBAL_CON
	.comm	_RDMA_MODE_MEMORY,4,2           ## @RDMA_MODE_MEMORY
	.no_dead_strip	_mtk_rdma_layer_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_layer_config
_mtk_rdma_layer_config:                 ; @mtk_rdma_layer_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	x22, x2
	mov	x19, x0
	bl	_comp_to_rdma
	ldr	w21, [x22]
	ldrh	w20, [x22, #4]
	ldr	w22, [x22, #8]
	mov	x1, x22
	bl	_rdma_fmt_convert
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _DISP_RDMA_MEM_CON@GOTPAGE
Lloh1:
	ldr	x9, [x9, _DISP_RDMA_MEM_CON@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel_relaxed
Lloh3:
	adrp	x8, _DRM_FORMAT_UYVY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DRM_FORMAT_UYVY@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _DRM_FORMAT_YUYV@GOTPAGE
Lloh7:
	ldr	x9, [x9, _DRM_FORMAT_YUYV@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
Lloh9:
	adrp	x23, _DISP_REG_RDMA_SIZE_CON_0@GOTPAGE
Lloh10:
	ldr	x23, [x23, _DISP_REG_RDMA_SIZE_CON_0@GOTPAGEOFF]
	ldr	w1, [x23]
Lloh11:
	adrp	x10, _RDMA_MATRIX_ENABLE@GOTPAGE
Lloh12:
	ldr	x10, [x10, _RDMA_MATRIX_ENABLE@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x10]
	cmp	w22, w8
	mov	x0, x19
	ccmp	w22, w9, #4, ne
	b.ne	LBB0_2
; %bb.1:
	mov	x3, x2
	bl	_rdma_update_bits
	ldr	w1, [x23]
Lloh14:
	adrp	x8, _RDMA_MATRIX_INT_MTX_SEL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _RDMA_MATRIX_INT_MTX_SEL@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
Lloh17:
	adrp	x8, _RDMA_MATRIX_INT_MTX_BT601_to_RGB@GOTPAGE
Lloh18:
	ldr	x8, [x8, _RDMA_MATRIX_INT_MTX_BT601_to_RGB@GOTPAGEOFF]
Lloh19:
	ldr	w3, [x8]
	mov	x0, x19
	b	LBB0_3
LBB0_2:
	mov	w3, #0
LBB0_3:
	bl	_rdma_update_bits
	ldr	x8, [x19]
Lloh20:
	adrp	x9, _DISP_RDMA_MEM_START_ADDR@GOTPAGE
Lloh21:
	ldr	x9, [x9, _DISP_RDMA_MEM_START_ADDR@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	x0, x21
	bl	_writel_relaxed
	ldr	x8, [x19]
Lloh23:
	adrp	x9, _DISP_RDMA_MEM_SRC_PITCH@GOTPAGE
Lloh24:
	ldr	x9, [x9, _DISP_RDMA_MEM_SRC_PITCH@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	x0, x20
	bl	_writel_relaxed
Lloh26:
	adrp	x8, _RDMA_MEM_GMC@GOTPAGE
Lloh27:
	ldr	x8, [x8, _RDMA_MEM_GMC@GOTPAGEOFF]
Lloh28:
	ldr	w0, [x8]
	ldr	x8, [x19]
Lloh29:
	adrp	x9, _DISP_RDMA_MEM_GMC_SETTING_0@GOTPAGE
Lloh30:
	ldr	x9, [x9, _DISP_RDMA_MEM_GMC_SETTING_0@GOTPAGEOFF]
Lloh31:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
Lloh32:
	adrp	x8, _DISP_REG_RDMA_GLOBAL_CON@GOTPAGE
Lloh33:
	ldr	x8, [x8, _DISP_REG_RDMA_GLOBAL_CON@GOTPAGEOFF]
Lloh34:
	adrp	x9, _RDMA_MODE_MEMORY@GOTPAGE
Lloh35:
	ldr	x9, [x9, _RDMA_MODE_MEMORY@GOTPAGEOFF]
Lloh36:
	ldr	w1, [x8]
Lloh37:
	ldr	w2, [x9]
	mov	x0, x19
	mov	x3, x2
	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	_rdma_update_bits
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh36
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_DISP_RDMA_MEM_CON,8,3          ; @DISP_RDMA_MEM_CON
	.comm	_DRM_FORMAT_UYVY,4,2            ; @DRM_FORMAT_UYVY
	.comm	_DRM_FORMAT_YUYV,4,2            ; @DRM_FORMAT_YUYV
	.comm	_DISP_REG_RDMA_SIZE_CON_0,4,2   ; @DISP_REG_RDMA_SIZE_CON_0
	.comm	_RDMA_MATRIX_ENABLE,4,2         ; @RDMA_MATRIX_ENABLE
	.comm	_RDMA_MATRIX_INT_MTX_SEL,4,2    ; @RDMA_MATRIX_INT_MTX_SEL
	.comm	_RDMA_MATRIX_INT_MTX_BT601_to_RGB,4,2 ; @RDMA_MATRIX_INT_MTX_BT601_to_RGB
	.comm	_DISP_RDMA_MEM_START_ADDR,8,3   ; @DISP_RDMA_MEM_START_ADDR
	.comm	_DISP_RDMA_MEM_SRC_PITCH,8,3    ; @DISP_RDMA_MEM_SRC_PITCH
	.comm	_RDMA_MEM_GMC,4,2               ; @RDMA_MEM_GMC
	.comm	_DISP_RDMA_MEM_GMC_SETTING_0,8,3 ; @DISP_RDMA_MEM_GMC_SETTING_0
	.comm	_DISP_REG_RDMA_GLOBAL_CON,4,2   ; @DISP_REG_RDMA_GLOBAL_CON
	.comm	_RDMA_MODE_MEMORY,4,2           ; @RDMA_MODE_MEMORY
	.no_dead_strip	_mtk_rdma_layer_config
.subsections_via_symbols
