	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wacom_led_control
_wacom_led_control:                     ## @wacom_led_control
	.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
	cmpq	$0, 16(%rdi)
	je	LBB0_1
## %bb.3:
	movq	%rdi, %rbx
	movq	24(%rdi), %rax
	movq	_REMOTE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
LBB0_1:
	movq	_ENOTSUPP@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_25:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	cmpq	$0, 32(%rbx)
	je	LBB0_6
## %bb.5:
	movq	_WAC_CMD_WL_LED_CONTROL@GOTPCREL(%rip), %rax
	movb	(%rax), %r12b
	movl	$13, %r14d
	jmp	LBB0_7
LBB0_6:
	movq	_WAC_CMD_LED_CONTROL@GOTPCREL(%rip), %rcx
	movq	_INTUOSP2_BT@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	movq	_WAC_CMD_WL_INTUOSP2@GOTPCREL(%rip), %rax
	movl	$51, %edx
	movl	$9, %r14d
	cmovel	%edx, %r14d
	movzbl	(%rax), %eax
	movzbl	(%rcx), %r12d
	cmovel	%eax, %r12d
LBB0_7:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_8
## %bb.9:
	movq	%rax, %r15
	movq	24(%rbx), %rax
	movq	_HID_GENERIC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_11
## %bb.10:
	movq	_WAC_CMD_LED_CONTROL_GENERIC@GOTPCREL(%rip), %rax
	movb	(%rax), %al
	movb	%al, (%r15)
	movb	8(%rbx), %al
	movb	%al, 1(%r15)
	movq	16(%rbx), %rax
	movb	(%rax), %r13b
	andb	$3, %r13b
	movl	$2, %eax
	jmp	LBB0_24
LBB0_8:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_11:
	movq	_INTUOS5S@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jl	LBB0_16
## %bb.12:
	movq	_INTUOSPL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jg	LBB0_16
## %bb.13:
	movq	16(%rbx), %rax
	movb	(%rax), %r13b
	movb	8(%rbx), %al
	shrb	$3, %al
	andb	$12, %al
	addb	$12, %al
	andb	$12, %al
	andb	$3, %r13b
	orb	%al, %r13b
	movb	%r12b, (%r15)
	cmpq	$0, 32(%rbx)
	je	LBB0_14
## %bb.15:
	movl	(%rbx), %edi
	movq	_HID_FEATURE_REPORT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_WAC_CMD_RETRIES@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r15, %rdx
	movl	%r14d, %ecx
	callq	_wacom_get_report
	movb	%r12b, (%r15)
	jmp	LBB0_23
LBB0_16:
	movq	_INTUOSP2_BT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_18
## %bb.17:
	movb	%r12b, (%r15)
	movl	$1684300900, 4(%r15)            ## imm = 0x64646464
	movb	$100, 8(%r15)
	movb	8(%rbx), %al
	movb	%al, 9(%r15)
	movq	16(%rbx), %rax
	movb	(%rax), %r13b
	andb	$3, %r13b
	movl	$10, %eax
	jmp	LBB0_24
LBB0_18:
	movq	16(%rbx), %rdx
	movl	(%rdx), %ecx
	movq	_WACOM_21UX2@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rax
	je	LBB0_21
## %bb.19:
	movq	_WACOM_24HD@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rax
	je	LBB0_21
## %bb.20:
	orl	$4, %ecx
	jmp	LBB0_22
LBB0_14:
	movl	$1, %eax
	jmp	LBB0_24
LBB0_21:
	movl	4(%rdx), %eax
	shll	$4, %eax
	orl	%eax, %ecx
	orl	$68, %ecx
LBB0_22:
	movb	%r12b, (%r15)
	movb	%cl, 1(%r15)
	movb	8(%rbx), %al
	movb	%al, 2(%r15)
	movb	9(%rbx), %al
	movb	%al, 3(%r15)
	movb	10(%rbx), %r13b
LBB0_23:
	movl	$4, %eax
