	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wacom_initialize_remotes
_wacom_initialize_remotes:              ## @wacom_initialize_remotes
	.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	24(%rdi), %rax
	movq	_REMOTE@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.1:
	movq	%rdi, %r14
	movq	(%rdi), %rdi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movl	$24, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_7
## %bb.2:
	movq	%rax, %r15
	movq	%rax, 16(%r14)
	leaq	16(%rax), %rdi
	callq	_spin_lock_init
	movq	%r15, %rdi
	addq	$12, %rdi
	movl	(%rbx), %edx
	movl	$20, %esi
	callq	_kfifo_alloc
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movq	(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_hid_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_4:
	movq	_remote0_serial_group@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	(%r15), %rcx
	movl	%eax, 8(%rcx)
	movq	_remote1_serial_group@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rcx)
	movq	_remote2_serial_group@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%rcx)
	movq	_remote3_serial_group@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 56(%rcx)
	movq	_remote4_serial_group@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 72(%rcx)
	movq	(%r14), %rsi
	leaq	L_.str.1(%rip), %rdi
	callq	_kobject_create_and_add
	movl	%eax, 8(%r15)
	testl	%eax, %eax
	je	LBB0_7
## %bb.5:
	movq	_remote_unpair_attrs@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	callq	_sysfs_create_files
	testl	%eax, %eax
	je	LBB0_10
## %bb.6:
	movl	%eax, %ebx
	movq	(%r14), %rdi
	leaq	L_.str.2(%rip), %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_hid_err
	jmp	LBB0_9
LBB0_7:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
LBB0_8:
	subl	(%rax), %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	_WACOM_MAX_REMOTES@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_13
## %bb.11:
	movq	8(%r14), %rcx
	movq	(%r15), %rdx
	xorl	%esi, %esi
	movq	_WACOM_STATUS_UNKNOWN@GOTPCREL(%rip), %rdi
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movl	(%rdi), %ebx
	movl	%ebx, (%rcx,%rsi,4)
	movq	$0, (%rdx)
	incq	%rsi
	movslq	(%rax), %rbx
	addq	$16, %rdx
	cmpq	%rbx, %rsi
	jl	LBB0_12
LBB0_13:
	movq	(%r14), %rdi
	movq	_wacom_remotes_destroy@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_devm_add_action_or_reset       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_REMOTE,8,3                     ## @REMOTE
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed allocating remote_fifo\n"

	.comm	_remote0_serial_group,4,2       ## @remote0_serial_group
	.comm	_remote1_serial_group,4,2       ## @remote1_serial_group
	.comm	_remote2_serial_group,4,2       ## @remote2_serial_group
	.comm	_remote3_serial_group,4,2       ## @remote3_serial_group
	.comm	_remote4_serial_group,4,2       ## @remote4_serial_group
L_.str.1:                               ## @.str.1
	.asciz	"wacom_remote"

	.comm	_remote_unpair_attrs,4,2        ## @remote_unpair_attrs
L_.str.2:                               ## @.str.2
	.asciz	"cannot create sysfs group err: %d\n"

	.comm	_WACOM_MAX_REMOTES,4,2          ## @WACOM_MAX_REMOTES
	.comm	_WACOM_STATUS_UNKNOWN,4,2       ## @WACOM_STATUS_UNKNOWN
	.comm	_wacom_remotes_destroy,4,2      ## @wacom_remotes_destroy
	.no_dead_strip	_wacom_initialize_remotes
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wacom_initialize_remotes
_wacom_initialize_remotes:              ; @wacom_initialize_remotes
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	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
; %bb.1:
	mov	x19, x0
	ldr	x0, [x0]
Lloh3:
	adrp	x21, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x21, [x21, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w2, [x21]
	mov	w1, #24
	bl	_devm_kzalloc
	cbz	x0, LBB0_4
; %bb.2:
	mov	x20, x0
	str	x0, [x19, #16]
	add	x0, x0, #16
	bl	_spin_lock_init
	add	x0, x20, #12
	ldr	w2, [x21]
	mov	w1, #20
	bl	_kfifo_alloc
	cbz	w0, LBB0_7
; %bb.3:
	ldr	x0, [x19]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_hid_err
LBB0_4:
Lloh7:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_6
LBB0_5:
	mov	w21, #0
LBB0_6:
	mov	x0, x21
	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
	add	sp, sp, #64
	ret
LBB0_7:
Lloh10:
	adrp	x8, _remote0_serial_group@GOTPAGE
Lloh11:
	ldr	x8, [x8, _remote0_serial_group@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	ldr	x9, [x20]
	str	w8, [x9, #8]
Lloh13:
	adrp	x8, _remote1_serial_group@GOTPAGE
Lloh14:
	ldr	x8, [x8, _remote1_serial_group@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
Lloh16:
	adrp	x10, _remote2_serial_group@GOTPAGE
Lloh17:
	ldr	x10, [x10, _remote2_serial_group@GOTPAGEOFF]
	str	w8, [x9, #24]
Lloh18:
	ldr	w8, [x10]
	str	w8, [x9, #40]
Lloh19:
	adrp	x8, _remote3_serial_group@GOTPAGE
Lloh20:
	ldr	x8, [x8, _remote3_serial_group@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	str	w8, [x9, #56]
Lloh22:
	adrp	x8, _remote4_serial_group@GOTPAGE
Lloh23:
	ldr	x8, [x8, _remote4_serial_group@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	str	w8, [x9, #72]
	ldr	x1, [x19]
Lloh25:
	adrp	x0, l_.str.1@PAGE
Lloh26:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_kobject_create_and_add
	str	w0, [x20, #8]
	cbz	w0, LBB0_4
; %bb.8:
Lloh27:
	adrp	x8, _remote_unpair_attrs@GOTPAGE
Lloh28:
	ldr	x8, [x8, _remote_unpair_attrs@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	bl	_sysfs_create_files
	cbz	w0, LBB0_10
; %bb.9:
	mov	x21, x0
	ldr	x0, [x19]
	str	x21, [sp]
Lloh30:
	adrp	x1, l_.str.2@PAGE
Lloh31:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_hid_err
	b	LBB0_6
LBB0_10:
Lloh32:
	adrp	x8, _WACOM_MAX_REMOTES@GOTPAGE
Lloh33:
	ldr	x8, [x8, _WACOM_MAX_REMOTES@GOTPAGEOFF]
	ldr	w9, [x8]
	cmp	w9, #1
	b.lt	LBB0_13
; %bb.11:
	mov	x9, #0
	ldr	x10, [x19, #8]
	ldr	x11, [x20]
Lloh34:
	adrp	x12, _WACOM_STATUS_UNKNOWN@GOTPAGE
Lloh35:
	ldr	x12, [x12, _WACOM_STATUS_UNKNOWN@GOTPAGEOFF]
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	w13, [x12]
	str	w13, [x10, x9, lsl #2]
	str	xzr, [x11], #16
	add	x9, x9, #1
	ldrsw	x13, [x8]
	cmp	x9, x13
	b.lt	LBB0_12
LBB0_13:
	ldr	x0, [x19]
Lloh36:
	adrp	x8, _wacom_remotes_destroy@GOTPAGE
Lloh37:
	ldr	x8, [x8, _wacom_remotes_destroy@GOTPAGEOFF]
Lloh38:
	ldr	w1, [x8]
	mov	x2, x19
	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
	add	sp, sp, #64
	b	_devm_add_action_or_reset
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.cfi_endproc
                                        ; -- End function
	.comm	_REMOTE,8,3                     ; @REMOTE
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed allocating remote_fifo\n"

	.comm	_remote0_serial_group,4,2       ; @remote0_serial_group
	.comm	_remote1_serial_group,4,2       ; @remote1_serial_group
	.comm	_remote2_serial_group,4,2       ; @remote2_serial_group
	.comm	_remote3_serial_group,4,2       ; @remote3_serial_group
	.comm	_remote4_serial_group,4,2       ; @remote4_serial_group
l_.str.1:                               ; @.str.1
	.asciz	"wacom_remote"

	.comm	_remote_unpair_attrs,4,2        ; @remote_unpair_attrs
l_.str.2:                               ; @.str.2
	.asciz	"cannot create sysfs group err: %d\n"

	.comm	_WACOM_MAX_REMOTES,4,2          ; @WACOM_MAX_REMOTES
	.comm	_WACOM_STATUS_UNKNOWN,4,2       ; @WACOM_STATUS_UNKNOWN
	.comm	_wacom_remotes_destroy,4,2      ; @wacom_remotes_destroy
	.no_dead_strip	_wacom_initialize_remotes
.subsections_via_symbols
