// File: /workspace/github_c_makefile_star2_O2/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
callq 0x3bfe
andl $0x0, 0x775f(%rip)      # 0xb3bc
leaq 0x775c(%rip), %rdx      # 0xb3c0
movl $0x5413, %esi           # imm = 0x5413
xorl %edi, %edi
xorl %eax, %eax
callq 0x10d0
cmpl $-0x1, %eax
je 0x3c81
movl $0x1, 0x773b(%rip)      # 0xb3bc
leaq 0x1168(%rip), %r14      # 0x4df0
leaq 0xdb1(%rip), %r15       # 0x4a40
movl %ebp, %edi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x11d0
leal -0x63(%rax), %ecx
cmpl $0x14, %ecx
ja 0x3e1c
movslq (%r15,%rcx,4), %rax
addq %r15, %rax
jmpq *%rax
movq 0x3318(%rip), %rax      # 0x6fd0
movq (%rax), %r13
movzbl (%r13), %r12d
cmpl $0x31, %r12d
je 0x3ddd
cmpl $0x6f, %r12d
jne 0x3de8
cmpb $0x6e, 0x1(%r13)
jne 0x3de8
cmpb $0x0, 0x2(%r13)
jne 0x3de8
movl $0x1, 0x76bc(%rip)      # 0xb3b0
jmp 0x3c8f
movq 0x32d3(%rip), %rax      # 0x6fd0
movq (%rax), %rdi
callq 0x11c0
movl %eax, 0x76a1(%rip)      # 0xb3ac
jmp 0x3c8f
movq 0x32bc(%rip), %rax      # 0x6fd0
movq (%rax), %rax
movq %rax, 0x766a(%rip)      # 0xb388
jmp 0x3c8f
pushq $0x1
popq %rdi
callq 0x131c
jmp 0x3c8f
movq 0x3299(%rip), %rax      # 0x6fd0
movq (%rax), %rdi
callq 0x1070
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x7645(%rip)     # 0xb390
jmp 0x3c8f
movq 0x3279(%rip), %rax      # 0x6fd0
movq (%rax), %rdi
callq 0x11c0
movl %eax, 0x7633(%rip)      # 0xb398
jmp 0x3c8f
movq 0x325f(%rip), %rax      # 0x6fd0
movq (%rax), %rdi
callq 0x1323
jmp 0x3c8f
movq 0x324b(%rip), %rax      # 0x6fd0
movq (%rax), %rdi
callq 0x1070
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x75fb(%rip)     # 0xb394
jmp 0x3c8f
movq 0x322b(%rip), %rax      # 0x6fd0
movq (%rax), %rdi
callq 0x11c0
movl %eax, 0x75f5(%rip)      # 0xb3a8
jmp 0x3c8f
movq 0x3211(%rip), %rax      # 0x6fd0
movq (%rax), %rax
movq %rax, 0x75d7(%rip)      # 0xb3a0
jmp 0x3c8f
movl $0x1, 0x75dc(%rip)      # 0xb3b4
jmp 0x3c8f
cmpb $0x0, 0x1(%r13)
je 0x3cea
movq %r13, %rdi
leaq 0x1013(%rip), %rsi      # 0x4e05
callq 0x1120
testl %eax, %eax
je 0x3e10
cmpb $0x30, %r12b
jne 0x3c8f
cmpb $0x0, 0x1(%r13)
jne 0x3c8f
andl $0x0, 0x7599(%rip)      # 0xb3b0
jmp 0x3c8f
cmpl $-0x1, %eax
jne 0x3e9d
movq 0x31a0(%rip), %rax      # 0x6fc8
movslq (%rax), %rcx
decl %ebp
cmpl %ebp, %ecx
jge 0x3e81
movq (%rbx,%rcx,8), %rdx
movq %rdx, 0x753c(%rip)      # 0xb378
leal 0x2(%rcx), %edx
movl %edx, (%rax)
movq 0x8(%rbx,%rcx,8), %rax
movq %rax, 0x7533(%rip)      # 0xb380
cmpl $0x0, 0x7560(%rip)      # 0xb3b4
jne 0x3e6e
cmpl $0x0, 0x755f(%rip)      # 0xb3bc
je 0x3e6e
movzwl 0x755c(%rip), %eax      # 0xb3c2
decl %eax
movl %eax, 0x754a(%rip)      # 0xb3b8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x364a
movq 0x3168(%rip), %rax      # 0x6ff0
movq (%rax), %rcx
leaq 0xf77(%rip), %rdi       # 0x4e09
pushq $0x16
popq %rsi
pushq $0x1
popq %rdx
callq 0x1200
movq (%rbx), %rdi
callq 0x3be3
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq