// File: /workspace/github_c_makefile_star2_O1/ikbenlike[P]nngutils/src/cat.c
// Function: parse_arg
struct cat_args *parse_arg(struct cat_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], "-A") || !strcmp(argv[i], "--show-all")){
                args->show_all = true;
            }
            else if(!strcmp(argv[i], "-e")){
                args->show_nonprinting = true;
                args->show_ends = true;
            }
            else if(!strcmp(argv[i], "-n") || !strcmp(argv[i], "--number")){
                args->number = true;
            }
            else if(!strcmp(argv[i], "-b") || !strcmp(argv[i], "--number-nonblank")){
                args->number_nonblank = true;
                args->number = false;
            }
            else if(!strcmp(argv[i], "-s") || !strcmp(argv[i], "--squeeze-blank")){
                args->squeeze_blank = true;
            }
            else if(!strcmp(argv[i], "-t")){
                args->show_nonprinting = true;
                args->show_tabs = true;
            }
            else if(!strcmp(argv[i], "-T") || !strcmp(argv[i], "--show-tabs")){
                args->show_tabs = true;
            }
            else if(!strcmp(argv[i], "-u")){
                continue;
            }
            else if(!strcmp(argv[i], "-v") || !strcmp(argv[i], "--show-nonprinting")){
                args->show_nonprinting = true;
            }
            else if(!strcmp(argv[i], "-E") || !strcmp(argv[i], "--show-ends")){
                args->show_ends = true;
            }
            else {
                fprintf(stderr, "%s: incorrect argument %s\n", argv[0], argv[i]);
                exit(1);
            }
        }
        else {
            args->files[args->fcount++] = argv[i];
        }
    }
    return args;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl %esi, %r15d
movq %rdi, %r14
movl $0x0, 0x10(%rdi)
movslq %esi, %r13
leaq (,%r13,8), %rsi
movl $0x1, %r12d
movl $0x1, %edi
callq 0x10b0
movq %rax, 0x8(%r14)
cmpl $0x2, %r13d
jl 0x1563
movl %r15d, %r15d
movq (%rbx,%r12,8), %r13
cmpb $0x2d, (%r13)
jne 0x135f
movq %r13, %rdi
callq 0x1050
cmpq $0x1, %rax
jne 0x137f
movq 0x8(%r14), %rax
movslq 0x10(%r14), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x10(%r14)
movq %r13, (%rax,%rcx,8)
incq %r12
cmpq %r12, %r15
jne 0x1346
jmp 0x1563
movq %r13, %rdi
leaq 0xc7b(%rip), %rsi       # 0x2004
callq 0x10c0
testl %eax, %eax
je 0x1508
movq %r13, %rdi
leaq 0xc67(%rip), %rsi       # 0x2007
callq 0x10c0
testl %eax, %eax
je 0x1508
movq %r13, %rdi
leaq 0xc5b(%rip), %rsi       # 0x2012
callq 0x10c0
testl %eax, %eax
je 0x151b
movq %r13, %rdi
leaq 0xc47(%rip), %rsi       # 0x2015
callq 0x10c0
testl %eax, %eax
je 0x1511
movq %r13, %rdi
leaq 0xc33(%rip), %rsi       # 0x2018
callq 0x10c0
testl %eax, %eax
je 0x1511
movq %r13, %rdi
leaq 0xc25(%rip), %rsi       # 0x2021
callq 0x10c0
testl %eax, %eax
je 0x152a
movq %r13, %rdi
leaq 0xc11(%rip), %rsi       # 0x2024
callq 0x10c0
testl %eax, %eax
je 0x152a
movq %r13, %rdi
leaq 0xc0c(%rip), %rsi       # 0x2036
callq 0x10c0
testl %eax, %eax
je 0x1539
movq %r13, %rdi
leaq 0xbf8(%rip), %rsi       # 0x2039
callq 0x10c0
testl %eax, %eax
je 0x1539
movq %r13, %rdi
leaq 0xbf1(%rip), %rsi       # 0x2049
callq 0x10c0
testl %eax, %eax
je 0x154d
movq %r13, %rdi
leaq 0xbdd(%rip), %rsi       # 0x204c
callq 0x10c0
testl %eax, %eax
je 0x1543
movq %r13, %rdi
leaq 0xbc9(%rip), %rsi       # 0x204f
callq 0x10c0
testl %eax, %eax
je 0x1543
movq %r13, %rdi
leaq 0xbbe(%rip), %rsi       # 0x205b
callq 0x10c0
testl %eax, %eax
je 0x1372
movq %r13, %rdi
leaq 0xbaa(%rip), %rsi       # 0x205e
callq 0x10c0
testl %eax, %eax
je 0x1559
movq %r13, %rdi
leaq 0xb96(%rip), %rsi       # 0x2061
callq 0x10c0
testl %eax, %eax
je 0x1559
movq %r13, %rdi
leaq 0xb92(%rip), %rsi       # 0x2074
callq 0x10c0
testl %eax, %eax
je 0x14fe
movq %r13, %rdi
leaq 0xb82(%rip), %rsi       # 0x2077
callq 0x10c0
testl %eax, %eax
jne 0x1575
movb $0x1, 0x2(%r14)
jmp 0x1372
movb $0x1, (%r14)
jmp 0x1372
movb $0x1, 0x3(%r14)
jmp 0x1372
movb $0x1, %al
movb %al, 0x6(%r14)
movb %al, 0x2(%r14)
jmp 0x1372
movb $0x1, 0x1(%r14)
movb $0x0, 0x3(%r14)
jmp 0x1372
movb $0x1, 0x4(%r14)
jmp 0x1372
movb $0x1, 0x5(%r14)
jmp 0x1372
movw $0x101, 0x5(%r14)       # imm = 0x101
jmp 0x1372
movb $0x1, 0x6(%r14)
jmp 0x1372
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
movq %r13, %rsi
callq 0x1120