int main() {
  int a[11];
  scanf("%d %d", a + 1, a + 2), printf("%d %d", a[1], a[2]);
  for (*a = 3; *a <= 10; ++*a)
    printf(" %d", a[*a] = (a[*a - 1] + a[*a - 2]) % 10);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x30(%rbp),%rsi
add    $0x4,%rsi
lea    -0x30(%rbp),%rdx
add    $0x8,%rdx
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x2c(%rbp),%esi
mov    -0x28(%rbp),%edx
lea    0xea6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x3,-0x30(%rbp)
cmpl   $0xa,-0x30(%rbp)
jg     11b9 <main+0x99>
mov    -0x30(%rbp),%eax
sub    $0x1,%eax
cltq
mov    -0x30(%rbp,%rax,4),%eax
mov    -0x30(%rbp),%ecx
sub    $0x2,%ecx
movslq %ecx,%rcx
add    -0x30(%rbp,%rcx,4),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
movslq -0x30(%rbp),%rax
mov    %esi,-0x30(%rbp,%rax,4)
lea    0xe5e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1168 <main+0x48>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x30,%rsp
lea    0x4(%rsp),%rsi
lea    0x8(%rsp),%rdx
lea    0xeca(%rip),%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
mov    0x4(%rsp),%esi
mov    0x8(%rsp),%edx
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
movl   $0x3,(%rsp)
mov    $0x3,%eax
lea    0xe9d(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
nop
cltq
mov    -0x8(%rsp,%rax,4),%ecx
add    -0x4(%rsp,%rax,4),%ecx
movslq %ecx,%rsi
imul   $0x66666667,%rsi,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rcx
add    %edx,%ecx
add    %ecx,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %ecx,%esi
mov    %esi,(%rsp,%rax,4)
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    (%rsp),%ecx
lea    0x1(%rcx),%eax
mov    %eax,(%rsp)
cmp    $0xa,%ecx
jl     1170 <main+0x50>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
ret

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

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