	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wacom_wac_pen_serial_enforce
_wacom_wac_pen_serial_enforce:          ## @wacom_wac_pen_serial_enforce
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r14d
	movq	%rdx, %r12
	movq	%rsi, %rbx
	movq	%rdi, %r15
	callq	_hid_get_drvdata
	movq	%rax, %rdx
	movq	(%rax), %rcx
	xorl	%eax, %eax
	cmpl	$0, (%rcx)
	jne	LBB0_27
## %bb.1:
	movq	_WACOM_QUIRK_TOOLSERIAL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, 20(%rdx)
	je	LBB0_27
## %bb.2:
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movl	(%rbx), %ecx
	movb	$1, %dl
	testl	%ecx, %ecx
	jle	LBB0_3
## %bb.4:
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movl	%r14d, -68(%rbp)                ## 4-byte Spill
	movq	%r12, -80(%rbp)                 ## 8-byte Spill
	leaq	4(%r12), %rax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	addq	$8, %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movq	8(%rbx), %rax
	xorl	%r12d, %r12d
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	movl	$0, -48(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	(%rbx), %ecx
LBB0_19:                                ##   in Loop: Header=BB0_5 Depth=1
	incq	%r12
	movslq	%ecx, %rdx
	cmpq	%rdx, %r12
	jge	LBB0_20
LBB0_5:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_7 Depth 2
	movq	(%rax,%r12,8), %r13
	cmpl	$0, (%r13)
	jle	LBB0_19
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	xorl	%r14d, %r14d
	jmp	LBB0_7
LBB0_10:                                ##   in Loop: Header=BB0_7 Depth=2
	movl	$1, -48(%rbp)                   ## 4-byte Folded Spill
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_7 Depth=2
	incq	%r14
	movq	8(%rbx), %rax
	movq	(%rax,%r12,8), %r13
	movslq	(%r13), %rcx
	cmpq	%rcx, %r14
	jge	LBB0_18
LBB0_7:                                 ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	16(%r13), %rax
	movl	(%rax,%r14,4), %edi
	callq	_wacom_equivalent_usage
	movl	%eax, %r15d
	leal	-131(%r15), %eax
	cmpl	$-4, %eax
	ja	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=2
	movq	_HID_DG_INRANGE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jne	LBB0_17
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=2
	movl	8(%r13), %ecx
	movl	%r14d, %edx
	imull	%ecx, %edx
	addl	4(%r13), %edx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	-96(%rbp), %rsi                 ## 8-byte Reload
	callq	_hid_field_extract
	xorl	%ecx, %ecx
	testl	%eax, %eax
	sete	%cl
	movq	_HID_DG_INRANGE@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %r15d
	cmovnel	%eax, %ecx
	testl	%ecx, %ecx
	je	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_7 Depth=2
	cmpl	$130, %r15d
	je	LBB0_12
## %bb.13:                              ##   in Loop: Header=BB0_7 Depth=2
	cmpl	$128, %r15d
	jne	LBB0_14
## %bb.15:                              ##   in Loop: Header=BB0_7 Depth=2
	movl	$1, -44(%rbp)                   ## 4-byte Folded Spill
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	jmp	LBB0_16
LBB0_12:                                ##   in Loop: Header=BB0_7 Depth=2
	movl	$1, -44(%rbp)                   ## 4-byte Folded Spill
	movq	-56(%rbp), %rax                 ## 8-byte Reload
LBB0_16:                                ##   in Loop: Header=BB0_7 Depth=2
	movq	(%rax), %rax
	movl	%ecx, (%rax)
	jmp	LBB0_17
LBB0_14:                                ##   in Loop: Header=BB0_7 Depth=2
	movl	$1, -44(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_17
LBB0_20:
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_22
## %bb.21:
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	addq	$16, %rsi
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_wacom_wac_queue_flush
	xorl	%edx, %edx
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	jmp	LBB0_26
LBB0_3:
	xorl	%eax, %eax
	jmp	LBB0_26
LBB0_22:
	cmpl	$0, -48(%rbp)                   ## 4-byte Folded Reload
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	je	LBB0_23
## %bb.24:
	addq	$16, %rsi
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	movl	-68(%rbp), %ecx                 ## 4-byte Reload
	callq	_wacom_wac_queue_insert
	movl	$1, %eax
	jmp	LBB0_25
LBB0_23:
	xorl	%eax, %eax
LBB0_25:
	movb	$1, %dl
LBB0_26:
	testl	%eax, %eax
	setne	%al
	andb	%dl, %al
	movzbl	%al, %eax
LBB0_27:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WACOM_QUIRK_TOOLSERIAL,4,2     ## @WACOM_QUIRK_TOOLSERIAL
	.comm	_HID_DG_INRANGE,4,2             ## @HID_DG_INRANGE
	.no_dead_strip	_wacom_wac_pen_serial_enforce
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wacom_wac_pen_serial_enforce
_wacom_wac_pen_serial_enforce:          ; @wacom_wac_pen_serial_enforce
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x3
	mov	x22, x2
	mov	x23, x1
	mov	x21, x0
	bl	_hid_get_drvdata
	ldr	x8, [x0]
	ldr	w8, [x8]
	cbz	w8, LBB0_2
LBB0_1:
	mov	w0, #0
	b	LBB0_26
LBB0_2:
	ldr	w8, [x0, #20]
Lloh0:
	adrp	x9, _WACOM_QUIRK_TOOLSERIAL@GOTPAGE
Lloh1:
	ldr	x9, [x9, _WACOM_QUIRK_TOOLSERIAL@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_1
; %bb.3:
	ldr	w9, [x23]
	cmp	w9, #1
	b.lt	LBB0_21
; %bb.4:
	str	w19, [sp, #12]                  ; 4-byte Folded Spill
	mov	x27, #0
	mov	w20, #0
	mov	w26, #0
	str	x22, [sp]                       ; 8-byte Folded Spill
	add	x24, x22, #4
	ldr	x8, [x23, #8]
	add	x10, x0, #8
	stp	x10, x0, [sp, #16]              ; 16-byte Folded Spill
Lloh3:
	adrp	x19, _HID_DG_INRANGE@GOTPAGE
Lloh4:
	ldr	x19, [x19, _HID_DG_INRANGE@GOTPAGEOFF]
	b	LBB0_7
LBB0_5:                                 ;   in Loop: Header=BB0_7 Depth=1
	ldr	w9, [x23]
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	x27, x27, #1
	cmp	x27, w9, sxtw
	b.ge	LBB0_19
LBB0_7:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_11 Depth 2
	ldr	x22, [x8, x27, lsl #3]
	ldr	w10, [x22]
	cmp	w10, #1
	b.lt	LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x28, #0
	b	LBB0_11
LBB0_9:                                 ;   in Loop: Header=BB0_11 Depth=2
	mov	w26, #1
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=2
	add	x28, x28, #1
	ldr	x8, [x23, #8]
	ldr	x22, [x8, x27, lsl #3]
	ldrsw	x9, [x22]
	cmp	x28, x9
	b.ge	LBB0_5
LBB0_11:                                ;   Parent Loop BB0_7 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x22, #16]
	ldr	w0, [x8, x28, lsl #2]
	bl	_wacom_equivalent_usage
	ldr	w8, [x19]
	sub	w9, w0, #131
	cmn	w9, #4
	ccmp	w0, w8, #4, ls
	b.ne	LBB0_10
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=2
	mov	x25, x0
	ldp	w8, w3, [x22, #4]
	madd	w2, w3, w28, w8
	mov	x0, x21
	mov	x1, x24
	bl	_hid_field_extract
	ldr	w8, [x19]
	cmp	w0, #0
	cset	w9, eq
	cmp	w25, w8
	csel	w8, w9, w0, eq
	cbz	w8, LBB0_9
; %bb.13:                               ;   in Loop: Header=BB0_11 Depth=2
	cmp	w25, #130
	b.eq	LBB0_16
; %bb.14:                               ;   in Loop: Header=BB0_11 Depth=2
	cmp	w25, #128
	b.ne	LBB0_18
; %bb.15:                               ;   in Loop: Header=BB0_11 Depth=2
	ldr	x9, [sp, #16]                   ; 8-byte Folded Reload
	b	LBB0_17
LBB0_16:                                ;   in Loop: Header=BB0_11 Depth=2
	ldr	x9, [sp, #24]                   ; 8-byte Folded Reload
LBB0_17:                                ;   in Loop: Header=BB0_11 Depth=2
	ldr	x9, [x9]
	str	w8, [x9]
LBB0_18:                                ;   in Loop: Header=BB0_11 Depth=2
	mov	w20, #1
	b	LBB0_10
LBB0_19:
	cbz	w20, LBB0_23
; %bb.20:
	ldr	x8, [sp, #24]                   ; 8-byte Folded Reload
	add	x1, x8, #16
	mov	x0, x21
	bl	_wacom_wac_queue_flush
	mov	w8, #0
	b	LBB0_25
LBB0_21:
	mov	w26, #0
LBB0_22:
	mov	w8, #1
	b	LBB0_25
LBB0_23:
	cbz	w26, LBB0_22
; %bb.24:
	ldr	x8, [sp, #24]                   ; 8-byte Folded Reload
	add	x1, x8, #16
	mov	x0, x21
	ldr	x2, [sp]                        ; 8-byte Folded Reload
	ldr	w3, [sp, #12]                   ; 4-byte Folded Reload
	bl	_wacom_wac_queue_insert
	mov	w8, #1
	mov	w26, #1
LBB0_25:
	cmp	w26, #0
	cset	w9, ne
	and	w0, w9, w8
LBB0_26:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_WACOM_QUIRK_TOOLSERIAL,4,2     ; @WACOM_QUIRK_TOOLSERIAL
	.comm	_HID_DG_INRANGE,4,2             ; @HID_DG_INRANGE
	.no_dead_strip	_wacom_wac_pen_serial_enforce
.subsections_via_symbols
