// File: /workspace/github_cpp_makefile_star2_O1/carellano8[P]Proyecto-Redes-I-2017/hamming.cpp
// Function: hamming::recibir(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void hamming::recibir(binario bin){
	size_t i,li,ls,j,a,b;
    int r;
    bool error=false;
    binario aux="";
    binario bufferB[MAXMSJ/MAXT*8];
    binario buffer2[MAXMSJ/MAXT*8];
    string bufferMsj;
    ofstream archivo("salidah.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){// decodificar hamming
        i=0;
        while(!error&&i<j){// decodificar hamming
        	// cout<<bufferB[i]<<endl;
        	// cout<<crc(bufferB[i])<<endl;
        	bufferB[i]=decodificadorHamming(bufferB[i],&r);
        	//~ cout<<"HOLA "<<r<<endl;
            if(r==-1){
                error=true;
            }
            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++;
        }
        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;
            if(r==0){
            	cout<<"Se ha detectado y corregido un error"<<endl;
            	archivo<<endl<<"Se ha detectado y corregido un error"<<endl;
            }
            archivo.close();
        }else{
        	cout<<"Se ha detectado algun un error"<<endl;
        }
    }
    
    
    
    
    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 $0x22f8, %rsp           # imm = 0x22F8
movq %rdi, %rbx
leaq -0x90(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x2060(%rip), %rdx      # 0x8159
leaq -0xa0(%rbp), %rdi
movq %rdx, %rsi
callq 0x315a
movl $0x10, %eax
leaq (%rax,%rbp), %rcx
addq $-0x1320, %rcx          # imm = 0xECE0
movq %rcx, -0x10(%rcx)
movq $0x0, -0x8(%rcx)
movb $0x0, (%rcx)
addq $0x20, %rax
cmpq $0x1010, %rax           # imm = 0x1010
jne 0x610d
movl $0x10, %eax
leaq (%rax,%rbp), %rcx
addq $-0x2320, %rcx          # imm = 0xDCE0
movq %rcx, -0x10(%rcx)
movq $0x0, -0x8(%rcx)
movb $0x0, (%rcx)
addq $0x20, %rax
cmpq $0x1010, %rax           # imm = 0x1010
jne 0x6138
leaq -0x70(%rbp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x1f4f(%rip), %rsi      # 0x80c7
leaq -0x320(%rbp), %rdi
movl $0x10, %edx
callq 0x2180
cmpq $0x0, 0x8(%rbx)
je 0x6231
leaq -0x1320(%rbp), %r14
movq $0x0, -0x30(%rbp)
xorl %r13d, %r13d
movl $0x8, %ecx
movq %rbx, %rdi
leaq 0x1fa5(%rip), %r12      # 0x815a
movq %r12, %rsi
movq %r13, %rdx
callq 0x2230
movq %rax, %r15
addq $0x8, %r13
movl $0x8, %ecx
movq %rbx, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x2230
movq %rax, %r13
addq $0x8, %r13
movq %r13, %rcx
subq %r15, %rcx
leaq -0x60(%rbp), %r12
movq %r12, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x2170
movq %r14, %rdi
movq %r12, %rsi
callq 0x21c0
movq -0x60(%rbp), %rdi
leaq -0x50(%rbp), %rax
cmpq %rax, %rdi
je 0x621d
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x2160
incq -0x30(%rbp)
addq $0x20, %r14
cmpq 0x8(%rbx), %r13
jb 0x61a6
jmp 0x6239
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq $0x11, %rax
setae %r13b
addq $-0x11, %rax
cmpq $-0x10, %rax
jb 0x62c7
leaq -0x1320(%rbp), %rbx
movl $0x1, %r15d
movl $0x1, %r12d
leaq -0x60(%rbp), %r14
movq 0x8(%rbx), %rcx
cmpq $0x1f, %rcx
movzbl %r13b, %r13d
cmovbl %r12d, %r13d
testb $0x1, %r13b
jne 0x62b4
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 0x62b4
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x2160
cmpq -0x30(%rbp), %r15
jae 0x62c7
addq $0x20, %rbx
incq %r15
testb $0x1, %r13b
je 0x6266
cmpq $0x0, -0x30(%rbp)
je 0x6399
testb $0x1, %r13b
jne 0x6399
xorl %r14d, %r14d
movl %r13d, -0x3c(%rbp)
movq -0x98(%rbp), %rdx
leaq -0xa0(%rbp), %rdi
xorl %esi, %esi
leaq 0x1e5f(%rip), %rcx      # 0x8159
xorl %r8d, %r8d
callq 0x2210
movq %r14, -0x38(%rbp)
movq %r14, %rax
shlq $0x5, %rax
leaq (%rax,%rbp), %r15
addq $-0x1320, %r15          # imm = 0xECE0
cmpq $0x0, 0x8(%r15)
je 0x6373
xorl %r12d, %r12d
xorl %r13d, %r13d
movq (%r15), %rax
movb (%rax,%r13), %r14b
movsbl %r14b, %esi
leaq -0xa0(%rbp), %rdi
callq 0x2120
movl $0x0, %ebx
cmpb $0x31, %r14b
je 0x634f
movl $0x0, %r12d
jmp 0x6352
incq %r12
xorl %eax, %eax
cmpq $0x5, %r12
sete %cl
je 0x6360
movq %r12, %rbx
movb %cl, %al
addq %rax, %r13
incq %r13
movq %rbx, %r12
cmpq 0x8(%r15), %r13
jb 0x6325
jmp 0x6375
xorl %ebx, %ebx
movq %r15, %rdi
leaq -0xa0(%rbp), %rsi
callq 0x20c0
movl -0x3c(%rbp), %r13d
movq -0x38(%rbp), %r14
incq %r14
cmpq -0x30(%rbp), %r14
jne 0x62e3
cmpq $0x0, -0x30(%rbp)
sete %al
orb %r13b, %al
movl %r13d, %ecx
orb %al, %cl
testb $0x1, %cl
jne 0x6477
leaq -0x1320(%rbp), %r12
movl $0x1, %eax
leaq -0xc0(%rbp), %r15
movq %rax, -0x38(%rbp)
leaq -0xb0(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq (%r12), %rsi
movq 0x8(%r12), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x30c0
leaq -0x60(%rbp), %r14
movq %r14, %rdi
movq %r15, %rsi
leaq -0x40(%rbp), %rdx
callq 0x6c8c
movq %r12, %rdi
movq %r14, %rsi
callq 0x21c0
movq -0x60(%rbp), %rdi
leaq -0x50(%rbp), %rax
cmpq %rax, %rdi
je 0x6422
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x2160
movq -0xc0(%rbp), %rdi
leaq -0xb0(%rbp), %rax
cmpq %rax, %rdi
je 0x6444
movq -0xb0(%rbp), %rsi
incq %rsi
callq 0x2160
cmpl $-0x1, -0x40(%rbp)
movzbl %r13b, %r13d
movl $0x1, %eax
cmovel %eax, %r13d
movq -0x38(%rbp), %rax
cmpq -0x30(%rbp), %rax
jae 0x6477
addq $0x20, %r12
incq %rax
testb $0x1, %r13b
leaq -0xc0(%rbp), %r15
je 0x63c5
testb $0x1, %r13b
jne 0x66fa
movl %r13d, -0x3c(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x66e9
xorl %r13d, %r13d
leaq -0x60(%rbp), %r14
movq %r13, %rax
shlq $0x5, %rax
leaq (%rax,%rbp), %rbx
addq $-0x1320, %rbx          # imm = 0xECE0
movl $0x1, %edx
movl $0x4, %ecx
leaq -0x120(%rbp), %rdi
movq %rbx, %rsi
callq 0x2170
movq -0x118(%rbp), %r15
testq %r15, %r15
je 0x6575
decq %r15
xorl %r14d, %r14d
xorl %r12d, %r12d
movq -0x120(%rbp), %rax
cmpb $0x31, (%rax,%r12)
jne 0x655b
movq %r15, %xmm1
movq 0x1c1a(%rip), %xmm0     # 0x8110
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movapd 0x1c1e(%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 0x1bec(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x1bf4(%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 0x1be0(%rip), %xmm0     # 0x8130
cvttsd2si %xmm0, %r14
andq %rcx, %r14
orq %rax, %r14
incq %r12
addq $-0x1, %r15
jb 0x64db
movslq %r14d, %rax
movq %rax, -0x38(%rbp)
leaq -0x60(%rbp), %r14
jmp 0x657d
movq $0x0, -0x38(%rbp)
movq -0x120(%rbp), %rdi
leaq -0x110(%rbp), %rax
cmpq %rax, %rdi
je 0x659f
movq -0x110(%rbp), %rsi
incq %rsi
callq 0x2160
movl $0x5, %edx
movl $0x1, %ecx
leaq -0x100(%rbp), %rdi
movq %rbx, %rsi
callq 0x2170
movq -0xf8(%rbp), %r12
testq %r12, %r12
je 0x666a
decq %r12
xorl %r14d, %r14d
xorl %r15d, %r15d
movq -0x100(%rbp), %rax
cmpb $0x31, (%rax,%r15)
jne 0x6651
movq %r12, %xmm1
movq 0x1b24(%rip), %xmm0     # 0x8110
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movapd 0x1b28(%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 0x1af6(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x1afe(%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 0x1aea(%rip), %xmm0     # 0x8130
cvttsd2si %xmm0, %r14
andq %rcx, %r14
orq %rax, %r14
incq %r15
addq $-0x1, %r12
jb 0x65d1
movq %rbx, %r15
movslq %r14d, %rbx
leaq -0x60(%rbp), %r14
jmp 0x666f
movq %rbx, %r15
xorl %ebx, %ebx
movq -0x100(%rbp), %rdi
leaq -0xf0(%rbp), %rax
cmpq %rax, %rdi
je 0x6691
movq -0xf0(%rbp), %rsi
incq %rsi
callq 0x2160
movl $0x6, %edx
movq %r14, %rdi
movq %r15, %rsi
movq $-0x1, %rcx
callq 0x2170
movq -0x38(%rbp), %rax
shlq $0x5, %rax
leaq (%rax,%rbp), %rdi
addq $-0x2320, %rdi          # imm = 0xDCE0
movq %r14, %rsi
callq 0x21c0
movq -0x60(%rbp), %rdi
leaq -0x50(%rbp), %rax
cmpq %rax, %rdi
je 0x66dc
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x2160
incq %r13
cmpq -0x30(%rbp), %r13
jne 0x6497
testq %rbx, %rbx
movzbl -0x3c(%rbp), %eax
movl $0x1, %r13d
cmovnel %eax, %r13d
testb $0x1, %r13b
je 0x6796
movq 0x48c5(%rip), %rbx      # 0xafd0
leaq 0x197d(%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 0x4893(%rip), %rdi      # 0xafd0
callq 0x2030
movq %rax, %rdi
callq 0x20e0
leaq -0x2b0(%rbp), %rdi
callq 0x2060
testb %al, %al
je 0x6a23
leaq 0x192a(%rip), %rsi      # 0x808f
leaq -0x320(%rbp), %rbx
movl $0x1e, %edx
movq %rbx, %rdi
callq 0x21a0
movq -0x320(%rbp), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2150
jmp 0x6a02
leaq -0x80(%rbp), %rdi
movq 0x8(%rdi), %rdx
leaq 0x19b4(%rip), %rcx      # 0x8159
xorl %esi, %esi
xorl %r8d, %r8d
callq 0x2210
cmpq $0x0, -0x30(%rbp)
je 0x68ef
xorl %eax, %eax
movq %rax, -0x38(%rbp)
shlq $0x5, %rax
cmpq $0x0, -0x2318(%rbp,%rax)
je 0x68de
leaq (%rax,%rbp), %r15
addq $-0x2320, %r15          # imm = 0xDCE0
xorl %r12d, %r12d
movl $0x8, %ecx
leaq -0xe0(%rbp), %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x2170
movq -0xd8(%rbp), %r13
testq %r13, %r13
je 0x689e
decq %r13
xorl %r14d, %r14d
xorl %ebx, %ebx
movq -0xe0(%rbp), %rax
cmpb $0x31, (%rax,%rbx)
jne 0x688f
movq %r13, %xmm1
movq 0x18e6(%rip), %xmm0     # 0x8110
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movapd 0x18ea(%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 0x18b8(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x18c0(%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 0x18ac(%rip), %xmm0     # 0x8130
cvttsd2si %xmm0, %r14
andq %rcx, %r14
orq %rax, %r14
incq %rbx
addq $-0x1, %r13
jb 0x6810
jmp 0x68a1
xorl %r14d, %r14d
movsbl %r14b, %esi
leaq -0x80(%rbp), %rdi
callq 0x2120
movq -0xe0(%rbp), %rdi
leaq -0xd0(%rbp), %rax
cmpq %rax, %rdi
je 0x68d0
movq -0xd0(%rbp), %rsi
incq %rsi
callq 0x2160
addq $0x8, %r12
cmpq 0x8(%r15), %r12
jb 0x67e1
movq -0x38(%rbp), %rax
incq %rax
cmpq -0x30(%rbp), %rax
jne 0x67bc
movq -0x80(%rbp), %rsi
movq -0x78(%rbp), %rdx
movq 0x46d2(%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 -0x2b0(%rbp), %rdi
callq 0x2060
testb %al, %al
je 0x6a23
movq -0x80(%rbp), %rsi
movq -0x78(%rbp), %rdx
leaq -0x320(%rbp), %rbx
movq %rbx, %rdi
callq 0x21a0
cmpl $0x0, -0x40(%rbp)
jne 0x6a15
movq 0x4667(%rip), %r14      # 0xafd0
leaq 0x1805(%rip), %rsi      # 0x8175
movl $0x24, %edx
movq %r14, %rdi
callq 0x21a0
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x2150
movsbl %al, %esi
movq 0x4635(%rip), %rdi      # 0xafd0
callq 0x2030
movq %rax, %rdi
callq 0x20e0
movq -0x320(%rbp), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x2150
movsbl %al, %esi
leaq -0x320(%rbp), %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20e0
movq %rax, %rbx
leaq 0x1794(%rip), %rsi      # 0x8175
movl $0x24, %edx
movq %rax, %rdi
callq 0x21a0
movq (%rbx), %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 -0x320(%rbp), %rdi
callq 0x21d0
jmp 0x6a69
movq 0x45a6(%rip), %rbx      # 0xafd0
leaq 0x165e(%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 0x4574(%rip), %rdi      # 0xafd0
callq 0x2030
movq %rax, %rdi
callq 0x20e0
movq 0x4558(%rip), %rax      # 0xafc8
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq -0x318(%rbp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, -0x320(%rbp,%rcx)
callq 0x2110
leaq -0x228(%rbp), %rdi
callq 0x20a0
movq -0x80(%rbp), %rdi
leaq -0x70(%rbp), %rax
cmpq %rax, %rdi
je 0x6ab8
movq -0x70(%rbp), %rsi
incq %rsi
callq 0x2160
movq $-0x1000, %rbx          # imm = 0xF000
leaq -0x1330(%rbp), %r14
movq -0x10(%r14), %rdi
cmpq %rdi, %r14
je 0x6ada
movq (%r14), %rsi
incq %rsi
callq 0x2160
addq $-0x20, %r14
addq $0x20, %rbx
jne 0x6ac6
movq $-0x1000, %rbx          # imm = 0xF000
leaq -0x330(%rbp), %r14
movq -0x10(%r14), %rdi
cmpq %rdi, %r14
je 0x6b06
movq (%r14), %rsi
incq %rsi
callq 0x2160
addq $-0x20, %r14
addq $0x20, %rbx
jne 0x6af2
movq -0xa0(%rbp), %rdi
leaq -0x90(%rbp), %rax
cmpq %rax, %rdi
je 0x6b32
movq -0x90(%rbp), %rsi
incq %rsi
callq 0x2160
addq $0x22f8, %rsp           # imm = 0x22F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x6bf1
jmp 0x6bbb
jmp 0x6bbb
jmp 0x6bbb
movq %rax, %rbx
movq -0xc0(%rbp), %rdi
leaq -0xb0(%rbp), %rax
cmpq %rax, %rdi
je 0x6be5
movq -0xb0(%rbp), %rsi
jmp 0x6bdd
jmp 0x6bbb
jmp 0x6bbb
jmp 0x6bbb
jmp 0x6bbb
movq %rax, %rbx
movq -0x100(%rbp), %rdi
leaq -0xf0(%rbp), %rax
cmpq %rax, %rdi
je 0x6be5
movq -0xf0(%rbp), %rsi
jmp 0x6bdd
movq %rax, %rbx
movq -0x120(%rbp), %rdi
leaq -0x110(%rbp), %rax
cmpq %rax, %rdi
je 0x6be5
movq -0x110(%rbp), %rsi
jmp 0x6bdd
jmp 0x6bbb
jmp 0x6bc0
movq %rax, %rbx
jmp 0x6be5
movq %rax, %rbx
movq -0xe0(%rbp), %rdi
leaq -0xd0(%rbp), %rax
cmpq %rax, %rdi
je 0x6be5
movq -0xd0(%rbp), %rsi
incq %rsi
callq 0x2160
leaq -0x320(%rbp), %rdi
callq 0x21e0
movq -0x80(%rbp), %rdi
leaq -0x70(%rbp), %rax
cmpq %rax, %rdi
je 0x6c0a
movq -0x70(%rbp), %rsi
incq %rsi
callq 0x2160
movq $-0x1000, %r14          # imm = 0xF000
leaq -0x1330(%rbp), %r15
movq -0x10(%r15), %rdi
cmpq %rdi, %r15
je 0x6c2c
movq (%r15), %rsi
incq %rsi
callq 0x2160
addq $-0x20, %r15
addq $0x20, %r14
jne 0x6c18
movq $-0x1000, %r14          # imm = 0xF000
leaq -0x330(%rbp), %r15
movq -0x10(%r15), %rdi
cmpq %rdi, %r15
je 0x6c58
movq (%r15), %rsi
incq %rsi
callq 0x2160
addq $-0x20, %r15
addq $0x20, %r14
jne 0x6c44
movq -0xa0(%rbp), %rdi
leaq -0x90(%rbp), %rax
cmpq %rax, %rdi
je 0x6c84
movq -0x90(%rbp), %rsi
incq %rsi
callq 0x2160
movq %rbx, %rdi
callq 0x2240