// File: brianbbsu[P]TCP-Ping/src/client.cpp
// Function: cmd_to_target(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
target cmd_to_target(std::string s){
    int p = -1;
    for(int i = 0;i < s.size();i += 1)if(s[i] == ':'){
        if(p != -1 || i == 0 || i + 1 == s.size())quit("Can not parse target '" + s + "'");
        p = i;
    }
    if(p == -1)quit("Can not parse target '" + s + "', maybe the port number is missing");
    std::string host = s.substr(0, p);
    uint16_t port;
    try{
        int _port = std::stoi(s.substr(p + 1));
        if(_port < 0 || _port > 65535)quit("Invalid port " + s.substr(p + 1) + " in target '" + s + "', shoulde be in [0, 65535]");
        port = _port;
    }catch(const std::invalid_argument& ia){
        quit("Can not parse port '" + s.substr(p + 1) + "' in target '" + s + "'");
    }
    return target(host, port);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2a0, %rsp            # imm = 0x2A0
movq %rsi, -0x270(%rbp)
movq %rdi, -0x268(%rbp)
movq %rdi, %rax
movq %rax, -0x260(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0xffffffff, -0x14(%rbp) # imm = 0xFFFFFFFF
movl $0x0, -0x18(%rbp)
movq -0x270(%rbp), %rdi
movslq -0x18(%rbp), %rax
movq %rax, -0x278(%rbp)
callq 0x7310
movq %rax, %rcx
movq -0x278(%rbp), %rax
cmpq %rcx, %rax
jae 0x8316
movq -0x270(%rbp), %rdi
movslq -0x18(%rbp), %rsi
callq 0x7880
movsbl (%rax), %eax
cmpl $0x3a, %eax
jne 0x8306
cmpl $-0x1, -0x14(%rbp)
jne 0x8279
cmpl $0x0, -0x18(%rbp)
je 0x8279
movq -0x270(%rbp), %rdi
movl -0x18(%rbp), %eax
addl $0x1, %eax
cltq
movq %rax, -0x280(%rbp)
callq 0x7310
movq %rax, %rcx
movq -0x280(%rbp), %rax
cmpq %rcx, %rax
jne 0x8300
movq -0x270(%rbp), %rdx
leaq 0x15db4(%rip), %rsi     # 0x1e03b
leaq -0x58(%rbp), %rdi
movq %rdi, -0x288(%rbp)
callq 0xa4f0
movq -0x288(%rbp), %rsi
leaq 0x15dab(%rip), %rdx     # 0x1e050
leaq -0x38(%rbp), %rdi
callq 0xa4a0
jmp 0x82b0
leaq -0x38(%rbp), %rdi
callq 0x1d460
jmp 0x82bb
leaq -0x38(%rbp), %rdi
callq 0x78b8
leaq -0x58(%rbp), %rdi
callq 0x78b8
jmp 0x8300
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x82f2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x78b8
leaq -0x58(%rbp), %rdi
callq 0x78b8
jmp 0x8817
movl -0x18(%rbp), %eax
movl %eax, -0x14(%rbp)
jmp 0x8308
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x81f9
cmpl $-0x1, -0x14(%rbp)
jne 0x83bc
movq -0x270(%rbp), %rdx
leaq 0x15d0d(%rip), %rsi     # 0x1e03b
leaq -0xa8(%rbp), %rdi
movq %rdi, -0x290(%rbp)
callq 0xa4f0
movq -0x290(%rbp), %rsi
leaq 0x15d03(%rip), %rdx     # 0x1e052
leaq -0x88(%rbp), %rdi
callq 0xa4a0
jmp 0x835d
leaq -0x88(%rbp), %rdi
callq 0x1d460
jmp 0x836b
leaq -0x88(%rbp), %rdi
callq 0x78b8
leaq -0xa8(%rbp), %rdi
callq 0x78b8
jmp 0x83bc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x83ab
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x78b8
leaq -0xa8(%rbp), %rdi
callq 0x78b8
jmp 0x8817
movq -0x270(%rbp), %rsi
movslq -0x14(%rbp), %rcx
xorl %eax, %eax
movl %eax, %edx
leaq -0xc8(%rbp), %rdi
callq 0x7470
movq -0x270(%rbp), %rsi
movl -0x14(%rbp), %eax
incl %eax
movslq %eax, %rdx
leaq -0xf0(%rbp), %rdi
movq $-0x1, %rcx
callq 0x7470
jmp 0x83fb
xorl %eax, %eax
movl %eax, %esi
leaq -0xf0(%rbp), %rdi
movl $0xa, %edx
callq 0xa600
movl %eax, -0x294(%rbp)
jmp 0x8418
leaq -0xf0(%rbp), %rdi
callq 0x78b8
movl -0x294(%rbp), %eax
movl %eax, -0xd0(%rbp)
cmpl $0x0, -0xd0(%rbp)
jl 0x8449
cmpl $0xffff, -0xd0(%rbp)    # imm = 0xFFFF
jle 0x873a
movq -0x270(%rbp), %rsi
movl -0x14(%rbp), %eax
incl %eax
movslq %eax, %rdx
leaq -0x190(%rbp), %rdi
movq $-0x1, %rcx
callq 0x7470
jmp 0x846d
leaq 0x15c02(%rip), %rsi     # 0x1e076
leaq -0x170(%rbp), %rdi
leaq -0x190(%rbp), %rdx
callq 0xa690
jmp 0x8489
leaq 0x15c26(%rip), %rdx     # 0x1e0b6
leaq -0x150(%rbp), %rdi
leaq -0x170(%rbp), %rsi
callq 0xa4a0
jmp 0x84a5
movq -0x270(%rbp), %rdx
leaq -0x130(%rbp), %rdi
leaq -0x150(%rbp), %rsi
callq 0xa640
jmp 0x84c1
leaq 0x15bbc(%rip), %rdx     # 0x1e084
leaq -0x110(%rbp), %rdi
leaq -0x130(%rbp), %rsi
callq 0xa4a0
jmp 0x84dd
leaq -0x110(%rbp), %rdi
callq 0x1d460
jmp 0x84eb
leaq -0x110(%rbp), %rdi
callq 0x78b8
leaq -0x130(%rbp), %rdi
callq 0x78b8
leaq -0x150(%rbp), %rdi
callq 0x78b8
leaq -0x170(%rbp), %rdi
callq 0x78b8
leaq -0x190(%rbp), %rdi
callq 0x78b8
jmp 0x873a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x85da
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0xf0(%rbp), %rdi
callq 0x78b8
jmp 0x85da
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x85ce
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x85c2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x85b6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x85aa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x110(%rbp), %rdi
callq 0x78b8
leaq -0x130(%rbp), %rdi
callq 0x78b8
leaq -0x150(%rbp), %rdi
callq 0x78b8
leaq -0x170(%rbp), %rdi
callq 0x78b8
leaq -0x190(%rbp), %rdi
callq 0x78b8
movl -0x64(%rbp), %eax
movl $0x1, %ecx
cmpl %ecx, %eax
jne 0x880b
movq -0x60(%rbp), %rdi
callq 0x7180
movq -0x270(%rbp), %rsi
movq %rax, -0x198(%rbp)
movl -0x14(%rbp), %eax
incl %eax
movslq %eax, %rdx
leaq -0x238(%rbp), %rdi
movq $-0x1, %rcx
callq 0x7470
jmp 0x861e
leaq 0x15a7b(%rip), %rsi     # 0x1e0a0
leaq -0x218(%rbp), %rdi
leaq -0x238(%rbp), %rdx
callq 0xa690
jmp 0x863a
leaq 0x15a74(%rip), %rdx     # 0x1e0b5
leaq -0x1f8(%rbp), %rdi
leaq -0x218(%rbp), %rsi
callq 0xa4a0
jmp 0x8656
movq -0x270(%rbp), %rdx
leaq -0x1d8(%rbp), %rdi
leaq -0x1f8(%rbp), %rsi
callq 0xa640
jmp 0x8672
leaq 0x159d7(%rip), %rdx     # 0x1e050
leaq -0x1b8(%rbp), %rdi
leaq -0x1d8(%rbp), %rsi
callq 0xa4a0
jmp 0x868e
leaq -0x1b8(%rbp), %rdi
callq 0x1d460
jmp 0x869c
leaq -0x1b8(%rbp), %rdi
callq 0x78b8
leaq -0x1d8(%rbp), %rdi
callq 0x78b8
leaq -0x1f8(%rbp), %rdi
callq 0x78b8
leaq -0x218(%rbp), %rdi
callq 0x78b8
leaq -0x238(%rbp), %rdi
callq 0x78b8
callq 0x7700
jmp 0x86df
jmp 0x86e1
leaq -0x258(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
callq 0x71b0
jmp 0x86f6
movq -0x268(%rbp), %rdi
movzwl -0xca(%rbp), %edx
leaq -0x258(%rbp), %rsi
callq 0xa6f0
jmp 0x8712
leaq -0x258(%rbp), %rdi
callq 0x78b8
leaq -0xc8(%rbp), %rdi
callq 0x78b8
movq -0x260(%rbp), %rax
addq $0x2a0, %rsp            # imm = 0x2A0
popq %rbp
retq
movl -0xd0(%rbp), %eax
movw %ax, -0xca(%rbp)
jmp 0x86e1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x87ea
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x87ce
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x87c2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x87b6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x87aa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x1b8(%rbp), %rdi
callq 0x78b8
leaq -0x1d8(%rbp), %rdi
callq 0x78b8
leaq -0x1f8(%rbp), %rdi
callq 0x78b8
leaq -0x218(%rbp), %rdi
callq 0x78b8
leaq -0x238(%rbp), %rdi
callq 0x78b8
jmp 0x87ea
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x880b
callq 0x7700
jmp 0x87f1
jmp 0x880b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x258(%rbp), %rdi
callq 0x78b8
leaq -0xc8(%rbp), %rdi
callq 0x78b8
movq -0x60(%rbp), %rdi
callq 0x77a0
movq %rax, %rdi
callq 0xa6e0
nopl (%rax,%rax)