	.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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$9, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %rbx
	movq	8(%r14), %rcx
	movq	24(%r14), %rax
	movq	(%rax), %rax
	movq	(%rax), %rdx
	movq	_INTUOS5S@GOTPCREL(%rip), %rsi
	movl	(%rcx), %eax
	cmpq	(%rsi), %rdx
	jl	LBB0_6
## %bb.4:
	movq	_INTUOS5L@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rdx
	jg	LBB0_6
## %bb.5:
	andl	$3, %eax
	movl	16(%r14), %ecx
	movq	_WAC_CMD_LED_CONTROL@GOTPCREL(%rip), %rdx
	movb	(%rdx), %dl
	movb	%dl, (%rbx)
	shrl	$3, %ecx
	andl	$12, %ecx
	addl	$12, %ecx
	andl	$12, %ecx
	orl	%eax, %ecx
	movl	$1, %eax
	jmp	LBB0_11
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_2
LBB0_6:
	movq	_WACOM_21UX2@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rdx
	je	LBB0_9
## %bb.7:
	movq	_WACOM_24HD@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rdx
	je	LBB0_9
## %bb.8:
	orl	$4, %eax
	jmp	LBB0_10
LBB0_9:
	movl	4(%rcx), %ecx
	shll	$4, %ecx
	orl	%ecx, %eax
	orl	$68, %eax
LBB0_10:
	movq	_WAC_CMD_LED_CONTROL@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movb	%cl, (%rbx)
	movb	%al, 1(%rbx)
	movb	16(%r14), %al
	movb	%al, 2(%rbx)
	movb	20(%r14), %al
	movb	%al, 3(%rbx)
	movb	21(%r14), %cl
	movl	$4, %eax
LBB0_11:
	movb	%cl, (%rbx,%rax)
	movl	(%r14), %edi
	movq	_WAC_CMD_LED_CONTROL@GOTPCREL(%rip), %rax
	movzbl	(%rax), %edx
	movq	_WAC_CMD_RETRIES@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movl	$3, %esi
	movq	%rbx, %rcx
	movl	$9, %r8d
	callq	_wacom_set_report
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_kfree
	movl	%r14d, %eax
LBB0_2:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_INTUOS5S,8,3                   ## @INTUOS5S
	.comm	_INTUOS5L,8,3                   ## @INTUOS5L
	.comm	_WAC_CMD_LED_CONTROL,1,0        ## @WAC_CMD_LED_CONTROL
	.comm	_WACOM_21UX2,8,3                ## @WACOM_21UX2
	.comm	_WACOM_24HD,8,3                 ## @WACOM_24HD
	.comm	_WAC_CMD_RETRIES,4,2            ## @WAC_CMD_RETRIES
	.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	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #9
	bl	_kzalloc
	cbz	x0, LBB0_4
; %bb.1:
	mov	x19, x0
	ldr	x8, [x20, #24]
	ldr	x8, [x8]
	ldr	x10, [x8]
Lloh3:
	adrp	x8, _INTUOS5S@GOTPAGE
Lloh4:
	ldr	x8, [x8, _INTUOS5S@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
Lloh6:
	adrp	x9, _INTUOS5L@GOTPAGE
Lloh7:
	ldr	x9, [x9, _INTUOS5L@GOTPAGEOFF]
Lloh8:
	ldr	x12, [x9]
	ldr	x11, [x20, #8]
	ldr	w9, [x11]
	cmp	x10, x8
	ccmp	x10, x12, #0, ge
Lloh9:
	adrp	x8, _WAC_CMD_LED_CONTROL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _WAC_CMD_LED_CONTROL@GOTPAGEOFF]
	b.le	LBB0_5
; %bb.2:
Lloh11:
	adrp	x12, _WACOM_21UX2@GOTPAGE
Lloh12:
	ldr	x12, [x12, _WACOM_21UX2@GOTPAGEOFF]
Lloh13:
	ldr	x12, [x12]
Lloh14:
	adrp	x13, _WACOM_24HD@GOTPAGE
Lloh15:
	ldr	x13, [x13, _WACOM_24HD@GOTPAGEOFF]
Lloh16:
	ldr	x13, [x13]
	cmp	x10, x12
	ccmp	x10, x13, #4, ne
	b.ne	LBB0_6
; %bb.3:
	ldr	w10, [x11, #4]
	orr	w9, w9, w10, lsl #4
	mov	w10, #68
	orr	w9, w9, w10
	b	LBB0_7
LBB0_4:
Lloh17:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_5:
	ldr	w10, [x20, #16]
	ldrb	w11, [x8]
	strb	w11, [x19]
	lsr	w10, w10, #3
	and	w10, w10, #0xc
	add	w10, w10, #12
	and	w10, w10, #0xc
	bfxil	w10, w9, #0, #2
	mov	w9, #1
	b	LBB0_8
LBB0_6:
	orr	w9, w9, #0x4
LBB0_7:
	ldrb	w10, [x8]
	strb	w10, [x19]
	strb	w9, [x19, #1]
	ldr	w9, [x20, #16]
	strb	w9, [x19, #2]
	ldrb	w9, [x20, #20]
	strb	w9, [x19, #3]
	ldrb	w10, [x20, #21]
	mov	w9, #4
LBB0_8:
	strb	w10, [x19, x9]
	ldr	w0, [x20]
	ldrb	w2, [x8]
Lloh20:
	adrp	x8, _WAC_CMD_RETRIES@GOTPAGE
Lloh21:
	ldr	x8, [x8, _WAC_CMD_RETRIES@GOTPAGEOFF]
Lloh22:
	ldr	w5, [x8]
	mov	w1, #3
	mov	x3, x19
	mov	w4, #9
	bl	_wacom_set_report
	mov	x20, x0
	mov	x0, x19
	bl	_kfree
	mov	x0, x20
LBB0_9:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_INTUOS5S,8,3                   ; @INTUOS5S
	.comm	_INTUOS5L,8,3                   ; @INTUOS5L
	.comm	_WAC_CMD_LED_CONTROL,1,0        ; @WAC_CMD_LED_CONTROL
	.comm	_WACOM_21UX2,8,3                ; @WACOM_21UX2
	.comm	_WACOM_24HD,8,3                 ; @WACOM_24HD
	.comm	_WAC_CMD_RETRIES,4,2            ; @WAC_CMD_RETRIES
	.no_dead_strip	_wacom_led_control
.subsections_via_symbols
