// File: hobbitsyfeet[P]Turn/main.cc
// Function: getPlayer[abi:cxx11]()
string getPlayer(){
  Unit tempPlayer;
  string option="";

  // create a new or load an already created player
  while (option != "load" && option !="new" ){
    cout<<"new or load>>"<<endl;
    cin>>option;
    if(option != "load" && option !="new" )
      cout<<"try again:\n";
  }

  // new player writes file and uses it
  if(option == "new"){
    cout<<"who? >>";
    cin>> option;
    tempPlayer.setName(option);
    //writes files to load later
    tempPlayer.saveUnit(option);
  }
  //uses an already existing file
  else if(option == "load"){
    cout<<"who? >>";
    cin >> option;
  }
  return option;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x210, %rsp            # imm = 0x210
movq %rdi, -0x160(%rbp)
movq %rdi, %rax
movq %rax, -0x158(%rbp)
movq %rdi, -0x8(%rbp)
leaq -0xc9(%rbp), %rdi
movq %rdi, -0x150(%rbp)
callq 0x3450
movq -0x150(%rbp), %rdx
leaq 0xe0b0(%rip), %rsi      # 0x12051
leaq -0xc8(%rbp), %rdi
callq 0x47d0
jmp 0x3faf
leaq -0x101(%rbp), %rdi
movq %rdi, -0x168(%rbp)
callq 0x3450
movq -0x168(%rbp), %rdx
leaq 0xe088(%rip), %rsi      # 0x12058
leaq -0x100(%rbp), %rdi
callq 0x47d0
jmp 0x3fde
movq %rsp, %rax
movq %rax, -0x170(%rbp)
leaq -0x100(%rbp), %rcx
movq %rcx, 0x78(%rax)
movl $0x0, 0x70(%rax)
movl $0x0, 0x68(%rax)
movl $0x0, 0x60(%rax)
movl $0x0, 0x58(%rax)
movl $0x0, 0x50(%rax)
movl $0x0, 0x48(%rax)
movl $0x14, 0x40(%rax)
movl $0x1c, 0x38(%rax)
movl $0x6, 0x30(%rax)
movl $0x0, 0x28(%rax)
movl $0x0, 0x20(%rax)
movl $0x2d, 0x18(%rax)
movl $0x0, 0x10(%rax)
movl $0x1, 0x8(%rax)
movl $0x0, (%rax)
leaq -0xa8(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
movl $0x1, %edx
movl $0xf, %r8d
movl $0x2, %r9d
movl %r8d, %ecx
callq 0x4eb0
jmp 0x4084
leaq -0x100(%rbp), %rdi
callq 0x31c0
leaq -0x101(%rbp), %rdi
callq 0x32d0
leaq -0xc8(%rbp), %rdi
callq 0x31c0
leaq -0xc9(%rbp), %rdi
callq 0x32d0
movb $0x0, -0x102(%rbp)
leaq -0x103(%rbp), %rdi
movq %rdi, -0x178(%rbp)
callq 0x3450
movq -0x160(%rbp), %rdi
movq -0x178(%rbp), %rdx
leaq 0xe3a8(%rip), %rsi      # 0x1248b
callq 0x47d0
jmp 0x40ea
leaq -0x103(%rbp), %rdi
callq 0x32d0
movq -0x160(%rbp), %rdi
leaq 0xdf5e(%rip), %rsi      # 0x12062
callq 0x48e0
movb %al, -0x179(%rbp)
jmp 0x4111
movb -0x179(%rbp), %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x17a(%rbp)
jne 0x4126
jmp 0x414f
movq -0x160(%rbp), %rdi
leaq 0xdf33(%rip), %rsi      # 0x12067
callq 0x48e0
movb %al, -0x17b(%rbp)
jmp 0x4141
movb -0x17b(%rbp), %al
movb %al, -0x17a(%rbp)
jmp 0x414f
movb -0x17a(%rbp), %al
testb $0x1, %al
jne 0x415e
jmp 0x42c0
movq 0x14e6b(%rip), %rdi     # 0x18fd0
leaq 0xdeff(%rip), %rsi      # 0x1206b
callq 0x3280
movq %rax, -0x188(%rbp)
jmp 0x417a
movq -0x188(%rbp), %rdi
movq 0x14e38(%rip), %rsi     # 0x18fc0
callq 0x32b0
jmp 0x418f
movq -0x160(%rbp), %rsi
movq 0x14e43(%rip), %rdi     # 0x18fe0
callq 0x3350
jmp 0x41a4
movq -0x160(%rbp), %rdi
leaq 0xdeb0(%rip), %rsi      # 0x12062
callq 0x48e0
movb %al, -0x189(%rbp)
jmp 0x41bf
movb -0x189(%rbp), %al
testb $0x1, %al
jne 0x41ce
jmp 0x42bb
movq -0x160(%rbp), %rdi
leaq 0xde8b(%rip), %rsi      # 0x12067
callq 0x48e0
movb %al, -0x18a(%rbp)
jmp 0x41e9
movb -0x18a(%rbp), %al
testb $0x1, %al
jne 0x41f8
jmp 0x42bb
movq 0x14dd1(%rip), %rdi     # 0x18fd0
leaq 0xde73(%rip), %rsi      # 0x12079
callq 0x3280
jmp 0x420d
jmp 0x42bb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd8(%rbp)
movl %eax, -0xdc(%rbp)
jmp 0x4270
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd8(%rbp)
movl %eax, -0xdc(%rbp)
jmp 0x4258
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd8(%rbp)
movl %eax, -0xdc(%rbp)
leaq -0x100(%rbp), %rdi
callq 0x31c0
leaq -0x101(%rbp), %rdi
callq 0x32d0
leaq -0xc8(%rbp), %rdi
callq 0x31c0
leaq -0xc9(%rbp), %rdi
callq 0x32d0
jmp 0x4470
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd8(%rbp)
movl %eax, -0xdc(%rbp)
leaq -0x103(%rbp), %rdi
callq 0x32d0
jmp 0x4464
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd8(%rbp)
movl %eax, -0xdc(%rbp)
jmp 0x4458
jmp 0x40f6
movq -0x160(%rbp), %rdi
leaq 0xdd99(%rip), %rsi      # 0x12067
callq 0x4880
movb %al, -0x18b(%rbp)
jmp 0x42db
movb -0x18b(%rbp), %al
testb $0x1, %al
jne 0x42ea
jmp 0x43cb
movq 0x14cdf(%rip), %rdi     # 0x18fd0
leaq 0xdd8d(%rip), %rsi      # 0x12085
callq 0x3280
jmp 0x42ff
movq -0x160(%rbp), %rsi
movq 0x14cd3(%rip), %rdi     # 0x18fe0
callq 0x3350
jmp 0x4314
movq -0x160(%rbp), %rsi
leaq -0x128(%rbp), %rdi
callq 0x3140
jmp 0x4329
leaq -0xa8(%rbp), %rdi
leaq -0x128(%rbp), %rsi
callq 0x50b0
jmp 0x433e
leaq -0x128(%rbp), %rdi
callq 0x31c0
movq -0x160(%rbp), %rsi
leaq -0x148(%rbp), %rdi
callq 0x3140
jmp 0x435f
leaq -0xa8(%rbp), %rdi
leaq -0x148(%rbp), %rsi
callq 0x5d30
jmp 0x4374
leaq -0x148(%rbp), %rdi
callq 0x31c0
jmp 0x4420
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd8(%rbp)
movl %eax, -0xdc(%rbp)
leaq -0x128(%rbp), %rdi
callq 0x31c0
jmp 0x4458
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xd8(%rbp)
movl %eax, -0xdc(%rbp)
leaq -0x148(%rbp), %rdi
callq 0x31c0
jmp 0x4458
movq -0x160(%rbp), %rdi
leaq 0xdc89(%rip), %rsi      # 0x12062
callq 0x4880
movb %al, -0x18c(%rbp)
jmp 0x43e6
movb -0x18c(%rbp), %al
testb $0x1, %al
jne 0x43f2
jmp 0x441e
movq 0x14bd7(%rip), %rdi     # 0x18fd0
leaq 0xdc85(%rip), %rsi      # 0x12085
callq 0x3280
jmp 0x4407
movq -0x160(%rbp), %rsi
movq 0x14bcb(%rip), %rdi     # 0x18fe0
callq 0x3350
jmp 0x441c
jmp 0x441e
jmp 0x4420
movb $0x1, -0x102(%rbp)
testb $0x1, -0x102(%rbp)
jne 0x443c
movq -0x160(%rbp), %rdi
callq 0x31c0
leaq -0xa8(%rbp), %rdi
callq 0x4910
movq -0x158(%rbp), %rax
addq $0x210, %rsp            # imm = 0x210
popq %rbp
retq
movq -0x160(%rbp), %rdi
callq 0x31c0
leaq -0xa8(%rbp), %rdi
callq 0x4910
movq -0xd8(%rbp), %rdi
callq 0x3440
nopl (%rax)