	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pidff_check_autocenter
_pidff_check_autocenter:                ## @pidff_check_autocenter
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movl	$1, %esi
	callq	_pidff_request_effect_upload
	movl	%eax, %r14d
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	8(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	callq	_hid_err
	jmp	LBB0_6
LBB0_2:
	movq	(%rbx), %rax
	movq	_PID_EFFECT_BLOCK_INDEX@GOTPCREL(%rip), %r12
	movq	(%r12), %rcx
	shlq	$4, %rcx
	movq	(%rax,%rcx), %rdx
	movq	8(%rax,%rcx), %rax
	movq	(%rax), %rax
	incq	%rax
	cmpq	%rax, (%rdx)
	jne	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	movl	$65535, %esi                    ## imm = 0xFFFF
	callq	_pidff_autocenter
	movq	_FF_AUTOCENTER@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r15), %esi
	callq	_set_bit
	jmp	LBB0_5
LBB0_4:
	movl	8(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_hid_notice
LBB0_5:
	movq	(%rbx), %rax
	movq	(%r12), %rcx
	shlq	$4, %rcx
	movq	(%rax,%rcx), %rax
	movq	(%rax), %rsi
	movq	%rbx, %rdi
	callq	_pidff_erase_pid
LBB0_6:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"upload request failed\n"

	.comm	_PID_EFFECT_BLOCK_INDEX,8,3     ## @PID_EFFECT_BLOCK_INDEX
	.comm	_FF_AUTOCENTER,4,2              ## @FF_AUTOCENTER
L_.str.1:                               ## @.str.1
	.asciz	"device has unknown autocenter control method\n"

	.no_dead_strip	_pidff_check_autocenter
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pidff_check_autocenter
_pidff_check_autocenter:                ; @pidff_check_autocenter
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x21, x1
	mov	x20, x0
	mov	w1, #1
	bl	_pidff_request_effect_upload
	mov	x19, x0
	cbz	w0, LBB0_2
; %bb.1:
	ldr	w0, [x20, #8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_hid_err
	b	LBB0_6
LBB0_2:
	ldr	x8, [x20]
Lloh2:
	adrp	x22, _PID_EFFECT_BLOCK_INDEX@GOTPAGE
Lloh3:
	ldr	x22, [x22, _PID_EFFECT_BLOCK_INDEX@GOTPAGEOFF]
	ldr	x9, [x22]
	add	x8, x8, x9, lsl #4
	ldp	x9, x8, [x8]
	ldr	x9, [x9]
	ldr	x8, [x8]
	add	x8, x8, #1
	cmp	x9, x8
	b.ne	LBB0_4
; %bb.3:
	mov	x0, x20
	mov	w1, #65535
	bl	_pidff_autocenter
Lloh4:
	adrp	x8, _FF_AUTOCENTER@GOTPAGE
Lloh5:
	ldr	x8, [x8, _FF_AUTOCENTER@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
	ldr	w1, [x21]
	bl	_set_bit
	b	LBB0_5
LBB0_4:
	ldr	w0, [x20, #8]
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_hid_notice
LBB0_5:
	ldr	x8, [x20]
	ldr	x9, [x22]
	lsl	x9, x9, #4
	ldr	x8, [x8, x9]
	ldr	x1, [x8]
	mov	x0, x20
	bl	_pidff_erase_pid
LBB0_6:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"upload request failed\n"

	.comm	_PID_EFFECT_BLOCK_INDEX,8,3     ; @PID_EFFECT_BLOCK_INDEX
	.comm	_FF_AUTOCENTER,4,2              ; @FF_AUTOCENTER
l_.str.1:                               ; @.str.1
	.asciz	"device has unknown autocenter control method\n"

	.no_dead_strip	_pidff_check_autocenter
.subsections_via_symbols
