// File: /workspace/github_c_makefile_star2_O0/ikbenlike[P]nngutils/src/wc.c
// Function: parse_arg
struct wc_args *parse_arg(struct wc_args *args, int argc, char **argv){
    args->fcount = 0;
    args->files = calloc(1, argc * sizeof(char*));
    for(int i = 1; i < argc; i++){
        if(argv[i][0] == '-' && strlen(argv[i]) != 1){
            if(!strcmp(argv[i], "-c") || !strcmp(argv[i], "--bytes")){
                args->byte_count = true;
            }
            else if(!strcmp(argv[i], "-m") || !strcmp(argv[i], "--chars")){
                args->char_count = true;
            }
            else if(!strcmp(argv[i], "-l") || !strcmp(argv[i], "--lines")){
                args->line_count = true;
            }
            else if(!strcmp(argv[i], "-L") || !strcmp(argv[i], "--max-line-length")){
                args->max_len = true;
            }
            else if(!strcmp(argv[i], "-w") || !strcmp(argv[i], "--words")){
                args->word_count = true;
            }
            else {
                fprintf(stderr, "%s: incorrect argument %s\n", argv[0], argv[i]);
            }
        }
        else {
            args->files[args->fcount++] = argv[i];
        }
    }
    if(args->fcount == 0){
        args->files[args->fcount++] = "-";
    }
    if(args->fcount == argc - 1 || args->fcount == argc){
        args->line_count = true;
        args->word_count = true;
        args->byte_count = true;
    }
    return args;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movl $0x0, 0x10(%rax)
movslq -0xc(%rbp), %rsi
shlq $0x3, %rsi
movl $0x1, %edi
callq 0x1080
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movl $0x1, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x144c
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x1412
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x1040
cmpq $0x1, %rax
je 0x1412
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xd70(%rip), %rsi       # 0x2004
callq 0x1090
cmpl $0x0, %eax
je 0x12bb
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xd56(%rip), %rsi       # 0x2007
callq 0x1090
cmpl $0x0, %eax
jne 0x12c7
movq -0x8(%rbp), %rax
movb $0x1, (%rax)
jmp 0x1410
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xd35(%rip), %rsi       # 0x200f
callq 0x1090
cmpl $0x0, %eax
je 0x1301
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xd1b(%rip), %rsi       # 0x2012
callq 0x1090
cmpl $0x0, %eax
jne 0x130e
movq -0x8(%rbp), %rax
movb $0x1, 0x1(%rax)
jmp 0x140e
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xcf9(%rip), %rsi       # 0x201a
callq 0x1090
cmpl $0x0, %eax
je 0x1348
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xcdf(%rip), %rsi       # 0x201d
callq 0x1090
cmpl $0x0, %eax
jne 0x1355
movq -0x8(%rbp), %rax
movb $0x1, 0x2(%rax)
jmp 0x140c
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xcbd(%rip), %rsi       # 0x2025
callq 0x1090
cmpl $0x0, %eax
je 0x138f
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xca3(%rip), %rsi       # 0x2028
callq 0x1090
cmpl $0x0, %eax
jne 0x1399
movq -0x8(%rbp), %rax
movb $0x1, 0x3(%rax)
jmp 0x140a
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xc8e(%rip), %rsi       # 0x203a
callq 0x1090
cmpl $0x0, %eax
je 0x13d3
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xc74(%rip), %rsi       # 0x203d
callq 0x1090
cmpl $0x0, %eax
jne 0x13dd
movq -0x8(%rbp), %rax
movb $0x1, 0x4(%rax)
jmp 0x1408
movq 0x2c14(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rdx
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rcx
leaq 0xc44(%rip), %rsi       # 0x2045
movb $0x0, %al
callq 0x10a0
jmp 0x140a
jmp 0x140c
jmp 0x140e
jmp 0x1410
jmp 0x143c
movq -0x18(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rsi
movl 0x10(%rsi), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, 0x10(%rsi)
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
jmp 0x143e
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x1242
movq -0x8(%rbp), %rax
cmpl $0x0, 0x10(%rax)
jne 0x147b
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rdx
movl 0x10(%rdx), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, 0x10(%rdx)
movslq %ecx, %rcx
leaq 0xbe9(%rip), %rdx       # 0x2060
movq %rdx, (%rax,%rcx,8)
movq -0x8(%rbp), %rax
movl 0x10(%rax), %eax
movl -0xc(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
je 0x1498
movq -0x8(%rbp), %rax
movl 0x10(%rax), %eax
cmpl -0xc(%rbp), %eax
jne 0x14af
movq -0x8(%rbp), %rax
movb $0x1, 0x2(%rax)
movq -0x8(%rbp), %rax
movb $0x1, 0x4(%rax)
movq -0x8(%rbp), %rax
movb $0x1, (%rax)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)