// File: matengyue[P]Similar_test_demo/./src/vectorConstruct.h
// Function: vectorConstruct(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>)
int ** vectorConstruct(vector<string> vector_A, vector<string> vector_B){
    vector<string> words;
    //统计所有词
    for (int i = 0; i < vector_A.size(); i++){
        int flag = 1;
        for (int j = 0; j < words.size(); j++){
            if (vector_A[i] == words[j]){
                flag = 0;
                break;
            }
        }
        if (flag){
            string word = vector_A[i];
            words.push_back(word);    
        }
    }

    for (int i = 0; i < vector_B.size(); i++){
        int flag = 1;
        for (int j = 0; j < words.size(); j++){
            if (vector_B[i] == words[j]){
                flag = 0;
                break;
            }
        }
        if (flag){
            string word = vector_B[i];
            words.push_back(word);    
        }
    }

    //词频统计
    int count = words.size();
    int **a;
    a = new int *[3];
    a[0] = new int[count];
    a[1] = new int[count];
    a[2] = new int[1];
    a[2][0] = count;
    for (int i = 0; i < count; i++){
        a[0][i] = 0;
        a[1][i] = 0;
        
        for (int j = 0; j < vector_A.size(); j++){
            if (words[i] == vector_A[j]){
                a[0][i]++;
            }
        }
        
        for (int j = 0; j < vector_B.size(); j++){
            if (words[i] == vector_B[j]){
                a[1][i]++;
            }
        }
    }

    return a;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x140, %rsp            # imm = 0x140
movq %rdi, -0xc0(%rbp)
movq %rsi, -0xb8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x3c70
movl $0x0, -0x2c(%rbp)
movq -0xc0(%rbp), %rdi
movslq -0x2c(%rbp), %rax
movq %rax, -0xc8(%rbp)
callq 0x3c90
movq %rax, %rcx
movq -0xc8(%rbp), %rax
cmpq %rcx, %rax
jae 0x2784
movl $0x1, -0x30(%rbp)
movl $0x0, -0x34(%rbp)
movslq -0x34(%rbp), %rax
movq %rax, -0xd0(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x3c90
movq %rax, %rcx
movq -0xd0(%rbp), %rax
cmpq %rcx, %rax
jae 0x270b
movq -0xc0(%rbp), %rdi
movslq -0x2c(%rbp), %rsi
callq 0x3d40
movq %rax, -0xd8(%rbp)
movslq -0x34(%rbp), %rsi
leaq -0x28(%rbp), %rdi
callq 0x3d40
movq -0xd8(%rbp), %rdi
movq %rax, %rsi
callq 0x3cb0
testb $0x1, %al
jne 0x26f5
jmp 0x26fe
movl $0x0, -0x30(%rbp)
jmp 0x270b
jmp 0x2700
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x2699
cmpl $0x0, -0x30(%rbp)
je 0x2774
movq -0xc0(%rbp), %rdi
movslq -0x2c(%rbp), %rsi
callq 0x3d40
movq %rax, %rsi
leaq -0x58(%rbp), %rdi
callq 0x2100
jmp 0x272f
leaq -0x28(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x3d60
jmp 0x273e
leaq -0x58(%rbp), %rdi
callq 0x2180
jmp 0x2774
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x2b59
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x2180
jmp 0x2b59
jmp 0x2776
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x2661
movl $0x0, -0x68(%rbp)
movq -0xb8(%rbp), %rdi
movslq -0x68(%rbp), %rax
movq %rax, -0xe0(%rbp)
callq 0x3c90
movq %rax, %rcx
movq -0xe0(%rbp), %rax
cmpq %rcx, %rax
jae 0x28a9
movl $0x1, -0x6c(%rbp)
movl $0x0, -0x70(%rbp)
movslq -0x70(%rbp), %rax
movq %rax, -0xe8(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x3c90
movq %rax, %rcx
movq -0xe8(%rbp), %rax
cmpq %rcx, %rax
jae 0x2835
movq -0xb8(%rbp), %rdi
movslq -0x68(%rbp), %rsi
callq 0x3d40
movq %rax, -0xf0(%rbp)
movslq -0x70(%rbp), %rsi
leaq -0x28(%rbp), %rdi
callq 0x3d40
movq -0xf0(%rbp), %rdi
movq %rax, %rsi
callq 0x3cb0
testb $0x1, %al
jne 0x281f
jmp 0x2828
movl $0x0, -0x6c(%rbp)
jmp 0x2835
jmp 0x282a
movl -0x70(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x70(%rbp)
jmp 0x27c3
cmpl $0x0, -0x6c(%rbp)
je 0x2899
movq -0xb8(%rbp), %rdi
movslq -0x68(%rbp), %rsi
callq 0x3d40
movq %rax, %rsi
leaq -0x90(%rbp), %rdi
callq 0x2100
jmp 0x285c
leaq -0x28(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x3d60
jmp 0x286e
leaq -0x90(%rbp), %rdi
callq 0x2180
jmp 0x2899
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x2180
jmp 0x2b59
jmp 0x289b
movl -0x68(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x68(%rbp)
jmp 0x278b
leaq -0x28(%rbp), %rdi
callq 0x3c90
movl %eax, -0x94(%rbp)
movl $0x18, %edi
callq 0x2030
movq %rax, -0xf8(%rbp)
jmp 0x28cb
movq -0xf8(%rbp), %rax
movq %rax, -0xa0(%rbp)
movslq -0x94(%rbp), %rax
movl $0x4, %ecx
mulq %rcx
movq %rax, %rdi
movq $-0x1, %rax
cmovoq %rax, %rdi
callq 0x2030
movq %rax, -0x100(%rbp)
jmp 0x2904
movq -0x100(%rbp), %rcx
movq -0xa0(%rbp), %rax
movq %rcx, (%rax)
movslq -0x94(%rbp), %rax
movl $0x4, %ecx
mulq %rcx
movq %rax, %rdi
movq $-0x1, %rax
cmovoq %rax, %rdi
callq 0x2030
movq %rax, -0x108(%rbp)
jmp 0x2940
movq -0x108(%rbp), %rcx
movq -0xa0(%rbp), %rax
movq %rcx, 0x8(%rax)
movl $0x4, %edi
callq 0x2030
movq %rax, -0x110(%rbp)
jmp 0x2965
movq -0x110(%rbp), %rcx
movq -0xa0(%rbp), %rax
movq %rcx, 0x10(%rax)
movl -0x94(%rbp), %ecx
movq -0xa0(%rbp), %rax
movq 0x10(%rax), %rax
movl %ecx, (%rax)
movl $0x0, -0xa4(%rbp)
movl -0xa4(%rbp), %eax
cmpl -0x94(%rbp), %eax
jge 0x2b32
movq -0xa0(%rbp), %rax
movq (%rax), %rax
movslq -0xa4(%rbp), %rcx
movl $0x0, (%rax,%rcx,4)
movq -0xa0(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0xa4(%rbp), %rcx
movl $0x0, (%rax,%rcx,4)
movl $0x0, -0xa8(%rbp)
movq -0xc0(%rbp), %rdi
movslq -0xa8(%rbp), %rax
movq %rax, -0x118(%rbp)
callq 0x3c90
movq %rax, %rcx
movq -0x118(%rbp), %rax
cmpq %rcx, %rax
jae 0x2a79
movslq -0xa4(%rbp), %rsi
leaq -0x28(%rbp), %rdi
callq 0x3d40
movq -0xc0(%rbp), %rdi
movq %rax, -0x120(%rbp)
movslq -0xa8(%rbp), %rsi
callq 0x3d40
movq -0x120(%rbp), %rdi
movq %rax, %rsi
callq 0x3cb0
testb $0x1, %al
jne 0x2a49
jmp 0x2a63
movq -0xa0(%rbp), %rax
movq (%rax), %rax
movslq -0xa4(%rbp), %rcx
movl (%rax,%rcx,4), %edx
addl $0x1, %edx
movl %edx, (%rax,%rcx,4)
jmp 0x2a65
movl -0xa8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xa8(%rbp)
jmp 0x29e1
movl $0x0, -0xac(%rbp)
movq -0xb8(%rbp), %rdi
movslq -0xac(%rbp), %rax
movq %rax, -0x128(%rbp)
callq 0x3c90
movq %rax, %rcx
movq -0x128(%rbp), %rax
cmpq %rcx, %rax
jae 0x2b1c
movslq -0xa4(%rbp), %rsi
leaq -0x28(%rbp), %rdi
callq 0x3d40
movq -0xb8(%rbp), %rdi
movq %rax, -0x130(%rbp)
movslq -0xac(%rbp), %rsi
callq 0x3d40
movq -0x130(%rbp), %rdi
movq %rax, %rsi
callq 0x3cb0
testb $0x1, %al
jne 0x2aeb
jmp 0x2b06
movq -0xa0(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0xa4(%rbp), %rcx
movl (%rax,%rcx,4), %edx
addl $0x1, %edx
movl %edx, (%rax,%rcx,4)
jmp 0x2b08
movl -0xac(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xac(%rbp)
jmp 0x2a83
jmp 0x2b1e
movl -0xa4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xa4(%rbp)
jmp 0x2994
movq -0xa0(%rbp), %rax
movq %rax, -0x138(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x3dd0
movq -0x138(%rbp), %rax
addq $0x140, %rsp            # imm = 0x140
popq %rbp
retq
leaq -0x28(%rbp), %rdi
callq 0x3dd0
movq -0x60(%rbp), %rdi
callq 0x2380
nopl (%rax,%rax)