	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wacom_query_device
_wacom_query_device:                    ## @wacom_query_device
	.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	$120, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	%rsp, -152(%rbp)                ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_WACOM_CMD_QUERY0@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -64(%rbp)
	movq	_WACOM_CMD_QUERY1@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -60(%rbp)
	movq	_WACOM_CMD_QUERY2@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)
	movq	_WACOM_CMD_QUERY3@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -52(%rbp)
	movq	_WACOM_CMD_THROW0@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -72(%rbp)
	movq	_WACOM_CMD_THROW1@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -68(%rbp)
	movq	_WACOM_QUERY_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%rbx, %rax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	movl	$16, -144(%rbp)
	leaq	-64(%rbp), %rax
	movq	%rax, -136(%rbp)
	movl	$0, -128(%rbp)
	movl	8(%r15), %eax
	movl	%eax, -124(%rbp)
	movl	$8, -120(%rbp)
	leaq	-72(%rbp), %rcx
	movq	%rcx, -112(%rbp)
	movl	$0, -104(%rbp)
	movl	%eax, -100(%rbp)
	leal	(,%rbx,4), %ecx
	movl	%ecx, -96(%rbp)
	movq	%r12, -88(%rbp)
	movq	_I2C_M_RD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, -80(%rbp)
	movl	%eax, -76(%rbp)
	movl	4(%r15), %ebx
	leaq	-144(%rbp), %r13
	movq	%r13, %rdi
	callq	_ARRAY_SIZE
	movl	%ebx, %edi
	movq	%r13, %rsi
	movl	%eax, %edx
	callq	_i2c_transfer
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_4
## %bb.1:
	leaq	-144(%rbp), %rdi
	callq	_ARRAY_SIZE
	cmpl	%eax, %ebx
	jne	LBB0_2
## %bb.3:
	leaq	12(%r12), %rdi
	callq	_get_unaligned_le16
	movq	%rax, 24(%r14)
	leaq	20(%r12), %rdi
	callq	_get_unaligned_le16
	movq	%rax, 16(%r14)
	leaq	44(%r12), %rdi
	callq	_get_unaligned_le16
	movq	%rax, 8(%r14)
	addq	$52, %r12
	movq	%r12, %rdi
	callq	_get_unaligned_le16
	movq	%rax, (%r14)
	movq	24(%r14), %rdx
	movq	8(%r14), %r8
	movq	16(%r14), %rcx
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movq	%rax, %r9
	callq	_dev_dbg
	xorl	%ebx, %ebx
	jmp	LBB0_4
LBB0_2:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_4:
	movq	-152(%rbp), %rsp                ## 8-byte Reload
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_6
## %bb.5:
	movl	%ebx, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_WACOM_CMD_QUERY0,4,2           ## @WACOM_CMD_QUERY0
	.comm	_WACOM_CMD_QUERY1,4,2           ## @WACOM_CMD_QUERY1
	.comm	_WACOM_CMD_QUERY2,4,2           ## @WACOM_CMD_QUERY2
	.comm	_WACOM_CMD_QUERY3,4,2           ## @WACOM_CMD_QUERY3
	.comm	_WACOM_CMD_THROW0,4,2           ## @WACOM_CMD_THROW0
	.comm	_WACOM_CMD_THROW1,4,2           ## @WACOM_CMD_THROW1
	.comm	_WACOM_QUERY_SIZE,4,2           ## @WACOM_QUERY_SIZE
	.comm	_I2C_M_RD,4,2                   ## @I2C_M_RD
	.comm	_EIO,4,2                        ## @EIO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"x_max:%d, y_max:%d, pressure:%d, fw:%d\n"

	.no_dead_strip	_wacom_query_device
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wacom_query_device
_wacom_query_device:                    ; @wacom_query_device
	.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
	sub	sp, sp, #112
	mov	x20, x1
	mov	x19, x0
	mov	x22, sp
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
Lloh3:
	adrp	x8, _WACOM_CMD_QUERY0@GOTPAGE
