// File: /workspace/github_c_makefile_star2_O2/robertdavidgraham[P]wc2/wc2.c
// Function: main
int main(int argc, char *argv[])
{
    int i;
    struct results totals = {0,0,0,0};
    struct config cfg;

    /* Force output to be an atomic line-at-a-time, so that other
     * programs reading the output never see a partial line */
#ifndef _WIN32
    setvbuf(stdout, NULL, _IOLBF, 0);
#endif

    /* Read in the configuration parameters from the command-line */
    cfg = read_command_line(argc, argv);

    /* Compile the ASCII/UTF8 state-machine that we'll use to
     * parse multi-byte characters */
    compile_utf8_statemachine(cfg.is_counting_chars);
    compile_pointers();


    /* Process all the files specified on the command-line */
    for (i=1; i<argc; i++) {
        FILE *fp;
        const char *filename = argv[i];
        struct results results;

        if (argv[i][0] == '-')
            continue;

        fp = fopen(filename, "rb");
        if (fp == NULL) {
            perror(argv[i]);
            continue;
        }

        results = parse_file(fp, &cfg);
        print_results(filename, &results, &cfg);

        totals.line_count += results.line_count;
        totals.word_count += results.word_count;
        totals.byte_count += results.byte_count;
        totals.char_count += results.char_count;

        fclose(fp);
    }

    /* If no files specified, or the "-" file specified, then
     * we need to read in <stdin>. We need to change the mode
     * to "binary", to prevent the library from doing it's own
     * notions of text processing */
    if (cfg.is_stdin) {
        struct results results;
        FILE *fp;

        /* Make sure we read <stdin> in binary mode, because on some
         * platforms (Windows) it defaults to text-mode that will
         * chnage some characters */
        fp = freopen(NULL, "rb", stdin);
        if (fp == NULL) {
            perror("stdin");
            fp = stdin;
        }

        results = parse_file(fp, &cfg);
        print_results(NULL, &results, &cfg);

        totals.line_count += results.line_count;
        totals.word_count += results.word_count;
        totals.byte_count += results.byte_count;
        totals.char_count += results.char_count;
    }

    /* If we read more than one thing, then we also need to print an
     * additional totals line */
    if (cfg.is_printing_totals)
        print_results("total", &totals, &cfg);

#if _WIN32
    {
      FILETIME begin;
      FILETIME end;
      FILETIME kernel;
      FILETIME user;
        if (GetProcessTimes(GetCurrentProcess(), &begin, &end, &kernel, &user)) {
            unsigned long long elapsed = ((unsigned long long)user.dwLowDateTime | (unsigned long long)user.dwHighDateTime<<32ULL)/10000ULL;
            printf("user %lu.%03u\n", (unsigned)(elapsed/1000ULL), (unsigned)(elapsed % 1000));
        }
    }
#endif
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movq %rsi, %rbx
movl %edi, 0x30(%rsp)
pxor %xmm0, %xmm0
movdqa %xmm0, 0x60(%rsp)
movdqa %xmm0, 0x50(%rsp)
movq 0x36f9(%rip), %rax      # 0x4fd0
movq (%rax), %rdi
movq $0x0, 0x20(%rsp)
pushq $0x1
popq %r14
xorl %esi, %esi
movl %r14d, %edx
xorl %ecx, %ecx
callq 0x1130
callq 0x1060
movq %rbx, %rdx
movl $0x16, (%rax)
xorl %edi, %edi
xorl %r13d, %r13d
xorl %ecx, %ecx
xorl %r8d, %r8d
movl $0x0, (%rsp)
movl $0x0, 0x8(%rsp)
movl $0x0, 0x4(%rsp)
movl $0x0, 0x1c(%rsp)
xorl %ebx, %ebx
xorl %ebp, %ebp
xorl %r15d, %r15d
xorl %esi, %esi
movl $0x0, 0xc(%rsp)
movq $0x0, 0x48(%rsp)
movq %rdx, 0x10(%rsp)
cmpl 0x30(%rsp), %r14d
jge 0x1a9b
movslq %r14d, %rax
movq (%rdx,%rax,8), %r12
cmpb $0x2d, (%r12)
jne 0x1a73
movzbl 0x1(%r12), %eax
testl %eax, %eax
je 0x1a7a
cmpl $0x2d, %eax
je 0x1bd4
movq %r12, %rdi
movl %esi, %r12d
callq 0x10a0
movl %r12d, %esi
movq 0x10(%rsp), %rdx
movq %rax, %r12
pushq $0x1
popq %rax
cmpq %r12, %rax
jae 0x1a87
movslq %r14d, %rcx
movq (%rdx,%rcx,8), %r13
movzbl (%r13,%rax), %ecx
cmpl $0x50, %ecx
je 0x1a18
cmpl $0x57, %ecx
je 0x19ec
cmpl $0x63, %ecx
je 0x19fb
cmpl $0x77, %ecx
je 0x1a0a
cmpl $0x6d, %ecx
je 0x19dc
cmpl $0x6c, %ecx
jne 0x1f3b
incl %ebx
movl %ebx, (%rsp)
movl %ebx, 0x1c(%rsp)
jmp 0x1a6b
testl %r15d, %r15d
jne 0x1f29
incl %ebp
xorl %r15d, %r15d
jmp 0x1a6b
addq %rax, %r13
cmpb $0x0, 0x1(%r13)
je 0x1a1e
incq %r13
jmp 0x1a38
testl %ebp, %ebp
jne 0x1f32
incl %r15d
xorl %ebp, %ebp
jmp 0x1a6b
movq 0x20(%rsp), %rcx
incl %ecx
movq %rcx, 0x20(%rsp)
jmp 0x1a6b
incl 0xc(%rsp)
jmp 0x1a6b
incl %r14d
cmpl 0x30(%rsp), %r14d
jge 0x1f20
movslq %r14d, %rax
movq 0x10(%rsp), %rcx
movq (%rcx,%rax,8), %r13
testq %r13, %r13
je 0x1f20
callq 0x1190
movq (%rax), %rax
movsbq (%r13), %rcx
testb $0x8, 0x1(%rax,%rcx,2)
je 0x1f20
movq %r13, %rdi
callq 0x1160
movl %eax, %esi
movq %r12, %rax
movq 0x10(%rsp), %rdx
incq %rax
jmp 0x1996
incq 0x48(%rsp)
jmp 0x1a93
pushq $0x1
popq %rax
movl %eax, 0x8(%rsp)
movl %eax, 0x4(%rsp)
jmp 0x1a93
movl %ebp, %edi
movl %r15d, %r13d
movl %esi, %ecx
movl 0xc(%rsp), %r8d
incl %r14d
jmp 0x1949
movl %r8d, 0x18(%rsp)
movl %edi, 0xc(%rsp)
movq 0x48(%rsp), %r9
testq %r9, %r9
pushq $0x1
popq %r14
movl 0x8(%rsp), %eax
cmovel %r14d, %eax
movl %eax, 0x8(%rsp)
movl 0x4(%rsp), %eax
cmovel %r14d, %eax
movl %eax, 0x4(%rsp)
movq 0x20(%rsp), %rdi
movl 0x1c(%rsp), %eax
orl %edi, %eax
orl %r15d, %eax
orl %ebp, %eax
movl (%rsp), %r8d
cmovel %r14d, %r8d
cmovel %r14d, %edi
cmovel %r14d, %r13d
movslq 0x30(%rsp), %rbx
testl %esi, %esi
je 0x1b1c
cmpq $0x1, %r9
ja 0x1b10
testq %r9, %r9
setne %al
cmpl $0x0, 0x4(%rsp)
setne %dl
andb %al, %dl
cmpb $0x1, %dl
jne 0x1c01
movl $0x0, (%rsp)
jmp 0x1c09
testq %r9, %r9
je 0x1bfe
movl %r8d, (%rsp)
movq %rdi, 0x20(%rsp)
pushq $0x1
popq %rbp
leaq 0x98(%rsp), %r15
movq %rbp, %r12
cmpq %rbx, %rbp
jge 0x1b96
movq (%rdx,%rbp,8), %rdi
cmpb $0x2d, (%rdi)
je 0x1b91
movq %r15, %rsi
callq 0x10b0
testl %eax, %eax
jne 0x1b8c
movl 0xb0(%rsp), %eax
movl $0xf000, %ecx           # imm = 0xF000
andl %ecx, %eax
cmpl $0x8000, %eax           # imm = 0x8000
jne 0x1b7c
movq 0xc8(%rsp), %rax
cmpq %rax, %r12
cmovleq %rax, %r12
jmp 0x1b8c
cmpq $0xf4241, %r12          # imm = 0xF4241
movl $0xf4240, %eax          # imm = 0xF4240
cmovlq %rax, %r12
movq 0x10(%rsp), %rdx
incq %rbp
jmp 0x1b3c
cmpq $0xf4241, %r12          # imm = 0xF4241
movl $0xf4240, %eax          # imm = 0xF4240
cmovgeq %r12, %rax
cmpl $0x0, 0x4(%rsp)
cmoveq %r12, %rax
xorl %ecx, %ecx
pushq $0xa
popq %rsi
movq 0x20(%rsp), %rdi
movl (%rsp), %r8d
movq 0x48(%rsp), %r9
testq %rax, %rax
je 0x1af1
incl %ecx
xorl %edx, %edx
divq %rsi
jmp 0x1bc2
cmpb $0x0, 0x2(%r12)
jne 0x1f5a
movl %r8d, 0x18(%rsp)
movl %edi, 0xc(%rsp)
notl %r14d
addl 0x30(%rsp), %r14d
movslq %r14d, %rax
addq %rax, 0x48(%rsp)
jmp 0x1aa4
pushq $0x1
popq %rcx
xorl %r14d, %r14d
movb $0x1, %al
movl %eax, (%rsp)
movq %r9, 0x98(%rsp)
movl 0x8(%rsp), %eax
movl %eax, 0xa0(%rsp)
movl %r8d, 0xa4(%rsp)
movl %edi, 0xa8(%rsp)
movl %r13d, 0xac(%rsp)
movl 0xc(%rsp), %ebp
movl %ebp, 0xb0(%rsp)
movl %r14d, 0xb4(%rsp)
movl %ecx, 0xb8(%rsp)
movl 0x18(%rsp), %eax
movl %eax, 0xbc(%rsp)
leaq 0x1433(%rip), %rsi      # 0x3092
pushq $0x6
popq %rdi
callq 0x1120
testl %ebp, %ebp
je 0x1e74
leaq 0x347a(%rip), %rdi      # 0x50f0
callq 0x129c
leaq 0x356e(%rip), %rdi      # 0x51f0
callq 0x129c
leaq 0x3762(%rip), %rdi      # 0x53f0
callq 0x1449
leaq 0x3656(%rip), %rdi      # 0x52f0
callq 0x1449
pushq $0x2
popq %rdi
pushq $0x4
popq %rsi
callq 0x14d4
pushq $0x3
popq %rdi
pushq $0x23
popq %rsi
callq 0x14d4
leaq 0x13434(%rip), %rax     # 0x150f0
leaq 0x342d(%rip), %rcx      # 0x50f0
xorl %edx, %edx
movq %rax, %rsi
cmpq $0x42, %rdx
je 0x1d01
xorl %edi, %edi
cmpq $0x100, %rdi            # imm = 0x100
je 0x1cee
movzbl (%rcx,%rdi), %r8d
shll $0xb, %r8d
addq %rax, %r8
movq %r8, (%rsi,%rdi,8)
incq %rdi
jmp 0x1cd0
incq %rdx
addq $0x800, %rsi            # imm = 0x800
addq $0x100, %rcx            # imm = 0x100
jmp 0x1cc8
pxor %xmm0, %xmm0
movdqa %xmm0, 0x20(%rsp)
pushq $0x1
popq %r14
leaq 0x70(%rsp), %r15
leaq 0x98(%rsp), %r12
movdqa %xmm0, 0x30(%rsp)
movq 0x10(%rsp), %rax
cmpq %rbx, %r14
jge 0x1dba
movq (%rax,%r14,8), %rbp
cmpb $0x2d, (%rbp)
je 0x1da1
movq %rbp, %rdi
leaq 0x130c(%rip), %rsi      # 0x3050
callq 0x10e0
testq %rax, %rax
je 0x1da6
movq %rax, %r13
movq %r15, %rdi
movq %rax, %rsi
movq %r12, %rdx
callq 0x1faf
movq %rbp, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x215b
movdqa 0x20(%rsp), %xmm0
paddq 0x70(%rsp), %xmm0
movdqa %xmm0, 0x20(%rsp)
movdqa 0x30(%rsp), %xmm0
paddq 0x80(%rsp), %xmm0
movdqa %xmm0, 0x30(%rsp)
movq %r13, %rdi
callq 0x1090
movq 0x10(%rsp), %rax
incq %r14
jmp 0x1d27
movq 0x10(%rsp), %r13
movq (%r13,%r14,8), %rdi
callq 0x1150
movq %r13, %rax
jmp 0x1da1
movaps 0x30(%rsp), %xmm0
movaps %xmm0, 0x60(%rsp)
movdqa 0x20(%rsp), %xmm0
movdqa %xmm0, 0x50(%rsp)
cmpl $0x0, 0x8(%rsp)
je 0x1e41
movq 0x31fa(%rip), %rbx      # 0x4fd8
movq (%rbx), %rdx
leaq 0x1268(%rip), %rsi      # 0x3050
xorl %edi, %edi
callq 0x10f0
testq %rax, %rax
je 0x1f0c
leaq 0x70(%rsp), %rbx
leaq 0x98(%rsp), %r14
movq %rbx, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x1faf
xorl %edi, %edi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x215b
movdqa 0x20(%rsp), %xmm0
paddq (%rbx), %xmm0
movdqa %xmm0, 0x50(%rsp)
movdqa 0x30(%rsp), %xmm0
paddq 0x10(%rbx), %xmm0
movdqa %xmm0, 0x60(%rsp)
cmpb $0x0, (%rsp)
jne 0x1e60
leaq 0x120b(%rip), %rdi      # 0x3059
leaq 0x50(%rsp), %rsi
leaq 0x98(%rsp), %rdx
callq 0x215b
xorl %eax, %eax
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %r14d, %r14d
movb $0x1, %bpl
leaq 0x326f(%rip), %r15      # 0x50f0
movb $0x3, %r13b
xorl %r12d, %r12d
cmpq $0xa, %r12
je 0x1eca
cmpq $0x100, %r12            # imm = 0x100
je 0x1cb5
callq 0x1190
movq (%rax), %rax
testb $0x20, 0x1(%rax,%r12,2)
jne 0x1ee8
movb $0x2, %al
movb %al, (%r12,%r15)
movb %al, 0x100(%r12,%r15)
movb %r13b, 0x200(%r12,%r15)
movb %r13b, 0x300(%r12,%r15)
jmp 0x1f04
movb %bpl, 0x3229(%rip)      # 0x50fa
movb %bpl, 0x3322(%rip)      # 0x51fa
movb %bpl, 0x341b(%rip)      # 0x52fa
movb %bpl, 0x3514(%rip)      # 0x53fa
jmp 0x1f04
movb %r14b, (%r12,%r15)
movb %r14b, 0x100(%r12,%r15)
movb %r14b, 0x200(%r12,%r15)
movb %r14b, 0x300(%r12,%r15)
incq %r12
jmp 0x1e87
leaq 0x1140(%rip), %rdi      # 0x3053
callq 0x1150
movq (%rbx), %rax
jmp 0x1df8
leaq 0x1179(%rip), %rdi      # 0x30a0
jmp 0x1f4d
leaq 0x116d(%rip), %rdi      # 0x309d
jmp 0x1f4d
leaq 0x1161(%rip), %rdi      # 0x309a
jmp 0x1f4d
leaq 0x98(%rsp), %rdi
movb $0x2d, (%rdi)
movb %cl, 0x1(%rdi)
movb $0x0, 0x2(%rdi)
callq 0x1150
pushq $0x1
popq %rdi
callq 0x1170
leaq 0x10fe(%rip), %rsi      # 0x305f
movq %r12, %rdi
callq 0x10d0
testl %eax, %eax
jne 0x1f8b
movq 0x3084(%rip), %rax      # 0x4ff8
movq (%rax), %rcx
leaq 0x10eb(%rip), %rdi      # 0x3069
pushq $0x29
popq %rsi
pushq $0x1
popq %rdx
callq 0x1180
jmp 0x1fa3
leaq 0x1101(%rip), %rsi      # 0x3093
movq %r12, %rdi
callq 0x10d0
testl %eax, %eax
jne 0x1faa
callq 0x227e
xorl %edi, %edi
callq 0x1170
movq %r12, %rdi
jmp 0x1f4d