// File: /workspace/github_cpp_makefile_star2_O1/wrighteagle2d[P]wrighteaglebase/Debug/../src/Formation.cpp
// Function: Formation::Rollback(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void Formation::Rollback(std::string update_name) {
  if (!mFormationTypeStack.empty()) {
    mFormationTypeStack.pop();
    if (!mFormationTypeStack.empty()) {
      SetTeammateFormationType(mFormationTypeStack.top().first);
      SetOpponentFormationType(mFormationTypeStack.top().second);
    }
  } else {
    Assert(!"mFormationTypeStack.empty()");
  }

  Logger::instance().GetTextLogger("formation_update")
      << mAgent.GetWorldState().CurrentTime() << ", " << mAgent.GetAgentID()
      << ", -, " << mFormationTypeStack.size() << ": " << update_name << endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, -0x50(%rbp)
movq %rdi, %r14
movq 0x50(%rdi), %rax
cmpq 0x30(%rdi), %rax
je 0x27913
leaq 0x20(%r14), %rdi
callq 0x290ac
movq 0x50(%r14), %rax
cmpq 0x30(%r14), %rax
je 0x27913
movq 0x58(%r14), %rsi
movq %rax, %rdi
cmpq %rsi, %rax
jne 0x278c4
movq 0x68(%r14), %rcx
movl $0x200, %edi            # imm = 0x200
addq -0x8(%rcx), %rdi
movq 0x8(%r14), %rcx
movzbl 0xc(%rcx), %edx
movl %edx, %r8d
shll $0x5, %r8d
leaq 0x66796(%rip), %rcx     # 0x8e070
addq %rcx, %r8
movl -0x8(%rdi), %edi
movq 0x40(%r8,%rdi,8), %rdi
movq %rdi, 0x10(%r14)
cmpq %rsi, %rax
jne 0x278fb
movq 0x68(%r14), %rsi
movl $0x200, %eax            # imm = 0x200
addq -0x8(%rsi), %rax
movl -0x4(%rax), %eax
xorb $0x1, %dl
movzbl %dl, %edx
shll $0x5, %edx
addq %rdx, %rcx
movq 0x40(%rcx,%rax,8), %rax
movq %rax, 0x18(%r14)
callq 0x35b4a
leaq 0x44d31(%rip), %rsi     # 0x6c650
movq %rax, %rdi
callq 0x35d5e
movq %rax, %r15
movq 0x8(%r14), %rax
movq 0x18(%rax), %r12
callq 0x450ba
cmpb $0x1, 0x5c45(%rax)
jne 0x27956
addq $0x10, %r12
movq %r15, %rdi
addq $0x210, %rdi            # imm = 0x210
movq %r12, %rsi
callq 0xea74
leaq 0x44d07(%rip), %rsi     # 0x6c664
movq %r15, %rdi
callq 0x2833e
movq %rax, %r15
movq 0x8(%r14), %rax
movl 0x8(%rax), %ecx
movq 0x18(%rax), %rdx
movq 0x10(%rdx), %rdx
movb 0xc(%rax), %al
movl %ecx, -0x38(%rbp)
movq %rdx, -0x34(%rbp)
movb %al, -0x2c(%rbp)
movq -0x38(%rbp), %rax
movq -0x30(%rbp), %rcx
movq %rax, -0x38(%rbp)
movl %ecx, -0x30(%rbp)
shrq $0x20, %rcx
movb %cl, -0x2c(%rbp)
callq 0x450ba
cmpb $0x1, 0x5c45(%rax)
jne 0x279bb
movq %r15, %rdi
addq $0x210, %rdi            # imm = 0x210
leaq -0x38(%rbp), %rsi
callq 0x29072
leaq 0x44ca5(%rip), %rsi     # 0x6c667
movq %r15, %rdi
callq 0x28388
movq %rax, %r15
movq 0x68(%r14), %r13
movq 0x48(%r14), %rbx
movq 0x50(%r14), %r12
movq 0x58(%r14), %rax
movq %rax, -0x40(%rbp)
movq 0x30(%r14), %rax
movq %rax, -0x48(%rbp)
movq 0x40(%r14), %r14
callq 0x450ba
cmpb $0x1, 0x5c45(%rax)
jne 0x27a39
movq %r13, %rax
subq %rbx, %rax
shrq $0x3, %rax
cmpq $0x1, %r13
adcq $-0x1, %rax
shlq $0x6, %rax
subq -0x40(%rbp), %r12
sarq $0x3, %r12
subq -0x48(%rbp), %r14
sarq $0x3, %r14
addq %r12, %r14
addq %rax, %r14
movq %r15, %rdi
addq $0x210, %rdi            # imm = 0x210
movq %r14, %rsi
callq 0x9320
leaq 0x45a40(%rip), %rsi     # 0x6d480
movq %r15, %rdi
callq 0x2833e
movq %rax, %rdi
movq -0x50(%rbp), %rsi
callq 0x283d2
movq %rax, %rbx
callq 0x450ba
cmpb $0x1, 0x5c45(%rax)
jne 0x27a9a
movq %rbx, %r14
addq $0x210, %r14            # imm = 0x210
movq 0x210(%rbx), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x9480
movsbl %al, %esi
movq %r14, %rdi
callq 0x9070
movq %rax, %rdi
callq 0x9330
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop