	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tpacpi_brightness_get_raw
_tpacpi_brightness_get_raw:             ## @tpacpi_brightness_get_raw
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movl	$0, -20(%rbp)
	movq	_brightness_mode@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leal	-129(%rax), %ecx
	cmpl	$2, %ecx
	jae	LBB0_1
## %bb.3:
	movq	_TP_EC_BACKLIGHT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-20(%rbp), %rsi
	callq	_acpi_ec_read
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_unlikely
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_1:
	cmpl	$128, %eax
	jne	LBB0_6
## %bb.2:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_tpacpi_brightness_nvram_get
	movl	%eax, (%r14)
	jmp	LBB0_8
LBB0_6:
	movq	_ENXIO@GOTPCREL(%rip), %rax
LBB0_7:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_8
LBB0_5:
	movl	-20(%rbp), %eax
	movl	%eax, (%r14)
	xorl	%ebx, %ebx
LBB0_8:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_brightness_mode,4,2            ## @brightness_mode
	.comm	_TP_EC_BACKLIGHT,4,2            ## @TP_EC_BACKLIGHT
	.comm	_EIO,4,2                        ## @EIO
	.comm	_ENXIO,4,2                      ## @ENXIO
	.no_dead_strip	_tpacpi_brightness_get_raw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tpacpi_brightness_get_raw
_tpacpi_brightness_get_raw:             ; @tpacpi_brightness_get_raw
	.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, x0
	str	wzr, [sp, #12]
Lloh0:
	adrp	x8, _brightness_mode@GOTPAGE
Lloh1:
	ldr	x8, [x8, _brightness_mode@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	sub	w9, w8, #129
	cmp	w9, #2
	b.hs	LBB0_3
; %bb.1:
Lloh3:
	adrp	x8, _TP_EC_BACKLIGHT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TP_EC_BACKLIGHT@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	add	x1, sp, #12
	bl	_acpi_ec_read
	cmp	w0, #0
	cset	w0, eq
	bl	_unlikely
	cbz	w0, LBB0_7
; %bb.2:
Lloh6:
	adrp	x8, _EIO@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_6
LBB0_3:
	cmp	w8, #128
	b.ne	LBB0_5
; %bb.4:
	bl	_tpacpi_brightness_nvram_get
	mov	x8, x0
	mov	w0, #0
	b	LBB0_8
LBB0_5:
Lloh8:
	adrp	x8, _ENXIO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_7:
	ldr	w8, [sp, #12]
LBB0_8:
	str	w8, [x19]
LBB0_9:
	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 AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_brightness_mode,4,2            ; @brightness_mode
	.comm	_TP_EC_BACKLIGHT,4,2            ; @TP_EC_BACKLIGHT
	.comm	_EIO,4,2                        ; @EIO
	.comm	_ENXIO,4,2                      ; @ENXIO
	.no_dead_strip	_tpacpi_brightness_get_raw
.subsections_via_symbols
