// File: davidcairuz[P]network-internet-relay-chat/client.cpp
// Function: main
int main(int argc, char* argv[]) {
    signal(SIGINT, Sigint_handler);

    if (argc < 2) {
        cout << "Provide your ip, please\n";
        return 1; 
    }

    string ip = argv[1];
    if (!check_ip(ip)) {
        cout << "Invalid IP\n";
        return 1;
    }

    pthread_t tid_receive;
    pthread_t tid_send;
    string command = "";
    
    nickname = get_nickname();
    cout << get_menu();

    // menu enquanto desconectado
    while (command != "/connect") {
        if(!getline(cin, command, '\n')) {
            cout << "quitting" << endl;
            exit(0);
        }

        if (command == "/menu") 
            cout << get_menu();
        else if(command == "/quit") 
            exit(0);
        else if(command == "/ping") 
            cout << "You've got to be connected!" << endl;
        else if(command.size() >= 9 && command.substr(0, 9) == "/nickname") {
            string new_nickname = command.substr(10, command.size());
            
            if (check_username(nickname)) {
                nickname = new_nickname;
                cout << "Nickname updated to: " << nickname << endl;        
            } else {
                cout << "Type a valid username (a-z, A-Z, ., _, -, size > 2)";
            }    
        } else if(command.size() >= 5 && command.substr(0, 5) == "/join") {
            cout << "You've got to be connected!" << endl;
        } else if (command.size() >= 5 && command.substr(0, 5) == "/kick") {
            cout << "You've got to be connected!" << endl;
        } else if (command.size() >= 5 && command.substr(0, 5) == "/mute") {
            cout << "You've got to be connected!" << endl;
        } else if (command.size() >= 7 && command.substr(0, 7) == "/unmute") {
            cout << "You've got to be connected!" << endl;
        }
    }

    client_socket = new Socket(ip, nickname);
    client_socket->Check();

    client_socket->Connect();
    client_socket->Check();

    if (pthread_create(&tid_send, NULL, client_send_thread, NULL) != 0) {
        cout << "Failed to create thread to send message" << endl;
        return 1;
    }
    if (pthread_create(&tid_receive, NULL, client_receive_thread, NULL) != 0) {
        cout << "Failed to create thread to receive message" << endl;
        return 1;
    }

    while (!quit);

    cout << "É nois flw vlw" << endl;
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x340, %rsp            # imm = 0x340
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x2, %edi
leaq -0xe85(%rip), %rsi      # 0x37b0
callq 0x22e0
cmpl $0x2, -0x8(%rbp)
jge 0x465f
movq 0x4989(%rip), %rdi      # 0x8fd0
leaq 0x1d73(%rip), %rsi      # 0x63c1
callq 0x2220
movl $0x1, -0x4(%rbp)
jmp 0x5233
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x268(%rbp)
leaq -0x31(%rbp), %rdi
movq %rdi, -0x260(%rbp)
callq 0x23c0
movq -0x268(%rbp), %rsi
movq -0x260(%rbp), %rdx
leaq -0x30(%rbp), %rdi
callq 0x2840
jmp 0x4697
leaq -0x31(%rbp), %rdi
callq 0x2290
leaq -0x68(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x20f0
jmp 0x46af
leaq -0x68(%rbp), %rdi
callq 0x3c80
xorb $-0x1, %al
movb %al, -0x269(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x2448
movb -0x269(%rbp), %al
testb $0x1, %al
jne 0x46d5
jmp 0x4728
movq 0x48f4(%rip), %rdi      # 0x8fd0
leaq 0x1cf7(%rip), %rsi      # 0x63da
callq 0x2220
jmp 0x46ea
movl $0x1, -0x4(%rbp)
movl $0x1, -0x6c(%rbp)
jmp 0x521d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x31(%rbp), %rdi
callq 0x2290
jmp 0x523f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x5228
leaq -0xa1(%rbp), %rdi
movq %rdi, -0x278(%rbp)
callq 0x23c0
movq -0x278(%rbp), %rdx
leaq 0x1b3b(%rip), %rsi      # 0x6284
leaq -0xa0(%rbp), %rdi
callq 0x2840
jmp 0x4757
leaq -0xa1(%rbp), %rdi
callq 0x2290
leaq -0xc8(%rbp), %rdi
callq 0x3a70
jmp 0x4771
leaq 0x4ad0(%rip), %rdi      # 0x9248
leaq -0xc8(%rbp), %rsi
movq %rsi, -0x280(%rbp)
callq 0x2300
movq -0x280(%rbp), %rdi
callq 0x2448
leaq -0xe8(%rbp), %rdi
callq 0x38d0
jmp 0x47a5
movq 0x4824(%rip), %rdi      # 0x8fd0
leaq -0xe8(%rbp), %rsi
callq 0x2200
jmp 0x47ba
leaq -0xe8(%rbp), %rdi
callq 0x2448
leaq 0x1c19(%rip), %rsi      # 0x63e6
leaq -0xa0(%rbp), %rdi
callq 0x5300
movb %al, -0x281(%rbp)
jmp 0x47e1
movb -0x281(%rbp), %al
testb $0x1, %al
jne 0x47f0
jmp 0x4fd5
movq 0x47e9(%rip), %rdi      # 0x8fe0
leaq -0xa0(%rbp), %rsi
movl $0xa, %edx
callq 0x23f0
movq %rax, -0x290(%rbp)
jmp 0x4811
movq -0x290(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x2120
movb %al, -0x291(%rbp)
jmp 0x482f
movb -0x291(%rbp), %al
testb $0x1, %al
jne 0x483e
jmp 0x48c1
movq 0x478b(%rip), %rdi      # 0x8fd0
leaq 0x1ba3(%rip), %rsi      # 0x63ef
callq 0x2220
movq %rax, -0x2a0(%rbp)
jmp 0x485a
movq -0x2a0(%rbp), %rdi
movq 0x4750(%rip), %rsi      # 0x8fb8
callq 0x2270
jmp 0x486f
xorl %edi, %edi
callq 0x22f0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0xa1(%rbp), %rdi
callq 0x2290
jmp 0x5228
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x520f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0xe8(%rbp), %rdi
callq 0x2448
jmp 0x520f
leaq 0x1a88(%rip), %rsi      # 0x6350
leaq -0xa0(%rbp), %rdi
callq 0x5250
movb %al, -0x2a1(%rbp)
jmp 0x48dc
movb -0x2a1(%rbp), %al
testb $0x1, %al
jne 0x48e8
jmp 0x4939
leaq -0x108(%rbp), %rdi
callq 0x38d0
jmp 0x48f6
movq 0x46d3(%rip), %rdi      # 0x8fd0
leaq -0x108(%rbp), %rsi
callq 0x2200
jmp 0x490b
leaq -0x108(%rbp), %rdi
callq 0x2448
jmp 0x4fd0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x108(%rbp), %rdi
callq 0x2448
jmp 0x520f
leaq 0x1a0a(%rip), %rsi      # 0x634a
leaq -0xa0(%rbp), %rdi
callq 0x5250
movb %al, -0x2a2(%rbp)
jmp 0x4954
movb -0x2a2(%rbp), %al
testb $0x1, %al
jne 0x4960
jmp 0x4967
xorl %edi, %edi
callq 0x22f0
leaq 0x1a8a(%rip), %rsi      # 0x63f8
leaq -0xa0(%rbp), %rdi
callq 0x5250
movb %al, -0x2a3(%rbp)
jmp 0x4982
movb -0x2a3(%rbp), %al
testb $0x1, %al
jne 0x498e
jmp 0x49c4
movq 0x463b(%rip), %rdi      # 0x8fd0
leaq 0x1a62(%rip), %rsi      # 0x63fe
callq 0x2220
movq %rax, -0x2b0(%rbp)
jmp 0x49aa
movq -0x2b0(%rbp), %rdi
movq 0x4600(%rip), %rsi      # 0x8fb8
callq 0x2270
jmp 0x49bf
jmp 0x4fcc
leaq -0xa0(%rbp), %rdi
callq 0x2160
movq %rax, %rcx
movb $0x0, -0x129(%rbp)
xorl %eax, %eax
cmpq $0x9, %rcx
movb %al, -0x2b1(%rbp)
jb 0x4a36
xorl %eax, %eax
movl %eax, %edx
leaq -0x128(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
movl $0x9, %ecx
callq 0x2260
jmp 0x4a06
movb $0x1, -0x129(%rbp)
leaq 0x1942(%rip), %rsi      # 0x6356
leaq -0x128(%rbp), %rdi
callq 0x5250
movb %al, -0x2b2(%rbp)
jmp 0x4a28
movb -0x2b2(%rbp), %al
movb %al, -0x2b1(%rbp)
jmp 0x4a36
movb -0x2b1(%rbp), %al
movb %al, -0x2b3(%rbp)
testb $0x1, -0x129(%rbp)
jne 0x4a4d
jmp 0x4a59
leaq -0x128(%rbp), %rdi
callq 0x2448
movb -0x2b3(%rbp), %al
testb $0x1, %al
jne 0x4a68
jmp 0x4bc9
leaq -0xa0(%rbp), %rdi
movq %rdi, -0x2c0(%rbp)
callq 0x2160
movq -0x2c0(%rbp), %rsi
movq %rax, %rcx
leaq -0x150(%rbp), %rdi
movl $0xa, %edx
callq 0x2260
jmp 0x4a98
leaq 0x47a9(%rip), %rsi      # 0x9248
leaq -0x170(%rbp), %rdi
callq 0x20f0
jmp 0x4aad
leaq -0x170(%rbp), %rdi
callq 0x39b0
movb %al, -0x2c1(%rbp)
jmp 0x4ac1
leaq -0x170(%rbp), %rdi
callq 0x2448
movb -0x2c1(%rbp), %al
testb $0x1, %al
jne 0x4adc
jmp 0x4b90
leaq 0x4765(%rip), %rdi      # 0x9248
leaq -0x150(%rbp), %rsi
callq 0x2030
jmp 0x4af1
movq 0x44d8(%rip), %rdi      # 0x8fd0
leaq 0x1895(%rip), %rsi      # 0x6394
callq 0x2220
movq %rax, -0x2d0(%rbp)
jmp 0x4b0d
movq -0x2d0(%rbp), %rdi
leaq 0x472d(%rip), %rsi      # 0x9248
callq 0x2200
movq %rax, -0x2d8(%rbp)
jmp 0x4b29
movq -0x2d8(%rbp), %rdi
movq 0x4481(%rip), %rsi      # 0x8fb8
callq 0x2270
jmp 0x4b3e
jmp 0x4ba7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
testb $0x1, -0x129(%rbp)
jne 0x4b57
jmp 0x4b63
leaq -0x128(%rbp), %rdi
callq 0x2448
jmp 0x520f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x4bb8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x170(%rbp), %rdi
callq 0x2448
jmp 0x4bb8
movq 0x4439(%rip), %rdi      # 0x8fd0
leaq 0x17c2(%rip), %rsi      # 0x6360
callq 0x2220
jmp 0x4ba5
jmp 0x4ba7
leaq -0x150(%rbp), %rdi
callq 0x2448
jmp 0x4fca
leaq -0x150(%rbp), %rdi
callq 0x2448
jmp 0x520f
leaq -0xa0(%rbp), %rdi
callq 0x2160
movq %rax, %rcx
movb $0x0, -0x191(%rbp)
xorl %eax, %eax
cmpq $0x5, %rcx
movb %al, -0x2d9(%rbp)
jb 0x4c3b
xorl %eax, %eax
movl %eax, %edx
leaq -0x190(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
movl $0x5, %ecx
callq 0x2260
jmp 0x4c0b
movb $0x1, -0x191(%rbp)
leaq 0x1791(%rip), %rsi      # 0x63aa
leaq -0x190(%rbp), %rdi
callq 0x5250
movb %al, -0x2da(%rbp)
jmp 0x4c2d
movb -0x2da(%rbp), %al
movb %al, -0x2d9(%rbp)
jmp 0x4c3b
movb -0x2d9(%rbp), %al
movb %al, -0x2db(%rbp)
testb $0x1, -0x191(%rbp)
jne 0x4c52
jmp 0x4c5e
leaq -0x190(%rbp), %rdi
callq 0x2448
movb -0x2db(%rbp), %al
testb $0x1, %al
jne 0x4c6a
jmp 0x4cc8
movq 0x435f(%rip), %rdi      # 0x8fd0
leaq 0x1786(%rip), %rsi      # 0x63fe
callq 0x2220
movq %rax, -0x2e8(%rbp)
jmp 0x4c86
movq -0x2e8(%rbp), %rdi
movq 0x4324(%rip), %rsi      # 0x8fb8
callq 0x2270
jmp 0x4c9b
jmp 0x4fc8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
testb $0x1, -0x191(%rbp)
jne 0x4cb7
jmp 0x4cc3
leaq -0x190(%rbp), %rdi
callq 0x2448
jmp 0x520f
leaq -0xa0(%rbp), %rdi
callq 0x2160
movq %rax, %rcx
movb $0x0, -0x1b9(%rbp)
xorl %eax, %eax
cmpq $0x5, %rcx
movb %al, -0x2e9(%rbp)
jb 0x4d3a
xorl %eax, %eax
movl %eax, %edx
leaq -0x1b8(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
movl $0x5, %ecx
callq 0x2260
jmp 0x4d0a
movb $0x1, -0x1b9(%rbp)
leaq 0x1702(%rip), %rsi      # 0x641a
leaq -0x1b8(%rbp), %rdi
callq 0x5250
movb %al, -0x2ea(%rbp)
jmp 0x4d2c
movb -0x2ea(%rbp), %al
movb %al, -0x2e9(%rbp)
jmp 0x4d3a
movb -0x2e9(%rbp), %al
movb %al, -0x2eb(%rbp)
testb $0x1, -0x1b9(%rbp)
jne 0x4d51
jmp 0x4d5d
leaq -0x1b8(%rbp), %rdi
callq 0x2448
movb -0x2eb(%rbp), %al
testb $0x1, %al
jne 0x4d69
jmp 0x4dc7
movq 0x4260(%rip), %rdi      # 0x8fd0
leaq 0x1687(%rip), %rsi      # 0x63fe
callq 0x2220
movq %rax, -0x2f8(%rbp)
jmp 0x4d85
movq -0x2f8(%rbp), %rdi
movq 0x4225(%rip), %rsi      # 0x8fb8
callq 0x2270
jmp 0x4d9a
jmp 0x4fc6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
testb $0x1, -0x1b9(%rbp)
jne 0x4db6
jmp 0x4dc2
leaq -0x1b8(%rbp), %rdi
callq 0x2448
jmp 0x520f
leaq -0xa0(%rbp), %rdi
callq 0x2160
movq %rax, %rcx
movb $0x0, -0x1e1(%rbp)
xorl %eax, %eax
cmpq $0x5, %rcx
movb %al, -0x2f9(%rbp)
jb 0x4e39
xorl %eax, %eax
movl %eax, %edx
leaq -0x1e0(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
movl $0x5, %ecx
callq 0x2260
jmp 0x4e09
movb $0x1, -0x1e1(%rbp)
leaq 0x1609(%rip), %rsi      # 0x6420
leaq -0x1e0(%rbp), %rdi
callq 0x5250
movb %al, -0x2fa(%rbp)
jmp 0x4e2b
movb -0x2fa(%rbp), %al
movb %al, -0x2f9(%rbp)
jmp 0x4e39
movb -0x2f9(%rbp), %al
movb %al, -0x2fb(%rbp)
testb $0x1, -0x1e1(%rbp)
jne 0x4e50
jmp 0x4e5c
leaq -0x1e0(%rbp), %rdi
callq 0x2448
movb -0x2fb(%rbp), %al
testb $0x1, %al
jne 0x4e68
jmp 0x4ec6
movq 0x4161(%rip), %rdi      # 0x8fd0
leaq 0x1588(%rip), %rsi      # 0x63fe
callq 0x2220
movq %rax, -0x308(%rbp)
jmp 0x4e84
movq -0x308(%rbp), %rdi
movq 0x4126(%rip), %rsi      # 0x8fb8
callq 0x2270
jmp 0x4e99
jmp 0x4fc4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
testb $0x1, -0x1e1(%rbp)
jne 0x4eb5
jmp 0x4ec1
leaq -0x1e0(%rbp), %rdi
callq 0x2448
jmp 0x520f
leaq -0xa0(%rbp), %rdi
callq 0x2160
movq %rax, %rcx
movb $0x0, -0x209(%rbp)
xorl %eax, %eax
cmpq $0x7, %rcx
movb %al, -0x309(%rbp)
jb 0x4f38
xorl %eax, %eax
movl %eax, %edx
leaq -0x208(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
movl $0x7, %ecx
callq 0x2260
jmp 0x4f08
movb $0x1, -0x209(%rbp)
leaq 0x1510(%rip), %rsi      # 0x6426
leaq -0x208(%rbp), %rdi
callq 0x5250
movb %al, -0x30a(%rbp)
jmp 0x4f2a
movb -0x30a(%rbp), %al
movb %al, -0x309(%rbp)
jmp 0x4f38
movb -0x309(%rbp), %al
movb %al, -0x30b(%rbp)
testb $0x1, -0x209(%rbp)
jne 0x4f4f
jmp 0x4f5b
leaq -0x208(%rbp), %rdi
callq 0x2448
movb -0x30b(%rbp), %al
testb $0x1, %al
jne 0x4f67
jmp 0x4fc2
movq 0x4062(%rip), %rdi      # 0x8fd0
leaq 0x1489(%rip), %rsi      # 0x63fe
callq 0x2220
movq %rax, -0x318(%rbp)
jmp 0x4f83
movq -0x318(%rbp), %rdi
movq 0x4027(%rip), %rsi      # 0x8fb8
callq 0x2270
jmp 0x4f98
jmp 0x4fc2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
testb $0x1, -0x209(%rbp)
jne 0x4fb1
jmp 0x4fbd
leaq -0x208(%rbp), %rdi
callq 0x2448
jmp 0x520f
jmp 0x4fc4
jmp 0x4fc6
jmp 0x4fc8
jmp 0x4fca
jmp 0x4fcc
jmp 0x4fce
jmp 0x4fd0
jmp 0x47c6
movl $0xa0, %edi
callq 0x2230
movq %rax, -0x320(%rbp)
jmp 0x4fe8
movb $0x1, -0x251(%rbp)
leaq -0x230(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x20f0
jmp 0x5001
leaq 0x4240(%rip), %rsi      # 0x9248
leaq -0x250(%rbp), %rdi
callq 0x20f0
jmp 0x5016
movq -0x320(%rbp), %rdi
leaq -0x230(%rbp), %rsi
leaq -0x250(%rbp), %rdx
movl $0x2000, %ecx           # imm = 0x2000
callq 0x2b90
jmp 0x5037
movq -0x320(%rbp), %rax
movb $0x0, -0x251(%rbp)
movq %rax, 0x4244(%rip)      # 0x9290
leaq -0x250(%rbp), %rdi
callq 0x2448
leaq -0x230(%rbp), %rdi
callq 0x2448
movq 0x4225(%rip), %rdi      # 0x9290
callq 0x3590
jmp 0x5072
movq 0x4217(%rip), %rdi      # 0x9290
callq 0x2fa0
jmp 0x5080
movq 0x4209(%rip), %rdi      # 0x9290
callq 0x3590
jmp 0x508e
leaq -0x80(%rbp), %rdi
xorl %eax, %eax
movl %eax, %ecx
leaq -0x11cd(%rip), %rdx     # 0x3ed0
movq %rcx, %rsi
callq 0x23e0
cmpl $0x0, %eax
je 0x5153
movq 0x3f1b(%rip), %rdi      # 0x8fd0
leaq 0x1372(%rip), %rsi      # 0x642e
callq 0x2220
movq %rax, -0x328(%rbp)
jmp 0x50ca
movq -0x328(%rbp), %rdi
movq 0x3ee0(%rip), %rsi      # 0x8fb8
callq 0x2270
jmp 0x50df
movl $0x1, -0x4(%rbp)
movl $0x1, -0x6c(%rbp)
jmp 0x5201
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x5132
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x5126
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x250(%rbp), %rdi
callq 0x2448
leaq -0x230(%rbp), %rdi
callq 0x2448
testb $0x1, -0x251(%rbp)
jne 0x513d
jmp 0x514e
movq -0x320(%rbp), %rdi
movl $0xa0, %esi
callq 0x2250
jmp 0x520f
leaq -0x78(%rbp), %rdi
xorl %eax, %eax
movl %eax, %ecx
leaq -0x14a2(%rip), %rdx     # 0x3cc0
movq %rcx, %rsi
callq 0x23e0
cmpl $0x0, %eax
je 0x51b0
movq 0x3e5a(%rip), %rdi      # 0x8fd0
leaq 0x12d9(%rip), %rsi      # 0x6456
callq 0x2220
movq %rax, -0x330(%rbp)
jmp 0x518b
movq -0x330(%rbp), %rdi
movq 0x3e1f(%rip), %rsi      # 0x8fb8
callq 0x2270
jmp 0x51a0
movl $0x1, -0x4(%rbp)
movl $0x1, -0x6c(%rbp)
jmp 0x5201
jmp 0x51b2
movb 0x40d0(%rip), %al       # 0x9288
xorb $-0x1, %al
testb $0x1, %al
jne 0x51c0
jmp 0x51c2
jmp 0x51b2
movq 0x3e07(%rip), %rdi      # 0x8fd0
leaq 0x12b1(%rip), %rsi      # 0x6481
callq 0x2220
movq %rax, -0x338(%rbp)
jmp 0x51de
movq -0x338(%rbp), %rdi
movq 0x3dcc(%rip), %rsi      # 0x8fb8
callq 0x2270
jmp 0x51f3
movl $0x0, -0x4(%rbp)
movl $0x1, -0x6c(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x2448
jmp 0x521d
leaq -0xa0(%rbp), %rdi
callq 0x2448
jmp 0x5228
leaq -0x30(%rbp), %rdi
callq 0x2448
jmp 0x5233
leaq -0x30(%rbp), %rdi
callq 0x2448
jmp 0x523f
movl -0x4(%rbp), %eax
addq $0x340, %rsp            # imm = 0x340
popq %rbp
retq
movq -0x40(%rbp), %rdi
callq 0x23a0
nopl (%rax,%rax)