	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bxt_enable_backlight
_bxt_enable_backlight:                  ## @bxt_enable_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	%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	%rsi, %r14
	movq	%rdi, %rbx
	movl	(%rsi), %edi
	callq	_to_intel_connector
	movq	%rax, %r12
	movl	32(%rax), %edi
	callq	_to_i915
	movl	(%rbx), %edi
	callq	_to_intel_crtc
	movl	(%r12), %edi
	cmpl	$1, %edi
	jne	LBB0_6
## %bb.1:
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_UTIL_PIN_CTL@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	callq	_I915_READ
	movq	_UTIL_PIN_ENABLE@GOTPCREL(%rip), %r13
	testl	%eax, (%r13)
	je	LBB0_3
## %bb.2:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rdi
	callq	_DRM_DEBUG_KMS
	movl	(%r13), %eax
	notl	%eax
	andl	%eax, %ebx
	movl	(%r15), %edi
	movl	%ebx, %esi
	callq	_I915_WRITE
LBB0_3:
	xorl	%ebx, %ebx
	cmpq	$0, 24(%r12)
	je	LBB0_5
## %bb.4:
	movq	_UTIL_PIN_POLARITY@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_5:
	movl	(%r15), %r13d
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_UTIL_PIN_PIPE
	orl	%eax, %ebx
	movq	_UTIL_PIN_MODE_PWM@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	_UTIL_PIN_ENABLE@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movl	%r13d, %edi
	movl	%ebx, %esi
	callq	_I915_WRITE
	movl	(%r12), %edi
LBB0_6:
	callq	_BXT_BLC_PWM_CTL
	movl	%eax, %edi
	callq	_I915_READ
	movq	_BXT_BLC_PWM_ENABLE@GOTPCREL(%rip), %r15
	testl	%eax, (%r15)
	je	LBB0_8
## %bb.7:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rdi
	callq	_DRM_DEBUG_KMS
	movl	(%r15), %eax
	notl	%eax
	andl	%eax, %ebx
	movl	(%r12), %edi
	callq	_BXT_BLC_PWM_CTL
	movl	%eax, %edi
	movl	%ebx, %esi
	callq	_I915_WRITE
LBB0_8:
	movl	(%r12), %edi
	callq	_BXT_BLC_PWM_FREQ
	movl	4(%r12), %esi
	movl	%eax, %edi
	callq	_I915_WRITE
	movl	16(%r12), %esi
	movq	%r14, %rdi
	callq	_intel_panel_actually_set_backlight
	xorl	%ebx, %ebx
	cmpq	$0, 8(%r12)
	je	LBB0_10
## %bb.9:
	movq	_BXT_BLC_PWM_POLARITY@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_10:
	movl	(%r12), %edi
	callq	_BXT_BLC_PWM_CTL
	movl	%eax, %edi
	movl	%ebx, %esi
	callq	_I915_WRITE
	movl	(%r12), %edi
	callq	_BXT_BLC_PWM_CTL
	movl	%eax, %edi
	callq	_POSTING_READ
	movl	(%r12), %edi
	callq	_BXT_BLC_PWM_CTL
	orl	(%r15), %ebx
	movl	%eax, %edi
	movl	%ebx, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_I915_WRITE                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_UTIL_PIN_CTL,4,2               ## @UTIL_PIN_CTL
	.comm	_UTIL_PIN_ENABLE,4,2            ## @UTIL_PIN_ENABLE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"util pin already enabled\n"

	.comm	_UTIL_PIN_POLARITY,4,2          ## @UTIL_PIN_POLARITY
	.comm	_UTIL_PIN_MODE_PWM,4,2          ## @UTIL_PIN_MODE_PWM
	.comm	_BXT_BLC_PWM_ENABLE,4,2         ## @BXT_BLC_PWM_ENABLE
