// File: /workspace/github_c_makefile_star2_O3/morozov312[P]documentary/./src/utilities.c
// Function: Check_argv
int Check_argv(int argc, char** array_argv, char** inpdir, char** outdir)
{
    const char input_directory[] = "-inpdir";
    const char output_directory[] = "-outdir";
    /// Default input dir
    *inpdir = "";
    /// Default output dir
    *outdir = ".";
    for (int i = 1; i < argc; i++) {
        char* current_str = array_argv[i];
        char* next_str = array_argv[i + 1];
        int check_inp = strcmp(current_str, input_directory);
        int check_out = strcmp(current_str, output_directory);
        int check_help = strcmp(current_str, HELP_FLAG);
        int check_version = strcmp(current_str, VERSION_FLAG);
        if (check_inp && check_out && check_help && check_version) {
            printf("\'%s\'%s \n",
                   array_argv[i],
                   " Is not a command. See \'--help\'");
            return 0;
        }
        if (!check_inp) {
            /// --help for -inpdir
            if (!strcmp(next_str, HELP_FLAG)) {
                printf("%s\n", "Path to source dir");
                return 0;
            } else {
                if (array_argv[i + 1][0] != '.') {
                    printf("\'%s\'%s\n", array_argv[i + 1], " Is wrong path");
                    return 0;
                }
                *inpdir = next_str;
                i++;
            }
        }
        if (!check_out) {
            /// --help for -outdir
            if (!strcmp(next_str, HELP_FLAG)) {
                printf("%s\n",
                       "Path to output dir (default - your current dir)");
                return 0;
            } else {
                *outdir = next_str;
                i++;
            }
        }
    }
    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, -0x50(%rbp)
leaq 0x1a89(%rip), %rax      # 0x5b2e
movq %rdx, -0x40(%rbp)
movq %rax, (%rdx)
leaq 0x19b7(%rip), %rax      # 0x5a6a
movq %rcx, -0x48(%rbp)
movq %rax, (%rcx)
movl $0x1, %r14d
movl %edi, -0x2c(%rbp)
cmpl $0x2, %edi
jl 0x41ed
movl $0x1, %ebx
movslq %ebx, %rax
movq -0x50(%rbp), %rcx
movq (%rcx,%rax,8), %r13
movq 0x8(%rcx,%rax,8), %rax
movq %rax, -0x38(%rbp)
movq %r13, %rdi
leaq 0x11fe(%rip), %rsi      # 0x52ed
callq 0x2190
movl %eax, %r12d
movq %r13, %rdi
leaq 0x11fa(%rip), %rsi      # 0x52fb
callq 0x2190
movl %eax, %r14d
movq %r13, %rdi
leaq 0x1219(%rip), %rsi      # 0x532c
callq 0x2190
movl %eax, %r15d
movq %r13, %rdi
leaq 0x11fd(%rip), %rsi      # 0x5322
callq 0x2190
testl %r12d, %r12d
je 0x413d
testl %r14d, %r14d
je 0x413d
testl %r15d, %r15d
je 0x413d
testl %eax, %eax
jne 0x41a2
testl %r12d, %r12d
je 0x4148
movq -0x38(%rbp), %r15
jmp 0x416e
movq -0x38(%rbp), %r15
movq %r15, %rdi
leaq 0x11d6(%rip), %rsi      # 0x532c
callq 0x2190
testl %eax, %eax
je 0x41b8
cmpb $0x2e, (%r15)
jne 0x41d2
incl %ebx
movq -0x40(%rbp), %rax
movq %r15, (%rax)
testl %r14d, %r14d
jne 0x418f
movq %r15, %rdi
leaq 0x11af(%rip), %rsi      # 0x532c
callq 0x2190
testl %eax, %eax
je 0x41c1
movq -0x48(%rbp), %rax
movq %r15, (%rax)
incl %ebx
incl %ebx
cmpl -0x2c(%rbp), %ebx
jl 0x40d1
movl $0x1, %r14d
jmp 0x41ed
leaq 0x197d(%rip), %rdi      # 0x5b26
leaq 0x197f(%rip), %rdx      # 0x5b2f
xorl %r14d, %r14d
movq %r13, %rsi
jmp 0x41e6
leaq 0x1990(%rip), %rdi      # 0x5b4f
jmp 0x41c8
leaq 0x19b1(%rip), %rdi      # 0x5b79
callq 0x2080
xorl %r14d, %r14d
jmp 0x41ed
leaq 0x1989(%rip), %rdi      # 0x5b62
leaq 0x198a(%rip), %rdx      # 0x5b6a
xorl %r14d, %r14d
movq %r15, %rsi
xorl %eax, %eax
callq 0x2100
movl %r14d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop