#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*/ Move(int *, int, int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *, ...);
int main() {
  int A[100] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
  int n, m = 3;
  scanf("%d%d", &n, &m);
  for (int i = 0; i < n; i++) {
    scanf("%d", A + i);
  }
  Move(A, n, m);
  for (int i = 0; i < n; i++) {
    printf("%d ", A[i]);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1b0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x1a0(%rbp),%rdi
lea    0xea0(%rip),%rsi
mov    $0x190,%edx
call   1050 <memcpy@plt>
movl   $0x3,-0x1a8(%rbp)
lea    0x1015(%rip),%rdi
lea    -0x1a4(%rbp),%rsi
lea    -0x1a8(%rbp),%rdx
mov    $0x0,%al
call   1060 <scanf@plt>
movl   $0x0,-0x1ac(%rbp)
mov    -0x1ac(%rbp),%eax
cmp    -0x1a4(%rbp),%eax
jge    11e3 <main+0xa3>
lea    -0x1a0(%rbp),%rsi
movslq -0x1ac(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
lea    0xfca(%rip),%rdi
mov    $0x0,%al
call   1060 <scanf@plt>
mov    -0x1ac(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1ac(%rbp)
jmp    119a <main+0x5a>
lea    -0x1a0(%rbp),%rdi
mov    -0x1a4(%rbp),%esi
mov    -0x1a8(%rbp),%edx
call   1030 <Move@plt>
movl   $0x0,-0x1b0(%rbp)
mov    -0x1b0(%rbp),%eax
cmp    -0x1a4(%rbp),%eax
jge    1245 <main+0x105>
movslq -0x1b0(%rbp),%rax
mov    -0x1a0(%rbp,%rax,4),%esi
lea    0xf69(%rip),%rdi
call   1040 <printf@plt>
mov    -0x1b0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1b0(%rbp)
jmp    1205 <main+0xc5>
xor    %eax,%eax
add    $0x1b0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x1a0,%rsp
lea    0xead(%rip),%rsi
lea    0x10(%rsp),%r15
mov    $0x190,%edx
mov    %r15,%rdi
call   1050 <memcpy@plt>
movl   $0x3,0xc(%rsp)
lea    0x101c(%rip),%rdi
lea    0x8(%rsp),%rsi
lea    0xc(%rsp),%rdx
xor    %eax,%eax
call   1060 <scanf@plt>
mov    0x8(%rsp),%esi
test   %esi,%esi
jle    11bf <main+0x7f>
lea    0xffe(%rip),%r14
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
add    $0x1,%rbx
movslq 0x8(%rsp),%rsi
add    $0x4,%r15
cmp    %rsi,%rbx
jl     11a0 <main+0x60>
mov    0xc(%rsp),%edx
lea    0x10(%rsp),%rdi
call   1030 <Move@plt>
cmpl   $0x0,0x8(%rsp)
jle    11fa <main+0xba>
xor    %ebx,%ebx
lea    0xfb8(%rip),%r14
nopl   (%rax)
mov    0x10(%rsp,%rbx,4),%esi
mov    %r14,%rdi
call   1040 <printf@plt>
add    $0x1,%rbx
movslq 0x8(%rsp),%rax
cmp    %rax,%rbx
jl     11e0 <main+0xa0>
xor    %eax,%eax
add    $0x1a0,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@__const.main.A = <{ [10 x i32], [90 x i32] }> <{ [10 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10], [90 x i32] zeroinitializer }>
@.str = [5 x i8] c"%d%d\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [4 x i8] c"%d \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [100 x i32]
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
%7 = bitcast [100 x i32]* %2 to i8*
store i32 3, i32* %4
%8 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %3, i32* %4)
store i32 0, i32* %5
br label %9
9: ; preds = %19, %0
%10 = load i32, i32* %5
%11 = load i32, i32* %3
%12 = icmp slt i32 %10, %11
br i1 %12, label %13, label %22
13: ; preds = %9
%14 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 0
%15 = load i32, i32* %5
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i32, i32* %14, i64 %16
%18 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %17)
br label %19
19: ; preds = %13
%20 = load i32, i32* %5
%21 = add nsw i32 %20, 1
store i32 %21, i32* %5
br label %9
22: ; preds = %9
%23 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 0
%24 = load i32, i32* %3
%25 = load i32, i32* %4
%26 = call i32 @Move(i32* %23, i32 %24, i32 %25)
store i32 0, i32* %6
br label %27
27: ; preds = %37, %22
%28 = load i32, i32* %6
%29 = load i32, i32* %3
%30 = icmp slt i32 %28, %29
br i1 %30, label %31, label %40
31: ; preds = %27
%32 = load i32, i32* %6
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 %33
%35 = load i32, i32* %34
%36 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %35)
br label %37
37: ; preds = %31
%38 = load i32, i32* %6
%39 = add nsw i32 %38, 1
store i32 %39, i32* %6
br label %27
40: ; preds = %27
ret i32 0
}

LLVM IR (-O2):
@__const.main.A = <{ [10 x i32], [90 x i32] }> <{ [10 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 10], [90 x i32] zeroinitializer }>
@.str = [5 x i8] c"%d%d\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [4 x i8] c"%d \00"
define i32 @main() {
%1 = alloca [100 x i32]
%2 = alloca i32
%3 = alloca i32
%4 = bitcast [100 x i32]* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
store i32 3, i32* %3
%7 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* %2, i32* %3)
%8 = load i32, i32* %2
%9 = icmp sgt i32 %8, 0
br i1 %9, label %17, label %10
10: ; preds = %17, %0
%11 = phi i32 [ %8, %0 ], [ %22, %17 ]
%12 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 0
%13 = load i32, i32* %3
%14 = call i32 @Move(i32* %12, i32 %11, i32 %13)
%15 = load i32, i32* %2
%16 = icmp sgt i32 %15, 0
br i1 %16, label %26, label %25
17: ; preds = %0, %17
%18 = phi i64 [ %21, %17 ], [ 0, %0 ]
%19 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 %18
%20 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %19)
%21 = add nuw nsw i64 %18, 1
%22 = load i32, i32* %2
%23 = sext i32 %22 to i64
%24 = icmp slt i64 %21, %23
br i1 %24, label %17, label %10
25: ; preds = %26, %10
ret i32 0
26: ; preds = %10, %26
%27 = phi i64 [ %31, %26 ], [ 0, %10 ]
%28 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 %27
%29 = load i32, i32* %28
%30 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %29)
%31 = add nuw nsw i64 %27, 1
%32 = load i32, i32* %2
%33 = sext i32 %32 to i64
%34 = icmp slt i64 %31, %33
br i1 %34, label %26, label %25
}