	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wacom_button_image_store
_wacom_button_image_store:              ## @wacom_button_image_store
	.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	%rcx, %r13
	movq	%rdx, %r14
	movl	%esi, %r15d
	callq	_to_hid_device
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_hid_get_drvdata
	movq	%rax, %r12
	movq	(%rbx), %rax
	movq	_BUS_BLUETOOTH@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	%rcx, %rax
	movl	$256, %edx                      ## imm = 0x100
	movl	$1024, %ebx                     ## imm = 0x400
	cmovel	%edx, %ebx
	cmpq	%r13, %rbx
	jne	LBB0_1
## %bb.2:
	cmpq	%rcx, %rax
	jne	LBB0_3
## %bb.4:
	movq	_WAC_CMD_ICON_BT_XFER@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	jmp	LBB0_6
LBB0_3:
	movq	_WAC_CMD_ICON_XFER@GOTPCREL(%rip), %rax
LBB0_5:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movl	(%rax), %r14d
	movq	%r12, %rdi
	callq	_mutex_lock
	movq	%r12, %rdi
	movl	%r15d, %esi
	movl	%r14d, %edx
	movl	%ebx, %ecx
	movq	-48(%rbp), %r8                  ## 8-byte Reload
	callq	_wacom_led_putimage
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_mutex_unlock
	testl	%ebx, %ebx
	cmovsl	%ebx, %r13d
LBB0_6:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BUS_BLUETOOTH,8,3              ## @BUS_BLUETOOTH
	.comm	_WAC_CMD_ICON_BT_XFER,4,2       ## @WAC_CMD_ICON_BT_XFER
	.comm	_WAC_CMD_ICON_XFER,4,2          ## @WAC_CMD_ICON_XFER
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_wacom_button_image_store
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wacom_button_image_store
_wacom_button_image_store:              ; @wacom_button_image_store
	.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	x19, x3
	mov	x20, x2
	mov	x21, x1
	bl	_to_hid_device
	mov	x23, x0
	bl	_hid_get_drvdata
	ldr	x8, [x23]
Lloh0:
	adrp	x9, _BUS_BLUETOOTH@GOTPAGE
Lloh1:
	ldr	x9, [x9, _BUS_BLUETOOTH@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	mov	w10, #1024
	mov	w11, #256
	csel	w23, w11, w10, eq
	cmp	x23, x19
	b.ne	LBB0_2
; %bb.1:
	mov	x22, x0
Lloh3:
	adrp	x10, _WAC_CMD_ICON_BT_XFER@GOTPAGE
Lloh4:
	ldr	x10, [x10, _WAC_CMD_ICON_BT_XFER@GOTPAGEOFF]
Lloh5:
	adrp	x11, _WAC_CMD_ICON_XFER@GOTPAGE
Lloh6:
	ldr	x11, [x11, _WAC_CMD_ICON_XFER@GOTPAGEOFF]
	cmp	x8, x9
	csel	x8, x10, x11, eq
	ldr	w24, [x8]
	bl	_mutex_lock
	mov	x0, x22
	mov	x1, x21
	mov	x2, x24
	mov	x3, x23
	mov	x4, x20
	bl	_wacom_led_putimage
	mov	x20, x0
	mov	x0, x22
	bl	_mutex_unlock
	cmp	w20, #0
	csel	w0, w20, w19, lt
	b	LBB0_3
LBB0_2:
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_BUS_BLUETOOTH,8,3              ; @BUS_BLUETOOTH
	.comm	_WAC_CMD_ICON_BT_XFER,4,2       ; @WAC_CMD_ICON_BT_XFER
	.comm	_WAC_CMD_ICON_XFER,4,2          ; @WAC_CMD_ICON_XFER
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_wacom_button_image_store
.subsections_via_symbols
