	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function probe_maple_kbd
_probe_maple_kbd:                       ## @probe_maple_kbd
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_to_maple_dev
	movq	%rax, %r14
	movl	(%rbx), %edi
	callq	_to_maple_driver
	movq	%rax, %r15
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$16, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r12
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	callq	_input_allocate_device
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %rbx
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	%rax, 8(%r12)
	movl	(%r12), %edi
	movq	_dc_kbd_keycode@GOTPCREL(%rip), %r15
	movq	(%r15), %rsi
	movl	$4, %edx
	callq	_memcpy
	movl	12(%r14), %eax
	movl	%eax, 36(%rbx)
	movq	_EV_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT
	movl	%eax, %r13d
	movq	_EV_REP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT
	orl	%r13d, %eax
	movq	(%rbx), %rcx
	movl	%eax, (%rcx)
	movl	(%r12), %edi
	movl	%edi, 32(%rbx)
	movl	$2, 8(%rbx)
	callq	_ARRAY_SIZE
	movl	%eax, 28(%rbx)
	movq	_BUS_HOST@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rbx)
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	addq	$8, %r14
	movq	%r14, 16(%rbx)
	movq	_NR_SCANCODES@GOTPCREL(%rip), %r13
	cmpl	$0, (%r13)
	jle	LBB0_7
## %bb.5:
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rax
	movl	(%rax,%r14,4), %edi
	movl	12(%rbx), %esi
	callq	___set_bit
	incq	%r14
	movslq	(%r13), %rax
	cmpq	%rax, %r14
	jl	LBB0_6
LBB0_7:
	movq	_KEY_RESERVED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	12(%rbx), %esi
	callq	___clear_bit
	movq	_EV_MSC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MSC_SCAN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_input_set_capability
	movq	%rbx, %rdi
	callq	_input_register_device
	testl	%eax, %eax
	je	LBB0_8
## %bb.9:
	movl	%eax, %r13d
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	xorl	%esi, %esi
	callq	_maple_set_drvdata
	movq	%rbx, %rdi
	callq	_input_free_device
	jmp	LBB0_10
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	jmp	LBB0_11
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r13d
LBB0_10:
	movq	%r12, %rdi
	callq	_kfree
	jmp	LBB0_11
LBB0_8:
	movq	_dc_kbd_callback@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_HZ@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	imulq	$1374389535, %rax, %rdx         ## imm = 0x51EB851F
	movq	%rdx, %rax
	shrq	$63, %rax
	sarq	$36, %rdx
	addl	%eax, %edx
	movq	_MAPLE_FUNC_KEYBOARD@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_maple_getcond_callback
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, (%rbx)
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_maple_set_drvdata
	xorl	%r13d, %r13d
LBB0_11:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_dc_kbd_keycode,8,3             ## @dc_kbd_keycode
	.comm	_EV_KEY,4,2                     ## @EV_KEY
	.comm	_EV_REP,4,2                     ## @EV_REP
	.comm	_BUS_HOST,4,2                   ## @BUS_HOST
	.comm	_NR_SCANCODES,4,2               ## @NR_SCANCODES
	.comm	_KEY_RESERVED,4,2               ## @KEY_RESERVED
	.comm	_EV_MSC,4,2                     ## @EV_MSC
	.comm	_MSC_SCAN,4,2                   ## @MSC_SCAN
	.comm	_dc_kbd_callback,4,2            ## @dc_kbd_callback
	.comm	_HZ,4,2                         ## @HZ
	.comm	_MAPLE_FUNC_KEYBOARD,4,2        ## @MAPLE_FUNC_KEYBOARD
	.no_dead_strip	_probe_maple_kbd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function probe_maple_kbd
_probe_maple_kbd:                       ; @probe_maple_kbd
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	bl	_to_maple_dev
	mov	x20, x0
	ldr	w0, [x19]
	bl	_to_maple_driver
	mov	x21, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #16
	bl	_kzalloc
	cbz	x0, LBB0_7
; %bb.1:
	mov	x19, x0
	bl	_input_allocate_device
	cbz	x0, LBB0_8
