// File: /workspace/github_c_makefile_star2_O0/7402[P]randwords/main.c
// Function: main
int main(int argc, const char * argv[]) {
    int max_index = word_count() - 1;
    int from_index = 0;
    int to_index = max_index;
    bool error = false;
    bool silent = false;
    int words_per_row = 5;
    int word_count = 35;
    
    for (int index = 1; index < argc && !error; index++) {
        //  -f from
        if (strcmp(argv[index], "-f") == 0 && index + 1 < argc) {
            from_index = atoi(argv[++index]) - 1;
            error = from_index < 0 || from_index > max_index || from_index > to_index;
            
        //  -t to
        } else if (strcmp(argv[index], "-t") == 0 && index + 1 < argc) {
            to_index = atoi(argv[++index]) - 1;
            error = to_index < 0 || to_index > max_index || from_index > to_index;
            
        //  -c words_per_row
        } else if (strcmp(argv[index], "-c") == 0 && index + 1 < argc) {
            words_per_row = atoi(argv[++index]);
            error = words_per_row < 1 || words_per_row > 100;
            
        //  -n number_of_words
        } else if (strcmp(argv[index], "-n") == 0 && index + 1 < argc) {
            word_count = atoi(argv[++index]);
            error = word_count < 0 || word_count > 5000;
            
        //  -v --version       print version
        } else if ((strcmp(argv[index], "--version") == 0) ||
                   (strcmp(argv[index], "-v") == 0)) {
            printf("randwords 0.9.2\n");
            silent = true;

        //  -h --help       print help for randwords
        } else if ((strcmp(argv[index], "--help") == 0) ||
                   (strcmp(argv[index], "-h") == 0)) {
            printf("Generates a series of random words.\n"
                   "Usage:\n"
                   "  randwords [-c <words_per_row] [-n <number_of_words>]\n"
                   "            [-f <from_word_number>] [-t <to_word_number>]\n"
                   "  randwords -h | --help\n"
                   "  randwords -v | --version\n"
                   "  randwords --license\n"
                   "  randwords --man-page\n"
                   "\n"
                   "Options:\n"
                   "  -c <words_per_row>     Number of words per row [default: 5]\n"
                   "  -n <number_of_words>   Number of words to print [default: 35]\n"
                   "  -f <from_word_number>  Include words from list beginning at this number [default: 1]\n"
                   "  -t <to_word_number>    Include words from list up to this number [default: 5000]\n"
                   "  -h --help     Show this screen.\n"
                   "  --version     Show version.\n"
                   "  --license     Show software copyright and license\n"
                   "  --man_page    Show source for man page\n");
            silent = true;
            
        //  --man-page      print source for man page
        } else if (strcmp(argv[index], "--man-page") == 0) {
            man_page_source();
            silent = true;
            
        //  --licence       print copyright and license
        } else if (strcmp(argv[index], "--license") == 0) {
            license();
            silent = true;;
            
        } else {
            error = true;
        }
    }
    
    if (silent) {
        
    } else if (error) {
        fprintf(stderr, "Error: invalid options\n");
        
    } else {
        if (print_words(from_index, to_index, words_per_row, word_count)) {
            printf("error: unable to print\n");
        }
    }
    
    return error ? 1 : 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
callq 0x1e770
subl $0x1, %eax
movl %eax, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x1c(%rbp)
movb $0x0, -0x1d(%rbp)
movb $0x0, -0x1e(%rbp)
movl $0x5, -0x24(%rbp)
movl $0x23, -0x28(%rbp)
movl $0x1, -0x2c(%rbp)
movl -0x2c(%rbp), %ecx
xorl %eax, %eax
cmpl -0x8(%rbp), %ecx
movb %al, -0x2d(%rbp)
jge 0x1e230
movb -0x1d(%rbp), %al
xorb $-0x1, %al
movb %al, -0x2d(%rbp)
movb -0x2d(%rbp), %al
testb $0x1, %al
jne 0x1e23c
jmp 0x1e50c
movq -0x10(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xdb5(%rip), %rsi       # 0x1f004
callq 0x1e080
cmpl $0x0, %eax
jne 0x1e2b4
movl -0x2c(%rbp), %eax
addl $0x1, %eax
cmpl -0x8(%rbp), %eax
jge 0x1e2b4
movq -0x10(%rbp), %rax
movl -0x2c(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, -0x2c(%rbp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
callq 0x1e0b0
subl $0x1, %eax
movl %eax, -0x18(%rbp)
movb $0x1, %al
cmpl $0x0, -0x18(%rbp)
movb %al, -0x2e(%rbp)
jl 0x1e2a7
movl -0x18(%rbp), %ecx
movb $0x1, %al
cmpl -0x14(%rbp), %ecx
movb %al, -0x2e(%rbp)
jg 0x1e2a7
movl -0x18(%rbp), %eax
cmpl -0x1c(%rbp), %eax
setg %al
movb %al, -0x2e(%rbp)
movb -0x2e(%rbp), %al
andb $0x1, %al
movb %al, -0x1d(%rbp)
jmp 0x1e4fc
movq -0x10(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xd40(%rip), %rsi       # 0x1f007
callq 0x1e080
cmpl $0x0, %eax
jne 0x1e32c
movl -0x2c(%rbp), %eax
addl $0x1, %eax
cmpl -0x8(%rbp), %eax
jge 0x1e32c
movq -0x10(%rbp), %rax
movl -0x2c(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, -0x2c(%rbp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
callq 0x1e0b0
subl $0x1, %eax
movl %eax, -0x1c(%rbp)
movb $0x1, %al
cmpl $0x0, -0x1c(%rbp)
movb %al, -0x2f(%rbp)
jl 0x1e31f
movl -0x1c(%rbp), %ecx
movb $0x1, %al
cmpl -0x14(%rbp), %ecx
movb %al, -0x2f(%rbp)
jg 0x1e31f
movl -0x18(%rbp), %eax
cmpl -0x1c(%rbp), %eax
setg %al
movb %al, -0x2f(%rbp)
movb -0x2f(%rbp), %al
andb $0x1, %al
movb %al, -0x1d(%rbp)
jmp 0x1e4fa
movq -0x10(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xccb(%rip), %rsi       # 0x1f00a
callq 0x1e080
cmpl $0x0, %eax
jne 0x1e392
movl -0x2c(%rbp), %eax
addl $0x1, %eax
cmpl -0x8(%rbp), %eax
jge 0x1e392
movq -0x10(%rbp), %rax
movl -0x2c(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, -0x2c(%rbp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
callq 0x1e0b0
movl %eax, -0x24(%rbp)
movb $0x1, %al
cmpl $0x1, -0x24(%rbp)
movb %al, -0x30(%rbp)
jl 0x1e385
cmpl $0x64, -0x24(%rbp)
setg %al
movb %al, -0x30(%rbp)
movb -0x30(%rbp), %al
andb $0x1, %al
movb %al, -0x1d(%rbp)
jmp 0x1e4f8
movq -0x10(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xc68(%rip), %rsi       # 0x1f00d
callq 0x1e080
cmpl $0x0, %eax
jne 0x1e3fb
movl -0x2c(%rbp), %eax
addl $0x1, %eax
cmpl -0x8(%rbp), %eax
jge 0x1e3fb
movq -0x10(%rbp), %rax
movl -0x2c(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, -0x2c(%rbp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
callq 0x1e0b0
movl %eax, -0x28(%rbp)
movb $0x1, %al
cmpl $0x0, -0x28(%rbp)
movb %al, -0x31(%rbp)
jl 0x1e3ee
cmpl $0x1388, -0x28(%rbp)    # imm = 0x1388
setg %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %al
andb $0x1, %al
movb %al, -0x1d(%rbp)
jmp 0x1e4f6
movq -0x10(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xc02(%rip), %rsi       # 0x1f010
callq 0x1e080
cmpl $0x0, %eax
je 0x1e435
movq -0x10(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xbef(%rip), %rsi       # 0x1f01a
callq 0x1e080
cmpl $0x0, %eax
jne 0x1e44c
leaq 0xbe1(%rip), %rdi       # 0x1f01d
movb $0x0, %al
callq 0x1e050
movb $0x1, -0x1e(%rbp)
jmp 0x1e4f4
movq -0x10(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xbcf(%rip), %rsi       # 0x1f02e
callq 0x1e080
cmpl $0x0, %eax
je 0x1e486
movq -0x10(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xbb9(%rip), %rsi       # 0x1f035
callq 0x1e080
cmpl $0x0, %eax
jne 0x1e49a
leaq 0xbab(%rip), %rdi       # 0x1f038
movb $0x0, %al
callq 0x1e050
movb $0x1, -0x1e(%rbp)
jmp 0x1e4f2
movq -0x10(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xe57(%rip), %rsi       # 0x1f304
callq 0x1e080
cmpl $0x0, %eax
jne 0x1e4c2
callq 0x1e580
movb $0x1, -0x1e(%rbp)
jmp 0x1e4f0
movq -0x10(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xe3a(%rip), %rsi       # 0x1f30f
callq 0x1e080
cmpl $0x0, %eax
jne 0x1e4ea
callq 0x1e5a0
movb $0x1, -0x1e(%rbp)
jmp 0x1e4ee
movb $0x1, -0x1d(%rbp)
jmp 0x1e4f0
jmp 0x1e4f2
jmp 0x1e4f4
jmp 0x1e4f6
jmp 0x1e4f8
jmp 0x1e4fa
jmp 0x1e4fc
jmp 0x1e4fe
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x1e21b
testb $0x1, -0x1e(%rbp)
je 0x1e514
jmp 0x1e55d
testb $0x1, -0x1d(%rbp)
je 0x1e534
movq 0xcad7(%rip), %rax      # 0x2aff8
movq (%rax), %rdi
leaq 0xdee(%rip), %rsi       # 0x1f319
movb $0x0, %al
callq 0x1e090
jmp 0x1e55b
movl -0x18(%rbp), %edi
movl -0x1c(%rbp), %esi
movl -0x24(%rbp), %edx
movl -0x28(%rbp), %ecx
callq 0x1e5c0
testb $0x1, %al
jne 0x1e54b
jmp 0x1e559
leaq 0xddf(%rip), %rdi       # 0x1f331
movb $0x0, %al
callq 0x1e050
jmp 0x1e55b
jmp 0x1e55d
movb -0x1d(%rbp), %dl
xorl %eax, %eax
movl $0x1, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)