// File: /workspace/github_c_makefile_star2_O1/lecram[P]congif/main.c
// Function: main
int
main(int argc, char *argv[])
{
    int opt;
    int ret;

    set_defaults();
    options.has_winsize = 0;
    if (ioctl(0, TIOCGWINSZ, &options.size) != -1) {
        options.has_winsize = 1;
    }
    while ((opt = getopt(argc, argv, "o:m:d:l:f:h:w:c:p:qv")) != -1) {
        switch (opt) {
        case 'o':
            options.output = optarg;
            break;
        case 'm':
            options.maxdelay = atof(optarg);
            break;
        case 'd':
            options.divisor = atof(optarg);
            break;
        case 'l':
            options.loop = atoi(optarg);
            break;
        case 'f':
            options.font = optarg;
            break;
        case 'h':
            options.height = atoi(optarg);
            break;
        case 'w':
            options.width = atoi(optarg);
            break;
        case 'c':
            if (!strcmp(optarg, "on") || !strcmp(optarg, "1"))
                options.cursor = 1;
            else if (!strcmp(optarg, "off") || !strcmp(optarg, "0"))
                options.cursor = 0;
            break;
        case 'q':
            options.quiet = 1;
            break;
        case 'v':
            set_verbosity(1);
            break;
        case 'p':
            set_default_palette(optarg);
            break;
        default:
            help(argv[0]);
            return 1;
        }
    }
    if (optind >= argc - 1) {
        fprintf(stderr, "error: no input given\n");
        help(argv[0]);
        return 1;
    }
    options.timings = argv[optind++];
    options.dialogue = argv[optind++];
    if (!options.quiet && options.has_winsize)
        options.barsize = options.size.ws_col - 1;
    ret = convert_script();
    return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x1e7b(%rip), %rax      # 0x5dd8
movq %rax, 0x8424(%rip)      # 0xc388
movabsq $0x3f8000007f7fffff, %rax # imm = 0x3F8000007F7FFFFF
movq %rax, 0x841b(%rip)      # 0xc390
movl $0xffffffff, 0x8419(%rip) # imm = 0xFFFFFFFF
xorps %xmm0, %xmm0
movups %xmm0, 0x8417(%rip)     # 0xc3a0
movss 0x1a7b(%rip), %xmm0     # 0x5a0c
movups %xmm0, 0x8418(%rip)     # 0xc3b0
leaq 0x8421(%rip), %rdx      # 0xc3c0
movl $0x5413, %esi           # imm = 0x5413
xorl %edi, %edi
xorl %eax, %eax
callq 0x10d0
cmpl $-0x1, %eax
je 0x3fbc
movl $0x1, 0x8400(%rip)      # 0xc3bc
leaq 0x1e1d(%rip), %r14      # 0x5de0
leaq 0x1a66(%rip), %r12      # 0x5a30
movq 0x3fff(%rip), %r15      # 0x7fd0
movl %ebp, %edi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x11d0
leal -0x63(%rax), %ecx
cmpl $0x14, %ecx
ja 0x411c
movslq (%r12,%rcx,4), %rax
addq %r12, %rax
jmpq *%rax
movq (%r15), %r13
movq %r13, %rdi
leaq 0x1df5(%rip), %rsi      # 0x5df5
callq 0x1120
testl %eax, %eax
je 0x410d
movq %r13, %rdi
leaq 0x1de1(%rip), %rsi      # 0x5df8
callq 0x1120
testl %eax, %eax
je 0x410d
movq %r13, %rdi
leaq 0x1dcc(%rip), %rsi      # 0x5dfa
callq 0x1120
testl %eax, %eax
je 0x404a
movq %r13, %rdi
leaq 0x19ba(%rip), %rsi      # 0x59fb
callq 0x1120
testl %eax, %eax
jne 0x3fd1
movl $0x0, 0x835c(%rip)      # 0xc3b0
jmp 0x3fd1
movq (%r15), %rdi
callq 0x11c0
movl %eax, 0x8345(%rip)      # 0xc3ac
jmp 0x3fd1
movq (%r15), %rdi
callq 0x1070
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x8310(%rip)     # 0xc390
jmp 0x3fd1
movq (%r15), %rdi
callq 0x11c0
movl %eax, 0x8305(%rip)      # 0xc398
jmp 0x3fd1
movl $0x1, %edi
callq 0x14dc
jmp 0x3fd1
movq (%r15), %rax
movq %rax, 0x82ef(%rip)      # 0xc3a0
jmp 0x3fd1
movq (%r15), %rdi
callq 0x1070
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x82ca(%rip)     # 0xc394
jmp 0x3fd1
movq (%r15), %rdi
callq 0x14e3
jmp 0x3fd1
movq (%r15), %rdi
callq 0x11c0
movl %eax, 0x82be(%rip)      # 0xc3a8
jmp 0x3fd1
movl $0x1, 0x82bb(%rip)      # 0xc3b4
jmp 0x3fd1
movq (%r15), %rax
movq %rax, 0x8280(%rip)      # 0xc388
jmp 0x3fd1
movl $0x1, 0x8299(%rip)      # 0xc3b0
jmp 0x3fd1
cmpl $-0x1, %eax
jne 0x4187
movq 0x3ea0(%rip), %rax      # 0x7fc8
movslq (%rax), %rcx
decl %ebp
cmpl %ebp, %ecx
jge 0x4191
leaq 0x1(%rcx), %rdx
movl %edx, (%rax)
movq (%rbx,%rcx,8), %rdx
movq %rdx, 0x8236(%rip)      # 0xc378
leal 0x2(%rcx), %edx
movl %edx, (%rax)
movq 0x8(%rbx,%rcx,8), %rax
movq %rax, 0x822d(%rip)      # 0xc380
cmpl $0x0, 0x825a(%rip)      # 0xc3b4
jne 0x4174
cmpl $0x0, 0x8259(%rip)      # 0xc3bc
je 0x4174
movzwl 0x8256(%rip), %eax      # 0xc3c2
decl %eax
movl %eax, 0x8244(%rip)      # 0xc3b8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x396c
movq %rbx, %rdi
callq 0x13c7
jmp 0x4199
movq %rbx, %rdi
callq 0x1389
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq