#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void help(void) {
  printf(
      "Usage: mygrep PATTERN [OPTION]... [FILE]...\nSearch for PATTERN in each "
      "FILE or standard input.\nPATTERN is, by default, a basic regular "
      "expression (BRE).\nExample: mygrep -i 'hello world' menu.h main.c\n\n");
  printf(
      "-i, --ignore-case         ignore case distinctions\n	while matching "
      "the pattern ignore the difference between capital and small "
      "letters.\n-r, --recursive           like --directories=recurse\n	if "
      "combine '-r' with '*' search pattern recursivly in all files of the "
      "current directory\n	if only use '-r' then search in all "
      "directories.\n-A, --after-context=NUM   print NUM lines of trailing "
      "context\n-c, --count               print only a count of matching lines "
      "per FILE\n-L, --files-without-match  print output with line numbar\n");
}


x86 assembly (clang, -O0):
<help>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
lea    0xfa3(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<help>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xfa5(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [202 x i8] c"Usage: mygrep PATTERN [OPTION]... [FILE]...\0ASearch for PATTERN in each FILE or standard input.\0APATTERN is, by default, a basic regular expression (BRE).\0AExample: mygrep -i 'hello world' menu.h main.c\0A\0A\00"
@.str.1 = [521 x i8] c"-i, --ignore-case ignore case distinctions\0A\09while matching the pattern ignore the difference between capital and small letters.\0A-r, --recursive like --directories=recurse\0A\09if combine '-r' with '*' search pattern recursivly in all files of the current directory\0A\09if only use '-r' then search in all directories.\0A-A, --after-context=NUM print NUM lines of trailing context\0A-c, --count print only a count of matching lines per FILE\0A-L, --files-without-match print output with line numbar\0A\00"
define void @help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([202 x i8], [202 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([521 x i8], [521 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [201 x i8] c"Usage: mygrep PATTERN [OPTION]... [FILE]...\0ASearch for PATTERN in each FILE or standard input.\0APATTERN is, by default, a basic regular expression (BRE).\0AExample: mygrep -i 'hello world' menu.h main.c\0A\00"
@str.2 = [520 x i8] c"-i, --ignore-case ignore case distinctions\0A\09while matching the pattern ignore the difference between capital and small letters.\0A-r, --recursive like --directories=recurse\0A\09if combine '-r' with '*' search pattern recursivly in all files of the current directory\0A\09if only use '-r' then search in all directories.\0A-A, --after-context=NUM print NUM lines of trailing context\0A-c, --count print only a count of matching lines per FILE\0A-L, --files-without-match print output with line numbar\00"
define void @help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([201 x i8], [201 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([520 x i8], [520 x i8]* @str.2, i64 0, i64 0))
ret void
}