// File: /workspace/github_cpp_makefile_star2_O3/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 0x270f3
leaq 0x20(%r14), %rdi
callq 0x28856
movq 0x50(%r14), %rcx
cmpq 0x30(%r14), %rcx
je 0x270f3
cmpq 0x58(%r14), %rcx
je 0x2709e
movl -0x8(%rcx), %edx
movq 0x8(%r14), %rax
movzbl 0xc(%rax), %eax
movl %eax, %esi
shll $0x5, %esi
leaq 0x63fe0(%rip), %rdi     # 0x8b070
addq %rsi, %rdi
movq 0x40(%rdi,%rdx,8), %rdx
movq %rdx, 0x10(%r14)
jmp 0x270d5
movq 0x8(%r14), %rax
movq 0x68(%r14), %rdx
movq -0x8(%rdx), %rcx
movl 0x1f8(%rcx), %ecx
movzbl 0xc(%rax), %eax
movl %eax, %esi
shll $0x5, %esi
leaq 0x63fb0(%rip), %rdi     # 0x8b070
addq %rsi, %rdi
movq 0x40(%rdi,%rcx,8), %rcx
movq %rcx, 0x10(%r14)
movl $0x200, %ecx            # imm = 0x200
addq -0x8(%rdx), %rcx
movl -0x4(%rcx), %ecx
xorb $0x1, %al
movzbl %al, %eax
shll $0x5, %eax
leaq 0x63f89(%rip), %rdx     # 0x8b070
addq %rax, %rdx
movq 0x40(%rdx,%rcx,8), %rax
movq %rax, 0x18(%r14)
callq 0x34c60
leaq 0x43541(%rip), %rsi     # 0x6a640
movq %rax, %rdi
callq 0x34e74
movq %rax, %r15
movq 0x8(%r14), %rax
movq 0x18(%rax), %r12
callq 0x43dce
cmpb $0x1, 0x5c45(%rax)
jne 0x27136
addq $0x10, %r12
movq %r15, %rdi
addq $0x210, %rdi            # imm = 0x210
movq %r12, %rsi
callq 0xe974
leaq 0x43517(%rip), %rsi     # 0x6a654
movq %r15, %rdi
callq 0x27b08
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 0x43dce
cmpb $0x1, 0x5c45(%rax)
jne 0x2719b
movq %r15, %rdi
addq $0x210, %rdi            # imm = 0x210
leaq -0x38(%rbp), %rsi
callq 0x2881c
leaq 0x434b5(%rip), %rsi     # 0x6a657
movq %r15, %rdi
callq 0x27b52
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 0x43dce
cmpb $0x1, 0x5c45(%rax)
jne 0x27219
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 0x44238(%rip), %rsi     # 0x6b458
movq %r15, %rdi
callq 0x27b08
movq %rax, %rdi
movq -0x50(%rbp), %rsi
callq 0x27b9c
movq %rax, %rbx
callq 0x43dce
cmpb $0x1, 0x5c45(%rax)
jne 0x2727a
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