	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function intel_dp_aux_set_backlight
_intel_dp_aux_set_backlight:            ## @intel_dp_aux_set_backlight
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movl	%esi, %ebx
	movl	(%rdi), %edi
	callq	_to_intel_connector
	movq	(%rax), %rdi
	callq	_enc_to_intel_dp
	movq	$0, -16(%rbp)
	movl	%ebx, -16(%rbp)
	movq	(%rax), %rcx
	movq	_DP_EDP_BACKLIGHT_BRIGHTNESS_BYTE_COUNT@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%edx, 8(%rcx)
	je	LBB0_2
## %bb.1:
	movzbl	%bh, %ecx
	movl	%ecx, -16(%rbp)
	movzbl	%bl, %ecx
	movl	%ecx, -12(%rbp)
LBB0_2:
	addq	$8, %rax
	movq	_DP_EDP_BACKLIGHT_BRIGHTNESS_MSB@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	-16(%rbp), %rdx
	movq	%rax, %rdi
	movl	$8, %ecx
	callq	_drm_dp_dpcd_write
	testq	%rax, %rax
	jns	LBB0_4
## %bb.3:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_DEBUG_KMS
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DP_EDP_BACKLIGHT_BRIGHTNESS_BYTE_COUNT,4,2 ## @DP_EDP_BACKLIGHT_BRIGHTNESS_BYTE_COUNT
	.comm	_DP_EDP_BACKLIGHT_BRIGHTNESS_MSB,4,2 ## @DP_EDP_BACKLIGHT_BRIGHTNESS_MSB
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to write aux backlight level\n"

	.no_dead_strip	_intel_dp_aux_set_backlight
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function intel_dp_aux_set_backlight
_intel_dp_aux_set_backlight:            ; @intel_dp_aux_set_backlight
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x1
	ldr	w0, [x0]
	bl	_to_intel_connector
	ldr	x0, [x0]
	bl	_enc_to_intel_dp
	str	xzr, [sp, #8]
	str	w19, [sp, #8]
	ldr	x8, [x0]
	ldr	w8, [x8, #8]
Lloh0:
	adrp	x9, _DP_EDP_BACKLIGHT_BRIGHTNESS_BYTE_COUNT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _DP_EDP_BACKLIGHT_BRIGHTNESS_BYTE_COUNT@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	ubfx	w8, w19, #8, #8
	and	w9, w19, #0xff
	stp	w8, w9, [sp, #8]
LBB0_2:
	add	x0, x0, #8
Lloh3:
	adrp	x8, _DP_EDP_BACKLIGHT_BRIGHTNESS_MSB@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DP_EDP_BACKLIGHT_BRIGHTNESS_MSB@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	w3, #8
	bl	_drm_dp_dpcd_write
	tbz	x0, #63, LBB0_4
; %bb.3:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG_KMS
LBB0_4:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_DP_EDP_BACKLIGHT_BRIGHTNESS_BYTE_COUNT,4,2 ; @DP_EDP_BACKLIGHT_BRIGHTNESS_BYTE_COUNT
	.comm	_DP_EDP_BACKLIGHT_BRIGHTNESS_MSB,4,2 ; @DP_EDP_BACKLIGHT_BRIGHTNESS_MSB
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to write aux backlight level\n"

	.no_dead_strip	_intel_dp_aux_set_backlight
.subsections_via_symbols
