	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sun4i_backend_layer_enable     ## -- Begin function sun4i_backend_layer_enable
	.p2align	4, 0x90
_sun4i_backend_layer_enable:            ## @sun4i_backend_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %ebx
	movl	%esi, %r12d
	movq	%rdi, %r14
	testl	%edx, %edx
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.1(%rip), %rsi
	cmoveq	%rax, %rsi
	leaq	L_.str(%rip), %rdi
	movl	%r12d, %edx
	callq	_DRM_DEBUG_DRIVER
	testl	%ebx, %ebx
	je	LBB0_1
## %bb.2:
	movl	%r12d, %edi
	callq	_SUN4I_BACKEND_MODCTL_LAY_EN
	movq	%rax, %r15
	jmp	LBB0_3
LBB0_1:
	xorl	%r15d, %r15d
LBB0_3:
	movl	(%r14), %r14d
	movq	_SUN4I_BACKEND_MODCTL_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%r12d, %edi
	callq	_SUN4I_BACKEND_MODCTL_LAY_EN
	movl	%r14d, %edi
	movl	%ebx, %esi
	movq	%rax, %rdx
	movq	%r15, %rcx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_regmap_update_bits             ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%sabling layer %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"En"

L_.str.2:                               ## @.str.2
	.asciz	"Dis"

	.comm	_SUN4I_BACKEND_MODCTL_REG,4,2   ## @SUN4I_BACKEND_MODCTL_REG
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sun4i_backend_layer_enable     ; -- Begin function sun4i_backend_layer_enable
	.p2align	2
_sun4i_backend_layer_enable:            ; @sun4i_backend_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	x21, x2
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, l_.str.1@PAGE
Lloh1:
	add	x8, x8, l_.str.1@PAGEOFF
Lloh2:
	adrp	x9, l_.str.2@PAGE
Lloh3:
	add	x9, x9, l_.str.2@PAGEOFF
	cmp	w2, #0
	csel	x1, x9, x8, eq
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, x19
	bl	_DRM_DEBUG_DRIVER
	cbz	w21, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_SUN4I_BACKEND_MODCTL_LAY_EN
	mov	x21, x0
	b	LBB0_3
LBB0_2:
	mov	x21, #0
LBB0_3:
	ldr	w20, [x20]
Lloh6:
	adrp	x8, _SUN4I_BACKEND_MODCTL_REG@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SUN4I_BACKEND_MODCTL_REG@GOTPAGEOFF]
Lloh8:
	ldr	w22, [x8]
	mov	x0, x19
	bl	_SUN4I_BACKEND_MODCTL_LAY_EN
	mov	x2, x0
	mov	x0, x20
	mov	x1, x22
	mov	x3, x21
	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	_regmap_update_bits
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%sabling layer %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"En"

l_.str.2:                               ; @.str.2
	.asciz	"Dis"

	.comm	_SUN4I_BACKEND_MODCTL_REG,4,2   ; @SUN4I_BACKEND_MODCTL_REG
.subsections_via_symbols
