// File: /workspace/github_cpp_makefile_star2_O3/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 0x3e69(%rip), %r15      # 0x6fd0
leaq 0x202c(%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 0x2008(%rip), %rsi      # 0x51b1
movl $0x27, %edx
movq %r15, %rdi
callq 0x2210
leaq 0x8(%rbx), %r14
movq 0x3e1f(%rip), %rdi      # 0x6fe0
movq %r14, %rsi
callq 0x2240
leaq 0x2009(%rip), %rsi      # 0x51d9
movq %r14, %rdi
callq 0x2080
testl %eax, %eax
je 0x3250
leaq 0x1ffd(%rip), %rsi      # 0x51e0
movq %r14, %rdi
callq 0x2080
testl %eax, %eax
je 0x3250
leaq 0x1ff0(%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 0x20d1(%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 0x20a7(%rip), %rdx      # 0x5306
leaq -0x50(%rbp), %rdi
movq %rdx, %rsi
callq 0x2d40
movl $0xffffffff, -0x2c(%rbp) # imm = 0xFFFFFFFF
movq 0x3d57(%rip), %r15      # 0x6fd0
leaq 0x1f7f(%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 0x3d25(%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 0x1f28(%rip), %rsi      # 0x5211
movl $0xc, %edx
movq %r12, %rdi
callq 0x2210
movq 0x3ce3(%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 0x1eea(%rip), %rsi      # 0x521e
movl $0x6, %edx
movq %r12, %rdi
callq 0x2210
movq 0x3c98(%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 0x3565
cmpl $0x3e7, -0x2c(%rbp)     # imm = 0x3E7
jle 0x3565
movq (%r12), %rax
addq -0x18(%rax), %r12
movq %r12, %rdi
movl $0xa, %esi
callq 0x21d0
movsbl %al, %esi
movq 0x3c3d(%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 0x2ca2
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 0x33ea
callq 0x21c0
movq 0x3bdf(%rip), %r12      # 0x6fd0
leaq 0x1e46(%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 0x3bac(%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 0x1daf(%rip), %rsi      # 0x5211
movl $0xc, %edx
movq %r12, %rdi
callq 0x2210
movq 0x3b6a(%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 0x1d71(%rip), %rsi      # 0x521e
movl $0x6, %edx
movq %r12, %rdi
callq 0x2210
movq 0x3b1f(%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 0x3565
cmpl $0x3e7, -0x2c(%rbp)     # imm = 0x3E7
jle 0x3565
movq (%r12), %rax
addq -0x18(%rax), %r12
movq %r12, %rdi
movl $0xa, %esi
callq 0x21d0
movsbl %al, %esi
movq 0x3ac7(%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 0x2ca2
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 0x35eb
callq 0x21c0
jmp 0x35eb
movq 0x3a64(%rip), %r12      # 0x6fd0
leaq 0x1cb2(%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 0x3a31(%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 0x3a1c(%rip), %rdi      # 0x6fe0
movl $0x7fffffff, %esi       # imm = 0x7FFFFFFF
movl $0xa, %edx
callq 0x2130
movq 0x10(%rbx), %rdx
leaq 0x1d28(%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 0x35fd
callq 0x21c0
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3610
jmp 0x3610
movq %rax, %rbx
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x3625
callq 0x21c0
movq %rbx, %rdi
callq 0x22f0
nop