	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function asle_set_backlight
_asle_set_backlight:                    ## @asle_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r14
	movq	(%rdi), %rax
	movq	(%rax), %r12
	movq	8(%rax), %r15
	leaq	L_.str(%rip), %rdi
	callq	_DRM_DEBUG_DRIVER
	movq	_ASLE_BCLP_VALID@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_1
## %bb.2:
	testq	%r12, %r12
	je	LBB0_1
## %bb.3:
	movq	_ASLE_BCLP_MSK@GOTPCREL(%rip), %rax
	andl	(%rax), %ebx
	cmpl	$256, %ebx                      ## imm = 0x100
	jl	LBB0_4
LBB0_1:
	movq	_ASLE_BACKLIGHT_FAILED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_5
LBB0_4:
	movl	(%r12), %eax
	imull	%ebx, %eax
	movslq	%eax, %rsi
	imulq	$-2139062143, %rsi, %rax        ## imm = 0x80808081
	shrq	$32, %rax
	addl	%eax, %esi
	movl	%esi, %eax
	shrl	$31, %eax
	sarl	$7, %esi
	addl	%eax, %esi
	movq	%r14, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_gma_backlight_set
	imull	$100, %ebx, %eax
	cltq
	imulq	$-2139062143, %rax, %rcx        ## imm = 0x80808081
	shrq	$32, %rcx
	addl	%ecx, %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	sarl	$7, %eax
	addl	%ecx, %eax
	movq	_ASLE_CBLV_VALID@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, (%r15)
	xorl	%eax, %eax
LBB0_5:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"asle set backlight %x\n"

	.comm	_ASLE_BCLP_VALID,4,2            ## @ASLE_BCLP_VALID
	.comm	_ASLE_BACKLIGHT_FAILED,4,2      ## @ASLE_BACKLIGHT_FAILED
	.comm	_ASLE_BCLP_MSK,4,2              ## @ASLE_BCLP_MSK
	.comm	_ASLE_CBLV_VALID,4,2            ## @ASLE_CBLV_VALID
	.no_dead_strip	_asle_set_backlight
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function asle_set_backlight
_asle_set_backlight:                    ; @asle_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	x20, x1
	mov	x19, x0
	ldr	x8, [x0]
	ldp	x22, x21, [x8]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG_DRIVER
Lloh2:
	adrp	x8, _ASLE_BCLP_VALID@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ASLE_BCLP_VALID@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_3
; %bb.1:
	cbz	x22, LBB0_3
; %bb.2:
Lloh5:
	adrp	x8, _ASLE_BCLP_MSK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ASLE_BCLP_MSK@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	and	w20, w8, w20
	cmp	w20, #256
	b.lt	LBB0_4
LBB0_3:
Lloh8:
	adrp	x8, _ASLE_BACKLIGHT_FAILED@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ASLE_BACKLIGHT_FAILED@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	b	LBB0_5
LBB0_4:
	ldr	w8, [x22]
	mul	w8, w8, w20
	mov	w22, #32897
	movk	w22, #32896, lsl #16
	smull	x9, w8, w22
	lsr	x9, x9, #32
	add	w8, w9, w8
	asr	w9, w8, #7
	add	w1, w9, w8, lsr #31
	mov	x0, x19
	bl	_gma_backlight_set
	mov	w0, #0
	mov	w8, #100
	mul	w8, w20, w8
	smull	x9, w8, w22
	lsr	x9, x9, #32
	add	w8, w9, w8
	asr	w9, w8, #7
	add	w8, w9, w8, lsr #31
Lloh11:
	adrp	x9, _ASLE_CBLV_VALID@GOTPAGE
Lloh12:
	ldr	x9, [x9, _ASLE_CBLV_VALID@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [x21]
LBB0_5:
	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
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"asle set backlight %x\n"

	.comm	_ASLE_BCLP_VALID,4,2            ; @ASLE_BCLP_VALID
	.comm	_ASLE_BACKLIGHT_FAILED,4,2      ; @ASLE_BACKLIGHT_FAILED
	.comm	_ASLE_BCLP_MSK,4,2              ; @ASLE_BCLP_MSK
	.comm	_ASLE_CBLV_VALID,4,2            ; @ASLE_CBLV_VALID
	.no_dead_strip	_asle_set_backlight
.subsections_via_symbols