LBB0_24:
	movb	%r13b, (%r15,%rax)
	movl	(%rbx), %edi
	movq	_HID_FEATURE_REPORT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_WAC_CMD_RETRIES@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r15, %rdx
	movl	%r14d, %ecx
	callq	_wacom_set_report
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_kfree
	movl	%ebx, %eax
	jmp	LBB0_25
	.cfi_endproc
                                        ## -- End function
	.comm	_WAC_CMD_LED_CONTROL,1,0        ## @WAC_CMD_LED_CONTROL
	.comm	_ENOTSUPP,4,2                   ## @ENOTSUPP
	.comm	_REMOTE,8,3                     ## @REMOTE
	.comm	_WAC_CMD_WL_LED_CONTROL,1,0     ## @WAC_CMD_WL_LED_CONTROL
	.comm	_INTUOSP2_BT,8,3                ## @INTUOSP2_BT
	.comm	_WAC_CMD_WL_INTUOSP2,1,0        ## @WAC_CMD_WL_INTUOSP2
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_HID_GENERIC,8,3                ## @HID_GENERIC
	.comm	_WAC_CMD_LED_CONTROL_GENERIC,1,0 ## @WAC_CMD_LED_CONTROL_GENERIC
	.comm	_INTUOS5S,8,3                   ## @INTUOS5S
	.comm	_INTUOSPL,8,3                   ## @INTUOSPL
	.comm	_HID_FEATURE_REPORT,4,2         ## @HID_FEATURE_REPORT
	.comm	_WAC_CMD_RETRIES,4,2            ## @WAC_CMD_RETRIES
	.comm	_WACOM_21UX2,8,3                ## @WACOM_21UX2
	.comm	_WACOM_24HD,8,3                 ## @WACOM_24HD
	.no_dead_strip	_wacom_led_control
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wacom_led_control
_wacom_led_control:                     ; @wacom_led_control
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	ldr	x8, [x0, #16]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x19, x0
	ldr	x8, [x0, #24]
Lloh0:
	adrp	x9, _REMOTE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _REMOTE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
LBB0_2:
Lloh3:
	adrp	x8, _ENOTSUPP@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOTSUPP@GOTPAGEOFF]
LBB0_3:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_4:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_5:
	ldr	x9, [x19, #32]
	cbz	x9, LBB0_7
; %bb.6:
Lloh5:
	adrp	x8, _WAC_CMD_WL_LED_CONTROL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _WAC_CMD_WL_LED_CONTROL@GOTPAGEOFF]
	ldrb	w24, [x8]
	mov	w20, #13
	b	LBB0_8
LBB0_7:
Lloh7:
	adrp	x9, _WAC_CMD_LED_CONTROL@GOTPAGE
Lloh8:
	ldr	x9, [x9, _WAC_CMD_LED_CONTROL@GOTPAGEOFF]
	ldrb	w9, [x9]
Lloh9:
	adrp	x10, _INTUOSP2_BT@GOTPAGE
Lloh10:
	ldr	x10, [x10, _INTUOSP2_BT@GOTPAGEOFF]
Lloh11:
	ldr	x10, [x10]
Lloh12:
	adrp	x11, _WAC_CMD_WL_INTUOSP2@GOTPAGE
Lloh13:
	ldr	x11, [x11, _WAC_CMD_WL_INTUOSP2@GOTPAGEOFF]
	ldrb	w11, [x11]
	cmp	x8, x10
	mov	w8, #9
	mov	w10, #51
	csel	w20, w10, w8, eq
	csel	w24, w11, w9, eq
LBB0_8:
Lloh14:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_kzalloc
	cbz	x0, LBB0_11
; %bb.9:
	mov	x21, x0
	ldr	x8, [x19, #24]
Lloh17:
	adrp	x9, _HID_GENERIC@GOTPAGE
Lloh18:
	ldr	x9, [x9, _HID_GENERIC@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
Lloh20:
	adrp	x22, _HID_FEATURE_REPORT@GOTPAGE
Lloh21:
	ldr	x22, [x22, _HID_FEATURE_REPORT@GOTPAGEOFF]
Lloh22:
	adrp	x23, _WAC_CMD_RETRIES@GOTPAGE
Lloh23:
	ldr	x23, [x23, _WAC_CMD_RETRIES@GOTPAGEOFF]
	cmp	x8, x9
	b.ne	LBB0_12
; %bb.10:
Lloh24:
	adrp	x8, _WAC_CMD_LED_CONTROL_GENERIC@GOTPAGE
Lloh25:
	ldr	x8, [x8, _WAC_CMD_LED_CONTROL_GENERIC@GOTPAGEOFF]
	ldrb	w8, [x8]
	strb	w8, [x21]
	ldrb	w8, [x19, #8]
	strb	w8, [x21, #1]
	ldr	x8, [x19, #16]
	ldrb	w8, [x8]
	and	w25, w8, #0x3
	mov	w8, #2
	b	LBB0_24
LBB0_11:
Lloh26:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh27:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_3
LBB0_12:
Lloh28:
	adrp	x9, _INTUOS5S@GOTPAGE
Lloh29:
	ldr	x9, [x9, _INTUOS5S@GOTPAGEOFF]
Lloh30:
	ldr	x9, [x9]
Lloh31:
	adrp	x10, _INTUOSPL@GOTPAGE
Lloh32:
	ldr	x10, [x10, _INTUOSPL@GOTPAGEOFF]
Lloh33:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #0, ge
	b.le	LBB0_15
; %bb.13:
Lloh34:
	adrp	x9, _INTUOSP2_BT@GOTPAGE
Lloh35:
	ldr	x9, [x9, _INTUOSP2_BT@GOTPAGEOFF]
Lloh36:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_17
; %bb.14:
	strb	w24, [x21]
	mov	w8, #25700
	movk	w8, #25700, lsl #16
	str	w8, [x21, #4]
	strb	w8, [x21, #8]
	ldrb	w8, [x19, #8]
	strb	w8, [x21, #9]
	ldr	x8, [x19, #16]
	ldrb	w8, [x8]
	and	w25, w8, #0x3
	mov	w8, #10
	b	LBB0_24
LBB0_15:
	ldr	x8, [x19, #16]
	ldrb	w8, [x8]
	ldrb	w9, [x19, #8]
	lsr	w9, w9, #3
	and	w9, w9, #0xc
	add	w9, w9, #12
	and	w25, w9, #0xc
	bfxil	w25, w8, #0, #2
	strb	w24, [x21]
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_20
; %bb.16:
	ldr	w0, [x19]
	ldr	w1, [x22]
	ldr	w4, [x23]
	mov	x2, x21
	mov	x3, x20
	bl	_wacom_get_report
	strb	w24, [x21]
	b	LBB0_23
LBB0_17:
	ldr	x10, [x19, #16]
	ldr	w9, [x10]
Lloh37:
	adrp	x11, _WACOM_21UX2@GOTPAGE
Lloh38:
	ldr	x11, [x11, _WACOM_21UX2@GOTPAGEOFF]
Lloh39:
	ldr	x11, [x11]
	cmp	x8, x11
	b.eq	LBB0_21
; %bb.18:
Lloh40:
	adrp	x11, _WACOM_24HD@GOTPAGE
Lloh41:
	ldr	x11, [x11, _WACOM_24HD@GOTPAGEOFF]
Lloh42:
	ldr	x11, [x11]
	cmp	x8, x11
	b.eq	LBB0_21
; %bb.19:
	orr	w8, w9, #0x4
	b	LBB0_22
LBB0_20:
	mov	w8, #1
	b	LBB0_24
LBB0_21:
	ldr	w8, [x10, #4]
	orr	w8, w9, w8, lsl #4
	mov	w9, #68
	orr	w8, w8, w9
LBB0_22:
	strb	w24, [x21]
	strb	w8, [x21, #1]
	ldrb	w8, [x19, #8]
	strb	w8, [x21, #2]
	ldrb	w8, [x19, #9]
	strb	w8, [x21, #3]
	ldrb	w25, [x19, #10]
LBB0_23:
	mov	w8, #4
LBB0_24:
	strb	w25, [x21, x8]
	ldr	w0, [x19]
	ldr	w1, [x22]
	ldr	w4, [x23]
	mov	x2, x21
	mov	x3, x20
	bl	_wacom_set_report
	mov	x19, x0
	mov	x0, x21
	bl	_kfree
	mov	x0, x19
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.cfi_endproc
                                        ; -- End function
	.comm	_WAC_CMD_LED_CONTROL,1,0        ; @WAC_CMD_LED_CONTROL
	.comm	_ENOTSUPP,4,2                   ; @ENOTSUPP
	.comm	_REMOTE,8,3                     ; @REMOTE
	.comm	_WAC_CMD_WL_LED_CONTROL,1,0     ; @WAC_CMD_WL_LED_CONTROL
	.comm	_INTUOSP2_BT,8,3                ; @INTUOSP2_BT
	.comm	_WAC_CMD_WL_INTUOSP2,1,0        ; @WAC_CMD_WL_INTUOSP2
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_HID_GENERIC,8,3                ; @HID_GENERIC
	.comm	_WAC_CMD_LED_CONTROL_GENERIC,1,0 ; @WAC_CMD_LED_CONTROL_GENERIC
	.comm	_INTUOS5S,8,3                   ; @INTUOS5S
	.comm	_INTUOSPL,8,3                   ; @INTUOSPL
	.comm	_HID_FEATURE_REPORT,4,2         ; @HID_FEATURE_REPORT
	.comm	_WAC_CMD_RETRIES,4,2            ; @WAC_CMD_RETRIES
	.comm	_WACOM_21UX2,8,3                ; @WACOM_21UX2
	.comm	_WACOM_24HD,8,3                 ; @WACOM_24HD
	.no_dead_strip	_wacom_led_control
.subsections_via_symbols
