	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_panel_set_backlight_acpi ## -- Begin function intel_panel_set_backlight_acpi
	.p2align	4, 0x90
_intel_panel_set_backlight_acpi:        ## @intel_panel_set_backlight_acpi
	.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
	movl	%edx, %r12d
	movl	%esi, %r13d
	movq	%rdi, %r15
	movl	4(%rdi), %edi
	callq	_to_intel_connector
	movq	%rax, %rbx
	movl	32(%rax), %edi
	callq	_to_i915
	cmpl	$0, 28(%rbx)
	je	LBB0_7
## %bb.1:
	cmpl	$0, (%r15)
	je	LBB0_7
## %bb.2:
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_mutex_lock
	xorl	%edi, %edi
	cmpq	$0, (%rbx)
	sete	%dil
	callq	_WARN_ON
	movq	%rbx, %rdi
	movl	%r13d, %esi
	movl	%r12d, %edx
	callq	_clamp_user_to_hw
	movl	%eax, %r12d
	movl	%eax, 24(%rbx)
	movq	16(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	%r12d, %esi
	callq	_scale_hw_to_user
	movq	16(%rbx), %rcx
	movl	%eax, 4(%rcx)
LBB0_4:
	cmpq	$0, 8(%rbx)
	je	LBB0_6
## %bb.5:
	movq	%r15, %rdi
	movl	%r12d, %esi
	callq	_intel_panel_actually_set_backlight
LBB0_6:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mutex_unlock                   ## TAILCALL
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_panel_set_backlight_acpi ; -- Begin function intel_panel_set_backlight_acpi
	.p2align	2
_intel_panel_set_backlight_acpi:        ; @intel_panel_set_backlight_acpi
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x22, x2
	mov	x23, x1
	mov	x19, x0
	ldr	w0, [x0, #4]
	bl	_to_intel_connector
	mov	x21, x0
	ldr	w0, [x0, #32]
	bl	_to_i915
	ldr	w8, [x21, #28]
	cbz	w8, LBB0_7
; %bb.1:
	ldr	w8, [x19]
	cbz	w8, LBB0_7
; %bb.2:
	mov	x20, x0
	bl	_mutex_lock
	ldr	x8, [x21]
	cmp	x8, #0
	cset	w0, eq
	bl	_WARN_ON
	mov	x0, x21
	mov	x1, x23
	mov	x2, x22
	bl	_clamp_user_to_hw
	mov	x22, x0
	str	w0, [x21, #24]
	ldr	x8, [x21, #16]
	cbz	x8, LBB0_4
; %bb.3:
	ldr	w2, [x8]
	mov	x0, x21
	mov	x1, x22
	bl	_scale_hw_to_user
	ldr	x8, [x21, #16]
	str	w0, [x8, #4]
LBB0_4:
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_6
; %bb.5:
	mov	x0, x19
	mov	x1, x22
	bl	_intel_panel_actually_set_backlight
LBB0_6:
	mov	x0, x20
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_mutex_unlock
LBB0_7:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
