	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_flexcop_pid_feed_control       ## -- Begin function flexcop_pid_feed_control
	.p2align	4, 0x90
_flexcop_pid_feed_control:              ## @flexcop_pid_feed_control
	.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
	movl	%edx, %r14d
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movl	(%rdi), %eax
	movl	4(%rdi), %edx
	addl	%eax, %eax
	leal	(%rax,%rax,2), %eax
	shll	$5, %edx
	subl	%eax, %edx
	addl	$6, %edx
	xorl	%ecx, %ecx
	cmpl	$1, %r14d
	sbbl	%ecx, %ecx
	orl	$1, %ecx
	movl	8(%rdi), %eax
	addl	%ecx, %eax
	movl	%eax, 8(%rdi)
	movl	(%rsi), %esi
	cmpl	%edx, %esi
	jl	LBB0_2
## %bb.1:
	movslq	%ecx, %rcx
	addq	%rcx, 16(%rbx)
LBB0_2:
	cmpq	$0, 32(%rbx)
	je	LBB0_3
LBB0_6:
	movl	4(%r15), %edx
	movq	%rbx, %rdi
	movl	%r14d, %ecx
	callq	_flexcop_pid_control
	movl	$1, %esi
	cmpq	$0, 16(%rbx)
	jg	LBB0_8
## %bb.7:
	xorl	%esi, %esi
	cmpl	$8192, 4(%r15)                  ## imm = 0x2000
	cmovel	%r14d, %esi
LBB0_8:
	movq	%rbx, %rdi
	callq	_flexcop_toggle_fullts_streaming
LBB0_9:
	cmpl	%r14d, 8(%rbx)
	jne	LBB0_14
## %bb.10:
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_flexcop_rcv_data_ctrl
	movq	24(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	*%rax
LBB0_12:
	testl	%r14d, %r14d
	jne	LBB0_14
## %bb.13:
	movq	%rbx, %rdi
	callq	_flexcop_reset_block_300
	movq	%rbx, %rdi
	callq	_flexcop_hw_filter_init
LBB0_14:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	cmpl	%r14d, %eax
	jne	LBB0_9
## %bb.4:
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_flexcop_toggle_fullts_streaming
	cmpq	$0, 32(%rbx)
	je	LBB0_9
## %bb.5:
	movl	(%r15), %esi
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_flexcop_pid_feed_control       ; -- Begin function flexcop_pid_feed_control
	.p2align	2
_flexcop_pid_feed_control:              ; @flexcop_pid_feed_control
	.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	x20, x2
	mov	x21, x1
	mov	x19, x0
	mov	w8, #-6
	ldp	w9, w10, [x0]
	mul	w8, w9, w8
	add	w8, w8, w10, lsl #5
	add	w10, w8, #6
	cmp	w2, #0
	mov	w8, #-1
	cneg	w9, w8, ne
	ldr	w8, [x0, #8]
	add	w8, w8, w9
	str	w8, [x0, #8]
	ldr	w1, [x1]
	cmp	w1, w10
	b.lt	LBB0_2
; %bb.1:
	ldr	x10, [x19, #16]
	add	x9, x10, w9, sxtw
	str	x9, [x19, #16]
LBB0_2:
	ldr	x9, [x19, #32]
	cbz	x9, LBB0_5
LBB0_3:
	ldr	w2, [x21, #4]
	mov	x0, x19
	mov	x3, x20
	bl	_flexcop_pid_control
	ldr	x8, [x19, #16]
	cmp	x8, #0
	b.le	LBB0_8
; %bb.4:
	mov	w1, #1
	b	LBB0_9
LBB0_5:
	cmp	w8, w20
	b.ne	LBB0_10
; %bb.6:
	mov	x0, x19
	mov	x1, x20
	bl	_flexcop_toggle_fullts_streaming
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_10
; %bb.7:
	ldr	w1, [x21]
	b	LBB0_3
LBB0_8:
	ldr	w8, [x21, #4]
	cmp	w8, #2, lsl #12                 ; =8192
	csel	w1, w20, wzr, eq
LBB0_9:
	mov	x0, x19
	bl	_flexcop_toggle_fullts_streaming
LBB0_10:
	ldr	w8, [x19, #8]
	cmp	w8, w20
	b.ne	LBB0_15
; %bb.11:
	mov	x0, x19
	mov	x1, x20
	bl	_flexcop_rcv_data_ctrl
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_13
; %bb.12:
	mov	x0, x19
	mov	x1, x20
	blr	x8
LBB0_13:
	cbnz	w20, LBB0_15
; %bb.14:
	mov	x0, x19
	bl	_flexcop_reset_block_300
	mov	x0, x19
	bl	_flexcop_hw_filter_init
LBB0_15:
	mov	w0, #0
	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
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
