	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lenovo_probe_cptkbd
_lenovo_probe_cptkbd:                   ## @lenovo_probe_cptkbd
	.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
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movq	_USB_DEVICE_ID_LENOVO_CUSBKBD@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.1:
	movq	8(%rbx), %rax
	movq	_HID_TYPE_USBMOUSE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
LBB0_3:
	leaq	16(%rbx), %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	$16, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %r15
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_hid_set_drvdata
	movq	%rbx, %rdi
	movl	$1, %esi
	movl	$3, %edx
	callq	_lenovo_send_cmd_cptkbd
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_hid_warn
LBB0_7:
	movq	%rbx, %rdi
	movl	$9, %esi
	movl	$1, %edx
	callq	_lenovo_send_cmd_cptkbd
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	leaq	L_.str.3(%rip), %rsi
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_hid_warn
LBB0_9:
	movq	$0, 8(%r15)
	movabsq	$21474836481, %rax              ## imm = 0x500000001
	movq	%rax, (%r15)
	movq	%rbx, %rdi
	callq	_lenovo_features_set_cptkbd
	movq	_lenovo_attr_group_cptkbd@GOTPCREL(%rip), %rsi
	movq	%r14, %rdi
	callq	_sysfs_create_group
	xorl	%r14d, %r14d
	testl	%eax, %eax
	je	LBB0_11
## %bb.10:
	leaq	L_.str.4(%rip), %rsi
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_hid_warn
	jmp	LBB0_11
LBB0_4:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	callq	_hid_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_11
LBB0_2:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_hid_dbg
	xorl	%r14d, %r14d
LBB0_11:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_USB_DEVICE_ID_LENOVO_CUSBKBD,8,3 ## @USB_DEVICE_ID_LENOVO_CUSBKBD
	.comm	_HID_TYPE_USBMOUSE,8,3          ## @HID_TYPE_USBMOUSE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Ignoring keyboard half of device\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
L_.str.1:                               ## @.str.1
	.asciz	"can't alloc keyboard descriptor\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.2:                               ## @.str.2
	.asciz	"Failed to switch F7/9/11 mode: %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"Failed to switch middle button: %d\n"

	.comm	_lenovo_attr_group_cptkbd,4,2   ## @lenovo_attr_group_cptkbd
L_.str.4:                               ## @.str.4
	.asciz	"Could not create sysfs group: %d\n"

	.no_dead_strip	_lenovo_probe_cptkbd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function lenovo_probe_cptkbd
lCPI0_0:
	.long	1                               ; 0x1
	.long	5                               ; 0x5
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_lenovo_probe_cptkbd:                   ; @lenovo_probe_cptkbd
	.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	x19, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _USB_DEVICE_ID_LENOVO_CUSBKBD@GOTPAGE
Lloh1:
	ldr	x9, [x9, _USB_DEVICE_ID_LENOVO_CUSBKBD@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	ldr	x8, [x19, #8]
Lloh3:
	adrp	x9, _HID_TYPE_USBMOUSE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _HID_TYPE_USBMOUSE@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_10
LBB0_2:
	add	x20, x19, #16
Lloh6:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x0, x20
	mov	w1, #16
	bl	_devm_kzalloc
	cbz	x0, LBB0_9
; %bb.3:
	mov	x21, x0
	mov	x0, x19
	mov	x1, x21
	bl	_hid_set_drvdata
	mov	x0, x19
	mov	w1, #1
	mov	w2, #3
	bl	_lenovo_send_cmd_cptkbd
	cbz	w0, LBB0_5
; %bb.4:
	mov	x2, x0
Lloh9:
	adrp	x1, l_.str.2@PAGE
Lloh10:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_hid_warn
LBB0_5:
	mov	x0, x19
	mov	w1, #9
	mov	w2, #1
	bl	_lenovo_send_cmd_cptkbd
	cbz	w0, LBB0_7
; %bb.6:
	mov	x2, x0
Lloh11:
	adrp	x1, l_.str.3@PAGE
Lloh12:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_hid_warn
LBB0_7:
	str	xzr, [x21, #8]
Lloh13:
	adrp	x8, lCPI0_0@PAGE
Lloh14:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [x21]
	mov	x0, x19
	bl	_lenovo_features_set_cptkbd
Lloh15:
	adrp	x1, _lenovo_attr_group_cptkbd@GOTPAGE
Lloh16:
	ldr	x1, [x1, _lenovo_attr_group_cptkbd@GOTPAGEOFF]
	mov	x0, x20
	bl	_sysfs_create_group
	cbz	w0, LBB0_12
; %bb.8:
	mov	x2, x0
Lloh17:
	adrp	x1, l_.str.4@PAGE
Lloh18:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_hid_warn
	b	LBB0_11
LBB0_9:
Lloh19:
	adrp	x1, l_.str.1@PAGE
Lloh20:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_hid_err
Lloh21:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_12
LBB0_10:
Lloh24:
	adrp	x1, l_.str@PAGE
Lloh25:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_hid_dbg
LBB0_11:
	mov	w0, #0
LBB0_12:
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdr	Lloh13, Lloh14
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_USB_DEVICE_ID_LENOVO_CUSBKBD,8,3 ; @USB_DEVICE_ID_LENOVO_CUSBKBD
	.comm	_HID_TYPE_USBMOUSE,8,3          ; @HID_TYPE_USBMOUSE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Ignoring keyboard half of device\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
l_.str.1:                               ; @.str.1
	.asciz	"can't alloc keyboard descriptor\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.2:                               ; @.str.2
	.asciz	"Failed to switch F7/9/11 mode: %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"Failed to switch middle button: %d\n"

	.comm	_lenovo_attr_group_cptkbd,4,2   ; @lenovo_attr_group_cptkbd
l_.str.4:                               ; @.str.4
	.asciz	"Could not create sysfs group: %d\n"

	.no_dead_strip	_lenovo_probe_cptkbd
.subsections_via_symbols
