	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_zx_vou_layer_enable            ## -- Begin function zx_vou_layer_enable
	.p2align	4, 0x90
_zx_vou_layer_enable:                   ## @zx_vou_layer_enable
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	(%rdi), %rax
	movl	(%rax), %edi
	callq	_to_zx_crtc
	movq	%rax, %rbx
	movq	8(%rax), %r15
	movq	%r14, %rdi
	callq	_to_zx_plane
	movq	(%rax), %r14
	movq	(%rbx), %rax
	movq	_OSD_CTRL0@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	addq	(%r15), %rdi
	movq	_VOU_CHN_MAIN@GOTPCREL(%rip), %rcx
	movl	8(%r14), %esi
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	xorl	%edx, %edx
	callq	_zx_writel_mask
	movq	_VOU_CLK_SEL@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	8(%r15), %rdi
	movl	4(%r14), %esi
	xorl	%edx, %edx
	jmp	LBB0_3
LBB0_2:
	movl	%esi, %edx
	callq	_zx_writel_mask
	movq	_VOU_CLK_SEL@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	8(%r15), %rdi
	movl	4(%r14), %edx
	movl	%edx, %esi
LBB0_3:
	callq	_zx_writel_mask
	movq	(%rbx), %rdi
	addq	(%r15), %rdi
	movl	(%r14), %edx
	movl	%edx, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_zx_writel_mask                 ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_VOU_CHN_MAIN,8,3               ## @VOU_CHN_MAIN
	.comm	_OSD_CTRL0,8,3                  ## @OSD_CTRL0
	.comm	_VOU_CLK_SEL,8,3                ## @VOU_CLK_SEL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_zx_vou_layer_enable            ; -- Begin function zx_vou_layer_enable
	.p2align	2
_zx_vou_layer_enable:                   ; @zx_vou_layer_enable
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	ldr	x8, [x0]
	ldr	w0, [x8]
	bl	_to_zx_crtc
	mov	x20, x0
	ldr	x21, [x0, #8]
	mov	x0, x19
	bl	_to_zx_plane
	ldr	x19, [x0]
	ldr	x8, [x20]
Lloh0:
	adrp	x9, _VOU_CHN_MAIN@GOTPAGE
Lloh1:
	ldr	x9, [x9, _VOU_CHN_MAIN@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	ldr	x10, [x21]
Lloh3:
	adrp	x20, _OSD_CTRL0@GOTPAGE
Lloh4:
	ldr	x20, [x20, _OSD_CTRL0@GOTPAGEOFF]
	ldr	x11, [x20]
	add	x0, x11, x10
	ldr	w1, [x19, #8]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	mov	w2, #0
	bl	_zx_writel_mask
	ldr	x8, [x21, #8]
Lloh5:
	adrp	x9, _VOU_CLK_SEL@GOTPAGE
Lloh6:
	ldr	x9, [x9, _VOU_CLK_SEL@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	add	x0, x9, x8
	ldr	w1, [x19, #4]
	mov	w2, #0
	b	LBB0_3
LBB0_2:
	mov	x2, x1
	bl	_zx_writel_mask
	ldr	x8, [x21, #8]
Lloh8:
	adrp	x9, _VOU_CLK_SEL@GOTPAGE
Lloh9:
	ldr	x9, [x9, _VOU_CLK_SEL@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	add	x0, x9, x8
	ldr	w1, [x19, #4]
	mov	x2, x1
LBB0_3:
	bl	_zx_writel_mask
	ldr	x8, [x21]
	ldr	x9, [x20]
	add	x0, x9, x8
	ldr	w1, [x19]
	mov	x2, x1
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_zx_writel_mask
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_VOU_CHN_MAIN,8,3               ; @VOU_CHN_MAIN
	.comm	_OSD_CTRL0,8,3                  ; @OSD_CTRL0
	.comm	_VOU_CLK_SEL,8,3                ; @VOU_CLK_SEL
.subsections_via_symbols
