// File: jianxinzhou[P]Smart/./include/MySocket.h
// Function: MySocket::MySocket(MyConf&)
MySocket(MyConf& conf)
            :conf_(conf)
        {
            std::cout << conf_.mapConf_["my_ip"] << std::endl;
            
            peerfd_ = socket(AF_INET, SOCK_DGRAM, 0);
            if(peerfd_ == -1)
            {
                std::cout <<__DATE__<<" "<<__TIME__ << " "<<__FILE__<<" "<<__LINE__<<": "<<"socket"<<std::endl ;
                exit(-1);
            }
            
            addrLen_ = sizeof(addr_);
            addr_.sin_family = AF_INET;
            addr_.sin_port = htons(atoi(conf_.mapConf_["my_port"].c_str()));
            addr_.sin_addr.s_addr = inet_addr(conf_.mapConf_["my_ip"].c_str());
            if(-1 ==  bind(peerfd_, (struct sockaddr*)&addr_, sizeof(addr_)) )
            {
                std::cout <<__DATE__<<" "<<__TIME__ << " "<<__FILE__<<" "<<__LINE__<<": "<<"bind"<<std::endl ;
                exit(-1);
            }
        }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq -0x10(%rbp), %rcx
movq %rcx, 0x18(%rax)
movq 0x18(%rax), %rax
addq $0x208, %rax            # imm = 0x208
movq %rax, -0xa8(%rbp)
leaq -0x31(%rbp), %rdi
movq %rdi, -0xa0(%rbp)
callq 0x3540
movq -0xa0(%rbp), %rdx
leaq 0xebab(%rip), %rsi      # 0x13120
leaq -0x30(%rbp), %rdi
callq 0x3410
jmp 0x4580
movq -0xa8(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x4df0
movq %rax, -0xb8(%rbp)
jmp 0x4599
movq -0xb8(%rbp), %rsi
movq 0x18a29(%rip), %rdi     # 0x1cfd0
callq 0x32a0
movq %rax, -0xc0(%rbp)
jmp 0x45b5
movq -0xc0(%rbp), %rdi
movq 0x189f5(%rip), %rsi     # 0x1cfb8
callq 0x3310
jmp 0x45ca
leaq -0x30(%rbp), %rdi
callq 0x31f0
leaq -0x31(%rbp), %rdi
callq 0x3320
movl $0x2, %esi
xorl %edx, %edx
movl %esi, %edi
callq 0x30e0
movl %eax, %ecx
movq -0xb0(%rbp), %rax
movl %ecx, (%rax)
cmpl $-0x1, (%rax)
jne 0x46d1
movq 0x189cb(%rip), %rdi     # 0x1cfd0
leaq 0xea07(%rip), %rsi      # 0x13013
callq 0x32c0
movq %rax, %rdi
leaq 0xec08(%rip), %rsi      # 0x13223
callq 0x32c0
movq %rax, %rdi
leaq 0xe9f5(%rip), %rsi      # 0x1301f
callq 0x32c0
movq %rax, %rdi
leaq 0xebea(%rip), %rsi      # 0x13223
callq 0x32c0
movq %rax, %rdi
leaq 0xeade(%rip), %rsi      # 0x13126
callq 0x32c0
movq %rax, %rdi
leaq 0xebcc(%rip), %rsi      # 0x13223
callq 0x32c0
movq %rax, %rdi
movl $0x19, %esi
callq 0x3520
movq %rax, %rdi
leaq 0xebaf(%rip), %rsi      # 0x13222
callq 0x32c0
movq %rax, %rdi
leaq 0xeab9(%rip), %rsi      # 0x1313b
callq 0x32c0
movq %rax, %rdi
movq 0x18927(%rip), %rsi     # 0x1cfb8
callq 0x3310
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x3380
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x46c3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x31f0
leaq -0x31(%rbp), %rdi
callq 0x3320
jmp 0x4942
movq -0xb0(%rbp), %rax
movl $0x10, 0x14(%rax)
movw $0x2, 0x4(%rax)
movq 0x18(%rax), %rax
addq $0x208, %rax            # imm = 0x208
movq %rax, -0xd0(%rbp)
leaq -0x69(%rbp), %rdi
movq %rdi, -0xc8(%rbp)
callq 0x3540
movq -0xc8(%rbp), %rdx
leaq 0xea2e(%rip), %rsi      # 0x13142
leaq -0x68(%rbp), %rdi
callq 0x3410
jmp 0x471f
movq -0xd0(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x4df0
movq %rax, -0xd8(%rbp)
jmp 0x4738
movq -0xd8(%rbp), %rdi
callq 0x3150
movq %rax, %rdi
callq 0x34b0
movzwl %ax, %edi
callq 0x3060
movw %ax, %cx
movq -0xb0(%rbp), %rax
movw %cx, 0x6(%rax)
leaq -0x68(%rbp), %rdi
callq 0x31f0
leaq -0x69(%rbp), %rdi
callq 0x3320
movq -0xb0(%rbp), %rax
movq 0x18(%rax), %rax
addq $0x208, %rax            # imm = 0x208
movq %rax, -0xe8(%rbp)
leaq -0x91(%rbp), %rdi
movq %rdi, -0xe0(%rbp)
callq 0x3540
movq -0xe0(%rbp), %rdx
leaq 0xe973(%rip), %rsi      # 0x13120
leaq -0x90(%rbp), %rdi
callq 0x3410
jmp 0x47bb
movq -0xe8(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x4df0
movq %rax, -0xf0(%rbp)
jmp 0x47d7
movq -0xf0(%rbp), %rdi
callq 0x3150
movq %rax, %rdi
callq 0x32e0
movl %eax, %ecx
movq -0xb0(%rbp), %rax
movl %ecx, 0x8(%rax)
leaq -0x90(%rbp), %rdi
callq 0x31f0
leaq -0x91(%rbp), %rdi
callq 0x3320
movq -0xb0(%rbp), %rsi
movl (%rsi), %edi
addq $0x4, %rsi
movl $0x10, %edx
callq 0x3080
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl %ecx, %eax
jne 0x4939
movq 0x18794(%rip), %rdi     # 0x1cfd0
leaq 0xe7d0(%rip), %rsi      # 0x13013
callq 0x32c0
movq %rax, %rdi
leaq 0xe9d1(%rip), %rsi      # 0x13223
callq 0x32c0
movq %rax, %rdi
leaq 0xe7be(%rip), %rsi      # 0x1301f
callq 0x32c0
movq %rax, %rdi
leaq 0xe9b3(%rip), %rsi      # 0x13223
callq 0x32c0
movq %rax, %rdi
leaq 0xe8a7(%rip), %rsi      # 0x13126
callq 0x32c0
movq %rax, %rdi
leaq 0xe995(%rip), %rsi      # 0x13223
callq 0x32c0
movq %rax, %rdi
movl $0x23, %esi
callq 0x3520
movq %rax, %rdi
leaq 0xe978(%rip), %rsi      # 0x13222
callq 0x32c0
movq %rax, %rdi
leaq 0xe891(%rip), %rsi      # 0x1314a
callq 0x32c0
movq %rax, %rdi
movq 0x186f0(%rip), %rsi     # 0x1cfb8
callq 0x3310
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x3380
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x48fa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x31f0
leaq -0x69(%rbp), %rdi
callq 0x3320
jmp 0x4942
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x492b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x31f0
leaq -0x91(%rbp), %rdi
callq 0x3320
jmp 0x4942
addq $0xf0, %rsp
popq %rbp
retq
movq -0x40(%rbp), %rdi
callq 0x3530
nopl (%rax,%rax)