// File: /workspace/github_c_makefile_star2_O0/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
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movl $0x0, 0xc(%rax)
movl $0x1, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x155c
movq -0x20(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0xde0(%rip), %rdi       # 0x2004
callq 0x10a0
cmpl $0x0, %eax
je 0x124b
movq -0x20(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0xdc6(%rip), %rdi       # 0x2007
callq 0x10a0
cmpl $0x0, %eax
jne 0x126a
movq -0x10(%rbp), %rax
movb $0x1, (%rax)
movq -0x10(%rbp), %rax
movl $0x8, 0xc(%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x1564
movq -0x20(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0xd90(%rip), %rdi       # 0x200d
callq 0x10a0
cmpl $0x0, %eax
je 0x12a4
movq -0x20(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0xd76(%rip), %rdi       # 0x2010
callq 0x10a0
cmpl $0x0, %eax
jne 0x12be
movq -0x10(%rbp), %rax
movb $0x1, 0x1(%rax)
movq -0x10(%rbp), %rax
movl 0xc(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0xc(%rax)
jmp 0x154a
movq -0x20(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0xd4d(%rip), %rdi       # 0x201e
callq 0x10a0
cmpl $0x0, %eax
je 0x12f8
movq -0x20(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0xd33(%rip), %rdi       # 0x2021
callq 0x10a0
cmpl $0x0, %eax
jne 0x1312
movq -0x10(%rbp), %rax
movb $0x1, 0x2(%rax)
movq -0x10(%rbp), %rax
movl 0xc(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0xc(%rax)
jmp 0x1548
movq -0x20(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0xd07(%rip), %rdi       # 0x202c
callq 0x10a0
cmpl $0x0, %eax
je 0x134c
movq -0x20(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0xced(%rip), %rdi       # 0x202f
callq 0x10a0
cmpl $0x0, %eax
jne 0x1366
movq -0x10(%rbp), %rax
movb $0x1, 0x3(%rax)
movq -0x10(%rbp), %rax
movl 0xc(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0xc(%rax)
jmp 0x1546
movq -0x20(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0xcc7(%rip), %rdi       # 0x2040
callq 0x10a0
cmpl $0x0, %eax
je 0x13a0
movq -0x20(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0xcad(%rip), %rdi       # 0x2043
callq 0x10a0
cmpl $0x0, %eax
jne 0x13ba
movq -0x10(%rbp), %rax
movb $0x1, 0x4(%rax)
movq -0x10(%rbp), %rax
movl 0xc(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0xc(%rax)
jmp 0x1544
movq -0x20(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0xc87(%rip), %rdi       # 0x2054
callq 0x10a0
cmpl $0x0, %eax
je 0x13f4
movq -0x20(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0xc6d(%rip), %rdi       # 0x2057
callq 0x10a0
cmpl $0x0, %eax
jne 0x140e
movq -0x10(%rbp), %rax
movb $0x1, 0x5(%rax)
movq -0x10(%rbp), %rax
movl 0xc(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0xc(%rax)
jmp 0x1542
movq -0x20(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0xc40(%rip), %rdi       # 0x2061
callq 0x10a0
cmpl $0x0, %eax
je 0x1448
movq -0x20(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0xc26(%rip), %rdi       # 0x2064
callq 0x10a0
cmpl $0x0, %eax
jne 0x1462
movq -0x10(%rbp), %rax
movb $0x1, 0x6(%rax)
movq -0x10(%rbp), %rax
movl 0xc(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0xc(%rax)
jmp 0x1540
movq -0x20(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0xbfb(%rip), %rdi       # 0x2070
callq 0x10a0
cmpl $0x0, %eax
je 0x149c
movq -0x20(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0xbe1(%rip), %rdi       # 0x2073
callq 0x10a0
cmpl $0x0, %eax
jne 0x14b6
movq -0x10(%rbp), %rax
movb $0x1, 0x7(%rax)
movq -0x10(%rbp), %rax
movl 0xc(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0xc(%rax)
jmp 0x153e
movq -0x20(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0xbbe(%rip), %rdi       # 0x2087
callq 0x10a0
cmpl $0x0, %eax
je 0x14f0
movq -0x20(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0xba4(%rip), %rdi       # 0x208a
callq 0x10a0
cmpl $0x0, %eax
jne 0x1507
movq -0x10(%rbp), %rax
movb $0x1, 0x8(%rax)
movq -0x10(%rbp), %rax
movl 0xc(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0xc(%rax)
jmp 0x153c
movq 0x2aea(%rip), %rax      # 0x3ff8
movq (%rax), %rdi
movq -0x20(%rbp), %rax
movq (%rax), %rdx
movq -0x20(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rcx
leaq 0xb72(%rip), %rsi       # 0x209d
movb $0x0, %al
callq 0x10b0
movl $0x1, %edi
callq 0x10c0
jmp 0x153e
jmp 0x1540
jmp 0x1542
jmp 0x1544
jmp 0x1546
jmp 0x1548
jmp 0x154a
jmp 0x154c
jmp 0x154e
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x1205
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nop