// File: /workspace/github_c_makefile_star2_O2/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
andl $0x0, 0xc(%rdi)
movslq %esi, %rax
movq %rax, -0x38(%rbp)
pushq $0x1
popq %r15
cmpq -0x38(%rbp), %r15
jge 0x1457
movq -0x30(%rbp), %rax
movq (%rax,%r15,8), %r13
movzbl (%r13), %r12d
leal -0x2d(%r12), %r14d
negl %r14d
movl %r14d, %eax
cmpl $0x2d, %r12d
jne 0x123c
movzbl 0x1(%r13), %eax
subl $0x61, %eax
jne 0x123a
movzbl 0x2(%r13), %eax
negl %eax
testl %eax, %eax
je 0x144d
leaq 0xdb9(%rip), %rdi       # 0x2004
movq %r13, %rsi
callq 0x10a0
testl %eax, %eax
je 0x144d
movl %r14d, %eax
cmpb $0x2d, %r12b
jne 0x1275
movzbl 0x1(%r13), %eax
subl $0x73, %eax
jne 0x1273
movzbl 0x2(%r13), %eax
negl %eax
testl %eax, %eax
je 0x1419
leaq 0xd86(%rip), %rdi       # 0x200a
movq %r13, %rsi
callq 0x10a0
testl %eax, %eax
je 0x1419
movl %r14d, %eax
cmpb $0x2d, %r12b
jne 0x12ae
movzbl 0x1(%r13), %eax
subl $0x6e, %eax
jne 0x12ac
movzbl 0x2(%r13), %eax
negl %eax
testl %eax, %eax
je 0x141f
leaq 0xd5b(%rip), %rdi       # 0x2018
movq %r13, %rsi
callq 0x10a0
testl %eax, %eax
je 0x141f
movl %r14d, %eax
cmpb $0x2d, %r12b
jne 0x12e7
movzbl 0x1(%r13), %eax
subl $0x72, %eax
jne 0x12e5
movzbl 0x2(%r13), %eax
negl %eax
testl %eax, %eax
je 0x1425
leaq 0xd2d(%rip), %rdi       # 0x2023
movq %r13, %rsi
callq 0x10a0
testl %eax, %eax
je 0x1425
movl %r14d, %eax
cmpb $0x2d, %r12b
jne 0x1320
movzbl 0x1(%r13), %eax
subl $0x76, %eax
jne 0x131e
movzbl 0x2(%r13), %eax
negl %eax
testl %eax, %eax
je 0x142b
leaq 0xd05(%rip), %rdi       # 0x2034
movq %r13, %rsi
callq 0x10a0
testl %eax, %eax
je 0x142b
movl %r14d, %eax
cmpb $0x2d, %r12b
jne 0x1359
movzbl 0x1(%r13), %eax
subl $0x6d, %eax
jne 0x1357
movzbl 0x2(%r13), %eax
negl %eax
testl %eax, %eax
je 0x1431
leaq 0xcdd(%rip), %rdi       # 0x2045
movq %r13, %rsi
callq 0x10a0
testl %eax, %eax
je 0x1431
movl %r14d, %eax
cmpb $0x2d, %r12b
jne 0x1392
movzbl 0x1(%r13), %eax
subl $0x70, %eax
jne 0x1390
movzbl 0x2(%r13), %eax
negl %eax
testl %eax, %eax
je 0x1437
leaq 0xcae(%rip), %rdi       # 0x204f
movq %r13, %rsi
callq 0x10a0
testl %eax, %eax
je 0x1437
movl %r14d, %eax
cmpb $0x2d, %r12b
jne 0x13cb
movzbl 0x1(%r13), %eax
subl $0x69, %eax
jne 0x13c9
movzbl 0x2(%r13), %eax
negl %eax
testl %eax, %eax
je 0x143d
leaq 0xc85(%rip), %rdi       # 0x205b
movq %r13, %rsi
callq 0x10a0
testl %eax, %eax
je 0x143d
cmpb $0x2d, %r12b
jne 0x13fb
movzbl 0x1(%r13), %r14d
subl $0x6f, %r14d
jne 0x13f8
movzbl 0x2(%r13), %r14d
negl %r14d
testl %r14d, %r14d
je 0x1413
leaq 0xc68(%rip), %rdi       # 0x206f
movq %r13, %rsi
callq 0x10a0
testl %eax, %eax
jne 0x1469
movb $0x1, 0x8(%rbx)
jmp 0x1441
movb $0x1, 0x1(%rbx)
jmp 0x1441
movb $0x1, 0x2(%rbx)
jmp 0x1441
movb $0x1, 0x3(%rbx)
jmp 0x1441
movb $0x1, 0x4(%rbx)
jmp 0x1441
movb $0x1, 0x5(%rbx)
jmp 0x1441
movb $0x1, 0x6(%rbx)
jmp 0x1441
movb $0x1, 0x7(%rbx)
movl %r15d, 0xc(%rbx)
incq %r15
jmp 0x1203
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 0x2b88(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
movq -0x30(%rbp), %rax
movq (%rax), %rdx
leaq 0xc01(%rip), %rsi       # 0x2082
movq %r13, %rcx
xorl %eax, %eax
callq 0x10b0
pushq $0x1
popq %rdi
callq 0x10c0