// File: /workspace/github_cpp_makefile_star2_O1/XuhuiSun95[P]Ticket-Booking-Service/server/ServerInterface.cpp
// Function: ServerInterface::Init()
void ServerInterface::Init() {

    std::cout << "Initializing Server..." << std::endl;
    std::cout << "Vending ticket type (movies or plays): ";
    std::cin >> mServerName;
    if(mServerName.compare("movies")!=0 && mServerName.compare("plays")!=0) {

        std::cout << "Please enter valid type!" << std::endl;
        mServerName = "";
        return;
    }

    std::string address = "";
    int port = -1;

    std::cout << "Enter Server INFO" << std::endl;
    std::cout << std::setw(20) << std::left << "IP address: ";
    std::cin >> address;
    std::cout << std::setw(20) << std::left << "Port: ";
    std::cin >> port;
    if(!std::cin.good() || port<1000) {

        std::cout << "Please enter valid port!" << std::endl;
        std::cin.clear();
        std::cin.ignore(INT_MAX, '\n');
        mServerName = "";
        return;
    }
    std::cout << std::endl;
    mServerInfo = std::make_pair(address, port);

    std::cout << "Enter Pair Server INFO" << std::endl;
    std::cout << std::setw(20) << std::left << "IP address: ";
    std::cin >> address;
    std::cout << std::setw(20) << std::left << "Port: ";
    std::cin >> port;
    if(!std::cin.good() || port<1000) {

        std::cout << "Please enter valid port!" << std::endl;
        std::cin.clear();
        std::cin.ignore(INT_MAX, '\n');
        mServerName = "";
        return;
    }
    std::cout << std::endl;
    mPairInfo = std::make_pair(address, port);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
movq 0x3e61(%rip), %r15      # 0x6fd0
leaq 0x2024(%rip), %rsi      # 0x519a
movl $0x16, %edx
movq %r15, %rdi
callq 0x2210
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21d0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2150
leaq 0x2000(%rip), %rsi      # 0x51b1
movl $0x27, %edx
movq %r15, %rdi
callq 0x2210
leaq 0x8(%rbx), %r14
movq 0x3e17(%rip), %rdi      # 0x6fe0
movq %r14, %rsi
callq 0x2240
leaq 0x2001(%rip), %rsi      # 0x51d9
movq %r14, %rdi
callq 0x2080
testl %eax, %eax
je 0x3258
leaq 0x1ff5(%rip), %rsi      # 0x51e0
movq %r14, %rdi
callq 0x2080
testl %eax, %eax
je 0x3258
leaq 0x1fe8(%rip), %rsi      # 0x51e6
movl $0x18, %edx
movq %r15, %rdi
callq 0x2210
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21d0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2150
movq 0x10(%rbx), %rdx
leaq 0x20c9(%rip), %rcx      # 0x5306
movq %r14, %rdi
xorl %esi, %esi
xorl %r8d, %r8d
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x22a0
leaq -0x40(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x209f(%rip), %rdx      # 0x5306
leaq -0x50(%rbp), %rdi
movq %rdx, %rsi
callq 0x2d4c
movl $0xffffffff, -0x2c(%rbp) # imm = 0xFFFFFFFF
movq 0x3d4f(%rip), %r15      # 0x6fd0
leaq 0x1f77(%rip), %rsi      # 0x51ff
movl $0x11, %edx
movq %r15, %rdi
callq 0x2210
movq (%r15), %rax
addq -0x18(%rax), %r15
movq %r15, %rdi
movl $0xa, %esi
callq 0x21d0
movsbl %al, %esi
movq 0x3d1d(%rip), %r12      # 0x6fd0
movq %r12, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2150
movq (%r12), %rax
movq -0x18(%rax), %rcx
movq $0x14, 0x10(%r12,%rcx)
movq -0x18(%rax), %rax
movl $0xffffff4f, %ecx       # imm = 0xFFFFFF4F
andl 0x18(%r12,%rax), %ecx
orl $0x20, %ecx
movl %ecx, 0x18(%r12,%rax)
leaq 0x1f20(%rip), %rsi      # 0x5211
movl $0xc, %edx
movq %r12, %rdi
callq 0x2210
movq 0x3cdb(%rip), %rdi      # 0x6fe0
leaq -0x50(%rbp), %rsi
callq 0x2240
movq (%r12), %rax
movq -0x18(%rax), %rcx
movq $0x14, 0x10(%r12,%rcx)
movq -0x18(%rax), %rax
movl $0xffffff4f, %ecx       # imm = 0xFFFFFF4F
andl 0x18(%r12,%rax), %ecx
orl $0x20, %ecx
movl %ecx, 0x18(%r12,%rax)
leaq 0x1ee2(%rip), %rsi      # 0x521e
movl $0x6, %edx
movq %r12, %rdi
callq 0x2210
movq 0x3c90(%rip), %r15      # 0x6fe0
leaq -0x2c(%rbp), %rsi
movq %r15, %rdi
callq 0x2120
movq (%r15), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0x20(%r15,%rax)
jne 0x356d
cmpl $0x3e7, -0x2c(%rbp)     # imm = 0x3E7
jle 0x356d
movq (%r12), %rax
addq -0x18(%rax), %r12
movq %r12, %rdi
movl $0xa, %esi
callq 0x21d0
movsbl %al, %esi
movq 0x3c35(%rip), %rdi      # 0x6fd0
callq 0x2030
movq %rax, %rdi
callq 0x2150
leaq -0x68(%rbp), %r13
movq %r13, -0x10(%r13)
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
addq %rsi, %rdx
leaq -0x78(%rbp), %rdi
callq 0x2cb2
movl -0x2c(%rbp), %eax
leaq -0x78(%rbp), %r12
movl %eax, 0x20(%r12)
leaq 0x28(%rbx), %rdi
movq %r12, %rsi
callq 0x2230
movl 0x20(%r12), %eax
movl %eax, 0x48(%rbx)
movq (%r12), %rdi
cmpq %r13, %rdi
je 0x33f2
callq 0x21c0
movq 0x3bd7(%rip), %r12      # 0x6fd0
leaq 0x1e3e(%rip), %rsi      # 0x523e
movl $0x16, %edx
movq %r12, %rdi
callq 0x2210
movq (%r12), %rax
addq -0x18(%rax), %r12
movq %r12, %rdi
movl $0xa, %esi
callq 0x21d0
movsbl %al, %esi
movq 0x3ba4(%rip), %r12      # 0x6fd0
movq %r12, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2150
movq (%r12), %rax
movq -0x18(%rax), %rcx
movq $0x14, 0x10(%r12,%rcx)
movq -0x18(%rax), %rax
movl $0xffffff4f, %ecx       # imm = 0xFFFFFF4F
andl 0x18(%r12,%rax), %ecx
orl $0x20, %ecx
movl %ecx, 0x18(%r12,%rax)
leaq 0x1da7(%rip), %rsi      # 0x5211
movl $0xc, %edx
movq %r12, %rdi
callq 0x2210
movq 0x3b62(%rip), %rdi      # 0x6fe0
leaq -0x50(%rbp), %rsi
callq 0x2240
movq (%r12), %rax
movq -0x18(%rax), %rcx
movq $0x14, 0x10(%r12,%rcx)
movq -0x18(%rax), %rax
movl $0xffffff4f, %ecx       # imm = 0xFFFFFF4F
andl 0x18(%r12,%rax), %ecx
orl $0x20, %ecx
movl %ecx, 0x18(%r12,%rax)
leaq 0x1d69(%rip), %rsi      # 0x521e
movl $0x6, %edx
movq %r12, %rdi
callq 0x2210
movq 0x3b17(%rip), %r13      # 0x6fe0
leaq -0x2c(%rbp), %rsi
movq %r13, %rdi
callq 0x2120
movq (%r13), %rax
movq -0x18(%rax), %rax
cmpl $0x0, 0x20(%r13,%rax)
jne 0x356d
cmpl $0x3e7, -0x2c(%rbp)     # imm = 0x3E7
jle 0x356d
movq (%r12), %rax
addq -0x18(%rax), %r12
movq %r12, %rdi
movl $0xa, %esi
callq 0x21d0
movsbl %al, %esi
movq 0x3abf(%rip), %rdi      # 0x6fd0
callq 0x2030
movq %rax, %rdi
callq 0x2150
leaq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %r15
movq %r15, (%rdi)
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
addq %rsi, %rdx
callq 0x2cb2
movl -0x2c(%rbp), %eax
leaq -0x78(%rbp), %r14
movl %eax, 0x20(%r14)
leaq 0x50(%rbx), %rdi
movq %r14, %rsi
callq 0x2230
movl 0x20(%r14), %eax
movl %eax, 0x70(%rbx)
movq (%r14), %rdi
cmpq %r15, %rdi
je 0x35f3
callq 0x21c0
jmp 0x35f3
movq 0x3a5c(%rip), %r12      # 0x6fd0
leaq 0x1caa(%rip), %rsi      # 0x5225
movl $0x18, %edx
movq %r12, %rdi
callq 0x2210
movq (%r12), %rax
addq -0x18(%rax), %r12
movq %r12, %rdi
movl $0xa, %esi
callq 0x21d0
movsbl %al, %esi
movq 0x3a29(%rip), %rdi      # 0x6fd0
callq 0x2030
movq %rax, %rdi
callq 0x2150
movq (%r15), %rax
addq -0x18(%rax), %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x22b0
movq 0x3a14(%rip), %rdi      # 0x6fe0
movl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
movl $0xa, %edx
callq 0x2130
movq 0x10(%rbx), %rdx
leaq 0x1d20(%rip), %rcx      # 0x5306
movq %r14, %rdi
xorl %esi, %esi
xorl %r8d, %r8d
callq 0x22a0
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x3605
callq 0x21c0
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3618
jmp 0x3618
movq %rax, %rbx
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x362d
callq 0x21c0
movq %rbx, %rdi
callq 0x22f0
nop