// File: PRDeving[P]CheckMyTags/src/checkmytags.cpp
// Function: main
int main(int argc, char* argv[]){

    getLookFor(argv[2]);
    int count = 0;    

    string line;
    if(argc < 2){
        cout << "No file." << endl;
        return 0;
    }
    ifstream is(argv[1]);

    while(getline(is, line)){
        checkIf(&line);
        count++;
    }

    cout << endl << endl << count << " lines analyzed." << endl
         << "____________________________" << endl <<endl;

    for(unsigned int x = 0; x < tags.size(); x++){
        if(tags[x].count < 0){
            cout << abs(tags[x].count) << " " << tags[x].name << "> closes uneeded" << endl;
        }else if(tags[x].count > 0){
            cout << tags[x].count << " " << tags[x].name << "> tags unclosed" << endl;
        }else{
            cout << "Every " << tags[x].name << "> tags correctly closed" << endl;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x310, %rsp            # imm = 0x310
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x24e0
movl $0x0, -0x14(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x2220
cmpl $0x2, -0x8(%rbp)
jge 0x2971
movq 0x46b5(%rip), %rdi      # 0x6fd8
leaq 0x16fa(%rip), %rsi      # 0x4024
callq 0x2170
movq %rax, -0x260(%rbp)
jmp 0x2938
movq -0x260(%rbp), %rdi
movq 0x467a(%rip), %rsi      # 0x6fc0
callq 0x21a0
jmp 0x294d
movl $0x0, -0x4(%rbp)
movl $0x1, -0x48(%rbp)
jmp 0x2d49
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x2d5e
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
leaq -0x250(%rbp), %rdi
movl $0x8, %edx
callq 0x22b0
jmp 0x298c
jmp 0x298e
leaq -0x250(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x2050
movq %rax, -0x268(%rbp)
jmp 0x29a7
movq -0x268(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x2200
movb %al, -0x269(%rbp)
jmp 0x29c5
movb -0x269(%rbp), %al
testb $0x1, %al
jne 0x29d1
jmp 0x2a04
leaq -0x38(%rbp), %rdi
callq 0x2770
jmp 0x29dc
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x298e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x250(%rbp), %rdi
callq 0x2070
jmp 0x2d5e
movq 0x45cd(%rip), %rdi      # 0x6fd8
movq 0x45ae(%rip), %rsi      # 0x6fc0
callq 0x21a0
movq %rax, -0x278(%rbp)
jmp 0x2a20
movq -0x278(%rbp), %rdi
movq 0x4592(%rip), %rsi      # 0x6fc0
callq 0x21a0
movq %rax, -0x280(%rbp)
jmp 0x2a3c
movq -0x280(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x2270
movq %rax, -0x288(%rbp)
jmp 0x2a54
movq -0x288(%rbp), %rdi
leaq 0x15cb(%rip), %rsi      # 0x402d
callq 0x2170
movq %rax, -0x290(%rbp)
jmp 0x2a70
movq -0x290(%rbp), %rdi
movq 0x4542(%rip), %rsi      # 0x6fc0
callq 0x21a0
movq %rax, -0x298(%rbp)
jmp 0x2a8c
movq -0x298(%rbp), %rdi
leaq 0x15a4(%rip), %rsi      # 0x403e
callq 0x2170
movq %rax, -0x2a0(%rbp)
jmp 0x2aa8
movq -0x2a0(%rbp), %rdi
movq 0x450a(%rip), %rsi      # 0x6fc0
callq 0x21a0
movq %rax, -0x2a8(%rbp)
jmp 0x2ac4
movq -0x2a8(%rbp), %rdi
movq 0x44ee(%rip), %rsi      # 0x6fc0
callq 0x21a0
jmp 0x2ad9
movl $0x0, -0x254(%rbp)
movl -0x254(%rbp), %eax
movq %rax, -0x2b0(%rbp)
leaq 0x46c1(%rip), %rdi      # 0x71b8
callq 0x2f70
movq %rax, %rcx
movq -0x2b0(%rbp), %rax
cmpq %rcx, %rax
jae 0x2d36
movl -0x254(%rbp), %eax
movl %eax, %esi
leaq 0x469a(%rip), %rdi      # 0x71b8
callq 0x2fa0
cmpl $0x0, 0x40(%rax)
jge 0x2bde
movl -0x254(%rbp), %eax
movl %eax, %esi
leaq 0x467c(%rip), %rdi      # 0x71b8
callq 0x2fa0
movl 0x40(%rax), %esi
movl %esi, %eax
negl %eax
cmovnsl %eax, %esi
movq 0x4486(%rip), %rdi      # 0x6fd8
callq 0x2270
movq %rax, -0x2b8(%rbp)
jmp 0x2b60
movq -0x2b8(%rbp), %rdi
leaq 0x1513(%rip), %rsi      # 0x4081
callq 0x2170
movq %rax, -0x2c0(%rbp)
jmp 0x2b7c
movl -0x254(%rbp), %eax
movl %eax, %esi
leaq 0x462d(%rip), %rdi      # 0x71b8
callq 0x2fa0
movq -0x2c0(%rbp), %rdi
movq %rax, %rsi
callq 0x2160
movq %rax, -0x2c8(%rbp)
jmp 0x2ba8
movq -0x2c8(%rbp), %rdi
leaq 0x14a5(%rip), %rsi      # 0x405b
callq 0x2170
movq %rax, -0x2d0(%rbp)
jmp 0x2bc4
movq -0x2d0(%rbp), %rdi
movq 0x43ee(%rip), %rsi      # 0x6fc0
callq 0x21a0
jmp 0x2bd9
jmp 0x2d20
movl -0x254(%rbp), %eax
movl %eax, %esi
leaq 0x45cb(%rip), %rdi      # 0x71b8
callq 0x2fa0
cmpl $0x0, 0x40(%rax)
jle 0x2ca3
movl -0x254(%rbp), %eax
movl %eax, %esi
leaq 0x45ad(%rip), %rdi      # 0x71b8
callq 0x2fa0
movl 0x40(%rax), %esi
movq 0x43be(%rip), %rdi      # 0x6fd8
callq 0x2270
movq %rax, -0x2d8(%rbp)
jmp 0x2c28
movq -0x2d8(%rbp), %rdi
leaq 0x144b(%rip), %rsi      # 0x4081
callq 0x2170
movq %rax, -0x2e0(%rbp)
jmp 0x2c44
movl -0x254(%rbp), %eax
movl %eax, %esi
leaq 0x4565(%rip), %rdi      # 0x71b8
callq 0x2fa0
movq -0x2e0(%rbp), %rdi
movq %rax, %rsi
callq 0x2160
movq %rax, -0x2e8(%rbp)
jmp 0x2c70
movq -0x2e8(%rbp), %rdi
leaq 0x13ee(%rip), %rsi      # 0x406c
callq 0x2170
movq %rax, -0x2f0(%rbp)
jmp 0x2c8c
movq -0x2f0(%rbp), %rdi
movq 0x4326(%rip), %rsi      # 0x6fc0
callq 0x21a0
jmp 0x2ca1
jmp 0x2d1e
movq 0x432e(%rip), %rdi      # 0x6fd8
leaq 0x13cb(%rip), %rsi      # 0x407c
callq 0x2170
movq %rax, -0x2f8(%rbp)
jmp 0x2cbf
movl -0x254(%rbp), %eax
movl %eax, %esi
leaq 0x44ea(%rip), %rdi      # 0x71b8
callq 0x2fa0
movq -0x2f8(%rbp), %rdi
movq %rax, %rsi
callq 0x2160
movq %rax, -0x300(%rbp)
jmp 0x2ceb
movq -0x300(%rbp), %rdi
leaq 0x138a(%rip), %rsi      # 0x4083
callq 0x2170
movq %rax, -0x308(%rbp)
jmp 0x2d07
movq -0x308(%rbp), %rdi
movq 0x42ab(%rip), %rsi      # 0x6fc0
callq 0x21a0
jmp 0x2d1c
jmp 0x2d1e
jmp 0x2d20
jmp 0x2d22
movl -0x254(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x254(%rbp)
jmp 0x2ae3
leaq -0x250(%rbp), %rdi
callq 0x2070
movl $0x0, -0x48(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x22e8
movl -0x4(%rbp), %eax
addq $0x310, %rsp            # imm = 0x310
popq %rbp
retq
leaq -0x38(%rbp), %rdi
callq 0x22e8
movq -0x40(%rbp), %rdi
callq 0x2280