#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*/ copy_n(char *, char *, int);
int /*<<< orphan*/ printf(char *, char *, char *);
int main() {
  char s1[25] = "fdadfafdaf";
  char s2[25] = "reqtfrtwfgsdgsfgs";
  char s3[25] = "iojkmkljijiojlk";
  copy_n(s1, s2, 15);
  printf("%s\n%s\n", s1, s2);
  copy_n(s3, s1, 15);
  printf("%s\n%s\n", s1, s2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xec7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xec4(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xec2(%rip),%al
mov    %al,-0x8(%rbp)
mov    0xec0(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xebd(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    0xeba(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xeb8(%rip),%al
mov    %al,-0x28(%rbp)
mov    0xeb6(%rip),%rax
mov    %rax,-0x60(%rbp)
mov    0xeb3(%rip),%rax
mov    %rax,-0x58(%rbp)
mov    0xeb0(%rip),%rax
mov    %rax,-0x50(%rbp)
mov    0xeae(%rip),%al
mov    %al,-0x48(%rbp)
lea    -0x20(%rbp),%rdi
lea    -0x40(%rbp),%rsi
mov    $0xf,%edx
call   1030 <copy_n@plt>
lea    -0x20(%rbp),%rsi
lea    -0x40(%rbp),%rdx
lea    0xe8b(%rip),%rdi
call   1040 <printf@plt>
lea    -0x60(%rbp),%rdi
lea    -0x20(%rbp),%rsi
mov    $0xf,%edx
call   1030 <copy_n@plt>
lea    -0x20(%rbp),%rsi
lea    -0x40(%rbp),%rdx
lea    0xe65(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x60,%rsp
movups 0xed9(%rip),%xmm0
movups %xmm0,0x49(%rsp)
movaps 0xec4(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movups 0xee1(%rip),%xmm0
movups %xmm0,0x29(%rsp)
movaps 0xecc(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movups 0xee9(%rip),%xmm0
movups %xmm0,0x9(%rsp)
movaps 0xed4(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0x40(%rsp),%rbx
lea    0x20(%rsp),%r14
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0xf,%edx
call   1030 <copy_n@plt>
lea    0xec8(%rip),%r15
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
call   1040 <printf@plt>
mov    %rsp,%rdi
mov    %rbx,%rsi
mov    $0xf,%edx
call   1030 <copy_n@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@__const.main.s1 = [25 x i8] c"fdadfafdaf\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@__const.main.s2 = [25 x i8] c"reqtfrtwfgsdgsfgs\00\00\00\00\00\00\00\00"
@__const.main.s3 = [25 x i8] c"iojkmkljijiojlk\00\00\00\00\00\00\00\00\00\00"
@.str = [7 x i8] c"%s\0A%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [25 x i8]
%3 = alloca [25 x i8]
%4 = alloca [25 x i8]
store i32 0, i32* %1
%5 = bitcast [25 x i8]* %2 to i8*
%6 = bitcast [25 x i8]* %3 to i8*
%7 = bitcast [25 x i8]* %4 to i8*
%8 = getelementptr inbounds [25 x i8], [25 x i8]* %2, i64 0, i64 0
%9 = getelementptr inbounds [25 x i8], [25 x i8]* %3, i64 0, i64 0
%10 = call i32 @copy_n(i8* %8, i8* %9, i32 15)
%11 = getelementptr inbounds [25 x i8], [25 x i8]* %2, i64 0, i64 0
%12 = getelementptr inbounds [25 x i8], [25 x i8]* %3, i64 0, i64 0
%13 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %11, i8* %12)
%14 = getelementptr inbounds [25 x i8], [25 x i8]* %4, i64 0, i64 0
%15 = getelementptr inbounds [25 x i8], [25 x i8]* %2, i64 0, i64 0
%16 = call i32 @copy_n(i8* %14, i8* %15, i32 15)
%17 = getelementptr inbounds [25 x i8], [25 x i8]* %2, i64 0, i64 0
%18 = getelementptr inbounds [25 x i8], [25 x i8]* %3, i64 0, i64 0
%19 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %17, i8* %18)
ret i32 0
}

LLVM IR (-O2):
@__const.main.s1 = [25 x i8] c"fdadfafdaf\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
@__const.main.s2 = [25 x i8] c"reqtfrtwfgsdgsfgs\00\00\00\00\00\00\00\00"
@__const.main.s3 = [25 x i8] c"iojkmkljijiojlk\00\00\00\00\00\00\00\00\00\00"
@.str = [7 x i8] c"%s\0A%s\0A\00"
define i32 @main() {
%1 = alloca [25 x i8]
%2 = alloca [25 x i8]
%3 = alloca [25 x i8]
%4 = getelementptr inbounds [25 x i8], [25 x i8]* %1, i64 0, i64 0
%5 = getelementptr inbounds [25 x i8], [25 x i8]* %2, i64 0, i64 0
%6 = getelementptr inbounds [25 x i8], [25 x i8]* %3, i64 0, i64 0
%7 = call i32 @copy_n(i8* %4, i8* %5, i32 15)
%8 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %4, i8* %5)
%9 = call i32 @copy_n(i8* %6, i8* %4, i32 15)
%10 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %4, i8* %5)
ret i32 0
}