#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 *);
int /*<<< orphan*/ strassign(char *, char *);
int main(void) {
  int maxstr = 1000;
  char s[maxstr];
  char ss[maxstr];
  s[0] = '\0';
  ss[0] = '\0';
  printf("Original:\n\ts = [%s]\n\tss = [%s]\n", s, ss);
  strassign("How beauteous mankind is! O brave new world, that has such people "
            "in it!\0",
            s);
  strassign("I hereby declare my wish to die a free man rather than to "
            "continue to live as a slave in a prison. And so I leave this "
            "world, where the heart must either break or turn to lead.\0",
            ss);
  printf("Mutation:\n\ts = [%s]\n\tss = [%s]\n", s, ss);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x3e8,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x10(%rbp)
mov    %rax,%rcx
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rsi
sub    %rcx,%rsi
mov    %rsi,-0x30(%rbp)
mov    %rsi,%rsp
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
mov    %rax,%rcx
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdx
sub    %rcx,%rdx
mov    %rdx,-0x28(%rbp)
mov    %rdx,%rsp
mov    %rax,-0x20(%rbp)
movb   $0x0,(%rsi)
movb   $0x0,(%rdx)
lea    0xe78(%rip),%rdi
call   1030 <printf@plt>
mov    -0x30(%rbp),%rsi
lea    0xea8(%rip),%rdi
call   1040 <strassign@plt>
mov    -0x28(%rbp),%rsi
lea    0xee2(%rip),%rdi
call   1040 <strassign@plt>
mov    -0x30(%rbp),%rsi
mov    -0x28(%rbp),%rdx
lea    0xe64(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x7d8,%rsp
movb   $0x0,0x3f0(%rsp)
movb   $0x0,(%rsp)
lea    0xec3(%rip),%rdi
lea    0x3f0(%rsp),%rbx
mov    %rsp,%r14
mov    %rbx,%rsi
mov    %r14,%rdx
call   1030 <printf@plt>
lea    0xee6(%rip),%rdi
mov    %rbx,%rsi
call   1040 <strassign@plt>
lea    0xf21(%rip),%rdi
mov    %r14,%rsi
call   1040 <strassign@plt>
lea    0xea8(%rip),%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x7d8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [32 x i8] c"Original:\0A\09s = [%s]\0A\09ss = [%s]\0A\00"
@.str.1 = [74 x i8] c"How beauteous mankind is! O brave new world, that has such people in it!\00\00"
@.str.2 = [178 x i8] c"I hereby declare my wish to die a free man rather than to continue to live as a slave in a prison. And so I leave this world, where the heart must either break or turn to lead.\00\00"
@.str.3 = [32 x i8] c"Mutation:\0A\09s = [%s]\0A\09ss = [%s]\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i64
store i32 0, i32* %1
store i32 1000, i32* %2
%6 = load i32, i32* %2
%7 = zext i32 %6 to i64
%8 = call i8* @llvm.stacksave()
store i8* %8, i8** %3
%9 = alloca i8, i64 %7
store i64 %7, i64* %4
%10 = load i32, i32* %2
%11 = zext i32 %10 to i64
%12 = alloca i8, i64 %11
store i64 %11, i64* %5
%13 = getelementptr inbounds i8, i8* %9, i64 0
store i8 0, i8* %13
%14 = getelementptr inbounds i8, i8* %12, i64 0
store i8 0, i8* %14
%15 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %9, i8* %12)
%16 = call i32 @strassign(i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.1, i64 0, i64 0), i8* %9)
%17 = call i32 @strassign(i8* getelementptr inbounds ([178 x i8], [178 x i8]* @.str.2, i64 0, i64 0), i8* %12)
%18 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0), i8* %9, i8* %12)
store i32 0, i32* %1
%19 = load i8*, i8** %3
%20 = load i32, i32* %1
ret i32 %20
}

LLVM IR (-O2):
@.str = [32 x i8] c"Original:\0A\09s = [%s]\0A\09ss = [%s]\0A\00"
@.str.1 = [74 x i8] c"How beauteous mankind is! O brave new world, that has such people in it!\00\00"
@.str.2 = [178 x i8] c"I hereby declare my wish to die a free man rather than to continue to live as a slave in a prison. And so I leave this world, where the heart must either break or turn to lead.\00\00"
@.str.3 = [32 x i8] c"Mutation:\0A\09s = [%s]\0A\09ss = [%s]\0A\00"
define i32 @main() {
%1 = alloca [1000 x i8]
%2 = alloca [1000 x i8]
%3 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 0
%4 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
store i8 0, i8* %4
store i8 0, i8* %3
%5 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %4, i8* %3)
%6 = call i32 @strassign(i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.1, i64 0, i64 0), i8* %4)
%7 = call i32 @strassign(i8* getelementptr inbounds ([178 x i8], [178 x i8]* @.str.2, i64 0, i64 0), i8* %3)
%8 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0), i8* %4, i8* %3)
ret i32 0
}