// File: /workspace/github_c_makefile_star2_O0/Aethlas[P]fflz4/fflz4.c
// Function: main
int main(int argc, char **argv)
{
    if (argc < 2) FAILED(1, "");

    char *profile = NULL, *bookmark = NULL;
    unsigned int flag = 0x0;
    int c = 0;

    while ((c = getopt(argc, argv, "p:utcbsd")) != -1) {
        switch (c) {
            case 'p': /* profile path */
                flag |= FLAG_P;
                profile = strdup(optarg);
                break;
            case 'u': /* url */
                flag |= FLAG_U;
                break;
            case 't': /* title */
                flag |= FLAG_T;
                break;
            case 'c': /* current session */
                flag |= FLAG_C;
                break;
            case 'b': /* bookmark */
                flag |= FLAG_B;
                break;
            case 's': /* session json */
                flag |= FLAG_S;
                break;
            case 'd': /* bookmark json */
                flag |= FLAG_D;
                break;
            case '?':
                if (optopt == 'p')
                    FAILED(1, "");
                break;
            default:
                break;
        }
    }

    if (!profile)
        profile = get_firefox_profile();

    if (flag & (FLAG_U | FLAG_T | FLAG_C | FLAG_S))
        get_tabs(profile, flag);

    if (flag & (FLAG_B | FLAG_D)) {
        bookmark = get_bookmark_file(profile);
        get_bookmarks(bookmark, flag);
        free(bookmark);
    }

    free(profile);
    return EXIT_SUCCESS;
}

// Assembly:
subq $0x38, %rsp
movl $0x0, 0x34(%rsp)
movl %edi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
cmpl $0x2, 0x30(%rsp)
jge 0x1375
jmp 0x134e
movq 0x4fca3(%rip), %rax     # 0x50ff8
movq (%rax), %rdi
leaq 0x4bf30(%rip), %rsi     # 0x4d28f
movb $0x0, %al
callq 0x1100
callq 0x1510
movl $0x1, %edi
callq 0x11f0
movq $0x0, 0x20(%rsp)
movq $0x0, 0x18(%rsp)
movl $0x0, 0x14(%rsp)
movl $0x0, 0x10(%rsp)
movl 0x30(%rsp), %edi
movq 0x28(%rsp), %rsi
leaq 0x4bd39(%rip), %rdx     # 0x4d0e0
callq 0x11d0
movl %eax, 0x10(%rsp)
cmpl $-0x1, %eax
je 0x1495
movl 0x10(%rsp), %eax
addl $-0x3f, %eax
movl %eax, %ecx
movq %rcx, 0x8(%rsp)
subl $0x36, %eax
ja 0x148e
movq 0x8(%rsp), %rax
leaq 0x4bc28(%rip), %rcx     # 0x4d004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl 0x14(%rsp), %eax
orl $0x1, %eax
movl %eax, 0x14(%rsp)
movq 0x4fbc9(%rip), %rax     # 0x50fc0
movq (%rax), %rdi
callq 0x1200
movq %rax, 0x20(%rsp)
jmp 0x1490
movl 0x14(%rsp), %eax
orl $0x2, %eax
movl %eax, 0x14(%rsp)
jmp 0x1490
movl 0x14(%rsp), %eax
orl $0x4, %eax
movl %eax, 0x14(%rsp)
jmp 0x1490
movl 0x14(%rsp), %eax
orl $0x8, %eax
movl %eax, 0x14(%rsp)
jmp 0x1490
movl 0x14(%rsp), %eax
orl $0x10, %eax
movl %eax, 0x14(%rsp)
jmp 0x1490
movl 0x14(%rsp), %eax
orl $0x20, %eax
movl %eax, 0x14(%rsp)
jmp 0x1490
movl 0x14(%rsp), %eax
orl $0x40, %eax
movl %eax, 0x14(%rsp)
jmp 0x1490
movq 0x4fb72(%rip), %rax     # 0x50fd0
cmpl $0x70, (%rax)
jne 0x148c
jmp 0x1465
movq 0x4fb8c(%rip), %rax     # 0x50ff8
movq (%rax), %rdi
leaq 0x4be19(%rip), %rsi     # 0x4d28f
movb $0x0, %al
callq 0x1100
callq 0x1510
movl $0x1, %edi
callq 0x11f0
jmp 0x1490
jmp 0x1490
jmp 0x1397
cmpq $0x0, 0x20(%rsp)
jne 0x14a7
callq 0x1590
movq %rax, 0x20(%rsp)
movl 0x14(%rsp), %eax
andl $0x2e, %eax
cmpl $0x0, %eax
je 0x14c1
movq 0x20(%rsp), %rdi
movl 0x14(%rsp), %esi
callq 0x1810
movl 0x14(%rsp), %eax
andl $0x50, %eax
cmpl $0x0, %eax
je 0x14f4
movq 0x20(%rsp), %rdi
callq 0x19f0
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
movl 0x14(%rsp), %esi
callq 0x1c80
movq 0x18(%rsp), %rdi
callq 0x1220
movq 0x20(%rsp), %rdi
callq 0x1220
xorl %eax, %eax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)