	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wacom_remote_create_one
_wacom_remote_create_one:               ## @wacom_remote_create_one
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r12
	movq	8(%rdi), %r13
	movq	16(%rdi), %rdi
	movq	_WACOM_MAX_REMOTES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	(%rdi), %rsi
	testl	%eax, %eax
	jle	LBB0_5
## %bb.1:
	shlq	$5, %rax
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%rbx, (%rsi,%rcx)
	je	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_3 Depth=1
	addq	$32, %rcx
	cmpq	%rcx, %rax
	jne	LBB0_3
LBB0_5:
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movl	%edx, %r15d
	shlq	$5, %r15
	addq	%r15, %rsi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	%edx, %r14d
	movl	(%rax), %edx
	movq	%r13, %rdi
	callq	_devres_open_group
	testl	%eax, %eax
	je	LBB0_6
## %bb.7:
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	movl	%r14d, %edx
	callq	_wacom_remote_create_attr_group
	movl	%eax, %r13d
	testl	%eax, %eax
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	jne	LBB0_11
## %bb.8:
	movq	%r12, %rdi
	callq	_wacom_allocate_input
	movq	(%r14), %rcx
	movq	%rax, 16(%rcx,%r15)
	testq	%rax, %rax
	je	LBB0_9
## %bb.12:
	movl	24(%rcx,%r15), %ecx
	movl	%ecx, 8(%rax)
	movl	(%r12), %ecx
	movl	%ecx, 4(%rax)
	testl	%ecx, %ecx
	je	LBB0_13
## %bb.14:
	movq	%rax, %rdi
	movq	%r12, %rsi
	callq	_wacom_setup_pad_input_capabilities
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_11
## %bb.15:
	movq	(%r14), %rax
	movq	%rbx, (%rax,%r15)
	movq	16(%rax,%r15), %rdi
	callq	_input_register_device
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_11
## %bb.16:
	movq	(%r14), %rax
	movq	16(%rax,%r15), %rdi
	movq	%r12, %rsi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	$3, %ecx
	movl	$1, %r8d
	callq	_wacom_led_groups_alloc_and_register_one
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_11
## %bb.17:
	movq	(%r14), %rax
	leaq	(%rax,%r15), %rsi
	movl	$1, 8(%rax,%r15)
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_devres_close_group
	jmp	LBB0_18
LBB0_4:
	movl	%edx, %eax
	shlq	$5, %rax
	movq	%rbx, (%rsi,%rax)
LBB0_18:
	xorl	%r13d, %r13d
	jmp	LBB0_19
LBB0_6:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	jmp	LBB0_19
LBB0_9:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_13:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_10:
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
LBB0_11:
	movq	(%r14), %rsi
	addq	%r15, %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_devres_release_group
	movq	(%r14), %rax
	movq	$0, (%rax,%r15)
LBB0_19:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WACOM_MAX_REMOTES,4,2          ## @WACOM_MAX_REMOTES
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_wacom_remote_create_one
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wacom_remote_create_one
_wacom_remote_create_one:               ; @wacom_remote_create_one
	.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
	mov	x20, x2
	mov	x22, x1
	mov	x21, x0
	ldp	x19, x24, [x0, #8]
Lloh0:
	adrp	x8, _WACOM_MAX_REMOTES@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WACOM_MAX_REMOTES@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x8]
	ldr	x8, [x24]
	cmp	w9, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x10, x8
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x10]
	cmp	x11, x22
	b.eq	LBB0_12
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x10, x10, #32
	subs	x9, x9, #1
	b.ne	LBB0_2
LBB0_4:
	mov	w25, w20
	add	x1, x8, x25, lsl #5
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_devres_open_group
	cbz	w0, LBB0_13
; %bb.5:
	mov	x0, x21
	mov	x1, x22
	mov	x2, x20
	bl	_wacom_remote_create_attr_group
	mov	x23, x0
	cbnz	w0, LBB0_17
; %bb.6:
	mov	x0, x21
	bl	_wacom_allocate_input
	ldr	x8, [x24]
	add	x8, x8, x25, lsl #5
	str	x0, [x8, #16]
	cbz	x0, LBB0_14
; %bb.7:
	ldr	w8, [x8, #24]
	ldr	w9, [x21]
	stp	w9, w8, [x0, #4]
	cbz	w9, LBB0_15
; %bb.8:
	mov	x1, x21
	bl	_wacom_setup_pad_input_capabilities
	mov	x23, x0
	cbnz	w0, LBB0_17
; %bb.9:
	ldr	x8, [x24]
	add	x8, x8, x25, lsl #5
	str	x22, [x8]
	ldr	x0, [x8, #16]
	bl	_input_register_device
	mov	x23, x0
	cbnz	w0, LBB0_17
; %bb.10:
	ldr	x8, [x24]
	add	x8, x8, x25, lsl #5
	ldr	x0, [x8, #16]
	mov	w22, #1
	mov	x1, x21
	mov	x2, x20
	mov	w3, #3
	mov	w4, #1
	bl	_wacom_led_groups_alloc_and_register_one
	mov	x23, x0
	cbnz	w0, LBB0_17
; %bb.11:
	ldr	x8, [x24]
	add	x1, x8, x25, lsl #5
	str	w22, [x1, #8]
	mov	x0, x19
	bl	_devres_close_group
	b	LBB0_18
LBB0_12:
	mov	w23, #0
	mov	w9, w20
	lsl	x9, x9, #5
	str	x22, [x8, x9]
	b	LBB0_18
LBB0_13:
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_18
LBB0_14:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_16
LBB0_15:
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_16:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_17:
	ldr	x8, [x24]
	lsl	x20, x25, #5
	add	x1, x8, x20
	mov	x0, x19
	bl	_devres_release_group
	ldr	x8, [x24]
	str	xzr, [x8, x20]
LBB0_18:
	mov	x0, x23
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_WACOM_MAX_REMOTES,4,2          ; @WACOM_MAX_REMOTES
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_wacom_remote_create_one
.subsections_via_symbols
