// File: /workspace/github_cpp_makefile_star2_O1/instance01[P]chromium-snss-parse/examples/parse_print_urls.cpp
// Function: main
int main(int argc, char* argv[]) {
    if (argc != 2) {
        std::cout << "Usage: " << argv[0] << " <filename>" << std::endl;
        std::cout << "For example on ArchLinux you could try and parse ";
        std::cout << "~/.config/chromium/Default/Current Session" << std::endl;
        return 0;
    }

    std::vector<std::shared_ptr<Command>> cmds = read_session_file(std::string(argv[1]));

    for (auto & x : cmds) {
        if (x->type == 6) {
            std::shared_ptr<CommandUpdateTabNavigation> c = std::static_pointer_cast<CommandUpdateTabNavigation>(x);
            std::cout << c->tabid << " " << c->index << " " << c->url << std::endl;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
cmpl $0x2, %edi
jne 0x4e75
movq 0x8(%r14), %rsi
leaq -0x68(%rbp), %rdi
leaq -0x29(%rbp), %rdx
callq 0x5054
leaq -0x48(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x496c
leaq -0x58(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4d9b
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x3160
movq -0x48(%rbp), %r13
movq -0x40(%rbp), %rbx
cmpq %rbx, %r13
je 0x4eb4
movq (%r13), %r14
cmpl $0x6, 0xc(%r14)
jne 0x4e6c
movq 0x8(%r13), %r15
testq %r15, %r15
je 0x4ddb
movq 0x51fd(%rip), %rax      # 0x9fc8
cmpb $0x0, (%rax)
je 0x4dd6
incl 0x8(%r15)
jmp 0x4ddb
lock
incl 0x8(%r15)
movl 0x14(%r14), %esi
movq 0x51ea(%rip), %rdi      # 0x9fd0
callq 0x3200
movq %rax, %r12
movl $0x1, %edx
movq %rax, %rdi
leaq 0x130d(%rip), %rsi      # 0x610a
callq 0x3170
movl 0x18(%r14), %esi
movq %r12, %rdi
callq 0x3200
movq %rax, %r12
movl $0x1, %edx
movq %rax, %rdi
leaq 0x12ea(%rip), %rsi      # 0x610a
callq 0x3170
movq 0x20(%r14), %rsi
movq 0x28(%r14), %rdx
movq %r12, %rdi
callq 0x3170
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x3140
movsbl %al, %esi
movq %r12, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x30f0
testq %r15, %r15
je 0x4e6c
movq %r15, %rdi
callq 0x5128
addq $0x10, %r13
jmp 0x4da3
movq 0x5154(%rip), %rbx      # 0x9fd0
leaq 0x12cd(%rip), %rsi      # 0x6150
movl $0x7, %edx
movq %rbx, %rdi
callq 0x3170
movq (%r14), %r14
testq %r14, %r14
je 0x4ec2
movq %r14, %rdi
callq 0x30c0
movq 0x5129(%rip), %rdi      # 0x9fd0
movq %r14, %rsi
movq %rax, %rdx
callq 0x3170
jmp 0x4ed9
leaq -0x48(%rbp), %rdi
callq 0x4ffe
jmp 0x4f63
movq (%rbx), %rax
movq -0x18(%rax), %rax
leaq (%rbx,%rax), %rdi
movl 0x20(%rbx,%rax), %esi
orl $0x1, %esi
callq 0x31f0
leaq 0x1278(%rip), %rsi      # 0x6158
movl $0xb, %edx
movq %rbx, %rdi
callq 0x3170
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3140
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x30f0
leaq 0x1249(%rip), %rsi      # 0x6164
movl $0x31, %edx
movq %rbx, %rdi
callq 0x3170
leaq 0x1267(%rip), %rsi      # 0x6196
movl $0x2a, %edx
movq %rbx, %rdi
callq 0x3170
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3140
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x30f0
xorl %eax, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x58(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4fb0
movq -0x58(%rbp), %rsi
incq %rsi
callq 0x3160
jmp 0x4fb0
movq %rax, %rbx
jmp 0x4fb0
movq %rax, %rbx
testq %r15, %r15
je 0x4fa7
movq %r15, %rdi
callq 0x5128
leaq -0x48(%rbp), %rdi
callq 0x4ffe
movq %rbx, %rdi
callq 0x3220