; %bb.2:
	mov	x22, x0
	str	x0, [x19, #8]
	ldr	w0, [x19]
Lloh3:
	adrp	x24, _dc_kbd_keycode@GOTPAGE
Lloh4:
	ldr	x24, [x24, _dc_kbd_keycode@GOTPAGEOFF]
	ldr	x1, [x24]
	mov	w2, #4
	bl	_memcpy
	ldr	w8, [x20, #12]
	str	w8, [x22, #36]
Lloh5:
	adrp	x8, _EV_KEY@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EV_KEY@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	bl	_BIT
	mov	x23, x0
Lloh8:
	adrp	x8, _EV_REP@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EV_REP@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	bl	_BIT
	orr	w8, w0, w23
	ldr	x9, [x22]
	str	w8, [x9]
	ldr	w0, [x19]
	str	w0, [x22, #32]
	mov	w8, #2
	str	w8, [x22, #8]
	bl	_ARRAY_SIZE
Lloh11:
	adrp	x8, _BUS_HOST@GOTPAGE
Lloh12:
	ldr	x8, [x8, _BUS_HOST@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	stp	w8, w0, [x22, #24]
	add	x8, x20, #8
	str	x8, [x22, #16]
Lloh14:
	adrp	x23, _NR_SCANCODES@GOTPAGE
Lloh15:
	ldr	x23, [x23, _NR_SCANCODES@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.3:
	mov	x25, #0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x24]
	ldr	w0, [x8, x25, lsl #2]
	ldr	w1, [x22, #12]
	bl	___set_bit
	add	x25, x25, #1
	ldrsw	x8, [x23]
	cmp	x25, x8
	b.lt	LBB0_4
LBB0_5:
Lloh16:
	adrp	x8, _KEY_RESERVED@GOTPAGE
Lloh17:
	ldr	x8, [x8, _KEY_RESERVED@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	ldr	w1, [x22, #12]
	bl	___clear_bit
Lloh19:
	adrp	x8, _EV_MSC@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EV_MSC@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
Lloh22:
	adrp	x8, _MSC_SCAN@GOTPAGE
Lloh23:
	ldr	x8, [x8, _MSC_SCAN@GOTPAGEOFF]
Lloh24:
	ldr	w2, [x8]
	mov	x0, x22
	bl	_input_set_capability
	mov	x0, x22
	bl	_input_register_device
	mov	x23, x0
	cbz	w0, LBB0_10
; %bb.6:
	mov	x0, x20
	mov	x1, #0
	bl	_maple_set_drvdata
	mov	x0, x22
	bl	_input_free_device
	b	LBB0_9
LBB0_7:
Lloh25:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh26:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_11
LBB0_8:
Lloh28:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh29:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_9:
	mov	x0, x19
	bl	_kfree
	b	LBB0_11
LBB0_10:
Lloh31:
	adrp	x8, _dc_kbd_callback@GOTPAGE
Lloh32:
	ldr	x8, [x8, _dc_kbd_callback@GOTPAGEOFF]
Lloh33:
	ldr	w1, [x8]
Lloh34:
	adrp	x8, _HZ@GOTPAGE
Lloh35:
	ldr	x8, [x8, _HZ@GOTPAGEOFF]
Lloh36:
	ldrsw	x8, [x8]
	mov	w9, #34079
	movk	w9, #20971, lsl #16
	mul	x8, x8, x9
	lsr	x9, x8, #63
	asr	x8, x8, #36
	add	w2, w8, w9
Lloh37:
	adrp	x8, _MAPLE_FUNC_KEYBOARD@GOTPAGE
Lloh38:
	ldr	x8, [x8, _MAPLE_FUNC_KEYBOARD@GOTPAGEOFF]
Lloh39:
	ldr	w3, [x8]
	mov	x0, x20
	bl	_maple_getcond_callback
	str	x21, [x20]
	mov	x0, x20
	mov	x1, x19
	bl	_maple_set_drvdata
LBB0_11:
	mov	x0, x23
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_dc_kbd_keycode,8,3             ; @dc_kbd_keycode
	.comm	_EV_KEY,4,2                     ; @EV_KEY
	.comm	_EV_REP,4,2                     ; @EV_REP
	.comm	_BUS_HOST,4,2                   ; @BUS_HOST
	.comm	_NR_SCANCODES,4,2               ; @NR_SCANCODES
	.comm	_KEY_RESERVED,4,2               ; @KEY_RESERVED
	.comm	_EV_MSC,4,2                     ; @EV_MSC
	.comm	_MSC_SCAN,4,2                   ; @MSC_SCAN
	.comm	_dc_kbd_callback,4,2            ; @dc_kbd_callback
	.comm	_HZ,4,2                         ; @HZ
	.comm	_MAPLE_FUNC_KEYBOARD,4,2        ; @MAPLE_FUNC_KEYBOARD
	.no_dead_strip	_probe_maple_kbd
.subsections_via_symbols
