	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tpacpi_driver_event
_tpacpi_driver_event:                   ## @tpacpi_driver_event
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movl	%edi, %ebx
	leal	-131(%rbx), %eax
	cmpl	$1, %eax
	ja	LBB0_3
## %bb.1:
	movq	_ibm_backlight_device@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_3
## %bb.2:
	xorl	%eax, %eax
	callq	_tpacpi_brightness_notify_change
	jmp	LBB0_6
LBB0_3:
	leal	-128(%rbx), %eax
	cmpl	$2, %eax
	ja	LBB0_6
## %bb.4:
	movq	_alsa_card@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_6
## %bb.5:
	xorl	%eax, %eax
	callq	_volume_alsa_notify_change
LBB0_6:
	movq	_tp_features@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_11
## %bb.7:
	movq	_TP_HKEY_EV_KBD_LIGHT@GOTPCREL(%rip), %rax
	cmpl	%ebx, (%rax)
	jne	LBB0_11
## %bb.8:
	movq	_kbdlight_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	xorl	%edi, %edi
	callq	_kbdlight_sysfs_get
	movq	_kbdlight_brightness@GOTPCREL(%rip), %rcx
	cmpl	%eax, (%rcx)
	je	LBB0_10
## %bb.9:
	movl	%eax, (%rcx)
	movq	_tpacpi_led_kbdlight@GOTPCREL(%rip), %rdi
	movl	%eax, %esi
	callq	_led_classdev_notify_brightness_hw_changed
LBB0_10:
	movq	_kbdlight_mutex@GOTPCREL(%rip), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_mutex_unlock                   ## TAILCALL
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ibm_backlight_device,8,3       ## @ibm_backlight_device
	.comm	_alsa_card,8,3                  ## @alsa_card
	.comm	_tp_features,8,3                ## @tp_features
	.comm	_TP_HKEY_EV_KBD_LIGHT,4,2       ## @TP_HKEY_EV_KBD_LIGHT
	.comm	_kbdlight_mutex,4,2             ## @kbdlight_mutex
	.comm	_kbdlight_brightness,4,2        ## @kbdlight_brightness
	.comm	_tpacpi_led_kbdlight,4,2        ## @tpacpi_led_kbdlight
	.no_dead_strip	_tpacpi_driver_event
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tpacpi_driver_event
_tpacpi_driver_event:                   ; @tpacpi_driver_event
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x8, _ibm_backlight_device@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ibm_backlight_device@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	sub	w9, w0, #131
	cmp	w9, #1
	ccmp	x8, #0, #4, ls
	b.ne	LBB0_4
; %bb.1:
	sub	w8, w19, #128
	cmp	w8, #2
	b.hi	LBB0_5
; %bb.2:
Lloh3:
	adrp	x8, _alsa_card@GOTPAGE
Lloh4:
	ldr	x8, [x8, _alsa_card@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cbz	x8, LBB0_5
; %bb.3:
	bl	_volume_alsa_notify_change
	b	LBB0_5
LBB0_4:
	bl	_tpacpi_brightness_notify_change
LBB0_5:
Lloh6:
	adrp	x8, _tp_features@GOTPAGE
Lloh7:
	ldr	x8, [x8, _tp_features@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
Lloh9:
	adrp	x9, _TP_HKEY_EV_KBD_LIGHT@GOTPAGE
Lloh10:
	ldr	x9, [x9, _TP_HKEY_EV_KBD_LIGHT@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	cmp	x8, #0
	ccmp	w9, w19, #0, ne
	b.eq	LBB0_7
; %bb.6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_7:
Lloh12:
	adrp	x0, _kbdlight_mutex@GOTPAGE
Lloh13:
	ldr	x0, [x0, _kbdlight_mutex@GOTPAGEOFF]
	bl	_mutex_lock
	mov	x0, #0
	bl	_kbdlight_sysfs_get
Lloh14:
	adrp	x8, _kbdlight_brightness@GOTPAGE
Lloh15:
	ldr	x8, [x8, _kbdlight_brightness@GOTPAGEOFF]
	ldr	w9, [x8]
	cmp	w9, w0
	b.eq	LBB0_9
; %bb.8:
	mov	x1, x0
	str	w0, [x8]
Lloh16:
	adrp	x0, _tpacpi_led_kbdlight@GOTPAGE
Lloh17:
	ldr	x0, [x0, _tpacpi_led_kbdlight@GOTPAGEOFF]
	bl	_led_classdev_notify_brightness_hw_changed
LBB0_9:
Lloh18:
	adrp	x0, _kbdlight_mutex@GOTPAGE
Lloh19:
	ldr	x0, [x0, _kbdlight_mutex@GOTPAGEOFF]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_mutex_unlock
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_ibm_backlight_device,8,3       ; @ibm_backlight_device
	.comm	_alsa_card,8,3                  ; @alsa_card
	.comm	_tp_features,8,3                ; @tp_features
	.comm	_TP_HKEY_EV_KBD_LIGHT,4,2       ; @TP_HKEY_EV_KBD_LIGHT
	.comm	_kbdlight_mutex,4,2             ; @kbdlight_mutex
	.comm	_kbdlight_brightness,4,2        ; @kbdlight_brightness
	.comm	_tpacpi_led_kbdlight,4,2        ; @tpacpi_led_kbdlight
	.no_dead_strip	_tpacpi_driver_event
.subsections_via_symbols