Lloh4:
	ldr	x8, [x8, _WACOM_CMD_QUERY0@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _WACOM_CMD_QUERY1@GOTPAGE
Lloh7:
	ldr	x9, [x9, _WACOM_CMD_QUERY1@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
Lloh9:
	adrp	x10, _WACOM_CMD_QUERY2@GOTPAGE
Lloh10:
	ldr	x10, [x10, _WACOM_CMD_QUERY2@GOTPAGEOFF]
	stp	w8, w9, [x29, #-72]
Lloh11:
	ldr	w8, [x10]
Lloh12:
	adrp	x9, _WACOM_CMD_QUERY3@GOTPAGE
Lloh13:
	ldr	x9, [x9, _WACOM_CMD_QUERY3@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	stp	w8, w9, [x29, #-64]
Lloh15:
	adrp	x8, _WACOM_CMD_THROW0@GOTPAGE
Lloh16:
	ldr	x8, [x8, _WACOM_CMD_THROW0@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
Lloh18:
	adrp	x9, _WACOM_CMD_THROW1@GOTPAGE
Lloh19:
	ldr	x9, [x9, _WACOM_CMD_THROW1@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	stp	w8, w9, [x29, #-80]
Lloh21:
	adrp	x8, _WACOM_QUERY_SIZE@GOTPAGE
Lloh22:
	ldr	x8, [x8, _WACOM_QUERY_SIZE@GOTPAGEOFF]
Lloh23:
	ldr	w12, [x8]
	lsl	x8, x12, #2
	mov	x9, x8
Lloh24:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh25:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x23, x9, x8
	mov	sp, x23
	mov	w8, #16
	stur	w8, [x29, #-152]
	sub	x8, x29, #72
	stur	x8, [x29, #-144]
	mov	w9, #8
	sub	x8, x29, #80
	stur	x8, [x29, #-120]
	ldp	w21, w8, [x0, #4]
	stur	wzr, [x29, #-136]
	stp	w8, w9, [x29, #-132]
	stp	wzr, w8, [x29, #-112]
	lsl	w9, w12, #2
	stur	w9, [x29, #-104]
	stur	x23, [x29, #-96]
Lloh26:
	adrp	x9, _I2C_M_RD@GOTPAGE
Lloh27:
	ldr	x9, [x9, _I2C_M_RD@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
	stp	w9, w8, [x29, #-88]
	sub	x0, x29, #152
	bl	_ARRAY_SIZE
	mov	x2, x0
	sub	x1, x29, #152
	mov	x0, x21
	bl	_i2c_transfer
	mov	x21, x0
	tbnz	w0, #31, LBB0_4
; %bb.1:
	sub	x0, x29, #152
	bl	_ARRAY_SIZE
	cmp	w21, w0
	b.ne	LBB0_3
; %bb.2:
	add	x0, x23, #12
	bl	_get_unaligned_le16
	str	x0, [x20, #24]
	add	x0, x23, #20
	bl	_get_unaligned_le16
	str	x0, [x20, #16]
	add	x0, x23, #44
	bl	_get_unaligned_le16
	str	x0, [x20, #8]
	add	x0, x23, #52
	bl	_get_unaligned_le16
	mov	x5, x0
	str	x0, [x20]
	ldp	x3, x2, [x20, #16]
	ldr	x4, [x20, #8]
Lloh29:
	adrp	x1, l_.str@PAGE
Lloh30:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
	mov	w21, #0
	b	LBB0_4
LBB0_3:
Lloh31:
	adrp	x8, _EIO@GOTPAGE
Lloh32:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_4:
	mov	sp, x22
	ldur	x8, [x29, #-56]
Lloh34:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh35:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh36:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_6
; %bb.5:
	mov	x0, x21
	sub	sp, x29, #48
	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
LBB0_6:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.comm	_WACOM_CMD_QUERY0,4,2           ; @WACOM_CMD_QUERY0
	.comm	_WACOM_CMD_QUERY1,4,2           ; @WACOM_CMD_QUERY1
	.comm	_WACOM_CMD_QUERY2,4,2           ; @WACOM_CMD_QUERY2
	.comm	_WACOM_CMD_QUERY3,4,2           ; @WACOM_CMD_QUERY3
	.comm	_WACOM_CMD_THROW0,4,2           ; @WACOM_CMD_THROW0
	.comm	_WACOM_CMD_THROW1,4,2           ; @WACOM_CMD_THROW1
	.comm	_WACOM_QUERY_SIZE,4,2           ; @WACOM_QUERY_SIZE
	.comm	_I2C_M_RD,4,2                   ; @I2C_M_RD
	.comm	_EIO,4,2                        ; @EIO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"x_max:%d, y_max:%d, pressure:%d, fw:%d\n"

	.no_dead_strip	_wacom_query_device
.subsections_via_symbols
