// File: nickgammon[P]tinymudserver/commands.cpp
// Function: DoClearFlag(tPlayer*, std::istream&)
void DoClearFlag (tPlayer * p, istream & sArgs)
{
  p->NeedFlag ("can_setflag");  // permissions
  tPlayer * ptarget = p->GetPlayer (sArgs, "Usage: clearflag <who> <flag>");  // who
  string flag = GetFlag (sArgs, "Clear which flag?"); // what
  NoMore (p, sArgs);  // check no more input
  if (ptarget->flags.find (flag) == ptarget->flags.end ())    // check set
    throw runtime_error ("Flag not set.");

  ptarget->flags.erase (flag);    // clear it
  *p << "You clear the flag '" << flag << "' for " << ptarget->playername << "\n";  // confirm
      
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x140, %rsp            # imm = 0x140
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xe0(%rbp)
leaq -0x31(%rbp), %rdi
movq %rdi, -0xd8(%rbp)
callq 0x46e0
movq -0xd8(%rbp), %rdx
leaq 0xa4b9(%rip), %rsi      # 0x1c4c5
leaq -0x30(%rbp), %rdi
callq 0x67d0
jmp 0x12017
movq -0xe0(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x82b0
jmp 0x12029
leaq -0x30(%rbp), %rdi
callq 0x47d8
leaq -0x31(%rbp), %rdi
callq 0x44a0
movq -0x8(%rbp), %rax
movq %rax, -0xf8(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0xf0(%rbp)
leaq -0x71(%rbp), %rdi
movq %rdi, -0xe8(%rbp)
callq 0x46e0
movq -0xe8(%rbp), %rdx
leaq 0xa4ba(%rip), %rsi      # 0x1c529
leaq -0x70(%rbp), %rdi
callq 0x67d0
jmp 0x1207a
movq -0xf0(%rbp), %rsi
movq -0xf8(%rbp), %rdi
movb $0x0, -0x72(%rbp)
leaq -0x70(%rbp), %rdx
leaq -0x72(%rbp), %rcx
callq 0x77e0
movq %rax, -0x100(%rbp)
jmp 0x120a2
leaq -0x70(%rbp), %rdi
callq 0x47d8
leaq -0x71(%rbp), %rdi
callq 0x44a0
movq -0x100(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x110(%rbp)
leaq -0xb9(%rbp), %rdi
movq %rdi, -0x108(%rbp)
callq 0x46e0
movq -0x108(%rbp), %rdx
leaq 0xa45c(%rip), %rsi      # 0x1c547
leaq -0xb8(%rbp), %rdi
callq 0x67d0
jmp 0x120f9
movq -0x110(%rbp), %rsi
leaq -0x98(%rbp), %rdi
leaq -0xb8(%rbp), %rdx
callq 0x10770
jmp 0x12115
leaq -0xb8(%rbp), %rdi
callq 0x47d8
leaq -0xb9(%rbp), %rdi
callq 0x44a0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x10580
jmp 0x1213c
movq -0x50(%rbp), %rdi
addq $0xe0, %rdi
leaq -0x98(%rbp), %rsi
callq 0x8fc0
movq %rax, -0x118(%rbp)
jmp 0x1215c
movq -0x118(%rbp), %rax
movq %rax, -0xc8(%rbp)
movq -0x50(%rbp), %rdi
addq $0xe0, %rdi
callq 0x8f30
movq %rax, -0xd0(%rbp)
leaq -0xc8(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
callq 0xc750
testb $0x1, %al
jne 0x1219d
jmp 0x122a8
movl $0x10, %edi
callq 0x4250
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x120(%rbp)
leaq 0xa39e(%rip), %rsi      # 0x1c559
callq 0x41c0
jmp 0x121c2
movq -0x120(%rbp), %rdi
movq 0x16e20(%rip), %rsi     # 0x28ff0
movq 0x16de1(%rip), %rdx     # 0x28fb8
callq 0x46a0
jmp 0x12371
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x12204
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x47d8
leaq -0x31(%rbp), %rdi
callq 0x44a0
jmp 0x12368
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x12235
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x47d8
leaq -0x71(%rbp), %rdi
callq 0x44a0
jmp 0x12368
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x12269
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0xb8(%rbp), %rdi
callq 0x47d8
leaq -0xb9(%rbp), %rdi
callq 0x44a0
jmp 0x12368
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x1235c
movq -0x120(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
callq 0x4350
jmp 0x1235c
movq -0x50(%rbp), %rdi
addq $0xe0, %rdi
leaq -0x98(%rbp), %rsi
callq 0x14760
jmp 0x122c1
movq -0x8(%rbp), %rdi
leaq 0xa29b(%rip), %rsi      # 0x1c567
callq 0x14790
movq %rax, -0x128(%rbp)
jmp 0x122da
movq -0x128(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0xb450
movq %rax, -0x130(%rbp)
jmp 0x122f6
movq -0x130(%rbp), %rdi
leaq 0xa21e(%rip), %rsi      # 0x1c522
callq 0x14660
movq %rax, -0x138(%rbp)
jmp 0x12312
movq -0x138(%rbp), %rdi
movq -0x50(%rbp), %rsi
addq $0x90, %rsi
callq 0xb450
movq %rax, -0x140(%rbp)
jmp 0x12332
movq -0x140(%rbp), %rdi
leaq 0x9d94(%rip), %rsi      # 0x1c0d4
callq 0x13b80
jmp 0x12347
leaq -0x98(%rbp), %rdi
callq 0x47d8
addq $0x140, %rsp            # imm = 0x140
popq %rbp
retq
leaq -0x98(%rbp), %rdi
callq 0x47d8
movq -0x40(%rbp), %rdi
callq 0x46d0
nopw %cs:(%rax,%rax)