#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 *);
int /*<<< orphan*/ reverseString(char *);
int /*<<< orphan*/ rot13(char *);
int main() {
  char msg[] = "Votre message";
  printf("Initial value: \"%s\"\n", msg);
  reverseString(msg);
  printf("Reversed     : \"%s\"\n", msg);
  reverseString(msg);
  rot13(msg);
  printf("ROT13        : \"%s\"\n", msg);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xec1(%rip),%rax
mov    %rax,-0xe(%rbp)
mov    0xebf(%rip),%eax
mov    %eax,-0x6(%rbp)
mov    0xeb9(%rip),%ax
mov    %ax,-0x2(%rbp)
lea    -0xe(%rbp),%rsi
lea    0xeac(%rip),%rdi
call   1040 <printf@plt>
lea    -0xe(%rbp),%rdi
call   1050 <reverseString@plt>
lea    -0xe(%rbp),%rsi
lea    0xea8(%rip),%rdi
call   1040 <printf@plt>
lea    -0xe(%rbp),%rdi
call   1050 <reverseString@plt>
lea    -0xe(%rbp),%rdi
call   1030 <rot13@plt>
lea    -0xe(%rbp),%rsi
lea    0xe9b(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movabs $0x6567617373656d,%rax
mov    %rax,0x6(%rsp)
movabs $0x656d206572746f56,%rax
20 6d 65
mov    %rax,(%rsp)
lea    0xeb5(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1050 <reverseString@plt>
lea    0xeb0(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
mov    %rbx,%rdi
call   1050 <reverseString@plt>
mov    %rbx,%rdi
call   1030 <rot13@plt>
lea    0xea6(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.msg = [14 x i8] c"Votre message\00"
@.str = [21 x i8] c"Initial value: \22%s\22\0A\00"
@.str.1 = [21 x i8] c"Reversed : \22%s\22\0A\00"
@.str.2 = [21 x i8] c"ROT13 : \22%s\22\0A\00"
define i32 @main() {
%1 = alloca [14 x i8]
%2 = bitcast [14 x i8]* %1 to i8*
%3 = getelementptr inbounds [14 x i8], [14 x i8]* %1, i64 0, i64 0
%4 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = getelementptr inbounds [14 x i8], [14 x i8]* %1, i64 0, i64 0
%6 = call i32 @reverseString(i8* %5)
%7 = getelementptr inbounds [14 x i8], [14 x i8]* %1, i64 0, i64 0
%8 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i8* %7)
%9 = getelementptr inbounds [14 x i8], [14 x i8]* %1, i64 0, i64 0
%10 = call i32 @reverseString(i8* %9)
%11 = getelementptr inbounds [14 x i8], [14 x i8]* %1, i64 0, i64 0
%12 = call i32 @rot13(i8* %11)
%13 = getelementptr inbounds [14 x i8], [14 x i8]* %1, i64 0, i64 0
%14 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i8* %13)
ret i32 0
}

LLVM IR (-O2):
@__const.main.msg = [14 x i8] c"Votre message\00"
@.str = [21 x i8] c"Initial value: \22%s\22\0A\00"
@.str.1 = [21 x i8] c"Reversed : \22%s\22\0A\00"
@.str.2 = [21 x i8] c"ROT13 : \22%s\22\0A\00"
define i32 @main() {
%1 = alloca [14 x i8]
%2 = getelementptr inbounds [14 x i8], [14 x i8]* %1, i64 0, i64 0
%3 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i32 @reverseString(i8* %2)
%5 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%6 = call i32 @reverseString(i8* %2)
%7 = call i32 @rot13(i8* %2)
%8 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i8* %2)
ret i32 0
}