	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wacom_led_putimage
_wacom_led_putimage:                    ## @wacom_led_putimage
	.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	%rdx, %r15
	movl	%esi, %r12d
	movq	%rdi, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$259, %edi                      ## imm = 0x103
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r13
	movq	_WAC_CMD_ICON_START@GOTPCREL(%rip), %rcx
	movb	(%rcx), %al
	movb	%al, (%r13)
	movb	$1, 1(%r13)
	movl	(%r14), %edi
	movzbl	(%rcx), %edx
	movq	_WAC_CMD_RETRIES@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movl	$3, %esi
	movq	%r13, %rcx
	movl	$2, %r8d
	callq	_wacom_set_report
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	movq	_WAC_CMD_ICON_XFER@GOTPCREL(%rip), %rbx
	movb	(%rbx), %al
	movb	%al, (%r13)
	andb	$7, %r12b
	movb	%r12b, 1(%r13)
	movq	%r13, %r12
	addq	$3, %r12
	movb	$0, 2(%r13)
	movq	%r12, %rdi
	movq	%r15, %rsi
	movl	$256, %edx                      ## imm = 0x100
	callq	_memcpy
	movl	(%r14), %edi
	movzbl	(%rbx), %edx
	movq	_WAC_CMD_RETRIES@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movl	$3, %esi
	movq	%r13, %rcx
	movl	$259, %r8d                      ## imm = 0x103
	callq	_wacom_set_report
	testl	%eax, %eax
	js	LBB0_5
## %bb.6:
	movb	$1, 2(%r13)
	leaq	256(%r15), %rsi
	movq	%r12, %rdi
	movl	$256, %edx                      ## imm = 0x100
	callq	_memcpy
	movl	(%r14), %edi
	movq	_WAC_CMD_ICON_XFER@GOTPCREL(%rip), %rax
	movzbl	(%rax), %edx
	movq	_WAC_CMD_RETRIES@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movl	$3, %esi
	movq	%r13, %rcx
	movl	$259, %r8d                      ## imm = 0x103
	callq	_wacom_set_report
	testl	%eax, %eax
	js	LBB0_5
## %bb.7:
	movb	$2, 2(%r13)
	leaq	512(%r15), %rsi
	movq	%r12, %rdi
	movl	$256, %edx                      ## imm = 0x100
	callq	_memcpy
	movl	(%r14), %edi
	movq	_WAC_CMD_ICON_XFER@GOTPCREL(%rip), %rax
	movzbl	(%rax), %edx
	movq	_WAC_CMD_RETRIES@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movl	$3, %esi
	movq	%r13, %rcx
	movl	$259, %r8d                      ## imm = 0x103
	callq	_wacom_set_report
	testl	%eax, %eax
	js	LBB0_5
## %bb.8:
	movb	$3, 2(%r13)
	addq	$768, %r15                      ## imm = 0x300
	movq	%r12, %rdi
	movq	%r15, %rsi
	movl	$256, %edx                      ## imm = 0x100
	callq	_memcpy
	movl	(%r14), %edi
	movq	_WAC_CMD_ICON_XFER@GOTPCREL(%rip), %rax
	movzbl	(%rax), %edx
	movq	_WAC_CMD_RETRIES@GOTPCREL(%rip), %r15
	movl	(%r15), %r9d
	movl	$3, %esi
	movq	%r13, %rcx
	movl	$259, %r8d                      ## imm = 0x103
	callq	_wacom_set_report
	movl	%eax, %ebx
	movq	_WAC_CMD_ICON_START@GOTPCREL(%rip), %rcx
	movq	%r15, %rsi
	jmp	LBB0_9
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_11
LBB0_5:
	movl	%eax, %ebx
	movq	_WAC_CMD_ICON_START@GOTPCREL(%rip), %rcx
	movq	_WAC_CMD_RETRIES@GOTPCREL(%rip), %rsi
LBB0_9:
	movb	(%rcx), %al
	movb	%al, (%r13)
	movb	$0, 1(%r13)
	movl	(%r14), %edi
	movzbl	(%rcx), %edx
	movl	(%rsi), %r9d
	movl	$3, %esi
	movq	%r13, %rcx
	movl	$2, %r8d
	callq	_wacom_set_report
	jmp	LBB0_10
LBB0_3:
	movl	%eax, %ebx
LBB0_10:
	movq	%r13, %rdi
	callq	_kfree
LBB0_11:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_WAC_CMD_ICON_START,1,0         ## @WAC_CMD_ICON_START
	.comm	_WAC_CMD_RETRIES,4,2            ## @WAC_CMD_RETRIES
	.comm	_WAC_CMD_ICON_XFER,1,0          ## @WAC_CMD_ICON_XFER
	.no_dead_strip	_wacom_led_putimage
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wacom_led_putimage
_wacom_led_putimage:                    ; @wacom_led_putimage
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x2
	mov	x22, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #259
	bl	_kzalloc
	cbz	x0, LBB0_7
; %bb.1:
	mov	x19, x0
Lloh3:
	adrp	x24, _WAC_CMD_ICON_START@GOTPAGE
Lloh4:
	ldr	x24, [x24, _WAC_CMD_ICON_START@GOTPAGEOFF]
	ldrb	w8, [x24]
	strb	w8, [x0]
	mov	w8, #1
	strb	w8, [x0, #1]
	ldr	w0, [x20]
	ldrb	w2, [x24]
Lloh5:
	adrp	x25, _WAC_CMD_RETRIES@GOTPAGE
Lloh6:
	ldr	x25, [x25, _WAC_CMD_RETRIES@GOTPAGEOFF]
	ldr	w5, [x25]
	mov	w1, #3
	mov	x3, x19
	mov	w4, #2
	bl	_wacom_set_report
	tbnz	w0, #31, LBB0_8
; %bb.2:
Lloh7:
	adrp	x26, _WAC_CMD_ICON_XFER@GOTPAGE
Lloh8:
	ldr	x26, [x26, _WAC_CMD_ICON_XFER@GOTPAGEOFF]
	ldrb	w8, [x26]
	strb	w8, [x19]
	and	w8, w22, #0x7
	strb	w8, [x19, #1]
	add	x22, x19, #3
	strb	wzr, [x19, #2]
	mov	x0, x22
	mov	x1, x21
	mov	w2, #256
	bl	_memcpy
	ldr	w0, [x20]
	ldrb	w2, [x26]
	ldr	w5, [x25]
	mov	w1, #3
	mov	x3, x19
	mov	w4, #259
	bl	_wacom_set_report
	tbnz	w0, #31, LBB0_6
; %bb.3:
	mov	w8, #1
	strb	w8, [x19, #2]
	add	x1, x21, #256
	mov	x0, x22
	mov	w2, #256
	bl	_memcpy
	ldr	w0, [x20]
	ldrb	w2, [x26]
	ldr	w5, [x25]
	mov	w1, #3
	mov	x3, x19
	mov	w4, #259
	bl	_wacom_set_report
	tbnz	w0, #31, LBB0_6
; %bb.4:
	mov	w8, #2
	strb	w8, [x19, #2]
	add	x1, x21, #512
	mov	x0, x22
	mov	w2, #256
	bl	_memcpy
	ldr	w0, [x20]
	ldrb	w2, [x26]
	ldr	w5, [x25]
	mov	w27, #3
	mov	w1, #3
	mov	x3, x19
	mov	w4, #259
	bl	_wacom_set_report
	tbnz	w0, #31, LBB0_6
; %bb.5:
	strb	w27, [x19, #2]
	add	x1, x21, #768
	mov	x0, x22
	mov	w2, #256
	bl	_memcpy
	ldr	w0, [x20]
	ldrb	w2, [x26]
	ldr	w5, [x25]
	mov	w1, #3
	mov	x3, x19
	mov	w4, #259
	bl	_wacom_set_report
LBB0_6:
	mov	x23, x0
	ldrb	w8, [x24]
	strb	w8, [x19]
	strb	wzr, [x19, #1]
	ldr	w0, [x20]
	ldrb	w2, [x24]
	ldr	w5, [x25]
	mov	w1, #3
	mov	x3, x19
	mov	w4, #2
	bl	_wacom_set_report
	b	LBB0_9
LBB0_7:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_10
LBB0_8:
	mov	x23, x0
LBB0_9:
	mov	x0, x19
	bl	_kfree
LBB0_10:
	mov	x0, x23
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_WAC_CMD_ICON_START,1,0         ; @WAC_CMD_ICON_START
	.comm	_WAC_CMD_RETRIES,4,2            ; @WAC_CMD_RETRIES
	.comm	_WAC_CMD_ICON_XFER,1,0          ; @WAC_CMD_ICON_XFER
	.no_dead_strip	_wacom_led_putimage
.subsections_via_symbols
