#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 print_help(void) {
  printf("\nGmem_test: A helper program for the driver gmem\nPossible usage is "
         "gmem_test [option] <string>\n\n");
  printf("Option\t\t\tDescription\n-----\t\t\t-----------\n\n");
  printf(
      "-help\t\t\tDisplay the help\n-read/show x\t\tShow the contents of the "
      "driver specified by x bytes. If blank -> displays the entire content\n");
  printf("-write <string>\t\twrite a string to the driver specified in "
         "<string>\n\n");
  return;
}


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

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

LLVM IR (-O0):
@.str = [97 x i8] c"\0AGmem_test: A helper program for the driver gmem\0APossible usage is gmem_test [option] <string>\0A\0A\00"
@.str.1 = [43 x i8] c"Option\09\09\09Description\0A-----\09\09\09-----------\0A\0A\00"
@.str.2 = [134 x i8] c"-help\09\09\09Display the help\0A-read/show x\09\09Show the contents of the driver specified by x bytes. If blank -> displays the entire content\0A\00"
@.str.3 = [70 x i8] c"-write <string>\09\09write a string to the driver specified in <string>\0A\0A\00"
define void @print_help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([97 x i8], [97 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([134 x i8], [134 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [96 x i8] c"\0AGmem_test: A helper program for the driver gmem\0APossible usage is gmem_test [option] <string>\0A\00"
@str.4 = [42 x i8] c"Option\09\09\09Description\0A-----\09\09\09-----------\0A\00"
@str.5 = [133 x i8] c"-help\09\09\09Display the help\0A-read/show x\09\09Show the contents of the driver specified by x bytes. If blank -> displays the entire content\00"
@str.6 = [69 x i8] c"-write <string>\09\09write a string to the driver specified in <string>\0A\00"
define void @print_help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([96 x i8], [96 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @str.4, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([133 x i8], [133 x i8]* @str.5, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([69 x i8], [69 x i8]* @str.6, i64 0, i64 0))
ret void
}