// File: wrighteagle2d[P]wrighteaglebase/Debug/../src/PlayerState.h
// Function: PlayerState::AutoUpdate(int, double)
inline void PlayerState::AutoUpdate(int delay_add, double conf_dec_factor) {
  MobileState::AutoUpdate(delay_add, conf_dec_factor);

  mNeckDir.AutoUpdate(delay_add, conf_dec_factor);
  mBodyDir.AutoUpdate(delay_add, conf_dec_factor);
  mArmPoint.AutoUpdate(delay_add, conf_dec_factor);
  mFocusOn.AutoUpdate(delay_add, conf_dec_factor);

  mCollideWithPost = false;
  mCollideWithPlayer = false;
  mCollideWithBall = false;
  mIsKicked = false;
  mIsTired = false;

  if (mTackleBan > 0) {
    mTackleBan -= delay_add;
    mTackleBan = Max(mTackleBan, 0);
  }

  if (mFoulChargedCycle > 0) {
    mFoulChargedCycle -= delay_add;
    mFoulChargedCycle = Max(mFoulChargedCycle, 0);
  }

  if (mCatchBan > 0) {
    mCatchBan -= delay_add;
    mCatchBan = Max(mCatchBan, 0);
  }

  if (mArmPoint.mValue.mExpireBan > 0) {
    mArmPoint.mValue.mExpireBan -= delay_add;
    mArmPoint.mValue.mExpireBan = Max(mArmPoint.mValue.mExpireBan, 0);
  }

  if (mArmPoint.mValue.mMovableBan > 0) {
    mArmPoint.mValue.mMovableBan -= delay_add;
    mArmPoint.mValue.mMovableBan = Max(mArmPoint.mValue.mMovableBan, 0);
  }

  if (GetPosDelay() > delay_add) {
    mIsBodyDirMayChanged = true;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movsd %xmm0, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x38(%rbp)
movl -0xc(%rbp), %esi
movsd -0x18(%rbp), %xmm0
callq 0x14340
movq -0x38(%rbp), %rdi
addq $0x98, %rdi
movl -0xc(%rbp), %esi
movsd -0x18(%rbp), %xmm0
callq 0xbe900
movq -0x38(%rbp), %rdi
addq $0xb0, %rdi
movl -0xc(%rbp), %esi
movsd -0x18(%rbp), %xmm0
callq 0xbe900
movq -0x38(%rbp), %rdi
addq $0xd0, %rdi
movl -0xc(%rbp), %esi
movsd -0x18(%rbp), %xmm0
callq 0xbe930
movq -0x38(%rbp), %rdi
addq $0xf8, %rdi
movl -0xc(%rbp), %esi
movsd -0x18(%rbp), %xmm0
callq 0xbe960
movq -0x38(%rbp), %rax
movb $0x0, 0x122(%rax)
movb $0x0, 0x121(%rax)
movb $0x0, 0x120(%rax)
movb $0x0, 0x111(%rax)
movb $0x0, 0x160(%rax)
cmpl $0x0, 0xc8(%rax)
jle 0xbe1c4
movq -0x38(%rbp), %rdi
movl -0xc(%rbp), %ecx
movl 0xc8(%rdi), %eax
subl %ecx, %eax
movl %eax, 0xc8(%rdi)
addq $0xc8, %rdi
movl $0x0, -0x1c(%rbp)
leaq -0x1c(%rbp), %rsi
callq 0x329c0
movq %rax, %rcx
movq -0x38(%rbp), %rax
movl (%rcx), %ecx
movl %ecx, 0xc8(%rax)
movq -0x38(%rbp), %rax
cmpl $0x0, 0x124(%rax)
jle 0xbe20c
movq -0x38(%rbp), %rdi
movl -0xc(%rbp), %ecx
movl 0x124(%rdi), %eax
subl %ecx, %eax
movl %eax, 0x124(%rdi)
addq $0x124, %rdi            # imm = 0x124
movl $0x0, -0x20(%rbp)
leaq -0x20(%rbp), %rsi
callq 0x329c0
movq %rax, %rcx
movq -0x38(%rbp), %rax
movl (%rcx), %ecx
movl %ecx, 0x124(%rax)
movq -0x38(%rbp), %rax
cmpl $0x0, 0xcc(%rax)
jle 0xbe254
movq -0x38(%rbp), %rdi
movl -0xc(%rbp), %ecx
movl 0xcc(%rdi), %eax
subl %ecx, %eax
movl %eax, 0xcc(%rdi)
addq $0xcc, %rdi
movl $0x0, -0x24(%rbp)
leaq -0x24(%rbp), %rsi
callq 0x329c0
movq %rax, %rcx
movq -0x38(%rbp), %rax
movl (%rcx), %ecx
movl %ecx, 0xcc(%rax)
movq -0x38(%rbp), %rax
cmpl $0x0, 0xd4(%rax)
jle 0xbe2a0
movq -0x38(%rbp), %rdi
movl -0xc(%rbp), %ecx
movl 0xd4(%rdi), %eax
subl %ecx, %eax
movl %eax, 0xd4(%rdi)
addq $0xd0, %rdi
addq $0x4, %rdi
movl $0x0, -0x28(%rbp)
leaq -0x28(%rbp), %rsi
callq 0x329c0
movq %rax, %rcx
movq -0x38(%rbp), %rax
movl (%rcx), %ecx
movl %ecx, 0xd4(%rax)
movq -0x38(%rbp), %rax
cmpl $0x0, 0xd0(%rax)
jle 0xbe2e8
movq -0x38(%rbp), %rdi
movl -0xc(%rbp), %ecx
movl 0xd0(%rdi), %eax
subl %ecx, %eax
movl %eax, 0xd0(%rdi)
addq $0xd0, %rdi
movl $0x0, -0x2c(%rbp)
leaq -0x2c(%rbp), %rsi
callq 0x329c0
movq %rax, %rcx
movq -0x38(%rbp), %rax
movl (%rcx), %ecx
movl %ecx, 0xd0(%rax)
movq -0x38(%rbp), %rdi
addq $0x8, %rdi
callq 0x1ddd0
cmpl -0xc(%rbp), %eax
jle 0xbe305
movq -0x38(%rbp), %rax
movb $0x1, 0x174(%rax)
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)