#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 *, char *);
void displayhelp() {
  printf("%-25s %s", "\n\n\'replace l<foo> |bar\'",
         "  to replace the content at line \'foo\' with string \'bar\'\n");
  printf("%-25s %s", "\'append l<foo> |bar\'",
         "to add \'bar\' at the end of line \'foo\'\n");
  printf("%-25s %s", "\'delete l<foo>\'", "to delete line \'foo\'\n");
  printf("%-25s %s", "\'write\'",
         "to save the file in the buffer into the file\n");
  printf("%-25s %s", "\'print\'", "to view the buffer\n");
  printf("%-25s %s", "\'help\'", "to display this again\n");
  printf("%-25s %s", "\'quit\'", "to end program\n\n");
  return;
}


x86 assembly (clang, -O0):
<displayhelp>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xee7(%rip),%rsi
lea    0xef8(%rip),%rdx
call   1030 <printf@plt>
lea    0xecb(%rip),%rdi
lea    0xf1f(%rip),%rsi
lea    0xf2d(%rip),%rdx
call   1030 <printf@plt>
lea    0xeb1(%rip),%rdi
lea    0xf41(%rip),%rsi
lea    0xf4a(%rip),%rdx
call   1030 <printf@plt>
lea    0xe97(%rip),%rdi
lea    0xf4d(%rip),%rsi
lea    0xf4e(%rip),%rdx
call   1030 <printf@plt>
lea    0xe7d(%rip),%rdi
lea    0xf69(%rip),%rsi
lea    0xf6a(%rip),%rdx
call   1030 <printf@plt>
lea    0xe63(%rip),%rdi
lea    0xf6b(%rip),%rsi
lea    0xf6b(%rip),%rdx
call   1030 <printf@plt>
lea    0xe49(%rip),%rdi
lea    0xf6f(%rip),%rsi
lea    0xf6f(%rip),%rdx
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<displayhelp>:
push   %rbx
lea    0xee8(%rip),%rbx
lea    0xeea(%rip),%rsi
lea    0xefb(%rip),%rdx
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xf26(%rip),%rsi
lea    0xf34(%rip),%rdx
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xf4c(%rip),%rsi
lea    0xf55(%rip),%rdx
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xf5c(%rip),%rsi
lea    0xf5d(%rip),%rdx
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xf7c(%rip),%rsi
lea    0xf7d(%rip),%rdx
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xf82(%rip),%rsi
lea    0xf82(%rip),%rdx
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xf8a(%rip),%rsi
lea    0xf8a(%rip),%rdx
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"%-25s %s\00"
@.str.1 = [24 x i8] c"\0A\0A'replace l<foo> |bar'\00"
@.str.2 = [58 x i8] c" to replace the content at line 'foo' with string 'bar'\0A\00"
@.str.3 = [21 x i8] c"'append l<foo> |bar'\00"
@.str.4 = [39 x i8] c"to add 'bar' at the end of line 'foo'\0A\00"
@.str.5 = [16 x i8] c"'delete l<foo>'\00"
@.str.6 = [22 x i8] c"to delete line 'foo'\0A\00"
@.str.7 = [8 x i8] c"'write'\00"
@.str.8 = [46 x i8] c"to save the file in the buffer into the file\0A\00"
@.str.9 = [8 x i8] c"'print'\00"
@.str.10 = [20 x i8] c"to view the buffer\0A\00"
@.str.11 = [7 x i8] c"'help'\00"
@.str.12 = [23 x i8] c"to display this again\0A\00"
@.str.13 = [7 x i8] c"'quit'\00"
@.str.14 = [17 x i8] c"to end program\0A\0A\00"
define void @displayhelp() {
%1 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.2, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.4, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.8, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.10, i64 0, i64 0))
%6 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.12, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.14, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"%-25s %s\00"
@.str.1 = [24 x i8] c"\0A\0A'replace l<foo> |bar'\00"
@.str.2 = [58 x i8] c" to replace the content at line 'foo' with string 'bar'\0A\00"
@.str.3 = [21 x i8] c"'append l<foo> |bar'\00"
@.str.4 = [39 x i8] c"to add 'bar' at the end of line 'foo'\0A\00"
@.str.5 = [16 x i8] c"'delete l<foo>'\00"
@.str.6 = [22 x i8] c"to delete line 'foo'\0A\00"
@.str.7 = [8 x i8] c"'write'\00"
@.str.8 = [46 x i8] c"to save the file in the buffer into the file\0A\00"
@.str.9 = [8 x i8] c"'print'\00"
@.str.10 = [20 x i8] c"to view the buffer\0A\00"
@.str.11 = [7 x i8] c"'help'\00"
@.str.12 = [23 x i8] c"to display this again\0A\00"
@.str.13 = [7 x i8] c"'quit'\00"
@.str.14 = [17 x i8] c"to end program\0A\0A\00"
define void @displayhelp() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.2, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.4, i64 0, i64 0))
%3 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0))
%4 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.8, i64 0, i64 0))
%5 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.10, i64 0, i64 0))
%6 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.12, i64 0, i64 0))
%7 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.14, i64 0, i64 0))
ret void
}