	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __cbas_ec_probe
___cbas_ec_probe:                       ## @__cbas_ec_probe
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movl	(%rdi), %edi
	callq	_dev_get_drvdata
	movq	%rax, %r15
	leaq	-44(%rbp), %rdx
	movq	%rax, %rdi
	xorl	%esi, %esi
	callq	_cbas_ec_query_base
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_14
## %bb.1:
	cmpl	$0, -44(%rbp)
	je	LBB0_2
## %bb.4:
	movq	%r14, %rdi
	callq	_devm_input_allocate_device
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	%rax, %r12
	leaq	L_.str(%rip), %rax
	movq	%rax, (%r12)
	movq	_BUS_HOST@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r12)
	movq	_EV_SW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SW_TABLET_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	callq	_input_set_capability
	movq	%r12, %rdi
	callq	_input_register_device
	testl	%eax, %eax
	je	LBB0_9
## %bb.7:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_8
LBB0_2:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_5:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_3:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_14
LBB0_9:
	movq	_cbas_ec@GOTPCREL(%rip), %r13
	movq	%r15, %rdi
	movl	$1, %esi
	movq	%r13, %rdx
	callq	_cbas_ec_query_base
	testl	%eax, %eax
	je	LBB0_11
## %bb.10:
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %rsi
LBB0_8:
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_dev_err
LBB0_14:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	_SW_TABLET_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	cmpl	$0, (%r13)
	sete	%dl
	movq	%r12, %rdi
	callq	_input_report_switch
	movq	%r12, %rdi
	callq	_cbas_ec_set_input
	movq	%r14, 8(%r13)
	movq	_cbas_ec_notify@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r13)
	addq	$4, %r13
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_blocking_notifier_chain_register
	testl	%eax, %eax
	je	LBB0_13
## %bb.12:
	movl	%eax, %ebx
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_dev_err
	xorl	%edi, %edi
	callq	_cbas_ec_set_input
	jmp	LBB0_14
LBB0_13:
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_device_init_wakeup
	xorl	%ebx, %ebx
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Whiskers Tablet Mode Switch"

	.comm	_BUS_HOST,4,2                   ## @BUS_HOST
	.comm	_EV_SW,4,2                      ## @EV_SW
	.comm	_SW_TABLET_MODE,4,2             ## @SW_TABLET_MODE
L_.str.1:                               ## @.str.1
	.asciz	"cannot register input device: %d\n"

	.comm	_cbas_ec,16,3                   ## @cbas_ec
L_.str.2:                               ## @.str.2
	.asciz	"cannot query base state: %d\n"

	.comm	_cbas_ec_notify,4,2             ## @cbas_ec_notify
L_.str.3:                               ## @.str.3
	.asciz	"cannot register notifier: %d\n"

	.no_dead_strip	___cbas_ec_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __cbas_ec_probe
___cbas_ec_probe:                       ; @__cbas_ec_probe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	ldr	w0, [x0]
	bl	_dev_get_drvdata
	mov	x20, x0
	add	x2, sp, #12
	mov	w1, #0
	bl	_cbas_ec_query_base
	mov	x21, x0
	cbnz	w0, LBB0_11
; %bb.1:
	ldr	w8, [sp, #12]
	cbz	w8, LBB0_5
; %bb.2:
	mov	x0, x19
	bl	_devm_input_allocate_device
	cbz	x0, LBB0_6
; %bb.3:
	mov	x22, x0
Lloh0:
	adrp	x8, l_.str@PAGE
Lloh1:
	add	x8, x8, l_.str@PAGEOFF
	str	x8, [x0]
Lloh2:
	adrp	x8, _BUS_HOST@GOTPAGE
Lloh3:
	ldr	x8, [x8, _BUS_HOST@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	str	w8, [x0, #8]
Lloh5:
	adrp	x8, _EV_SW@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EV_SW@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	adrp	x24, _SW_TABLET_MODE@GOTPAGE
Lloh9:
	ldr	x24, [x24, _SW_TABLET_MODE@GOTPAGEOFF]
	ldr	w2, [x24]
	bl	_input_set_capability
	mov	x0, x22
	bl	_input_register_device
	cbz	w0, LBB0_8
; %bb.4:
	mov	x21, x0
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_10
LBB0_5:
Lloh12:
	adrp	x8, _ENXIO@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh14:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_11
LBB0_8:
Lloh16:
	adrp	x23, _cbas_ec@GOTPAGE
Lloh17:
	ldr	x23, [x23, _cbas_ec@GOTPAGEOFF]
	mov	x0, x20
	mov	w1, #1
	mov	x2, x23
	bl	_cbas_ec_query_base
	cbz	w0, LBB0_12
; %bb.9:
	mov	x21, x0
Lloh18:
	adrp	x1, l_.str.2@PAGE
Lloh19:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_10:
	mov	x0, x19
	mov	x2, x21
	bl	_dev_err
LBB0_11:
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_12:
	ldr	w1, [x24]
	ldr	w8, [x23]
	cmp	w8, #0
	cset	w2, eq
	mov	x0, x22
	bl	_input_report_switch
	mov	x0, x22
	bl	_cbas_ec_set_input
Lloh20:
	adrp	x8, _cbas_ec_notify@GOTPAGE
Lloh21:
	ldr	x8, [x8, _cbas_ec_notify@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	str	w8, [x23, #4]!
	stur	x19, [x23, #4]
	mov	x0, x20
	mov	x1, x23
	bl	_blocking_notifier_chain_register
	mov	x21, x0
	cbz	w0, LBB0_14
; %bb.13:
Lloh23:
	adrp	x1, l_.str.3@PAGE
Lloh24:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	bl	_dev_err
	mov	x0, #0
	bl	_cbas_ec_set_input
	b	LBB0_11
LBB0_14:
	mov	x0, x19
	mov	w1, #1
	bl	_device_init_wakeup
	b	LBB0_11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Whiskers Tablet Mode Switch"

	.comm	_BUS_HOST,4,2                   ; @BUS_HOST
	.comm	_EV_SW,4,2                      ; @EV_SW
	.comm	_SW_TABLET_MODE,4,2             ; @SW_TABLET_MODE
l_.str.1:                               ; @.str.1
	.asciz	"cannot register input device: %d\n"

	.comm	_cbas_ec,16,3                   ; @cbas_ec
l_.str.2:                               ; @.str.2
	.asciz	"cannot query base state: %d\n"

	.comm	_cbas_ec_notify,4,2             ; @cbas_ec_notify
l_.str.3:                               ; @.str.3
	.asciz	"cannot register notifier: %d\n"

	.no_dead_strip	___cbas_ec_probe
.subsections_via_symbols
