#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 *, char const *);
void print_usage(const char *cmd) {
  printf("%s -h: show this help\n", cmd);
  printf("%s -c\"message\" /path/to/shm:"
         " initialiaze a shm\n",
         cmd);
  printf("%s -C\"/path/to/file/containing/message\" /path/to/shm:"
         " initialiaze a shm\n",
         cmd);
  printf("%s -d {/path/to/shm | -i <shmid>}:"
         " delete a shm\n",
         cmd);
  printf("%s -r\"N\" {/path/to/shm | -i <shmid>}:"
         " read N times from a shm with a small pause between each "
         "reading\n",
         cmd);
  printf("%s -w\"message\" {/path/to/shm | -i <shmid>}:"
         " write to a shm\n",
         cmd);
  printf(
      "%s -W\"/path/to/file/containing/message\" {/path/to/shm | -i <shmid>}:"
      " write to a shm\n",
      cmd);
}


x86 assembly (clang, -O0):
<print_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed9(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xee0(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xf00(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xf39(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xf5a(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xfb1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xfdd(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_usage>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
lea    0xeed(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
lea    0xf0e(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
lea    0xf48(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
lea    0xf6a(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
lea    0xfc2(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
lea    0xfef(%rip),%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"%s -h: show this help\0A\00"
@.str.1 = [48 x i8] c"%s -c\22message\22 /path/to/shm: initialiaze a shm\0A\00"
@.str.2 = [73 x i8] c"%s -C\22/path/to/file/containing/message\22 /path/to/shm: initialiaze a shm\0A\00"
@.str.3 = [49 x i8] c"%s -d {/path/to/shm | -i <shmid>}: delete a shm\0A\00"
@.str.4 = [103 x i8] c"%s -r\22N\22 {/path/to/shm | -i <shmid>}: read N times from a shm with a small pause between each reading\0A\00"
@.str.5 = [60 x i8] c"%s -w\22message\22 {/path/to/shm | -i <shmid>}: write to a shm\0A\00"
@.str.6 = [85 x i8] c"%s -W\22/path/to/file/containing/message\22 {/path/to/shm | -i <shmid>}: write to a shm\0A\00"
define void @print_usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = load i8*, i8** %2
%6 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i64 0, i64 0), i8* %5)
%7 = load i8*, i8** %2
%8 = call i32 @printf(i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.2, i64 0, i64 0), i8* %7)
%9 = load i8*, i8** %2
%10 = call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.3, i64 0, i64 0), i8* %9)
%11 = load i8*, i8** %2
%12 = call i32 @printf(i8* getelementptr inbounds ([103 x i8], [103 x i8]* @.str.4, i64 0, i64 0), i8* %11)
%13 = load i8*, i8** %2
%14 = call i32 @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.5, i64 0, i64 0), i8* %13)
%15 = load i8*, i8** %2
%16 = call i32 @printf(i8* getelementptr inbounds ([85 x i8], [85 x i8]* @.str.6, i64 0, i64 0), i8* %15)
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"%s -h: show this help\0A\00"
@.str.1 = [48 x i8] c"%s -c\22message\22 /path/to/shm: initialiaze a shm\0A\00"
@.str.2 = [73 x i8] c"%s -C\22/path/to/file/containing/message\22 /path/to/shm: initialiaze a shm\0A\00"
@.str.3 = [49 x i8] c"%s -d {/path/to/shm | -i <shmid>}: delete a shm\0A\00"
@.str.4 = [103 x i8] c"%s -r\22N\22 {/path/to/shm | -i <shmid>}: read N times from a shm with a small pause between each reading\0A\00"
@.str.5 = [60 x i8] c"%s -w\22message\22 {/path/to/shm | -i <shmid>}: write to a shm\0A\00"
@.str.6 = [85 x i8] c"%s -W\22/path/to/file/containing/message\22 {/path/to/shm | -i <shmid>}: write to a shm\0A\00"
define void @print_usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.2, i64 0, i64 0), i8* %0)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.3, i64 0, i64 0), i8* %0)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([103 x i8], [103 x i8]* @.str.4, i64 0, i64 0), i8* %0)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.5, i64 0, i64 0), i8* %0)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([85 x i8], [85 x i8]* @.str.6, i64 0, i64 0), i8* %0)
ret void
}