// File: sumanishs[P]boost-edif-parser2/main.cpp
// Function: main
int main(int argc, char* argv[])
{
    if(argc < 2){ 
        std::cout << "Usage:" << argv[0] << " <file name>" << std::endl;
        return 1;
    }   

    std::string file (argv[1]);
    EdifReader reader;
    clock_t start, end;
    
    start = clock();
    if(reader.Read(file)){
        std::cout << "Done...." << std::endl;
        end = clock();
        double time_taken = ((double)(end - start))/CLOCKS_PER_SEC;
        std::cout << "Time taken to parse the design: " << time_taken << "seconds" << std::endl;
        return 0;
    }   
    else {
        std::cout << "Failed...." << std::endl;
        end = clock();
        double time_taken = ((double)(end - start))/CLOCKS_PER_SEC;
        std::cout << "Execution time: " << time_taken << "seconds" << std::endl;
        return 1;
    }  
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0x2, -0x8(%rbp)
jge 0xbd3eb
movq 0x59c32(%rip), %rdi     # 0x116fd8
leaq 0xbfab(%rip), %rsi      # 0xc9358
callq 0x6350
movq %rax, %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
callq 0x6350
movq %rax, %rdi
leaq 0xbf94(%rip), %rsi      # 0xc935f
callq 0x6350
movq %rax, %rdi
movq 0x59be6(%rip), %rsi     # 0x116fc0
callq 0x63b0
movl $0x1, -0x4(%rbp)
jmp 0xbd661
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x80(%rbp)
leaq -0x31(%rbp), %rdi
movq %rdi, -0x78(%rbp)
callq 0x65f0
movq -0x80(%rbp), %rsi
movq -0x78(%rbp), %rdx
leaq -0x30(%rbp), %rdi
callq 0x2b2f0
jmp 0xbd417
leaq -0x31(%rbp), %rdi
callq 0x63d0
leaq -0x45(%rbp), %rdi
callq 0xbd680
jmp 0xbd42b
callq 0x6250
movq %rax, -0x50(%rbp)
leaq -0x45(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x7bc0
movb %al, -0x81(%rbp)
jmp 0xbd449
movb -0x81(%rbp), %al
testb $0x1, %al
jne 0xbd458
jmp 0xbd572
movq 0x59b79(%rip), %rdi     # 0x116fd8
leaq 0xbf06(%rip), %rsi      # 0xc936c
callq 0x6350
movq %rax, -0x90(%rbp)
jmp 0xbd474
movq -0x90(%rbp), %rdi
movq 0x59b3e(%rip), %rsi     # 0x116fc0
callq 0x63b0
jmp 0xbd489
callq 0x6250
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq -0x50(%rbp), %rcx
subq %rcx, %rax
cvtsi2sd %rax, %xmm0
movsd 0xbea6(%rip), %xmm1     # 0xc9350
divsd %xmm1, %xmm0
movsd %xmm0, -0x60(%rbp)
movq 0x59b1e(%rip), %rdi     # 0x116fd8
leaq 0xbeb4(%rip), %rsi      # 0xc9375
callq 0x6350
movq %rax, -0x98(%rbp)
jmp 0xbd4cf
movq -0x98(%rbp), %rdi
movsd -0x60(%rbp), %xmm0
callq 0x6650
movq %rax, -0xa0(%rbp)
jmp 0xbd4e9
movq -0xa0(%rbp), %rdi
leaq 0xbe9f(%rip), %rsi      # 0xc9396
callq 0x6350
movq %rax, -0xa8(%rbp)
jmp 0xbd505
movq -0xa8(%rbp), %rdi
movq 0x59aad(%rip), %rsi     # 0x116fc0
callq 0x63b0
jmp 0xbd51a
movl $0x0, -0x4(%rbp)
movl $0x1, -0x64(%rbp)
jmp 0xbd642
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x31(%rbp), %rdi
callq 0x63d0
jmp 0xbd66d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0xbd656
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x45(%rbp), %rdi
callq 0xbd690
jmp 0xbd656
movq 0x59a5f(%rip), %rdi     # 0x116fd8
leaq 0xbe1e(%rip), %rsi      # 0xc939e
callq 0x6350
movq %rax, -0xb0(%rbp)
jmp 0xbd58e
movq -0xb0(%rbp), %rdi
movq 0x59a24(%rip), %rsi     # 0x116fc0
callq 0x63b0
jmp 0xbd5a3
callq 0x6250
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq -0x50(%rbp), %rcx
subq %rcx, %rax
cvtsi2sd %rax, %xmm0
movsd 0xbd8c(%rip), %xmm1     # 0xc9350
divsd %xmm1, %xmm0
movsd %xmm0, -0x70(%rbp)
movq 0x59a04(%rip), %rdi     # 0x116fd8
leaq 0xbdce(%rip), %rsi      # 0xc93a9
callq 0x6350
movq %rax, -0xb8(%rbp)
jmp 0xbd5e9
movq -0xb8(%rbp), %rdi
movsd -0x70(%rbp), %xmm0
callq 0x6650
movq %rax, -0xc0(%rbp)
jmp 0xbd603
movq -0xc0(%rbp), %rdi
leaq 0xbd85(%rip), %rsi      # 0xc9396
callq 0x6350
movq %rax, -0xc8(%rbp)
jmp 0xbd61f
movq -0xc8(%rbp), %rdi
movq 0x59993(%rip), %rsi     # 0x116fc0
callq 0x63b0
jmp 0xbd634
movl $0x1, -0x4(%rbp)
movl $0x1, -0x64(%rbp)
leaq -0x45(%rbp), %rdi
callq 0xbd690
leaq -0x30(%rbp), %rdi
callq 0x61e0
jmp 0xbd661
leaq -0x30(%rbp), %rdi
callq 0x61e0
jmp 0xbd66d
movl -0x4(%rbp), %eax
addq $0xd0, %rsp
popq %rbp
retq
movq -0x40(%rbp), %rdi
callq 0x65e0
nopw %cs:(%rax,%rax)