// File: /workspace/github_c_makefile_star2_O3/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
subq $0x18, %rsp
movq %rdx, -0x30(%rbp)
movq %rdi, %rbx
movl $0x0, 0xc(%rdi)
cmpl $0x2, %esi
jl 0x14e0
movl %esi, %eax
movq %rax, -0x38(%rbp)
movl $0x1, %r15d
movq -0x30(%rbp), %rax
movq (%rax,%r15,8), %r13
movzbl (%r13), %r14d
leal -0x2d(%r14), %r12d
negl %r12d
movl %r12d, %eax
cmpl $0x2d, %r14d
jne 0x12be
movzbl 0x1(%r13), %eax
subl $0x61, %eax
jne 0x12bc
movzbl 0x2(%r13), %eax
negl %eax
testl %eax, %eax
je 0x14d6
leaq 0xd37(%rip), %rdi       # 0x2004
movq %r13, %rsi
callq 0x10a0
testl %eax, %eax
je 0x14d6
movl %r12d, %eax
cmpb $0x2d, %r14b
jne 0x12f7
movzbl 0x1(%r13), %eax
subl $0x73, %eax
jne 0x12f5
movzbl 0x2(%r13), %eax
negl %eax
testl %eax, %eax
je 0x149b
leaq 0xd04(%rip), %rdi       # 0x200a
movq %r13, %rsi
callq 0x10a0
testl %eax, %eax
je 0x149b
movl %r12d, %eax
cmpb $0x2d, %r14b
jne 0x1330
movzbl 0x1(%r13), %eax
subl $0x6e, %eax
jne 0x132e
movzbl 0x2(%r13), %eax
negl %eax
testl %eax, %eax
je 0x14a1
leaq 0xcd9(%rip), %rdi       # 0x2018
movq %r13, %rsi
callq 0x10a0
testl %eax, %eax
je 0x14a1
movl %r12d, %eax
cmpb $0x2d, %r14b
jne 0x1369
movzbl 0x1(%r13), %eax
subl $0x72, %eax
jne 0x1367
movzbl 0x2(%r13), %eax
negl %eax
testl %eax, %eax
je 0x14a7
leaq 0xcab(%rip), %rdi       # 0x2023
movq %r13, %rsi
callq 0x10a0
testl %eax, %eax
je 0x14a7
movl %r12d, %eax
cmpb $0x2d, %r14b
jne 0x13a2
movzbl 0x1(%r13), %eax
subl $0x76, %eax
jne 0x13a0
movzbl 0x2(%r13), %eax
negl %eax
testl %eax, %eax
je 0x14ad
leaq 0xc83(%rip), %rdi       # 0x2034
movq %r13, %rsi
callq 0x10a0
testl %eax, %eax
je 0x14ad
movl %r12d, %eax
cmpb $0x2d, %r14b
jne 0x13db
movzbl 0x1(%r13), %eax
subl $0x6d, %eax
jne 0x13d9
movzbl 0x2(%r13), %eax
negl %eax
testl %eax, %eax
je 0x14b3
leaq 0xc5b(%rip), %rdi       # 0x2045
movq %r13, %rsi
callq 0x10a0
testl %eax, %eax
je 0x14b3
movl %r12d, %eax
cmpb $0x2d, %r14b
jne 0x1414
movzbl 0x1(%r13), %eax
subl $0x70, %eax
jne 0x1412
movzbl 0x2(%r13), %eax
negl %eax
testl %eax, %eax
je 0x14b9
leaq 0xc2c(%rip), %rdi       # 0x204f
movq %r13, %rsi
callq 0x10a0
testl %eax, %eax
je 0x14b9
movl %r12d, %eax
cmpb $0x2d, %r14b
jne 0x144d
movzbl 0x1(%r13), %eax
subl $0x69, %eax
jne 0x144b
movzbl 0x2(%r13), %eax
negl %eax
testl %eax, %eax
je 0x14bf
leaq 0xc03(%rip), %rdi       # 0x205b
movq %r13, %rsi
callq 0x10a0
testl %eax, %eax
je 0x14bf
cmpb $0x2d, %r14b
jne 0x147d
movzbl 0x1(%r13), %r12d
subl $0x6f, %r12d
jne 0x147a
movzbl 0x2(%r13), %r12d
negl %r12d
testl %r12d, %r12d
je 0x1495
leaq 0xbe6(%rip), %rdi       # 0x206f
movq %r13, %rsi
callq 0x10a0
testl %eax, %eax
jne 0x14f2
movb $0x1, 0x8(%rbx)
jmp 0x14c3
movb $0x1, 0x1(%rbx)
jmp 0x14c3
movb $0x1, 0x2(%rbx)
jmp 0x14c3
movb $0x1, 0x3(%rbx)
jmp 0x14c3
movb $0x1, 0x4(%rbx)
jmp 0x14c3
movb $0x1, 0x5(%rbx)
jmp 0x14c3
movb $0x1, 0x6(%rbx)
jmp 0x14c3
movb $0x1, 0x7(%rbx)
movl %r15d, 0xc(%rbx)
incq %r15
cmpq %r15, -0x38(%rbp)
jne 0x1290
jmp 0x14e0
movb $0x1, (%rbx)
movl $0x8, 0xc(%rbx)
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq -0x30(%rbp), %rdi
movq %r13, %rsi
callq 0x10f0