// File: /workspace/github_cpp_makefile_star2_O1/Tarstingo[P]rarcrack/crackrar.cpp
// Function: getPara(int, std::vector<unsigned char, std::allocator<unsigned char>>&, std::vector<unsigned char, std::allocator<unsigned char>>&, std::vector<unsigned char, std::allocator<unsigned char>>&)
void getPara(int fd,std::vector<muchar> &salt,std::vector<muchar> &iv,std::vector<muchar> &s)
{
    timespec tmptime,nowtime;
    clock_gettime(CLOCK_REALTIME,&tmptime);

    unsigned char tmp[20];
    unsigned char sa[8],v[16],is[16];
    read(fd,tmp,20);
    read(fd,sa,8);
    read(fd,v,16);
    read(fd,is,16);
    for(int i=0;i<8;i++)
        salt.push_back(sa[i]);
    for(int i=0;i<16;i++)
    {
        iv.push_back(v[i]);
        s.push_back(is[i]);
    }

    clock_gettime(CLOCK_REALTIME,&nowtime);
    printf("\033[31mgetPara\033[m\n");
    if(tmptime.tv_nsec>nowtime.tv_nsec)
    {
        cout<<"0s   "<<1000000000-nowtime.tv_nsec+tmptime.tv_nsec<<" ns"<<endl;
    }
    else
    {
        cout<<"0s   "<<nowtime.tv_nsec-tmptime.tv_nsec<<" ns"<<endl;
    }

    cout<<tmptime.tv_sec<<" "<<tmptime.tv_nsec<<endl;
    cout<<nowtime.tv_sec<<" "<<nowtime.tv_nsec<<endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movl %edi, %r12d
xorl %r13d, %r13d
leaq -0x38(%rbp), %rsi
xorl %edi, %edi
callq 0x2130
leaq -0x90(%rbp), %rsi
movl $0x14, %edx
movl %r12d, %edi
callq 0x21c0
leaq -0x40(%rbp), %rsi
movl $0x8, %edx
movl %r12d, %edi
callq 0x21c0
leaq -0x60(%rbp), %rsi
movl $0x10, %edx
movl %r12d, %edi
callq 0x21c0
leaq -0x50(%rbp), %rsi
movl $0x10, %edx
movl %r12d, %edi
callq 0x21c0
leaq -0x40(,%r13), %rdx
addq %rbp, %rdx
movq 0x8(%r15), %rsi
cmpq 0x10(%r15), %rsi
je 0x2764
movb (%rdx), %al
movb %al, (%rsi)
incq 0x8(%r15)
jmp 0x276c
movq %r15, %rdi
callq 0x31a2
incq %r13
cmpq $0x8, %r13
jne 0x2745
xorl %r15d, %r15d
leaq (%r15,%rbp), %rdx
addq $-0x60, %rdx
movq 0x8(%r14), %rsi
cmpq 0x10(%r14), %rsi
je 0x2794
movb (%rdx), %al
movb %al, (%rsi)
incq 0x8(%r14)
jmp 0x279c
movq %r14, %rdi
callq 0x31a2
leaq (%r15,%rbp), %rdx
addq $-0x50, %rdx
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x27b8
movb (%rdx), %al
movb %al, (%rsi)
incq 0x8(%rbx)
jmp 0x27c0
movq %rbx, %rdi
callq 0x31a2
incq %r15
cmpq $0x10, %r15
jne 0x2778
leaq -0x70(%rbp), %rbx
xorl %edi, %edi
movq %rbx, %rsi
callq 0x2130
leaq 0x187a(%rip), %rdi      # 0x4058
callq 0x21e0
movq -0x30(%rbp), %r15
movq 0x8(%rbx), %r12
movq 0x37e6(%rip), %r14      # 0x5fd8
leaq 0x180b(%rip), %rsi      # 0x4004
movl $0x5, %edx
movq %r14, %rdi
callq 0x2190
movq 0x8(%rbx), %rax
movq -0x30(%rbp), %rsi
movq %rax, %rcx
subq %rsi, %rcx
subq %rax, %rsi
addq $0x3b9aca00, %rsi       # imm = 0x3B9ACA00
cmpq %r12, %r15
cmovleq %rcx, %rsi
movq %r14, %rdi
callq 0x2140
movq %rax, %r15
leaq 0x17d3(%rip), %rsi      # 0x400a
movl $0x3, %edx
movq %rax, %rdi
callq 0x2190
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2150
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20e0
movq -0x38(%rbp), %rsi
movq %r14, %rdi
callq 0x2140
movq %rax, %r12
leaq 0x1787(%rip), %r15      # 0x4008
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x2190
movq -0x30(%rbp), %rsi
movq %r12, %rdi
callq 0x2140
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x2150
movsbl %al, %esi
movq %r12, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20e0
movq (%rbx), %rsi
movq %r14, %rdi
callq 0x2140
movq %rax, %r14
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x2190
movq 0x8(%rbx), %rsi
movq %r14, %rdi
callq 0x2140
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2150
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20e0
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq