// File: /workspace/github_c_makefile_star2_O2/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)
movl %edi, -0x2c(%rbp)
leaq 0x1b1e(%rip), %rax      # 0x5b2e
movq %rdx, -0x40(%rbp)
movq %rax, (%rdx)
leaq 0x1a4c(%rip), %rax      # 0x5a6a
movq %rcx, -0x48(%rbp)
movq %rax, (%rcx)
pushq $0x1
popq %r12
cmpl -0x2c(%rbp), %r12d
jge 0x4148
movq %r12, -0x38(%rbp)
movslq %r12d, %rax
movq -0x50(%rbp), %rcx
movq (%rcx,%rax,8), %rbx
movq 0x8(%rcx,%rax,8), %r14
movq %rbx, %rdi
leaq 0x129c(%rip), %rsi      # 0x52ed
callq 0x2190
movl %eax, %r15d
movq %rbx, %rdi
leaq 0x1298(%rip), %rsi      # 0x52fb
callq 0x2190
movl %eax, %r13d
movq %rbx, %rdi
leaq 0x12b7(%rip), %rsi      # 0x532c
callq 0x2190
movl %eax, %r12d
movq %rbx, %rdi
leaq 0x129b(%rip), %rsi      # 0x5322
callq 0x2190
testl %r15d, %r15d
je 0x409f
testl %r13d, %r13d
je 0x409f
testl %r12d, %r12d
je 0x409f
testl %eax, %eax
jne 0x40fb
movq -0x38(%rbp), %r12
movl %r12d, %ebx
testl %r15d, %r15d
jne 0x40d0
movq %r14, %rdi
leaq 0x1277(%rip), %rsi      # 0x532c
callq 0x2190
testl %eax, %eax
je 0x4119
cmpb $0x2e, (%r14)
jne 0x4130
leal 0x1(%r12), %ebx
movq -0x40(%rbp), %rax
movq %r14, (%rax)
testl %r13d, %r13d
jne 0x40f1
movq %r14, %rdi
leaq 0x124d(%rip), %rsi      # 0x532c
callq 0x2190
testl %eax, %eax
je 0x4122
movq -0x48(%rbp), %rax
movq %r14, (%rax)
incl %ebx
incl %ebx
movl %ebx, %r12d
jmp 0x4029
leaq 0x1a24(%rip), %rdi      # 0x5b26
leaq 0x1a26(%rip), %rdx      # 0x5b2f
movq %rbx, %rsi
xorl %eax, %eax
callq 0x2100
movq -0x38(%rbp), %r12
jmp 0x4148
leaq 0x1a2f(%rip), %rdi      # 0x5b4f
jmp 0x4129
leaq 0x1a50(%rip), %rdi      # 0x5b79
callq 0x2080
jmp 0x4148
leaq 0x1a2b(%rip), %rdi      # 0x5b62
leaq 0x1a2c(%rip), %rdx      # 0x5b6a
movq %r14, %rsi
xorl %eax, %eax
callq 0x2100
xorl %eax, %eax
cmpl -0x2c(%rbp), %r12d
setge %al
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq