	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function surface3_spi_report_pen
_surface3_spi_report_pen:               ## @surface3_spi_report_pen
	.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, %r12
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movl	(%rsi), %ebx
	movq	_BTN_TOOL_PEN@GOTPCREL(%rip), %rax
	movq	%rax, %rcx
	testb	$24, %bl
	je	LBB0_2
## %bb.1:
	movq	_BTN_TOOL_RUBBER@GOTPCREL(%rip), %rcx
LBB0_2:
	movl	%ebx, %r13d
	andl	$1, %r13d
	testb	$1, %bl
	cmovneq	%rcx, %rax
	movq	8(%r12), %r15
	movl	(%rax), %r14d
	movl	(%r12), %esi
	cmpl	%r14d, %esi
	je	LBB0_4
## %bb.3:
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_input_report_key
	movq	%r15, %rdi
	callq	_input_sync
	movl	%r14d, (%r12)
LBB0_4:
	movq	_BTN_TOUCH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edx
	andl	$18, %edx
	movq	%r15, %rdi
	callq	_input_report_key
	movl	(%r12), %esi
	movq	%r15, %rdi
	movl	%r13d, %edx
	callq	_input_report_key
	testl	%ebx, %ebx
	je	LBB0_5
## %bb.6:
	movq	_BTN_STYLUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	andl	$4, %ebx
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_input_report_key
	movq	_ABS_X@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	leaq	12(%rbx), %rdi
	callq	_get_unaligned_le16
	movq	%r15, %rdi
	movl	%r14d, %esi
	movl	%eax, %edx
	callq	_input_report_abs
	movq	_ABS_Y@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	leaq	8(%rbx), %rdi
	callq	_get_unaligned_le16
	movq	%r15, %rdi
	movl	%r14d, %esi
	movl	%eax, %edx
	callq	_input_report_abs
	movq	_ABS_PRESSURE@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	addq	$4, %rbx
	movq	%rbx, %rdi
	callq	_get_unaligned_le16
	movq	%r15, %rdi
	movl	%r14d, %esi
	movl	%eax, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_input_report_abs               ## TAILCALL
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BTN_TOOL_RUBBER,4,2            ## @BTN_TOOL_RUBBER
	.comm	_BTN_TOOL_PEN,4,2               ## @BTN_TOOL_PEN
	.comm	_BTN_TOUCH,4,2                  ## @BTN_TOUCH
	.comm	_BTN_STYLUS,4,2                 ## @BTN_STYLUS
	.comm	_ABS_X,4,2                      ## @ABS_X
	.comm	_ABS_Y,4,2                      ## @ABS_Y
	.comm	_ABS_PRESSURE,4,2               ## @ABS_PRESSURE
	.no_dead_strip	_surface3_spi_report_pen
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function surface3_spi_report_pen
_surface3_spi_report_pen:               ; @surface3_spi_report_pen
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x20, x1
	mov	x21, x0
	ldr	x19, [x0, #8]
	ldr	w23, [x1]
	and	w22, w23, #0x1
	tst	w23, #0x18
Lloh0:
	adrp	x8, _BTN_TOOL_RUBBER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BTN_TOOL_RUBBER@GOTPAGEOFF]
Lloh2:
	adrp	x9, _BTN_TOOL_PEN@GOTPAGE
Lloh3:
	ldr	x9, [x9, _BTN_TOOL_PEN@GOTPAGEOFF]
	cset	w10, ne
	tst	w23, w10
	csel	x8, x8, x9, ne
	ldr	w24, [x8]
	ldr	w1, [x0]
	cmp	w1, w24
	b.eq	LBB0_2
; %bb.1:
	mov	x0, x19
	mov	w2, #0
	bl	_input_report_key
	mov	x0, x19
	bl	_input_sync
	str	w24, [x21]
LBB0_2:
Lloh4:
	adrp	x8, _BTN_TOUCH@GOTPAGE
Lloh5:
	ldr	x8, [x8, _BTN_TOUCH@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	mov	w8, #18
	and	w2, w23, w8
	mov	x0, x19
	bl	_input_report_key
	ldr	w1, [x21]
	mov	x0, x19
	mov	x2, x22
	bl	_input_report_key
	cbz	w23, LBB0_4
; %bb.3:
Lloh7:
	adrp	x8, _BTN_STYLUS@GOTPAGE
Lloh8:
	ldr	x8, [x8, _BTN_STYLUS@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	and	w2, w23, #0x4
	mov	x0, x19
	bl	_input_report_key
Lloh10:
	adrp	x8, _ABS_X@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ABS_X@GOTPAGEOFF]
Lloh12:
	ldr	w21, [x8]
	add	x0, x20, #12
	bl	_get_unaligned_le16
	mov	x2, x0
	mov	x0, x19
	mov	x1, x21
	bl	_input_report_abs
Lloh13:
	adrp	x8, _ABS_Y@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ABS_Y@GOTPAGEOFF]
Lloh15:
	ldr	w21, [x8]
	add	x0, x20, #8
	bl	_get_unaligned_le16
	mov	x2, x0
	mov	x0, x19
	mov	x1, x21
	bl	_input_report_abs
Lloh16:
	adrp	x8, _ABS_PRESSURE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ABS_PRESSURE@GOTPAGEOFF]
Lloh18:
	ldr	w21, [x8]
	add	x0, x20, #4
	bl	_get_unaligned_le16
	mov	x2, x0
	mov	x0, x19
	mov	x1, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_input_report_abs
LBB0_4:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_BTN_TOOL_RUBBER,4,2            ; @BTN_TOOL_RUBBER
	.comm	_BTN_TOOL_PEN,4,2               ; @BTN_TOOL_PEN
	.comm	_BTN_TOUCH,4,2                  ; @BTN_TOUCH
	.comm	_BTN_STYLUS,4,2                 ; @BTN_STYLUS
	.comm	_ABS_X,4,2                      ; @ABS_X
	.comm	_ABS_Y,4,2                      ; @ABS_Y
	.comm	_ABS_PRESSURE,4,2               ; @ABS_PRESSURE
	.no_dead_strip	_surface3_spi_report_pen
.subsections_via_symbols
