// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
callq 0x6010
movl $0x0, 0x878f(%rip)      # 0xe844
xorl %edi, %edi
movl $0x5413, %esi           # imm = 0x5413
leaq 0x873d(%rip), %rdx      # 0xe800
addq $0x48, %rdx
movb $0x0, %al
callq 0x10d0
cmpl $-0x1, %eax
je 0x60dd
movl $0x1, 0x8767(%rip)      # 0xe844
jmp 0x60df
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
leaq 0x1a63(%rip), %rdx      # 0x7b50
callq 0x11f0
movl %eax, -0x14(%rbp)
cmpl $-0x1, %eax
je 0x62ad
movl -0x14(%rbp), %eax
addl $-0x63, %eax
movl %eax, %ecx
movq %rcx, -0x20(%rbp)
subl $0x14, %eax
ja 0x6290
movq -0x20(%rbp), %rax
leaq 0x1682(%rip), %rcx      # 0x77a0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x3eaa(%rip), %rax      # 0x9fd8
movq (%rax), %rax
movq %rax, 0x86d8(%rip)      # 0xe810
jmp 0x62a8
movq 0x3e94(%rip), %rax      # 0x9fd8
movq (%rax), %rdi
callq 0x1070
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x86c0(%rip)     # 0xe818
jmp 0x62a8
movq 0x3e74(%rip), %rax      # 0x9fd8
movq (%rax), %rdi
callq 0x1070
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x86a4(%rip)     # 0xe81c
jmp 0x62a8
movq 0x3e54(%rip), %rax      # 0x9fd8
movq (%rax), %rdi
callq 0x11e0
movl %eax, 0x868e(%rip)      # 0xe820
jmp 0x62a8
movq 0x3e3a(%rip), %rax      # 0x9fd8
movq (%rax), %rax
movq %rax, 0x8680(%rip)      # 0xe828
jmp 0x62a8
movq 0x3e24(%rip), %rax      # 0x9fd8
movq (%rax), %rdi
callq 0x11e0
movl %eax, 0x866e(%rip)      # 0xe830
jmp 0x62a8
movq 0x3e0a(%rip), %rax      # 0x9fd8
movq (%rax), %rdi
callq 0x11e0
movl %eax, 0x8658(%rip)      # 0xe834
jmp 0x62a8
movq 0x3df0(%rip), %rax      # 0x9fd8
movq (%rax), %rdi
leaq 0x1973(%rip), %rsi      # 0x7b65
callq 0x1130
cmpl $0x0, %eax
je 0x6217
movq 0x3dd5(%rip), %rax      # 0x9fd8
movq (%rax), %rdi
leaq 0x195b(%rip), %rsi      # 0x7b68
callq 0x1130
cmpl $0x0, %eax
jne 0x6223
movl $0x1, 0x8617(%rip)      # 0xe838
jmp 0x6265
movq 0x3dae(%rip), %rax      # 0x9fd8
movq (%rax), %rdi
leaq 0x1936(%rip), %rsi      # 0x7b6a
callq 0x1130
cmpl $0x0, %eax
je 0x6259
movq 0x3d93(%rip), %rax      # 0x9fd8
movq (%rax), %rdi
leaq 0x152c(%rip), %rsi      # 0x777b
callq 0x1130
cmpl $0x0, %eax
jne 0x6263
movl $0x0, 0x85d5(%rip)      # 0xe838
jmp 0x6265
jmp 0x62a8
movl $0x1, 0x85cb(%rip)      # 0xe83c
jmp 0x62a8
movl $0x1, %edi
callq 0x1330
jmp 0x62a8
movq 0x3d52(%rip), %rax      # 0x9fd8
movq (%rax), %rdi
callq 0x1350
jmp 0x62a8
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x5fe0
movl $0x1, -0x4(%rbp)
jmp 0x6372
jmp 0x60df
movq 0x3d1c(%rip), %rax      # 0x9fd0
movl (%rax), %eax
movl -0x8(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jl 0x62f0
movq 0x3d31(%rip), %rax      # 0x9ff8
movq (%rax), %rdi
leaq 0x189d(%rip), %rsi      # 0x7b6e
movb $0x0, %al
callq 0x1140
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x5fe0
movl $0x1, -0x4(%rbp)
jmp 0x6372
movq -0x10(%rbp), %rax
movq 0x3cd5(%rip), %rcx      # 0x9fd0
movl (%rcx), %ecx
movl %ecx, %esi
addl $0x1, %esi
movq 0x3cc7(%rip), %rdx      # 0x9fd0
movl %esi, (%rdx)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x84e7(%rip)      # 0xe800
movq -0x10(%rbp), %rax
movq 0x3cac(%rip), %rcx      # 0x9fd0
movl (%rcx), %ecx
movl %ecx, %esi
addl $0x1, %esi
movq 0x3c9e(%rip), %rdx      # 0x9fd0
movl %esi, (%rdx)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x84c6(%rip)      # 0xe808
cmpl $0x0, 0x84f3(%rip)      # 0xe83c
jne 0x6364
cmpl $0x0, 0x84f2(%rip)      # 0xe844
je 0x6364
movzwl 0x84ef(%rip), %eax      # 0xe84a
subl $0x1, %eax
movl %eax, 0x84dc(%rip)      # 0xe840
callq 0x5840
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq