#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 *, int, int);
int /*<<< orphan*/ puts(char *);
int main(void) {
  int x[10] = {
      1, 2, 3, 4, 5, 6, 7, 8,
  };
  int y[10];
  register int *ptrx, *ptry;
  for (int w = 0; w < 10; w++)
    printf("x-%d\t\ty-%d\n", x[w], y[w]);
  for (ptrx = x, ptry = y; ptrx < &x[10]; *ptry++ = *ptrx++)
    ;
  puts("\n\n");
  for (int w = 0; w < 10; w++)
    printf("x-%d\t\ty-%d\n", x[w], y[w]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x30(%rbp),%rdi
lea    0xeb3(%rip),%rsi
mov    $0x28,%edx
call   1050 <memcpy@plt>
movl   $0x0,-0x74(%rbp)
cmpl   $0xa,-0x74(%rbp)
jge    1192 <main+0x62>
movslq -0x74(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%esi
movslq -0x74(%rbp),%rax
mov    -0x60(%rbp,%rax,4),%edx
lea    0xea9(%rip),%rdi
call   1040 <printf@plt>
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    115e <main+0x2e>
lea    -0x30(%rbp),%rax
mov    %rax,-0x68(%rbp)
lea    -0x60(%rbp),%rax
mov    %rax,-0x70(%rbp)
mov    -0x68(%rbp),%rax
lea    -0x30(%rbp),%rcx
add    $0x28,%rcx
cmp    %rcx,%rax
jae    11e3 <main+0xb3>
jmp    11bc <main+0x8c>
mov    -0x68(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x68(%rbp)
mov    (%rax),%ecx
mov    -0x70(%rbp),%rax
mov    %rax,%rdx
add    $0x4,%rdx
mov    %rdx,-0x70(%rbp)
mov    %ecx,(%rax)
jmp    11a2 <main+0x72>
lea    0xe4a(%rip),%rdi
call   1030 <puts@plt>
movl   $0x0,-0x78(%rbp)
cmpl   $0xa,-0x78(%rbp)
jge    122a <main+0xfa>
movslq -0x78(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%esi
movslq -0x78(%rbp),%rax
mov    -0x60(%rbp,%rax,4),%edx
lea    0xe11(%rip),%rdi
call   1040 <printf@plt>
mov    -0x78(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x78(%rbp)
jmp    11f6 <main+0xc6>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x60,%rsp
mov    0xee4(%rip),%rax
mov    %rax,0x20(%rsp)
movaps 0xec8(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xeac(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0xec9(%rip),%rbx
mov    %rbx,%rdi
mov    $0x1,%esi
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x6,%esi
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x7,%esi
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x8,%esi
call   1040 <printf@plt>
mov    %rbx,%rdi
xor    %esi,%esi
call   1040 <printf@plt>
mov    %rbx,%rdi
xor    %esi,%esi
call   1040 <printf@plt>
lea    0x28(%rsp),%rax
lea    0x4(%rsp),%rcx
cmp    %rcx,%rax
cmova  %rax,%rcx
mov    %rsp,%rsi
mov    %rsi,%rax
not    %rax
lea    (%rcx,%rax,1),%rdx
add    $0x4,%rdx
and    $0xfffffffffffffffc,%rdx
lea    0x30(%rsp),%rdi
call   1050 <memcpy@plt>
lea    0xe22(%rip),%rdi
call   1030 <puts@plt>
mov    (%rsp),%esi
mov    0x30(%rsp),%edx
mov    %rbx,%rdi
call   1040 <printf@plt>
mov    0x4(%rsp),%esi
mov    0x34(%rsp),%edx
mov    %rbx,%rdi
call   1040 <printf@plt>
mov    0x8(%rsp),%esi
mov    0x38(%rsp),%edx
mov    %rbx,%rdi
call   1040 <printf@plt>
mov    0xc(%rsp),%esi
mov    0x3c(%rsp),%edx
mov    %rbx,%rdi
call   1040 <printf@plt>
mov    0x10(%rsp),%esi
mov    0x40(%rsp),%edx
mov    %rbx,%rdi
call   1040 <printf@plt>
mov    0x14(%rsp),%esi
mov    0x44(%rsp),%edx
mov    %rbx,%rdi
call   1040 <printf@plt>
mov    0x18(%rsp),%esi
mov    0x48(%rsp),%edx
mov    %rbx,%rdi
call   1040 <printf@plt>
mov    0x1c(%rsp),%esi
mov    0x4c(%rsp),%edx
mov    %rbx,%rdi
call   1040 <printf@plt>
mov    0x20(%rsp),%esi
mov    0x50(%rsp),%edx
mov    %rbx,%rdi
call   1040 <printf@plt>
mov    0x24(%rsp),%esi
mov    0x54(%rsp),%edx
mov    %rbx,%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.x = [10 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 0, i32 0]
@.str = [12 x i8] c"x-%d\09\09y-%d\0A\00"
@.str.1 = [3 x i8] c"\0A\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x i32]
%3 = alloca [10 x i32]
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %1
%8 = bitcast [10 x i32]* %2 to i8*
store i32 0, i32* %6
br label %9
9: ; preds = %22, %0
%10 = load i32, i32* %6
%11 = icmp slt i32 %10, 10
br i1 %11, label %12, label %25
12: ; preds = %9
%13 = load i32, i32* %6
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 %14
%16 = load i32, i32* %15
%17 = load i32, i32* %6
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 %18
%20 = load i32, i32* %19
%21 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %16, i32 %20)
br label %22
22: ; preds = %12
%23 = load i32, i32* %6
%24 = add nsw i32 %23, 1
store i32 %24, i32* %6
br label %9
25: ; preds = %9
%26 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
store i32* %26, i32** %4
%27 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 0
store i32* %27, i32** %5
br label %28
28: ; preds = %33, %25
%29 = load i32*, i32** %4
%30 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 10
%31 = icmp ult i32* %29, %30
br i1 %31, label %32, label %39
32: ; preds = %28
br label %33
33: ; preds = %32
%34 = load i32*, i32** %4
%35 = getelementptr inbounds i32, i32* %34, i32 1
store i32* %35, i32** %4
%36 = load i32, i32* %34
%37 = load i32*, i32** %5
%38 = getelementptr inbounds i32, i32* %37, i32 1
store i32* %38, i32** %5
store i32 %36, i32* %37
br label %28
39: ; preds = %28
%40 = call i32 @puts(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %7
br label %41
41: ; preds = %54, %39
%42 = load i32, i32* %7
%43 = icmp slt i32 %42, 10
br i1 %43, label %44, label %57
44: ; preds = %41
%45 = load i32, i32* %7
%46 = sext i32 %45 to i64
%47 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 %46
%48 = load i32, i32* %47
%49 = load i32, i32* %7
%50 = sext i32 %49 to i64
%51 = getelementptr inbounds [10 x i32], [10 x i32]* %3, i64 0, i64 %50
%52 = load i32, i32* %51
%53 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %48, i32 %52)
br label %54
54: ; preds = %44
%55 = load i32, i32* %7
%56 = add nsw i32 %55, 1
store i32 %56, i32* %7
br label %41
57: ; preds = %41
ret i32 0
}

LLVM IR (-O2):
@__const.main.x = [10 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 0, i32 0]
@.str = [12 x i8] c"x-%d\09\09y-%d\0A\00"
@.str.1 = [3 x i8] c"\0A\0A\00"
define i32 @main() {
%1 = alloca [10 x i32]
%2 = bitcast [10 x i32]* %1 to i8*
%3 = ptrtoint [10 x i32]* %1 to i64
%4 = alloca [10 x i32]
%5 = bitcast [10 x i32]* %4 to i8*
%6 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%7 = getelementptr inbounds [10 x i32], [10 x i32]* %4, i64 0, i64 0
%8 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 1, i32 undef)
%9 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 1
%10 = getelementptr inbounds [10 x i32], [10 x i32]* %4, i64 0, i64 1
%11 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 2, i32 undef)
%12 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 2
%13 = getelementptr inbounds [10 x i32], [10 x i32]* %4, i64 0, i64 2
%14 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 3, i32 undef)
%15 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 3
%16 = getelementptr inbounds [10 x i32], [10 x i32]* %4, i64 0, i64 3
%17 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 4, i32 undef)
%18 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 4
%19 = getelementptr inbounds [10 x i32], [10 x i32]* %4, i64 0, i64 4
%20 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 5, i32 undef)
%21 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 5
%22 = getelementptr inbounds [10 x i32], [10 x i32]* %4, i64 0, i64 5
%23 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 6, i32 undef)
%24 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 6
%25 = getelementptr inbounds [10 x i32], [10 x i32]* %4, i64 0, i64 6
%26 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 7, i32 undef)
%27 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 7
%28 = getelementptr inbounds [10 x i32], [10 x i32]* %4, i64 0, i64 7
%29 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 8, i32 undef)
%30 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 8
%31 = getelementptr inbounds [10 x i32], [10 x i32]* %4, i64 0, i64 8
%32 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 0, i32 undef)
%33 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 9
%34 = getelementptr inbounds [10 x i32], [10 x i32]* %4, i64 0, i64 9
%35 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 0, i32 undef)
%36 = add i64 %3, 40
%37 = or i64 %3, 4
%38 = call i64 @llvm.umax.i64(i64 %36, i64 %37)
%39 = xor i64 %3, -1
%40 = add i64 %38, %39
%41 = add i64 %40, 4
%42 = and i64 %41, -4
%43 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%44 = load i32, i32* %6
%45 = load i32, i32* %7
%46 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %44, i32 %45)
%47 = load i32, i32* %9
%48 = load i32, i32* %10
%49 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %47, i32 %48)
%50 = load i32, i32* %12
%51 = load i32, i32* %13
%52 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %50, i32 %51)
%53 = load i32, i32* %15
%54 = load i32, i32* %16
%55 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %53, i32 %54)
%56 = load i32, i32* %18
%57 = load i32, i32* %19
%58 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %56, i32 %57)
%59 = load i32, i32* %21
%60 = load i32, i32* %22
%61 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %59, i32 %60)
%62 = load i32, i32* %24
%63 = load i32, i32* %25
%64 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %62, i32 %63)
%65 = load i32, i32* %27
%66 = load i32, i32* %28
%67 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %65, i32 %66)
%68 = load i32, i32* %30
%69 = load i32, i32* %31
%70 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %68, i32 %69)
%71 = load i32, i32* %33
%72 = load i32, i32* %34
%73 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %71, i32 %72)
ret i32 0
}