// File: /workspace/github_cpp_makefile_star2_O2/shengzh-oOoO[P]CodeSim/src/text_moss.cpp
// Function: main
int main(int argc, char ** argv){
    if (argc <=2 || argc >= 5){
        assert(false);
    }
    if (argc == 4){
        if(strcmp(argv[3],"-v")==0 || strcmp(argv[3],"--verbose")==0){
            debug_option = 1;
        }
        else{
            assert(false);
        }
    }
    CodeFile cfile1,cfile2;
    cfile1.init(argv[1]);
    cfile2.init(argv[2]);
    cfile1.CreateHashList();
    cfile2.CreateHashList();
    cfile1.Winnowing();
    cfile2.Winnowing();

    sort(cfile1.result.begin(), cfile1.result.end());
    sort(cfile2.result.begin(), cfile2.result.end());

    int i = 0, j = 0;
    int same_cnt = 0;
    while(i < cfile1.result.size() && j < cfile2.result.size()){
        if(cfile1.result[i] == cfile2.result[j]){
            i++;
            j++;
            same_cnt ++;
        }
        else if(cfile1.result[i] > cfile2.result[j]){
            j++;
        }
        else if(cfile1.result[i] < cfile2.result[j]){
            i++;
        }
    }
    double IoU = (double)same_cnt/(double)(cfile1.result.size() + cfile2.result.size() - same_cnt);
    printf("%0.1f\n",IoU * 100);
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x160, %rsp            # imm = 0x160
leal -0x5(%rdi), %eax
cmpl $-0x3, %eax
jbe 0x1471
movq %rsi, %rbx
cmpl $0x4, %edi
jne 0x12ee
movq 0x18(%rbx), %rdi
cmpb $0x2d, (%rdi)
jne 0x12d3
cmpb $0x76, 0x1(%rdi)
jne 0x12d3
cmpb $0x0, 0x2(%rdi)
je 0x12e7
leaq 0x1d8d(%rip), %rsi      # 0x3067
callq 0x1100
testl %eax, %eax
jne 0x148a
movb $0x1, 0x3ddc(%rip)      # 0x50ca
leaq -0x108(%rbp), %rax
movq %rax, 0x8(%rax)
movq %rax, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
andq $0x0, 0x40(%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x30(%rax)
leaq -0x58(%rbp), %rax
movq %rax, 0x8(%rax)
movq %rax, (%rax)
movups %xmm0, 0x10(%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x30(%rax)
andq $0x0, 0x40(%rax)
movq 0x8(%rbx), %rsi
leaq -0x170(%rbp), %r14
movq %r14, %rdi
callq 0x10c0
movq 0x10(%rbx), %rsi
leaq -0xc0(%rbp), %rdi
callq 0x10c0
movq %r14, %rdi
callq 0x14ca
leaq -0xc0(%rbp), %rdi
callq 0x14ca
leaq -0x170(%rbp), %rdi
callq 0x15b6
leaq -0xc0(%rbp), %rdi
callq 0x15b6
movq -0xd8(%rbp), %rdi
movq -0xd0(%rbp), %rsi
callq 0x1cae
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x1cae
movq -0xd8(%rbp), %rdx
movq -0xd0(%rbp), %rax
subq %rdx, %rax
sarq $0x3, %rax
movq -0x28(%rbp), %rsi
movq -0x20(%rbp), %rcx
subq %rsi, %rcx
sarq $0x3, %rcx
xorl %edi, %edi
xorl %r9d, %r9d
xorl %r8d, %r8d
movslq %edi, %r10
movslq %r9d, %r9
cmpq %r10, %rax
jbe 0x1402
cmpq %r9, %rcx
jbe 0x1402
movq (%rdx,%r10,8), %r11
movq (%rsi,%r9,8), %rbx
cmpq %rbx, %r11
je 0x13eb
jle 0x13f5
incq %r9
jmp 0x13cd
incl %edi
incl %r9d
incl %r8d
jmp 0x13c7
setl %r10b
movzbl %r10b, %r10d
addl %r10d, %edi
jmp 0x13c7
cvtsi2sd %r8d, %xmm0
movl %r8d, %edx
subq %rdx, %rax
addq %rcx, %rax
movq %rax, %xmm1
punpckldq 0x1bf3(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x1bfb(%rip), %xmm1     # 0x3020
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
addsd %xmm1, %xmm2
divsd %xmm2, %xmm0
mulsd 0x1bf3(%rip), %xmm0     # 0x3030
leaq 0x1c2d(%rip), %rdi      # 0x3071
movb $0x1, %al
callq 0x1030
leaq -0xc0(%rbp), %rdi
callq 0x1696
leaq -0x170(%rbp), %rdi
callq 0x1696
xorl %eax, %eax
addq $0x160, %rsp            # imm = 0x160
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x1bc0(%rip), %rdi      # 0x3038
leaq 0x1bbf(%rip), %rsi      # 0x303e
leaq 0x1bca(%rip), %rcx      # 0x3050
pushq $0x5b
jmp 0x14a1
leaq 0x1ba7(%rip), %rdi      # 0x3038
leaq 0x1ba6(%rip), %rsi      # 0x303e
leaq 0x1bb1(%rip), %rcx      # 0x3050
pushq $0x62
popq %rdx
callq 0x1090
movq %rax, %rbx
leaq -0xc0(%rbp), %rdi
callq 0x1696
leaq -0x170(%rbp), %rdi
callq 0x1696
movq %rbx, %rdi
callq 0x1150