	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i9xx_set_backlight
_i9xx_set_backlight:                    ## @i9xx_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	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movl	(%rdi), %edi
	callq	_to_intel_connector
	movq	%rax, %rbx
	movl	16(%rax), %edi
	callq	_to_i915
	movq	%rax, %r14
	xorl	%edi, %edi
	cmpl	$0, (%rbx)
	sete	%dil
	callq	_WARN_ON
	cmpq	$0, 8(%rbx)
	je	LBB0_2
## %bb.1:
	movl	%r15d, %eax
	shll	$8, %eax
	subl	%r15d, %eax
	subl	%r15d, %eax
	cltd
	idivl	(%rbx)
                                        ## kill: def $eax killed $eax def $rax
	leal	1(%rax), %ecx
	movl	%r15d, %eax
	cltd
	idivl	%ecx
	movl	(%r14), %edi
	movq	_LBPC@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	movl	%eax, %r15d
	movl	%ecx, %edx
	callq	_pci_write_config_byte
LBB0_2:
	movq	%r14, %rdi
	movl	$4, %esi
	callq	_IS_GEN
	testq	%rax, %rax
	sete	%cl
	jne	LBB0_3
## %bb.4:
	movq	_BACKLIGHT_DUTY_CYCLE_MASK_PNV@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_3:
	movq	_BACKLIGHT_DUTY_CYCLE_MASK@GOTPCREL(%rip), %rax
LBB0_5:
	shll	%cl, %r15d
	movl	(%rax), %ebx
	movq	_BLC_PWM_CTL@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	callq	_I915_READ
	notl	%ebx
	andl	%eax, %ebx
	orl	%r15d, %ebx
	movl	(%r14), %edi
	movl	%ebx, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_I915_WRITE                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_LBPC,4,2                       ## @LBPC
	.comm	_BACKLIGHT_DUTY_CYCLE_MASK,4,2  ## @BACKLIGHT_DUTY_CYCLE_MASK
	.comm	_BACKLIGHT_DUTY_CYCLE_MASK_PNV,4,2 ## @BACKLIGHT_DUTY_CYCLE_MASK_PNV
	.comm	_BLC_PWM_CTL,4,2                ## @BLC_PWM_CTL
	.no_dead_strip	_i9xx_set_backlight
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i9xx_set_backlight
_i9xx_set_backlight:                    ; @i9xx_set_backlight
	.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, x1
	ldr	w0, [x0]
	bl	_to_intel_connector
	mov	x21, x0
	ldr	w0, [x0, #16]
	bl	_to_i915
	mov	x20, x0
	ldr	w8, [x21]
	cmp	w8, #0
	cset	w0, eq
	bl	_WARN_ON
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_2
; %bb.1:
	mov	w8, #254
	mul	w8, w19, w8
	ldr	w9, [x21]
	sdiv	w8, w8, w9
	add	w2, w8, #1
	ldr	w0, [x20]
Lloh0:
	adrp	x8, _LBPC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LBPC@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	sdiv	w19, w19, w2
	bl	_pci_write_config_byte
LBB0_2:
	mov	x0, x20
	mov	w1, #4
	bl	_IS_GEN
Lloh3:
	adrp	x8, _BACKLIGHT_DUTY_CYCLE_MASK_PNV@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BACKLIGHT_DUTY_CYCLE_MASK_PNV@GOTPAGEOFF]
Lloh5:
	adrp	x9, _BACKLIGHT_DUTY_CYCLE_MASK@GOTPAGE
Lloh6:
	ldr	x9, [x9, _BACKLIGHT_DUTY_CYCLE_MASK@GOTPAGEOFF]
	cmp	x0, #0
	csel	x8, x8, x9, eq
	cset	w9, eq
	lsl	w19, w19, w9
	ldr	w20, [x8]
Lloh7:
	adrp	x21, _BLC_PWM_CTL@GOTPAGE
Lloh8:
	ldr	x21, [x21, _BLC_PWM_CTL@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_I915_READ
	bic	w8, w0, w20
	ldr	w0, [x21]
	orr	w1, w8, w19
	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	_I915_WRITE
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_LBPC,4,2                       ; @LBPC
	.comm	_BACKLIGHT_DUTY_CYCLE_MASK,4,2  ; @BACKLIGHT_DUTY_CYCLE_MASK
	.comm	_BACKLIGHT_DUTY_CYCLE_MASK_PNV,4,2 ; @BACKLIGHT_DUTY_CYCLE_MASK_PNV
	.comm	_BLC_PWM_CTL,4,2                ; @BLC_PWM_CTL
	.no_dead_strip	_i9xx_set_backlight
.subsections_via_symbols
