	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lenovo_led_brightness_set_tpkbd
_lenovo_led_brightness_set_tpkbd:       ## @lenovo_led_brightness_set_tpkbd
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movq	(%rax), %rdi
	callq	_to_hid_device
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_hid_get_drvdata
	movq	%rax, %rcx
	addq	$8, %rcx
	cmpq	%rbx, %rcx
	sete	%cl
	movl	$1, %edx
	shll	%cl, %edx
	movq	_LED_OFF@GOTPCREL(%rip), %rcx
	cmpl	%r14d, (%rcx)
	jne	LBB0_2
## %bb.1:
	notl	%edx
	andl	(%rax), %edx
	jmp	LBB0_3
LBB0_2:
	orl	(%rax), %edx
LBB0_3:
	movl	%edx, (%rax)
	movq	(%r15), %rcx
	movq	_HID_OUTPUT_REPORT@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rsi
	movq	(%rcx,%rsi,8), %rcx
	movq	24(%rcx), %rsi
	andl	$1, %edx
	movq	(%rsi), %rcx
	movq	(%rcx), %rcx
	movq	(%rcx), %rcx
	movl	%edx, (%rcx)
	movl	(%rax), %eax
	shrl	%eax
	andl	$1, %eax
	movl	%eax, 4(%rcx)
	movq	_HID_REQ_SET_REPORT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_hid_hw_request                 ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_LED_OFF,4,2                    ## @LED_OFF
	.comm	_HID_OUTPUT_REPORT,8,3          ## @HID_OUTPUT_REPORT
	.comm	_HID_REQ_SET_REPORT,4,2         ## @HID_REQ_SET_REPORT
	.no_dead_strip	_lenovo_led_brightness_set_tpkbd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lenovo_led_brightness_set_tpkbd
_lenovo_led_brightness_set_tpkbd:       ; @lenovo_led_brightness_set_tpkbd
	.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	x21, x0
	ldr	x8, [x0]
	ldr	x0, [x8]
	bl	_to_hid_device
	mov	x19, x0
	bl	_hid_get_drvdata
	add	x8, x0, #8
	cmp	x8, x21
	cset	w8, eq
Lloh0:
	adrp	x9, _LED_OFF@GOTPAGE
Lloh1:
	ldr	x9, [x9, _LED_OFF@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	mov	w10, #1
	lsl	w8, w10, w8
	cmp	w9, w20
	b.ne	LBB0_2
; %bb.1:
	ldr	w9, [x0]
	bic	w8, w9, w8
	b	LBB0_3
LBB0_2:
	ldr	w9, [x0]
	orr	w8, w9, w8
LBB0_3:
	str	w8, [x0]
	ldr	x9, [x19]
Lloh3:
	adrp	x10, _HID_OUTPUT_REPORT@GOTPAGE
Lloh4:
	ldr	x10, [x10, _HID_OUTPUT_REPORT@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	ldr	x9, [x9, x10, lsl #3]
	ldr	x1, [x9, #24]
	and	w8, w8, #0x1
	ldr	x9, [x1]
	ldr	x9, [x9]
	ldr	x9, [x9]
	str	w8, [x9]
	ldr	w8, [x0]
	ubfx	w8, w8, #1, #1
	str	w8, [x9, #4]
Lloh6:
	adrp	x8, _HID_REQ_SET_REPORT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _HID_REQ_SET_REPORT@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x0, x19
	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
	b	_hid_hw_request
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_LED_OFF,4,2                    ; @LED_OFF
	.comm	_HID_OUTPUT_REPORT,8,3          ; @HID_OUTPUT_REPORT
	.comm	_HID_REQ_SET_REPORT,4,2         ; @HID_REQ_SET_REPORT
	.no_dead_strip	_lenovo_led_brightness_set_tpkbd
.subsections_via_symbols
