// File: /workspace/github_cpp_makefile_star2_O3/carellano8[P]Proyecto-Redes-I-2017/crc16.cpp
// Function: crc16::recibir(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void crc16::recibir(binario bin){
    size_t i,li,ls,j,a,b;
    bool error=false;
    binario aux="";
    binario bufferB[MAXMSJ/MAXT*8];
    binario buffer2[MAXMSJ/MAXT*8];
    string bufferMsj;
    ofstream archivo("salidacrc.txt");
    
   
     i=0;j=0;
    while(i<bin.size()){

        li=bin.find("01111110",i);
        ls=bin.find("01111110",i+8);
        bufferB[j]=bin.substr(li,(ls+8)-li);

        //~ cout<<"Inferior "<<li<<" Superior "<<ls<<" Distancia "<<(ls+8)-li<<endl;
        //~ cout<<bufferB[j]<<endl;
        j++;
        i=ls+8;;
    }
    if(j>16){error=true;}// maximo 16 tramas 

    i=0;
    while(!error&&i<j){// Verfificar que no hay error en las banderas 
        if(bufferB[i].size()<30){
            error=true;
        }
        if(!error){
            bufferB[i]=bufferB[i].substr(8,bufferB[i].size()-16);//quita las banderas 
        }
        i++;
    }
   	if(!error){// Quitar relleno de bits
        for (i = 0; i < j; i++)
        {
        	b=0;aux="";a=0;
        	while(a < bufferB[i].size())
        	{
        		if(bufferB[i].at(a)=='1'){
                    b++;
                }else{
                    b=0;
                    }
                aux+=bufferB[i].at(a);		
                if(b==5){
                a++;b=0;
                	}
            a++;
        	}
        	
        	bufferB[i]=aux;

       	}
    }
            
    
    if(!error){// CRC16
        i=0;
        while(!error&&i<j){// Verfificar CRC16
        	// cout<<bufferB[i]<<endl;
        	// cout<<crc(bufferB[i])<<endl;
            if(crc(bufferB[i])!="0000000000000000"){
                error=true;
            }else{
                bufferB[i]=bufferB[i].substr(0,bufferB[i].size()-16);
            }
            i++;
        }
    }
   
       
    if(!error){// Cabecera, Que no hay desorden en las tramas y que hay trama final
        i=0;
        while(!error&&i<j){// 
            a=BitStringToInt(bufferB[i].substr(1,4));
            b=BitStringToInt(bufferB[i].substr(5,1));
            buffer2[a]=bufferB[i].substr(6);
            //cout<<a<<" "<<b<<" "<<buffer2[a]<<endl;
            i++;
        }
        //~ b=BitStringToInt(buffer2[i-1].substr(5,1));
        if(!b){
            error=true;
        }
    }
    if(!error){
        bufferMsj="";
        for (i = 0; i <j ; i++)
        {
            for (a = 0; a <buffer2[i].size() ; a+=8)
            {
                bufferMsj+=(char)(BitStringToInt(buffer2[i].substr(a,8)));
            }   
        }

        cout<<bufferMsj<<endl;
        if(archivo.is_open()){
            archivo<<bufferMsj;
            archivo.close();
        }
    }
    
    
    
    
    if(error){
        cout<<"Se ha detectado algun un error"<<endl;
        if(archivo.is_open()){
            archivo<<"Se ha detectado algun un error"<<endl;
            archivo.close();
        }else{
            cout<<"Se ha detectado algun un error"<<endl;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2308, %rsp           # imm = 0x2308
movq %rdi, %rbx
leaq -0x90(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x3ce4(%rip), %rdx      # 0x8159
leaq -0xa0(%rbp), %rdi
movq %rdx, %rsi
callq 0x3140
movl $0x10, %eax
leaq (%rax,%rbp), %rcx
addq $-0x1330, %rcx          # imm = 0xECD0
movq %rcx, -0x10(%rcx)
movq $0x0, -0x8(%rcx)
movb $0x0, (%rcx)
addq $0x20, %rax
cmpq $0x1010, %rax           # imm = 0x1010
jne 0x4489
movl $0x10, %eax
leaq (%rax,%rbp), %rcx
addq $-0x2330, %rcx          # imm = 0xDCD0
movq %rcx, -0x10(%rcx)
movq $0x0, -0x8(%rcx)
movb $0x0, (%rcx)
addq $0x20, %rax
cmpq $0x1010, %rax           # imm = 0x1010
jne 0x44b4
leaq -0x70(%rbp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x3bba(%rip), %rsi      # 0x80ae
leaq -0x328(%rbp), %rdi
movl $0x10, %edx
callq 0x2180
cmpq $0x0, 0x8(%rbx)
je 0x45cb
movq $-0x1, -0x40(%rbp)
leaq -0x1330(%rbp), %r14
xorl %r12d, %r12d
movl $0x8, %ecx
movq %rbx, %rdi
leaq 0x3c29(%rip), %r13      # 0x815a
movq %r13, %rsi
movq %r12, %rdx
callq 0x2230
movq %rax, %r15
addq $0x8, %r12
movl $0x8, %ecx
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x2230
movq %rax, %r12
addq $0x8, %r12
movq %r12, %rcx
subq %r15, %rcx
leaq -0x60(%rbp), %r13
movq %r13, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x2170
movq %r14, %rdi
movq %r13, %rsi
callq 0x21c0
movq -0x60(%rbp), %rdi
leaq -0x50(%rbp), %rax
cmpq %rax, %rdi
je 0x4599
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x2160
incq -0x40(%rbp)
addq $0x20, %r14
cmpq 0x8(%rbx), %r12
jb 0x4522
movq -0x40(%rbp), %rax
leaq 0x1(%rax), %rcx
cmpq $0xf, %rax
jbe 0x45d4
xorl %eax, %eax
cmpq $0x11, %rcx
setae %dl
cmovbq %rax, %rcx
jmp 0x4824
xorl %ebx, %ebx
xorl %edx, %edx
jmp 0x4a95
movq %rcx, -0x30(%rbp)
cmpq $0x11, %rcx
setae %dl
leaq -0x1330(%rbp), %rbx
xorl %r15d, %r15d
movl $0x1, %r12d
leaq -0x60(%rbp), %r14
movq 0x8(%rbx), %rcx
cmpq $0x1e, %rcx
movzbl %dl, %edx
cmovbl %r12d, %edx
testb $0x1, %dl
jne 0x4820
movl %edx, -0x34(%rbp)
addq $-0x10, %rcx
movl $0x8, %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2170
movq %rbx, %rdi
movq %r14, %rsi
callq 0x21c0
movq -0x60(%rbp), %rdi
leaq -0x50(%rbp), %rax
cmpq %rax, %rdi
je 0x4646
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x2160
incq %r15
addq $0x20, %rbx
cmpq -0x30(%rbp), %r15
movl -0x34(%rbp), %edx
jb 0x45f3
xorl %ebx, %ebx
movq -0x98(%rbp), %rdx
leaq -0xa0(%rbp), %rdi
xorl %esi, %esi
leaq 0x3aea(%rip), %rcx      # 0x8159
xorl %r8d, %r8d
callq 0x2210
movq %rbx, -0x128(%rbp)
movq %rbx, %rax
shlq $0x5, %rax
leaq (%rax,%rbp), %r15
addq $-0x1330, %r15          # imm = 0xECD0
cmpq $0x0, 0x8(%r15)
je 0x46ea
xorl %ebx, %ebx
xorl %r12d, %r12d
movq (%r15), %rax
movb (%rax,%r12), %r14b
movsbl %r14b, %esi
leaq -0xa0(%rbp), %rdi
callq 0x2120
movl $0x0, %r13d
cmpb $0x31, %r14b
je 0x46c6
movl $0x0, %ebx
jmp 0x46c9
incq %rbx
xorl %eax, %eax
cmpq $0x5, %rbx
sete %cl
je 0x46d7
movq %rbx, %r13
movb %cl, %al
addq %rax, %r12
incq %r12
movq %r13, %rbx
cmpq 0x8(%r15), %r12
jb 0x469c
jmp 0x46ed
xorl %r13d, %r13d
movq %r15, %rdi
leaq -0xa0(%rbp), %rsi
callq 0x20c0
movq -0x30(%rbp), %rcx
movq -0x128(%rbp), %rdx
leaq 0x1(%rdx), %rbx
cmpq %rdx, -0x40(%rbp)
jne 0x4658
movl -0x34(%rbp), %edx
testb $0x1, %dl
jne 0x4824
leaq -0x1330(%rbp), %r14
movl $0x1, %eax
leaq -0x120(%rbp), %r12
movq %rax, -0x40(%rbp)
leaq -0x110(%rbp), %rax
movq %rax, -0x120(%rbp)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x30a2
leaq -0x60(%rbp), %rbx
movq %rbx, %rdi
movq %r12, %r15
movq %r12, %rsi
callq 0x3cf8
movq %rbx, %rdi
leaq 0x39c4(%rip), %rsi      # 0x8138
callq 0x2080
movl %eax, %r12d
movq -0x60(%rbp), %rdi
leaq -0x50(%rbp), %rax
cmpq %rax, %rdi
je 0x4795
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x2160
movq -0x120(%rbp), %rdi
leaq -0x110(%rbp), %rax
cmpq %rax, %rdi
je 0x47b7
movq -0x110(%rbp), %rsi
incq %rsi
callq 0x2160
testl %r12d, %r12d
jne 0x4ab0
movq 0x8(%r14), %rcx
addq $-0x10, %rcx
leaq -0x60(%rbp), %r12
movq %r12, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x2170
movq %r14, %rdi
movq %r12, %rsi
callq 0x21c0
movq -0x60(%rbp), %rdi
leaq -0x50(%rbp), %rax
cmpq %rax, %rdi
movq %r15, %r12
je 0x4800
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x2160
movl -0x34(%rbp), %edx
testb $0x1, %dl
jne 0x4820
addq $0x20, %r14
movq -0x40(%rbp), %rcx
leaq 0x1(%rcx), %rax
cmpq -0x30(%rbp), %rcx
jb 0x4734
jmp 0x4820
movq -0x30(%rbp), %rcx
testb $0x1, %dl
movq %rcx, -0x30(%rbp)
jne 0x4aa7
testq %rcx, %rcx
je 0x4a93
movl %edx, -0x34(%rbp)
xorl %r14d, %r14d
leaq -0x60(%rbp), %r15
movq %r14, %rax
shlq $0x5, %rax
leaq (%rax,%rbp), %r12
addq $-0x1330, %r12          # imm = 0xECD0
movl $0x1, %edx
movl $0x4, %ecx
leaq -0x100(%rbp), %rdi
movq %r12, %rsi
callq 0x2170
movq -0xf8(%rbp), %rbx
testq %rbx, %rbx
je 0x491e
decq %rbx
xorl %r15d, %r15d
xorl %r13d, %r13d
movq -0x100(%rbp), %rax
cmpb $0x31, (%rax,%r13)
jne 0x4908
movq %rbx, %xmm1
movq 0x386d(%rip), %xmm0     # 0x8110
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movapd 0x3871(%rip), %xmm0     # 0x8120
subpd %xmm0, %xmm1
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
callq 0x2140
movq %r15, %xmm1
punpckldq 0x383f(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x3847(%rip), %xmm1     # 0x8120
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
addsd %xmm1, %xmm2
addsd %xmm2, %xmm0
cvttsd2si %xmm0, %rax
movq %rax, %rcx
sarq $0x3f, %rcx
subsd 0x3833(%rip), %xmm0     # 0x8130
cvttsd2si %xmm0, %r15
andq %rcx, %r15
orq %rax, %r15
incq %r13
addq $-0x1, %rbx
jb 0x4888
movslq %r15d, %rbx
leaq -0x60(%rbp), %r15
jmp 0x4920
xorl %ebx, %ebx
movq -0x100(%rbp), %rdi
leaq -0xf0(%rbp), %rax
cmpq %rax, %rdi
je 0x4942
movq -0xf0(%rbp), %rsi
incq %rsi
callq 0x2160
movl $0x5, %edx
movl $0x1, %ecx
leaq -0xe0(%rbp), %rdi
movq %r12, %rsi
callq 0x2170
movq %rbx, -0x40(%rbp)
movq -0xd8(%rbp), %rbx
testq %rbx, %rbx
je 0x4a0e
decq %rbx
xorl %r13d, %r13d
xorl %r15d, %r15d
movq -0xe0(%rbp), %rax
cmpb $0x31, (%rax,%r15)
jne 0x49f8
movq %rbx, %xmm1
movq 0x377d(%rip), %xmm0     # 0x8110
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movapd 0x3781(%rip), %xmm0     # 0x8120
subpd %xmm0, %xmm1
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
callq 0x2140
movq %r13, %xmm1
punpckldq 0x374f(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x3757(%rip), %xmm1     # 0x8120
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
addsd %xmm1, %xmm2
addsd %xmm2, %xmm0
cvttsd2si %xmm0, %rax
movq %rax, %rcx
sarq $0x3f, %rcx
subsd 0x3743(%rip), %xmm0     # 0x8130
cvttsd2si %xmm0, %r13
andq %rcx, %r13
orq %rax, %r13
incq %r15
addq $-0x1, %rbx
jb 0x4978
movslq %r13d, %r13
leaq -0x60(%rbp), %r15
jmp 0x4a11
xorl %r13d, %r13d
movq -0xe0(%rbp), %rdi
leaq -0xd0(%rbp), %rax
cmpq %rax, %rdi
movq -0x30(%rbp), %rbx
je 0x4a37
movq -0xd0(%rbp), %rsi
incq %rsi
callq 0x2160
movl $0x6, %edx
movq %r15, %rdi
movq %r12, %rsi
movq $-0x1, %rcx
callq 0x2170
movq -0x40(%rbp), %rax
shlq $0x5, %rax
leaq (%rax,%rbp), %rdi
addq $-0x2330, %rdi          # imm = 0xDCD0
movq %r15, %rsi
callq 0x21c0
movq -0x60(%rbp), %rdi
leaq -0x50(%rbp), %rax
cmpq %rax, %rdi
je 0x4a82
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x2160
incq %r14
cmpq %rbx, %r14
jne 0x4844
movl -0x34(%rbp), %edx
jmp 0x4a95
xorl %ebx, %ebx
movq %rbx, -0x30(%rbp)
testq %r13, %r13
movzbl %dl, %eax
movl $0x1, %edx
cmovnel %eax, %edx
testb $0x1, %dl
je 0x4b59
movq 0x6519(%rip), %rbx      # 0xafd0
leaq 0x35d1(%rip), %rsi      # 0x808f
movl $0x1e, %edx
movq %rbx, %rdi
callq 0x21a0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x2150
movsbl %al, %esi
movq 0x64e7(%rip), %rdi      # 0xafd0
callq 0x2030
movq %rax, %rdi
callq 0x20e0
leaq -0x2b8(%rbp), %rdi
callq 0x2060
testb %al, %al
je 0x4d27
leaq 0x357e(%rip), %rsi      # 0x808f
leaq -0x328(%rbp), %rbx
movl $0x1e, %edx
movq %rbx, %rdi
callq 0x21a0
movq -0x328(%rbp), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x2150
movsbl %al, %esi
leaq -0x328(%rbp), %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20e0
jmp 0x4d19
leaq -0x80(%rbp), %rdi
movq 0x8(%rdi), %rdx
leaq 0x35f1(%rip), %rcx      # 0x8159
xorl %esi, %esi
xorl %r8d, %r8d
callq 0x2210
movq -0x30(%rbp), %rbx
testq %rbx, %rbx
je 0x4cb7
xorl %eax, %eax
movq %rax, -0x40(%rbp)
shlq $0x5, %rax
cmpq $0x0, -0x2328(%rbp,%rax)
je 0x4ca7
leaq (%rax,%rbp), %r15
addq $-0x2330, %r15          # imm = 0xDCD0
xorl %r12d, %r12d
movl $0x8, %ecx
leaq -0xc0(%rbp), %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x2170
movq -0xb8(%rbp), %r13
testq %r13, %r13
je 0x4c67
decq %r13
xorl %r14d, %r14d
xorl %ebx, %ebx
movq -0xc0(%rbp), %rax
cmpb $0x31, (%rax,%rbx)
jne 0x4c54
movq %r13, %xmm1
movq 0x3521(%rip), %xmm0     # 0x8110
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movapd 0x3525(%rip), %xmm0     # 0x8120
subpd %xmm0, %xmm1
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
callq 0x2140
movq %r14, %xmm1
punpckldq 0x34f3(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x34fb(%rip), %xmm1     # 0x8120
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
addsd %xmm1, %xmm2
addsd %xmm2, %xmm0
cvttsd2si %xmm0, %rax
movq %rax, %rcx
sarq $0x3f, %rcx
subsd 0x34e7(%rip), %xmm0     # 0x8130
cvttsd2si %xmm0, %r14
andq %rcx, %r14
orq %rax, %r14
incq %rbx
addq $-0x1, %r13
jb 0x4bd5
movq -0x30(%rbp), %rbx
jmp 0x4c6a
xorl %r14d, %r14d
movsbl %r14b, %esi
leaq -0x80(%rbp), %rdi
callq 0x2120
movq -0xc0(%rbp), %rdi
leaq -0xb0(%rbp), %rax
cmpq %rax, %rdi
je 0x4c99
movq -0xb0(%rbp), %rsi
incq %rsi
callq 0x2160
addq $0x8, %r12
cmpq 0x8(%r15), %r12
jb 0x4ba6
movq -0x40(%rbp), %rax
incq %rax
cmpq %rbx, %rax
jne 0x4b81
movq -0x80(%rbp), %rsi
movq -0x78(%rbp), %rdx
movq 0x630a(%rip), %rdi      # 0xafd0
callq 0x21a0
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
leaq -0x2b8(%rbp), %rdi
callq 0x2060
testb %al, %al
je 0x4d6d
movq -0x80(%rbp), %rsi
movq -0x78(%rbp), %rdx
leaq -0x328(%rbp), %rdi
callq 0x21a0
leaq -0x328(%rbp), %rdi
callq 0x21d0
jmp 0x4d6d
movq 0x62a2(%rip), %rbx      # 0xafd0
leaq 0x335a(%rip), %rsi      # 0x808f
movl $0x1e, %edx
movq %rbx, %rdi
callq 0x21a0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x2150
movsbl %al, %esi
movq 0x6270(%rip), %rdi      # 0xafd0
callq 0x2030
movq %rax, %rdi
callq 0x20e0
movq 0x6254(%rip), %rax      # 0xafc8
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq -0x320(%rbp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, -0x328(%rbp,%rcx)
callq 0x2110
leaq -0x230(%rbp), %rdi
callq 0x20a0
movq -0x80(%rbp), %rdi
leaq -0x70(%rbp), %rax
cmpq %rax, %rdi
je 0x4dbc
movq -0x70(%rbp), %rsi
incq %rsi
callq 0x2160
movq $-0x1000, %rbx          # imm = 0xF000
leaq -0x1340(%rbp), %r14
movq -0x10(%r14), %rdi
cmpq %rdi, %r14
je 0x4dde
movq (%r14), %rsi
incq %rsi
callq 0x2160
addq $-0x20, %r14
addq $0x20, %rbx
jne 0x4dca
movq $-0x1000, %rbx          # imm = 0xF000
leaq -0x340(%rbp), %r14
movq -0x10(%r14), %rdi
cmpq %rdi, %r14
je 0x4e0a
movq (%r14), %rsi
incq %rsi
callq 0x2160
addq $-0x20, %r14
addq $0x20, %rbx
jne 0x4df6
movq -0xa0(%rbp), %rdi
leaq -0x90(%rbp), %rax
cmpq %rax, %rdi
je 0x4e36
movq -0x90(%rbp), %rsi
incq %rsi
callq 0x2160
addq $0x2308, %rsp           # imm = 0x2308
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x4efb
jmp 0x4ec3
movq %rax, %rbx
movq -0x120(%rbp), %rdi
leaq -0x110(%rbp), %rax
cmpq %rax, %rdi
je 0x4eef
movq -0x110(%rbp), %rsi
jmp 0x4ee7
jmp 0x4ec3
jmp 0x4ec3
jmp 0x4ec3
jmp 0x4ec3
jmp 0x4ec3
jmp 0x4ec3
jmp 0x4ec3
movq %rax, %rbx
movq -0xe0(%rbp), %rdi
leaq -0xd0(%rbp), %rax
cmpq %rax, %rdi
je 0x4eef
movq -0xd0(%rbp), %rsi
jmp 0x4ee7
movq %rax, %rbx
movq -0x100(%rbp), %rdi
leaq -0xf0(%rbp), %rax
cmpq %rax, %rdi
je 0x4eef
movq -0xf0(%rbp), %rsi
jmp 0x4ee7
jmp 0x4ec3
movq %rax, %rbx
jmp 0x4eef
jmp 0x4eca
movq %rax, %rbx
movq -0xc0(%rbp), %rdi
leaq -0xb0(%rbp), %rax
cmpq %rax, %rdi
je 0x4eef
movq -0xb0(%rbp), %rsi
incq %rsi
callq 0x2160
leaq -0x328(%rbp), %rdi
callq 0x21e0
movq -0x80(%rbp), %rdi
leaq -0x70(%rbp), %rax
cmpq %rax, %rdi
je 0x4f14
movq -0x70(%rbp), %rsi
incq %rsi
callq 0x2160
movq $-0x1000, %r14          # imm = 0xF000
leaq -0x1340(%rbp), %r15
movq -0x10(%r15), %rdi
cmpq %rdi, %r15
je 0x4f36
movq (%r15), %rsi
incq %rsi
callq 0x2160
addq $-0x20, %r15
addq $0x20, %r14
jne 0x4f22
movq $-0x1000, %r14          # imm = 0xF000
leaq -0x340(%rbp), %r15
movq -0x10(%r15), %rdi
cmpq %rdi, %r15
je 0x4f62
movq (%r15), %rsi
incq %rsi
callq 0x2160
addq $-0x20, %r15
addq $0x20, %r14
jne 0x4f4e
movq -0xa0(%rbp), %rdi
leaq -0x90(%rbp), %rax
cmpq %rax, %rdi
je 0x4f8e
movq -0x90(%rbp), %rsi
incq %rsi
callq 0x2160
movq %rbx, %rdi
callq 0x2240