	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_aux_backlight_enable
_set_aux_backlight_enable:              ## @set_aux_backlight_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
	movl	$0, -28(%rbp)
	movq	(%rdi), %rax
	movq	_DP_EDP_BACKLIGHT_AUX_ENABLE_CAP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, 4(%rax)
	je	LBB0_9
## %bb.1:
	movl	%esi, %r14d
	movq	%rdi, %rbx
	addq	$8, %rbx
	movq	_DP_EDP_DISPLAY_CONTROL_REGISTER@GOTPCREL(%rip), %r15
	movq	(%r15), %rsi
	leaq	-28(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_drm_dp_dpcd_readb
	testq	%rax, %rax
	js	LBB0_2
## %bb.3:
	movq	_DP_EDP_BACKLIGHT_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	testl	%r14d, %r14d
	je	LBB0_5
## %bb.4:
	orl	-28(%rbp), %edx
	jmp	LBB0_6
LBB0_2:
	movq	(%r15), %rsi
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_8
LBB0_5:
	notl	%edx
	andl	-28(%rbp), %edx
LBB0_6:
	movl	%edx, -28(%rbp)
	movq	(%r15), %rsi
	movq	%rbx, %rdi
	callq	_drm_dp_dpcd_writeb
	cmpl	$1, %eax
	je	LBB0_9
## %bb.7:
	testl	%r14d, %r14d
	leaq	L_.str.3(%rip), %rax
	leaq	L_.str.2(%rip), %rsi
	cmoveq	%rax, %rsi
	leaq	L_.str.1(%rip), %rdi
LBB0_8:
	callq	_DRM_DEBUG_KMS
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DP_EDP_BACKLIGHT_AUX_ENABLE_CAP,4,2 ## @DP_EDP_BACKLIGHT_AUX_ENABLE_CAP
	.comm	_DP_EDP_DISPLAY_CONTROL_REGISTER,8,3 ## @DP_EDP_DISPLAY_CONTROL_REGISTER
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to read DPCD register 0x%x\n"

	.comm	_DP_EDP_BACKLIGHT_ENABLE,4,2    ## @DP_EDP_BACKLIGHT_ENABLE
L_.str.1:                               ## @.str.1
	.asciz	"Failed to %s aux backlight\n"

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

L_.str.3:                               ## @.str.3
	.asciz	"disable"

	.no_dead_strip	_set_aux_backlight_enable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_aux_backlight_enable
_set_aux_backlight_enable:              ; @set_aux_backlight_enable
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	str	wzr, [sp, #12]
	ldr	x8, [x0]
	ldr	w8, [x8, #4]
Lloh0:
	adrp	x9, _DP_EDP_BACKLIGHT_AUX_ENABLE_CAP@GOTPAGE
Lloh1:
	ldr	x9, [x9, _DP_EDP_BACKLIGHT_AUX_ENABLE_CAP@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.1:
	mov	x19, x1
	add	x20, x0, #8
Lloh3:
	adrp	x21, _DP_EDP_DISPLAY_CONTROL_REGISTER@GOTPAGE
Lloh4:
	ldr	x21, [x21, _DP_EDP_DISPLAY_CONTROL_REGISTER@GOTPAGEOFF]
	ldr	x1, [x21]
	add	x2, sp, #12
	mov	x0, x20
	bl	_drm_dp_dpcd_readb
	tbnz	x0, #63, LBB0_4
; %bb.2:
Lloh5:
	adrp	x8, _DP_EDP_BACKLIGHT_ENABLE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _DP_EDP_BACKLIGHT_ENABLE@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cbz	w19, LBB0_5
; %bb.3:
	ldr	w9, [sp, #12]
	orr	w2, w9, w8
	b	LBB0_6
LBB0_4:
	ldr	x1, [x21]
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_8
LBB0_5:
	ldr	w9, [sp, #12]
	bic	w2, w9, w8
LBB0_6:
	str	w2, [sp, #12]
	ldr	x1, [x21]
	mov	x0, x20
	bl	_drm_dp_dpcd_writeb
	cmp	w0, #1
	b.eq	LBB0_9
; %bb.7:
Lloh10:
	adrp	x8, l_.str.2@PAGE
Lloh11:
	add	x8, x8, l_.str.2@PAGEOFF
Lloh12:
	adrp	x9, l_.str.3@PAGE
Lloh13:
	add	x9, x9, l_.str.3@PAGEOFF
	cmp	w19, #0
	csel	x1, x9, x8, eq
Lloh14:
	adrp	x0, l_.str.1@PAGE
Lloh15:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_8:
	bl	_DRM_DEBUG_KMS
LBB0_9:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_DP_EDP_BACKLIGHT_AUX_ENABLE_CAP,4,2 ; @DP_EDP_BACKLIGHT_AUX_ENABLE_CAP
	.comm	_DP_EDP_DISPLAY_CONTROL_REGISTER,8,3 ; @DP_EDP_DISPLAY_CONTROL_REGISTER
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to read DPCD register 0x%x\n"

	.comm	_DP_EDP_BACKLIGHT_ENABLE,4,2    ; @DP_EDP_BACKLIGHT_ENABLE
l_.str.1:                               ; @.str.1
	.asciz	"Failed to %s aux backlight\n"

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

l_.str.3:                               ; @.str.3
	.asciz	"disable"

	.no_dead_strip	_set_aux_backlight_enable
.subsections_via_symbols
