#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*/ strcpy(char *, char *);
int main(int argc, char **argv) {
  char buf[3][16];
  strcpy(buf[0], "0123456789abcdef");
  strcpy(buf[1], "0123456789abcdef");
  strcpy(buf[2], buf[0]);
  strcpy(buf[2], buf[1]);
  printf("%s\n", buf[0]);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x40(%rbp),%rdi
lea    0xec6(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0x40(%rbp),%rdi
add    $0x10,%rdi
lea    0xeb2(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0x40(%rbp),%rdi
add    $0x20,%rdi
lea    -0x40(%rbp),%rsi
call   1030 <strcpy@plt>
lea    -0x40(%rbp),%rdi
add    $0x20,%rdi
lea    -0x40(%rbp),%rsi
add    $0x10,%rsi
call   1030 <strcpy@plt>
lea    -0x40(%rbp),%rsi
lea    0xe8d(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x30,%rsp
lea    0xed0(%rip),%rbx
mov    %rsp,%r14
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <strcpy@plt>
lea    0x10(%rsp),%r15
mov    %r15,%rdi
mov    %rbx,%rsi
call   1030 <strcpy@plt>
lea    0x20(%rsp),%rbx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1030 <strcpy@plt>
lea    0xea1(%rip),%rdi
mov    %r14,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [17 x i8] c"0123456789abcdef\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca [3 x [16 x i8]]
store i32 %0, i32* %3
store i8** %1, i8*** %4
%6 = getelementptr inbounds [3 x [16 x i8]], [3 x [16 x i8]]* %5, i64 0, i64 0
%7 = getelementptr inbounds [16 x i8], [16 x i8]* %6, i64 0, i64 0
%8 = call i32 @strcpy(i8* %7, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%9 = getelementptr inbounds [3 x [16 x i8]], [3 x [16 x i8]]* %5, i64 0, i64 1
%10 = getelementptr inbounds [16 x i8], [16 x i8]* %9, i64 0, i64 0
%11 = call i32 @strcpy(i8* %10, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%12 = getelementptr inbounds [3 x [16 x i8]], [3 x [16 x i8]]* %5, i64 0, i64 2
%13 = getelementptr inbounds [16 x i8], [16 x i8]* %12, i64 0, i64 0
%14 = getelementptr inbounds [3 x [16 x i8]], [3 x [16 x i8]]* %5, i64 0, i64 0
%15 = getelementptr inbounds [16 x i8], [16 x i8]* %14, i64 0, i64 0
%16 = call i32 @strcpy(i8* %13, i8* %15)
%17 = getelementptr inbounds [3 x [16 x i8]], [3 x [16 x i8]]* %5, i64 0, i64 2
%18 = getelementptr inbounds [16 x i8], [16 x i8]* %17, i64 0, i64 0
%19 = getelementptr inbounds [3 x [16 x i8]], [3 x [16 x i8]]* %5, i64 0, i64 1
%20 = getelementptr inbounds [16 x i8], [16 x i8]* %19, i64 0, i64 0
%21 = call i32 @strcpy(i8* %18, i8* %20)
%22 = getelementptr inbounds [3 x [16 x i8]], [3 x [16 x i8]]* %5, i64 0, i64 0
%23 = getelementptr inbounds [16 x i8], [16 x i8]* %22, i64 0, i64 0
%24 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %23)
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"0123456789abcdef\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [3 x [16 x i8]]
%4 = getelementptr inbounds [3 x [16 x i8]], [3 x [16 x i8]]* %3, i64 0, i64 0, i64 0
%5 = call i32 @strcpy(i8* %4, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%6 = getelementptr inbounds [3 x [16 x i8]], [3 x [16 x i8]]* %3, i64 0, i64 1, i64 0
%7 = call i32 @strcpy(i8* %6, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%8 = getelementptr inbounds [3 x [16 x i8]], [3 x [16 x i8]]* %3, i64 0, i64 2, i64 0
%9 = call i32 @strcpy(i8* %8, i8* %4)
%10 = call i32 @strcpy(i8* %8, i8* %6)
%11 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 0
}