#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 EXIT_SUCCESS;
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fputc(char, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdout;
int /*<<< orphan*/ write(int, char *, int);
int main(void) {
  printf("Take a walk on the wild side, by: ");
  write(1, "Lou Reed.\n", 10);
  fputc('\n', stdout);
  printf("Get-up stand-up, stand-up for your rights, by: ");
  fflush(stdout);
  write(1, "Bob Marley.\n", 12);
  fputc('\n', stdout);
  printf("Back in black: \n");
  write(1, "AC/DC.\n", 7);
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
call   1040 <printf@plt>
mov    $0x1,%edi
lea    0xebc(%rip),%rsi
mov    $0xa,%edx
call   1030 <write@plt>
mov    0x2e68(%rip),%rax
mov    (%rax),%esi
mov    $0xa,%edi
call   1050 <fputc@plt>
lea    0xea3(%rip),%rdi
call   1040 <printf@plt>
mov    0x2e49(%rip),%rax
mov    (%rax),%edi
call   1060 <fflush@plt>
mov    $0x1,%edi
lea    0xeb4(%rip),%rsi
mov    $0xc,%edx
call   1030 <write@plt>
mov    0x2e25(%rip),%rax
mov    (%rax),%esi
mov    $0xa,%edi
call   1050 <fputc@plt>
lea    0xe9d(%rip),%rdi
call   1040 <printf@plt>
mov    $0x1,%edi
lea    0xe9d(%rip),%rsi
mov    $0x7,%edx
call   1030 <write@plt>
mov    0x2de8(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xea8(%rip),%rdi
call   1050 <printf@plt>
lea    0xebf(%rip),%rsi
mov    $0x1,%edi
mov    $0xa,%edx
call   1040 <write@plt>
mov    0x2e66(%rip),%rbx
mov    (%rbx),%esi
mov    $0xa,%edi
call   1060 <fputc@plt>
lea    0xea1(%rip),%rdi
call   1050 <printf@plt>
mov    (%rbx),%edi
call   1070 <fflush@plt>
lea    0xebe(%rip),%rsi
mov    $0x1,%edi
mov    $0xc,%edx
call   1040 <write@plt>
mov    (%rbx),%esi
mov    $0xa,%edi
call   1060 <fputc@plt>
lea    0xeb1(%rip),%rdi
call   1030 <puts@plt>
lea    0xe9d(%rip),%rsi
mov    $0x1,%edi
mov    $0x7,%edx
call   1040 <write@plt>
mov    0x2df4(%rip),%rax
mov    (%rax),%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [35 x i8] c"Take a walk on the wild side, by: \00"
@.str.1 = [11 x i8] c"Lou Reed.\0A\00"
@stdout = global i32 0
@.str.2 = [48 x i8] c"Get-up stand-up, stand-up for your rights, by: \00"
@.str.3 = [13 x i8] c"Bob Marley.\0A\00"
@.str.4 = [17 x i8] c"Back in black: \0A\00"
@.str.5 = [8 x i8] c"AC/DC.\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @write(i32 1, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 10)
%4 = load i32, i32* @stdout
%5 = call i32 @fputc(i8 signext 10, i32 %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.2, i64 0, i64 0))
%7 = load i32, i32* @stdout
%8 = call i32 @fflush(i32 %7)
%9 = call i32 @write(i32 1, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i32 12)
%10 = load i32, i32* @stdout
%11 = call i32 @fputc(i8 signext 10, i32 %10)
%12 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0))
%13 = call i32 @write(i32 1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i32 7)
%14 = load i32, i32* @EXIT_SUCCESS
ret i32 %14
}

LLVM IR (-O2):
@.str = [35 x i8] c"Take a walk on the wild side, by: \00"
@.str.1 = [11 x i8] c"Lou Reed.\0A\00"
@stdout = global i32 0
@.str.2 = [48 x i8] c"Get-up stand-up, stand-up for your rights, by: \00"
@.str.3 = [13 x i8] c"Bob Marley.\0A\00"
@.str.5 = [8 x i8] c"AC/DC.\0A\00"
@EXIT_SUCCESS = global i32 0
@str = [16 x i8] c"Back in black: \00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i32 10)
%3 = load i32, i32* @stdout
%4 = tail call i32 @fputc(i8 signext 10, i32 %3)
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str.2, i64 0, i64 0))
%6 = load i32, i32* @stdout
%7 = tail call i32 @fflush(i32 %6)
%8 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), i32 12)
%9 = load i32, i32* @stdout
%10 = tail call i32 @fputc(i8 signext 10, i32 %9)
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
%12 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i32 7)
%13 = load i32, i32* @EXIT_SUCCESS
ret i32 %13
}