#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 rib_dohelp(void) {
  printf("\nRIB help\n===================================================\n");
  printf("\np - View pointer position\nv - View complete memory status");
  printf("\nc - Clear all memory buffers\ni - Set input string");
  printf("\nl - Load program from file");
  printf("\nq - Quit the program\n");
}


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

x86 assembly (clang, -O2):
<rib_dohelp>:
push   %rax
lea    0xf62(%rip),%rdi
call   1030 <puts@plt>
lea    0xecc(%rip),%rdi
call   1040 <printf@plt>
lea    0xefb(%rip),%rdi
call   1040 <printf@plt>
lea    0xf22(%rip),%rdi
call   1040 <printf@plt>
lea    0xf70(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [63 x i8] c"\0ARIB help\0A===================================================\0A\00"
@.str.1 = [59 x i8] c"\0Ap - View pointer position\0Av - View complete memory status\00"
@.str.2 = [51 x i8] c"\0Ac - Clear all memory buffers\0Ai - Set input string\00"
@.str.3 = [28 x i8] c"\0Al - Load program from file\00"
@.str.4 = [23 x i8] c"\0Aq - Quit the program\0A\00"
define void @rib_dohelp() {
%1 = call i32 @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.4, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [59 x i8] c"\0Ap - View pointer position\0Av - View complete memory status\00"
@.str.2 = [51 x i8] c"\0Ac - Clear all memory buffers\0Ai - Set input string\00"
@.str.3 = [28 x i8] c"\0Al - Load program from file\00"
@str = [62 x i8] c"\0ARIB help\0A===================================================\00"
@str.5 = [22 x i8] c"\0Aq - Quit the program\00"
define void @rib_dohelp() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.5, i64 0, i64 0))
ret void
}