	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wacom_wireless_irq
_wacom_wireless_irq:                    ## @wacom_wireless_irq
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_WACOM_PKGLEN_WIRELESS@GOTPCREL(%rip), %rax
	cmpq	%rsi, (%rax)
	jne	LBB0_14
## %bb.1:
	movq	%rdi, %r15
	movq	(%rdi), %rbx
	movb	(%rbx), %al
	movq	_WACOM_REPORT_WL@GOTPCREL(%rip), %rcx
	cmpb	(%rcx), %al
	jne	LBB0_14
## %bb.2:
	testb	$1, 1(%rbx)
	jne	LBB0_3
## %bb.11:
	cmpl	$0, 8(%r15)
	je	LBB0_14
## %bb.12:
	movl	$0, 8(%r15)
	movq	_WACOM_WORKER_WIRELESS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_wacom_schedule_work
	movq	_POWER_SUPPLY_STATUS_UNKNOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	jmp	LBB0_13
LBB0_3:
	movq	16(%r15), %rax
	movq	(%rax), %rcx
	movq	_INTUOSHT@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_5
## %bb.4:
	movq	_INTUOSHT2@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_8
LBB0_5:
	movq	8(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.6:
	cmpq	$0, 16(%rax)
	je	LBB0_8
## %bb.7:
	movq	_SW_MUTE_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzbl	5(%rbx), %edx
	andl	$64, %edx
	callq	_input_report_switch
	movq	16(%r15), %rax
	movq	8(%rax), %rdi
	callq	_input_sync
LBB0_8:
	leaq	6(%rbx), %rdi
	callq	_get_unaligned_be16
	movzbl	5(%rbx), %r14d
	movl	%r14d, %ecx
	andl	$63, %ecx
	imull	$100, %ecx, %ecx
	imull	$2115, %ecx, %edx               ## imm = 0x843
	shrl	$16, %edx
	subl	%edx, %ecx
	movzwl	%cx, %ebx
	shrl	%ebx
	addl	%edx, %ebx
	shrl	$4, %ebx
	shrl	$7, %r14d
	cmpl	%eax, 8(%r15)
	je	LBB0_10
## %bb.9:
	movl	%eax, 8(%r15)
	movq	_WACOM_WORKER_WIRELESS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_wacom_schedule_work
LBB0_10:
	movq	_WACOM_POWER_SUPPLY_STATUS_AUTO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	%ebx, %edx
	movl	%r14d, %ecx
	movl	$1, %r8d
LBB0_13:
	xorl	%r9d, %r9d
	callq	_wacom_notify_battery
LBB0_14:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WACOM_PKGLEN_WIRELESS,8,3      ## @WACOM_PKGLEN_WIRELESS
	.comm	_WACOM_REPORT_WL,1,0            ## @WACOM_REPORT_WL
	.comm	_INTUOSHT,8,3                   ## @INTUOSHT
	.comm	_INTUOSHT2,8,3                  ## @INTUOSHT2
	.comm	_SW_MUTE_DEVICE,4,2             ## @SW_MUTE_DEVICE
	.comm	_WACOM_WORKER_WIRELESS,4,2      ## @WACOM_WORKER_WIRELESS
	.comm	_WACOM_POWER_SUPPLY_STATUS_AUTO,4,2 ## @WACOM_POWER_SUPPLY_STATUS_AUTO
	.comm	_POWER_SUPPLY_STATUS_UNKNOWN,4,2 ## @POWER_SUPPLY_STATUS_UNKNOWN
	.no_dead_strip	_wacom_wireless_irq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wacom_wireless_irq
_wacom_wireless_irq:                    ; @wacom_wireless_irq
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
Lloh0:
	adrp	x8, _WACOM_PKGLEN_WIRELESS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WACOM_PKGLEN_WIRELESS@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x1
	b.ne	LBB0_13
; %bb.1:
	mov	x19, x0
	ldr	x20, [x0]
	ldrb	w8, [x20]
Lloh3:
	adrp	x9, _WACOM_REPORT_WL@GOTPAGE
Lloh4:
	ldr	x9, [x9, _WACOM_REPORT_WL@GOTPAGEOFF]
	ldrb	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_13
; %bb.2:
	ldrb	w8, [x20, #1]
	tbnz	w8, #0, LBB0_5
; %bb.3:
	ldr	w8, [x19, #8]
	cbz	w8, LBB0_13
; %bb.4:
	str	wzr, [x19, #8]
Lloh5:
	adrp	x8, _WACOM_WORKER_WIRELESS@GOTPAGE
Lloh6:
	ldr	x8, [x8, _WACOM_WORKER_WIRELESS@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_wacom_schedule_work
Lloh8:
	adrp	x8, _POWER_SUPPLY_STATUS_UNKNOWN@GOTPAGE
Lloh9:
	ldr	x8, [x8, _POWER_SUPPLY_STATUS_UNKNOWN@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	mov	w3, #0
	mov	w4, #0
	b	LBB0_12
LBB0_5:
	ldr	x8, [x19, #16]
	ldr	x9, [x8]
Lloh11:
	adrp	x10, _INTUOSHT@GOTPAGE
Lloh12:
	ldr	x10, [x10, _INTUOSHT@GOTPAGEOFF]
Lloh13:
	ldr	x10, [x10]
Lloh14:
	adrp	x11, _INTUOSHT2@GOTPAGE
Lloh15:
	ldr	x11, [x11, _INTUOSHT2@GOTPAGEOFF]
Lloh16:
	ldr	x11, [x11]
	cmp	x9, x10
	ccmp	x9, x11, #4, ne
	b.ne	LBB0_9
; %bb.6:
	ldr	x0, [x8, #8]
	cbz	x0, LBB0_9
; %bb.7:
	ldr	x8, [x8, #16]
	cbz	x8, LBB0_9
; %bb.8:
Lloh17:
	adrp	x8, _SW_MUTE_DEVICE@GOTPAGE
Lloh18:
	ldr	x8, [x8, _SW_MUTE_DEVICE@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	ldrb	w8, [x20, #5]
	and	w2, w8, #0x40
	bl	_input_report_switch
	ldr	x8, [x19, #16]
	ldr	x0, [x8, #8]
	bl	_input_sync
LBB0_9:
	add	x0, x20, #6
	bl	_get_unaligned_be16
	ldrb	w8, [x20, #5]
	and	w9, w8, #0x3f
	mov	w10, #100
	mul	w10, w9, w10
	mov	w11, #14892
	movk	w11, #3, lsl #16
	mul	w9, w9, w11
	lsr	w9, w9, #16
	sub	w10, w10, w9
	and	w10, w10, #0xfffe
	add	w9, w9, w10, lsr #1
	lsr	w20, w9, #4
	lsr	w21, w8, #7
	ldr	w8, [x19, #8]
	cmp	w8, w0
	b.eq	LBB0_11
; %bb.10:
	str	w0, [x19, #8]
Lloh20:
	adrp	x8, _WACOM_WORKER_WIRELESS@GOTPAGE
Lloh21:
	ldr	x8, [x8, _WACOM_WORKER_WIRELESS@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_wacom_schedule_work
LBB0_11:
Lloh23:
	adrp	x8, _WACOM_POWER_SUPPLY_STATUS_AUTO@GOTPAGE
Lloh24:
	ldr	x8, [x8, _WACOM_POWER_SUPPLY_STATUS_AUTO@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	mov	x3, x21
	mov	w4, #1
LBB0_12:
	mov	w5, #0
	bl	_wacom_notify_battery
LBB0_13:
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_WACOM_PKGLEN_WIRELESS,8,3      ; @WACOM_PKGLEN_WIRELESS
	.comm	_WACOM_REPORT_WL,1,0            ; @WACOM_REPORT_WL
	.comm	_INTUOSHT,8,3                   ; @INTUOSHT
	.comm	_INTUOSHT2,8,3                  ; @INTUOSHT2
	.comm	_SW_MUTE_DEVICE,4,2             ; @SW_MUTE_DEVICE
	.comm	_WACOM_WORKER_WIRELESS,4,2      ; @WACOM_WORKER_WIRELESS
	.comm	_WACOM_POWER_SUPPLY_STATUS_AUTO,4,2 ; @WACOM_POWER_SUPPLY_STATUS_AUTO
	.comm	_POWER_SUPPLY_STATUS_UNKNOWN,4,2 ; @POWER_SUPPLY_STATUS_UNKNOWN
	.no_dead_strip	_wacom_wireless_irq
.subsections_via_symbols
