// File: /workspace/github_c_makefile_star2_O1/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 0x1a3f(%rip), %rax      # 0x5b2f
movq %rax, (%rdx)
leaq 0x1971(%rip), %rax      # 0x5a6b
movq %rcx, -0x48(%rbp)
movq %rax, (%rcx)
movl %edi, -0x30(%rbp)
cmpl $0x2, %edi
setl -0x29(%rbp)
jl 0x4246
movq %rdx, -0x40(%rbp)
movl $0x1, %r14d
movslq %r14d, %rax
movq -0x50(%rbp), %rcx
movq (%rcx,%rax,8), %rbx
movq 0x8(%rcx,%rax,8), %rax
movq %rax, -0x38(%rbp)
movq %rbx, %rdi
leaq 0x11b4(%rip), %rsi      # 0x52ed
callq 0x2190
movl %eax, %r12d
movq %rbx, %rdi
leaq 0x11b0(%rip), %rsi      # 0x52fb
callq 0x2190
movl %eax, %r13d
movq %rbx, %rdi
leaq 0x11cf(%rip), %rsi      # 0x532c
callq 0x2190
movl %eax, %r15d
movq %rbx, %rdi
leaq 0x11b3(%rip), %rsi      # 0x5322
callq 0x2190
testl %r12d, %r12d
je 0x41a7
testl %r13d, %r13d
je 0x41a7
testl %r15d, %r15d
je 0x41a7
testl %eax, %eax
je 0x41a7
xorl %r15d, %r15d
leaq 0x1996(%rip), %rdi      # 0x5b27
movq %rbx, %rsi
leaq 0x1995(%rip), %rdx      # 0x5b30
xorl %eax, %eax
callq 0x2100
jmp 0x4230
testl %r12d, %r12d
je 0x41d7
movq -0x38(%rbp), %rbx
movb $0x1, %r15b
testl %r13d, %r13d
jne 0x4230
movq %rbx, %rdi
leaq 0x116a(%rip), %rsi      # 0x532c
callq 0x2190
testl %eax, %eax
je 0x4221
movq -0x48(%rbp), %rax
movq %rbx, (%rax)
incl %r14d
jmp 0x4230
movq -0x38(%rbp), %rbx
movq %rbx, %rdi
leaq 0x1147(%rip), %rsi      # 0x532c
callq 0x2190
testl %eax, %eax
je 0x41ff
cmpb $0x2e, (%rbx)
jne 0x4208
incl %r14d
movq -0x40(%rbp), %rax
movq %rbx, (%rax)
jmp 0x41b0
leaq 0x194a(%rip), %rdi      # 0x5b50
jmp 0x4228
xorl %r15d, %r15d
leaq 0x1951(%rip), %rdi      # 0x5b63
movq %rbx, %rsi
leaq 0x194f(%rip), %rdx      # 0x5b6b
jmp 0x419b
leaq 0x1952(%rip), %rdi      # 0x5b7a
callq 0x2080
xorl %r15d, %r15d
testb %r15b, %r15b
je 0x4246
incl %r14d
cmpl -0x30(%rbp), %r14d
setge -0x29(%rbp)
jl 0x411b
movzbl -0x29(%rbp), %eax
andl $0x1, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq