	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pid_calc
_pid_calc:                              ## @pid_calc
	.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	%rdi, %rbx
	movl	(%rdi), %r14d
	subl	%esi, %r14d
	movl	%r14d, %edi
	callq	_int_tofp
	movl	%eax, %r12d
	movl	%r14d, %edi
	callq	_abs
	movq	%rax, %rcx
	xorl	%eax, %eax
	cmpq	8(%rbx), %rcx
	jle	LBB0_5
## %bb.1:
	movl	16(%rbx), %edi
	movl	%r12d, %esi
	callq	_mul_fp
	movl	%eax, %r15d
	addl	%r12d, 20(%rbx)
	movl	$30, %edi
	callq	_int_tofp
	movl	20(%rbx), %edx
	movl	%eax, %ecx
	negl	%ecx
	cmpl	%eax, %edx
	cmovll	%edx, %eax
	jg	LBB0_3
## %bb.2:
	cmpl	%ecx, %eax
	jge	LBB0_4
LBB0_3:
	cmpl	%ecx, %eax
	cmovgl	%eax, %ecx
	movl	%ecx, 20(%rbx)
LBB0_4:
	movl	24(%rbx), %edi
	movl	%r14d, %esi
	subl	28(%rbx), %esi
	callq	_mul_fp
	movl	%eax, %r12d
	movl	%r14d, 28(%rbx)
	movl	20(%rbx), %edi
	movl	32(%rbx), %esi
	callq	_mul_fp
	addl	%r15d, %r12d
	addl	%eax, %r12d
	movl	%r12d, %edi
	callq	_fp_toint
LBB0_5:
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_pid_calc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pid_calc
_pid_calc:                              ; @pid_calc
	.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	x19, x0
	ldr	w8, [x0]
	sub	w20, w8, w1
	mov	x0, x20
	bl	_int_tofp
	mov	x22, x0
	mov	x0, x20
	bl	_abs
	ldr	x8, [x19, #8]
	cmp	x0, x8
	b.le	LBB0_4
; %bb.1:
	ldr	w0, [x19, #16]
	mov	x1, x22
	bl	_mul_fp
	mov	x21, x0
	ldr	w8, [x19, #20]
	add	w8, w8, w22
	str	w8, [x19, #20]
	mov	w0, #30
	bl	_int_tofp
	ldr	w9, [x19, #20]
	neg	w8, w0
	cmp	w9, w0
	csel	w9, w9, w0, lt
	ccmp	w9, w8, #8, le
	b.ge	LBB0_3
; %bb.2:
	cmp	w9, w8
	csel	w8, w9, w8, gt
	str	w8, [x19, #20]
LBB0_3:
	ldp	w0, w8, [x19, #24]
	sub	w1, w20, w8
	bl	_mul_fp
	mov	x22, x0
	str	w20, [x19, #28]
	ldr	w0, [x19, #20]
	ldr	w1, [x19, #32]
	bl	_mul_fp
	add	w8, w22, w21
	add	w0, w8, w0
	bl	_fp_toint
	b	LBB0_5
LBB0_4:
	mov	w0, #0
LBB0_5:
                                        ; kill: def $w0 killed $w0 killed $x0
	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
	.no_dead_strip	_pid_calc
.subsections_via_symbols
