	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wacom_query_tablet_data
_wacom_query_tablet_data:               ## @wacom_query_tablet_data
	.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	%rsi, %r12
	movq	%rdi, %r14
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$4, %edi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_20
## %bb.1:
	movq	%rax, %r15
	movq	(%r12), %rax
	movq	_TABLETPC2FG@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
## %bb.2:
	xorl	%r12d, %r12d
	movq	_WAC_HID_FEATURE_REPORT@GOTPCREL(%rip), %r13
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	%eax, %ebx
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$4, %r12d
	ja	LBB0_15
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	incl	%r12d
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	$1027, (%r15)                   ## imm = 0x403
	movl	(%r13), %esi
	movq	%r14, %rdi
	movl	$3, %edx
	movq	%r15, %rcx
	movl	$4, %r8d
	movl	$1, %r9d
	callq	_wacom_set_report
	testl	%eax, %eax
	js	LBB0_4
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	(%r13), %esi
	movq	%r14, %rdi
	movl	$3, %edx
	movq	%r15, %rcx
	movl	$4, %r8d
	movl	$1, %r9d
	callq	_wacom_get_report
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_5
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpb	$4, 1(%r15)
	je	LBB0_15
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$5, %r12d
	jb	LBB0_9
	jmp	LBB0_15
LBB0_20:
	movl	%ebx, %eax
	jmp	LBB0_21
LBB0_10:
	movq	_TABLETPC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_11
LBB0_15:
	movq	%r15, %rdi
	callq	_kfree
	movl	%ebx, %eax
	sarl	$31, %eax
	andl	%ebx, %eax
LBB0_21:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	xorl	%r12d, %r12d
	movq	_WAC_HID_FEATURE_REPORT@GOTPCREL(%rip), %r13
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_12 Depth=1
	movl	%eax, %ebx
LBB0_14:                                ##   in Loop: Header=BB0_12 Depth=1
	cmpl	$4, %r12d
	ja	LBB0_15
LBB0_19:                                ##   in Loop: Header=BB0_12 Depth=1
	incl	%r12d
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movw	$514, (%r15)                    ## imm = 0x202
	movl	(%r13), %esi
	movq	%r14, %rdi
	movl	$2, %edx
	movq	%r15, %rcx
	movl	$2, %r8d
	movl	$1, %r9d
	callq	_wacom_set_report
	testl	%eax, %eax
	js	LBB0_13
## %bb.16:                              ##   in Loop: Header=BB0_12 Depth=1
	movl	(%r13), %esi
	movq	%r14, %rdi
	movl	$2, %edx
	movq	%r15, %rcx
	movl	$2, %r8d
	movl	$1, %r9d
	callq	_wacom_get_report
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_14
## %bb.17:                              ##   in Loop: Header=BB0_12 Depth=1
	cmpb	$2, 1(%r15)
	je	LBB0_15
## %bb.18:                              ##   in Loop: Header=BB0_12 Depth=1
	cmpl	$5, %r12d
	jb	LBB0_19
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_TABLETPC2FG,8,3                ## @TABLETPC2FG
	.comm	_WAC_HID_FEATURE_REPORT,4,2     ## @WAC_HID_FEATURE_REPORT
	.comm	_TABLETPC,8,3                   ## @TABLETPC
	.no_dead_strip	_wacom_query_tablet_data
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wacom_query_tablet_data
_wacom_query_tablet_data:               ; @wacom_query_tablet_data
	.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	x22, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w21, w8
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	w0, #4
	bl	_kmalloc
	cbz	x0, LBB0_10
; %bb.1:
	mov	x20, x0
	ldr	x8, [x22]
Lloh6:
	adrp	x9, _TABLETPC2FG@GOTPAGE
Lloh7:
	ldr	x9, [x9, _TABLETPC2FG@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.2:
	mov	w22, #0
	mov	w23, #1027
Lloh9:
	adrp	x24, _WAC_HID_FEATURE_REPORT@GOTPAGE
Lloh10:
	ldr	x24, [x24, _WAC_HID_FEATURE_REPORT@GOTPAGEOFF]
	b	LBB0_6
LBB0_3:                                 ;   in Loop: Header=BB0_6 Depth=1
	mov	x21, x0
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	cmp	w22, #4
	b.hi	LBB0_19
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	w22, w22, #1
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	str	w23, [x20]
	ldr	w1, [x24]
	mov	x0, x19
	mov	w2, #3
	mov	x3, x20
	mov	w4, #4
	mov	w5, #1
	bl	_wacom_set_report
	tbnz	w0, #31, LBB0_3
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w1, [x24]
	mov	x0, x19
	mov	w2, #3
	mov	x3, x20
	mov	w4, #4
	mov	w5, #1
	bl	_wacom_get_report
	mov	x21, x0
	tbnz	w0, #31, LBB0_4
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	ldrb	w8, [x20, #1]
	cmp	w8, #4
	b.eq	LBB0_19
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	cmp	w22, #5
	b.lo	LBB0_5
	b	LBB0_19
LBB0_10:
	mov	x0, x21
	b	LBB0_20
LBB0_11:
Lloh11:
	adrp	x9, _TABLETPC@GOTPAGE
Lloh12:
	ldr	x9, [x9, _TABLETPC@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_19
; %bb.12:
	mov	w22, #0
	mov	w23, #514
Lloh14:
	adrp	x24, _WAC_HID_FEATURE_REPORT@GOTPAGE
Lloh15:
	ldr	x24, [x24, _WAC_HID_FEATURE_REPORT@GOTPAGEOFF]
	b	LBB0_15
LBB0_13:                                ;   in Loop: Header=BB0_15 Depth=1
	ldrb	w8, [x20, #1]
	cmp	w8, #2
	ccmp	w22, #5, #2, ne
	b.hs	LBB0_19
LBB0_14:                                ;   in Loop: Header=BB0_15 Depth=1
	add	w22, w22, #1
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	strh	w23, [x20]
	ldr	w1, [x24]
	mov	x0, x19
	mov	w2, #2
	mov	x3, x20
	mov	w4, #2
	mov	w5, #1
	bl	_wacom_set_report
	tbnz	w0, #31, LBB0_18
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	ldr	w1, [x24]
	mov	x0, x19
	mov	w2, #2
	mov	x3, x20
	mov	w4, #2
	mov	w5, #1
	bl	_wacom_get_report
	mov	x21, x0
	tbz	w0, #31, LBB0_13
; %bb.17:                               ;   in Loop: Header=BB0_15 Depth=1
	cmp	w22, #4
	b.ls	LBB0_14
	b	LBB0_19
LBB0_18:                                ;   in Loop: Header=BB0_15 Depth=1
	mov	x21, x0
	cmp	w22, #4
	b.ls	LBB0_14
LBB0_19:
	mov	x0, x20
	bl	_kfree
	cmp	w21, #0
	csel	w0, w21, wzr, lt
LBB0_20:
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_TABLETPC2FG,8,3                ; @TABLETPC2FG
	.comm	_WAC_HID_FEATURE_REPORT,4,2     ; @WAC_HID_FEATURE_REPORT
	.comm	_TABLETPC,8,3                   ; @TABLETPC
	.no_dead_strip	_wacom_query_tablet_data
.subsections_via_symbols
