// File: /workspace/github_c_makefile_star2_O1/ikbenlike[P]nngutils/src/uname.c
// Function: parse_arg
struct uname_args *parse_arg(struct uname_args *args, int argc, char **argv){
    //struct uname_args args;
    args->count = 0;
    for(int i = 1; i < argc; i++){
        if(!strcmp("-a", argv[i]) || !strcmp("--all", argv[i])){
            args->p_all = true;
            args->count = 8;
            return args;
        }
        else if(!strcmp("-s", argv[i]) || !strcmp("--kernel-name", argv[i])){
            args->p_kname = true;
            args->count += 1;
        }
        else if(!strcmp("-n", argv[i]) || !strcmp("--nodename", argv[i])){
            args->p_nname = true;
            args->count += 1;
        }
        else if(!strcmp("-r", argv[i]) || !strcmp("--kernel-release", argv[i])){
            args->p_krelease = true;
            args->count += 1;
        }
        else if(!strcmp("-v", argv[i]) || !strcmp("--kernel-version", argv[i])){
            args->p_kversion = true;
            args->count += 1;
        }
        else if(!strcmp("-m", argv[i]) || !strcmp("--machine", argv[i])){
            args->p_machine = true;
            args->count += 1;
        }
        else if(!strcmp("-p", argv[i]) || !strcmp("--processor", argv[i])){
            args->p_processor = true;
            args->count += 1;
        }
        else if(!strcmp("-i", argv[i]) || !strcmp("--hardware-platform", argv[i])){
            args->p_platform = true;
            args->count += 1;
        }
        else if(!strcmp("-o", argv[i]) || !strcmp("--operating-system", argv[i])){
            args->p_os = true;
            args->count += 1;
        }
        else{
            fprintf(stderr, "%s: incorrect argument %s\n", argv[0], argv[i]);
            exit(1);
        }
    }
    return args;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x0, 0xc(%rdi)
cmpl $0x2, %esi
jl 0x1450
movq %rdx, %r14
movl %esi, %r12d
movl $0x1, %r15d
movq (%r14,%r15,8), %r13
leaq 0xd80(%rip), %rdi       # 0x2004
movq %r13, %rsi
callq 0x10a0
testl %eax, %eax
je 0x1446
leaq 0xd6c(%rip), %rdi       # 0x2007
movq %r13, %rsi
callq 0x10a0
testl %eax, %eax
je 0x1446
leaq 0xd5b(%rip), %rdi       # 0x200d
movq %r13, %rsi
callq 0x10a0
testl %eax, %eax
je 0x140d
leaq 0xd47(%rip), %rdi       # 0x2010
movq %r13, %rsi
callq 0x10a0
testl %eax, %eax
je 0x140d
leaq 0xd3e(%rip), %rdi       # 0x201e
movq %r13, %rsi
callq 0x10a0
testl %eax, %eax
je 0x1413
leaq 0xd2a(%rip), %rdi       # 0x2021
movq %r13, %rsi
callq 0x10a0
testl %eax, %eax
je 0x1413
leaq 0xd1e(%rip), %rdi       # 0x202c
movq %r13, %rsi
callq 0x10a0
testl %eax, %eax
je 0x1419
leaq 0xd0a(%rip), %rdi       # 0x202f
movq %r13, %rsi
callq 0x10a0
testl %eax, %eax
je 0x1419
leaq 0xd04(%rip), %rdi       # 0x2040
movq %r13, %rsi
callq 0x10a0
testl %eax, %eax
je 0x141f
leaq 0xcf0(%rip), %rdi       # 0x2043
movq %r13, %rsi
callq 0x10a0
testl %eax, %eax
je 0x141f
leaq 0xcea(%rip), %rdi       # 0x2054
movq %r13, %rsi
callq 0x10a0
testl %eax, %eax
je 0x1425
leaq 0xcd6(%rip), %rdi       # 0x2057
movq %r13, %rsi
callq 0x10a0
testl %eax, %eax
je 0x1425
leaq 0xcc9(%rip), %rdi       # 0x2061
movq %r13, %rsi
callq 0x10a0
testl %eax, %eax
je 0x142b
leaq 0xcb5(%rip), %rdi       # 0x2064
movq %r13, %rsi
callq 0x10a0
testl %eax, %eax
je 0x142b
leaq 0xcae(%rip), %rdi       # 0x2070
movq %r13, %rsi
callq 0x10a0
testl %eax, %eax
je 0x1431
leaq 0xc9e(%rip), %rdi       # 0x2073
movq %r13, %rsi
callq 0x10a0
testl %eax, %eax
je 0x1431
leaq 0xc9f(%rip), %rdi       # 0x2087
movq %r13, %rsi
callq 0x10a0
testl %eax, %eax
je 0x1407
leaq 0xc8f(%rip), %rdi       # 0x208a
movq %r13, %rsi
callq 0x10a0
testl %eax, %eax
jne 0x1462
movb $0x1, 0x8(%rbx)
jmp 0x1435
movb $0x1, 0x1(%rbx)
jmp 0x1435
movb $0x1, 0x2(%rbx)
jmp 0x1435
movb $0x1, 0x3(%rbx)
jmp 0x1435
movb $0x1, 0x4(%rbx)
jmp 0x1435
movb $0x1, 0x5(%rbx)
jmp 0x1435
movb $0x1, 0x6(%rbx)
jmp 0x1435
movb $0x1, 0x7(%rbx)
incl 0xc(%rbx)
incq %r15
cmpq %r15, %r12
jne 0x1279
jmp 0x1450
movb $0x1, (%rbx)
movl $0x8, 0xc(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
movq %r13, %rsi
callq 0x10f0