	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __get_lcd_brightness
___get_lcd_brightness:                  ## @__get_lcd_brightness
	.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, %rbx
	cmpq	$0, (%rdi)
	je	LBB0_1
## %bb.2:
	leaq	-20(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_get_tr_backlight_status
	testl	%eax, %eax
	jne	LBB0_13
## %bb.3:
	xorl	%eax, %eax
	cmpl	$0, -20(%rbp)
	jne	LBB0_13
## %bb.4:
	movl	$1, %r14d
	jmp	LBB0_5
LBB0_1:
	xorl	%r14d, %r14d
LBB0_5:
	movq	_HCI_LCD_BRIGHTNESS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-20(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_hci_read
	movl	%eax, %ebx
	movq	_TOS_FAILURE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jne	LBB0_9
## %bb.6:
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
	jmp	LBB0_7
LBB0_9:
	movq	_TOS_NOT_SUPPORTED@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jne	LBB0_7
## %bb.10:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	jmp	LBB0_12
LBB0_7:
	movq	_TOS_SUCCESS@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jne	LBB0_11
## %bb.8:
	movl	-20(%rbp), %eax
	movq	_HCI_LCD_BRIGHTNESS_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	sarl	%cl, %eax
	addl	%r14d, %eax
	jmp	LBB0_13
LBB0_11:
	movq	_EIO@GOTPCREL(%rip), %rcx
LBB0_12:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_13:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HCI_LCD_BRIGHTNESS,4,2         ## @HCI_LCD_BRIGHTNESS
	.comm	_TOS_FAILURE,4,2                ## @TOS_FAILURE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ACPI call to get LCD Brightness failed\n"

	.comm	_TOS_NOT_SUPPORTED,4,2          ## @TOS_NOT_SUPPORTED
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_TOS_SUCCESS,4,2                ## @TOS_SUCCESS
	.comm	_HCI_LCD_BRIGHTNESS_SHIFT,4,2   ## @HCI_LCD_BRIGHTNESS_SHIFT
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	___get_lcd_brightness
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __get_lcd_brightness
___get_lcd_brightness:                  ; @__get_lcd_brightness
	.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
	ldr	x8, [x0]
	cbz	x8, LBB0_4
; %bb.1:
	add	x1, sp, #12
	mov	x0, x19
	bl	_get_tr_backlight_status
	cbnz	w0, LBB0_14
; %bb.2:
	ldr	w8, [sp, #12]
	cbz	w8, LBB0_5
; %bb.3:
	mov	w0, #0
	b	LBB0_14
LBB0_4:
	mov	w20, #0
	b	LBB0_6
LBB0_5:
	mov	w20, #1
LBB0_6:
Lloh0:
	adrp	x8, _HCI_LCD_BRIGHTNESS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HCI_LCD_BRIGHTNESS@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x19
	bl	_hci_read
	mov	x19, x0
Lloh3:
	adrp	x8, _TOS_FAILURE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TOS_FAILURE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_8
; %bb.7:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
	b	LBB0_10
LBB0_8:
Lloh8:
	adrp	x8, _TOS_NOT_SUPPORTED@GOTPAGE
Lloh9:
	ldr	x8, [x8, _TOS_NOT_SUPPORTED@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	cmp	w19, w8
	b.ne	LBB0_10
; %bb.9:
Lloh11:
	adrp	x8, _ENODEV@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_13
LBB0_10:
Lloh13:
	adrp	x8, _TOS_SUCCESS@GOTPAGE
Lloh14:
	ldr	x8, [x8, _TOS_SUCCESS@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	cmp	w19, w8
	b.ne	LBB0_12
; %bb.11:
	ldr	w8, [sp, #12]
Lloh16:
	adrp	x9, _HCI_LCD_BRIGHTNESS_SHIFT@GOTPAGE
Lloh17:
	ldr	x9, [x9, _HCI_LCD_BRIGHTNESS_SHIFT@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	asr	w8, w8, w9
	add	w0, w8, w20
	b	LBB0_14
LBB0_12:
Lloh19:
	adrp	x8, _EIO@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_13:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_14:
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_HCI_LCD_BRIGHTNESS,4,2         ; @HCI_LCD_BRIGHTNESS
	.comm	_TOS_FAILURE,4,2                ; @TOS_FAILURE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ACPI call to get LCD Brightness failed\n"

	.comm	_TOS_NOT_SUPPORTED,4,2          ; @TOS_NOT_SUPPORTED
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_TOS_SUCCESS,4,2                ; @TOS_SUCCESS
	.comm	_HCI_LCD_BRIGHTNESS_SHIFT,4,2   ; @HCI_LCD_BRIGHTNESS_SHIFT
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	___get_lcd_brightness
.subsections_via_symbols
