#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 *rs(char *, int);
main() {
  char data1[] = "He llo world        ";
  char data2[] = " Hello world        ";
  printf("%s\n", data1);
  printf("%s, %s\n", data1, rs(data1, 12));
  printf("%s, %s\n", data2, rs(data2, 12));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    0xed1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xece(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xecc(%rip),%eax
mov    %eax,-0x10(%rbp)
mov    0xec7(%rip),%al
mov    %al,-0xc(%rbp)
mov    0xec9(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xec6(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    0xec4(%rip),%eax
mov    %eax,-0x30(%rbp)
mov    0xebf(%rip),%al
mov    %al,-0x2c(%rbp)
lea    -0x20(%rbp),%rsi
lea    0xeb6(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x20(%rbp),%rax
mov    %rax,-0x50(%rbp)
lea    -0x20(%rbp),%rdi
mov    $0xc,%esi
call   1030 <rs@plt>
mov    -0x50(%rbp),%rsi
mov    %rax,%rdx
lea    0xe87(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x40(%rbp),%rax
mov    %rax,-0x48(%rbp)
lea    -0x40(%rbp),%rdi
mov    $0xc,%esi
call   1030 <rs@plt>
mov    -0x48(%rbp),%rsi
mov    %rax,%rdx
lea    0xe5c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x38,%rsp
movaps 0xed2(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movabs $0x20202020202020,%rax
mov    %rax,0x2d(%rsp)
movaps 0xed7(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rax,0xd(%rsp)
lea    0xee0(%rip),%rdi
lea    0x20(%rsp),%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0xc,%esi
call   1030 <rs@plt>
lea    0xeb9(%rip),%r14
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %rax,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0xc,%esi
call   1030 <rs@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %rax,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.main.data1 = [21 x i8] c"He llo world \00"
@__const.main.data2 = [21 x i8] c" Hello world \00"
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [8 x i8] c"%s, %s\0A\00"
define i32 @main() {
%1 = alloca [21 x i8]
%2 = alloca [21 x i8]
%3 = bitcast [21 x i8]* %1 to i8*
%4 = bitcast [21 x i8]* %2 to i8*
%5 = getelementptr inbounds [21 x i8], [21 x i8]* %1, i64 0, i64 0
%6 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = getelementptr inbounds [21 x i8], [21 x i8]* %1, i64 0, i64 0
%8 = getelementptr inbounds [21 x i8], [21 x i8]* %1, i64 0, i64 0
%9 = call i8* @rs(i8* %8, i32 12)
%10 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* %7, i8* %9)
%11 = getelementptr inbounds [21 x i8], [21 x i8]* %2, i64 0, i64 0
%12 = getelementptr inbounds [21 x i8], [21 x i8]* %2, i64 0, i64 0
%13 = call i8* @rs(i8* %12, i32 12)
%14 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* %11, i8* %13)
ret i32 0
}

LLVM IR (-O2):
@__const.main.data1 = [21 x i8] c"He llo world \00"
@__const.main.data2 = [21 x i8] c" Hello world \00"
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [8 x i8] c"%s, %s\0A\00"
define i32 @main() {
%1 = alloca [21 x i8]
%2 = alloca [21 x i8]
%3 = getelementptr inbounds [21 x i8], [21 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [21 x i8], [21 x i8]* %2, i64 0, i64 0
%5 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %3)
%6 = call i8* @rs(i8* %3, i32 12)
%7 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* %3, i8* %6)
%8 = call i8* @rs(i8* %4, i32 12)
%9 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* %4, i8* %8)
ret i32 0
}