L_.str.1:                               ## @.str.1
	.asciz	"backlight already enabled\n"

	.comm	_BXT_BLC_PWM_POLARITY,4,2       ## @BXT_BLC_PWM_POLARITY
	.no_dead_strip	_bxt_enable_backlight
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bxt_enable_backlight
_bxt_enable_backlight:                  ; @bxt_enable_backlight
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x1
	mov	x21, x0
	ldr	w0, [x1]
	bl	_to_intel_connector
	mov	x19, x0
	ldr	w0, [x0, #32]
	bl	_to_i915
	ldr	w0, [x21]
	bl	_to_intel_crtc
	mov	x8, x0
	ldr	w0, [x19]
	cmp	w0, #1
	b.ne	LBB0_4
; %bb.1:
	ldr	w21, [x8]
Lloh0:
	adrp	x24, _UTIL_PIN_CTL@GOTPAGE
Lloh1:
	ldr	x24, [x24, _UTIL_PIN_CTL@GOTPAGEOFF]
	ldr	w0, [x24]
	bl	_I915_READ
Lloh2:
	adrp	x23, _UTIL_PIN_ENABLE@GOTPAGE
Lloh3:
	ldr	x23, [x23, _UTIL_PIN_ENABLE@GOTPAGEOFF]
	ldr	w8, [x23]
	tst	w8, w0
	b.eq	LBB0_3
; %bb.2:
	mov	x22, x0
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG_KMS
	ldr	w8, [x23]
	bic	w1, w22, w8
	ldr	w0, [x24]
	bl	_I915_WRITE
LBB0_3:
	ldr	x8, [x19, #24]
Lloh6:
	adrp	x9, _UTIL_PIN_POLARITY@GOTPAGE
Lloh7:
	ldr	x9, [x9, _UTIL_PIN_POLARITY@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	cmp	x8, #0
	csel	w25, wzr, w9, eq
	ldr	w22, [x24]
	mov	x0, x21
	bl	_UTIL_PIN_PIPE
	orr	w8, w0, w25
Lloh9:
	adrp	x9, _UTIL_PIN_MODE_PWM@GOTPAGE
Lloh10:
	ldr	x9, [x9, _UTIL_PIN_MODE_PWM@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w8, w8, w9
	ldr	w9, [x23]
	orr	w1, w8, w9
	mov	x0, x22
	bl	_I915_WRITE
	ldr	w0, [x19]
LBB0_4:
	bl	_BXT_BLC_PWM_CTL
	bl	_I915_READ
Lloh12:
	adrp	x22, _BXT_BLC_PWM_ENABLE@GOTPAGE
Lloh13:
	ldr	x22, [x22, _BXT_BLC_PWM_ENABLE@GOTPAGEOFF]
	ldr	w8, [x22]
	tst	w8, w0
	b.eq	LBB0_6
; %bb.5:
	mov	x21, x0
Lloh14:
	adrp	x0, l_.str.1@PAGE
Lloh15:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_DEBUG_KMS
	ldr	w8, [x22]
	bic	w21, w21, w8
	ldr	w0, [x19]
	bl	_BXT_BLC_PWM_CTL
	mov	x1, x21
	bl	_I915_WRITE
LBB0_6:
	ldr	w0, [x19]
	bl	_BXT_BLC_PWM_FREQ
	ldr	w1, [x19, #4]
	bl	_I915_WRITE
	ldr	w1, [x19, #16]
	mov	x0, x20
	bl	_intel_panel_actually_set_backlight
	ldr	x8, [x19, #8]
Lloh16:
	adrp	x9, _BXT_BLC_PWM_POLARITY@GOTPAGE
Lloh17:
	ldr	x9, [x9, _BXT_BLC_PWM_POLARITY@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	cmp	x8, #0
	csel	w20, wzr, w9, eq
	ldr	w0, [x19]
	bl	_BXT_BLC_PWM_CTL
	mov	x1, x20
	bl	_I915_WRITE
	ldr	w0, [x19]
	bl	_BXT_BLC_PWM_CTL
	bl	_POSTING_READ
	ldr	w0, [x19]
	bl	_BXT_BLC_PWM_CTL
	ldr	w8, [x22]
	orr	w1, w8, w20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_I915_WRITE
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_UTIL_PIN_CTL,4,2               ; @UTIL_PIN_CTL
	.comm	_UTIL_PIN_ENABLE,4,2            ; @UTIL_PIN_ENABLE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"util pin already enabled\n"

	.comm	_UTIL_PIN_POLARITY,4,2          ; @UTIL_PIN_POLARITY
	.comm	_UTIL_PIN_MODE_PWM,4,2          ; @UTIL_PIN_MODE_PWM
	.comm	_BXT_BLC_PWM_ENABLE,4,2         ; @BXT_BLC_PWM_ENABLE
l_.str.1:                               ; @.str.1
	.asciz	"backlight already enabled\n"

	.comm	_BXT_BLC_PWM_POLARITY,4,2       ; @BXT_BLC_PWM_POLARITY
	.no_dead_strip	_bxt_enable_backlight
.subsections_via_symbols
