// File: dianejdan[P]Eclat/./Pattern.hpp
// Function: Pattern<int>::join_tid_list(Pattern<int>*)
vector<int> join_tid_list( Pattern<Typ> *x){
        vector<int> ret; // joined tid list
        vector<int> xTidList = x->tidList; // the "larger" child tid list

        int i = 0; // iterator for one tid list
        int j = 0; // iterator for another tid list

        while (i < xTidList.size()){ // go through one tid list
            while (j < tidList.size()){ // go through second tid list

                if (xTidList[i] == tidList[j]){ // if the tid of two tid lists
                                                // are the same, add this tid to
                                                // joined tid list. The first tid list
                                                // catches up the second
                    ret.push_back(xTidList[i]);
                    ++j; // move iterator of second tid list by one
                    break; // get out of the while loop since I need to compare
                           // this new tid with the next tid in the first tid list
                }

                if (xTidList[i] < tidList[j]){ // if the tid in first tid list is 
                                               // smaller than the second one tid list
                                               // break, the second one needs to catch
                                               // up the first tid list
                    break;
                }
                ++j; // if two tids are unequal, or they are racing, move the iterator
                     // of second tid list by one
            }
            ++i; // move the iterator of the first tid list by one
        }
        return ret;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x68(%rbp)
movq %rdi, %rax
movq %rax, -0x60(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x58(%rbp)
movb $0x0, -0x19(%rbp)
callq 0x4500
movq -0x18(%rbp), %rsi
addq $0x8, %rsi
leaq -0x38(%rbp), %rdi
callq 0x4b50
jmp 0x94b6
movl $0x0, -0x48(%rbp)
movl $0x0, -0x4c(%rbp)
movslq -0x48(%rbp), %rax
movq %rax, -0x70(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x4a40
movq %rax, %rcx
movq -0x70(%rbp), %rax
cmpq %rcx, %rax
jae 0x95d2
jmp 0x94e7
movq -0x58(%rbp), %rdi
movslq -0x4c(%rbp), %rax
movq %rax, -0x78(%rbp)
addq $0x8, %rdi
callq 0x4a40
movq %rax, %rcx
movq -0x78(%rbp), %rax
cmpq %rcx, %rax
jae 0x95c4
movslq -0x48(%rbp), %rsi
leaq -0x38(%rbp), %rdi
callq 0x9cc0
movq -0x58(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x7c(%rbp)
addq $0x8, %rdi
movslq -0x4c(%rbp), %rsi
callq 0x9cc0
movq %rax, %rcx
movl -0x7c(%rbp), %eax
cmpl (%rcx), %eax
jne 0x9587
movslq -0x48(%rbp), %rsi
leaq -0x38(%rbp), %rdi
callq 0x9cc0
movq -0x68(%rbp), %rdi
movq %rax, %rsi
callq 0x4750
jmp 0x9554
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x95c4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x95fb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x4860
jmp 0x95fb
movslq -0x48(%rbp), %rsi
leaq -0x38(%rbp), %rdi
callq 0x9cc0
movq -0x58(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x80(%rbp)
addq $0x8, %rdi
movslq -0x4c(%rbp), %rsi
callq 0x9cc0
movq %rax, %rcx
movl -0x80(%rbp), %eax
cmpl (%rcx), %eax
jge 0x95b6
jmp 0x95c4
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x94e7
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
jmp 0x94c4
movb $0x1, -0x19(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x4860
testb $0x1, -0x19(%rbp)
jne 0x95ee
movq -0x68(%rbp), %rdi
callq 0x4860
movq -0x60(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
movq -0x68(%rbp), %rdi
callq 0x4860
movq -0x40(%rbp), %rdi
callq 0x2390
nopl (%rax)