#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 /*<<< orphan*/ scanf(char *, int *, int *, int *, int *, int *, int *);
int main() {
  int n = 8;
  int t[n];
  printf("Podaj %d liczb całkowitych:\n", n);
  scanf("%d, %d, %d, %d, %d, %d", &t[0], &t[1], &t[2], &t[3], &t[4], &t[5]);
  printf("Od końca: %d, %d, %d, %d, %d, %d\n", t[5], t[4], t[3], t[2], t[1],
         t[0]);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x8,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x10(%rbp)
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x20(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x18(%rbp)
mov    -0x4(%rbp),%esi
lea    0xea0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x20(%rbp),%rsi
mov    %rsi,%rdx
add    $0x4,%rdx
mov    %rsi,%rcx
add    $0x8,%rcx
mov    %rsi,%r8
add    $0xc,%r8
mov    %rsi,%r9
add    $0x10,%r9
mov    %rsi,%rax
add    $0x14,%rax
lea    0xe89(%rip),%rdi
sub    $0x10,%rsp
mov    %rax,(%rsp)
call   1040 <scanf@plt>
add    $0x10,%rsp
mov    -0x20(%rbp),%rax
mov    0x14(%rax),%esi
mov    0x10(%rax),%edx
mov    0xc(%rax),%ecx
mov    0x8(%rax),%r8d
mov    0x4(%rax),%r9d
mov    (%rax),%eax
lea    0xe71(%rip),%rdi
sub    $0x10,%rsp
mov    %eax,(%rsp)
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
mov    -0x10(%rbp),%rax
mov    %rax,%rsp
xor    %eax,%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x38,%rsp
lea    0xed5(%rip),%rdi
mov    $0x8,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x14(%rsp),%rdx
lea    0x18(%rsp),%rcx
lea    0x1c(%rsp),%r8
lea    0x20(%rsp),%r9
lea    0x24(%rsp),%rax
mov    %rax,(%rsp)
lea    0xec3(%rip),%rdi
lea    0x10(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x24(%rsp),%esi
mov    0x20(%rsp),%edx
mov    0x1c(%rsp),%ecx
mov    0x18(%rsp),%r8d
mov    0x10(%rsp),%eax
mov    0x14(%rsp),%r9d
mov    %eax,(%rsp)
lea    0xeac(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x38,%rsp
ret

LLVM IR (-O0):
@.str = [30 x i8] c"Podaj %d liczb ca\C5\82kowitych:\0A\00"
@.str.1 = [23 x i8] c"%d, %d, %d, %d, %d, %d\00"
@.str.2 = [35 x i8] c"Od ko\C5\84ca: %d, %d, %d, %d, %d, %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i64
store i32 8, i32* %1
%4 = load i32, i32* %1
%5 = zext i32 %4 to i64
%6 = call i8* @llvm.stacksave()
store i8* %6, i8** %2
%7 = alloca i32, i64 %5
store i64 %5, i64* %3
%8 = load i32, i32* %1
%9 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = getelementptr inbounds i32, i32* %7, i64 0
%11 = getelementptr inbounds i32, i32* %7, i64 1
%12 = getelementptr inbounds i32, i32* %7, i64 2
%13 = getelementptr inbounds i32, i32* %7, i64 3
%14 = getelementptr inbounds i32, i32* %7, i64 4
%15 = getelementptr inbounds i32, i32* %7, i64 5
%16 = call i32 @scanf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i32* %10, i32* %11, i32* %12, i32* %13, i32* %14, i32* %15)
%17 = getelementptr inbounds i32, i32* %7, i64 5
%18 = load i32, i32* %17
%19 = getelementptr inbounds i32, i32* %7, i64 4
%20 = load i32, i32* %19
%21 = getelementptr inbounds i32, i32* %7, i64 3
%22 = load i32, i32* %21
%23 = getelementptr inbounds i32, i32* %7, i64 2
%24 = load i32, i32* %23
%25 = getelementptr inbounds i32, i32* %7, i64 1
%26 = load i32, i32* %25
%27 = getelementptr inbounds i32, i32* %7, i64 0
%28 = load i32, i32* %27
%29 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0), i32 %18, i32 %20, i32 %22, i32 %24, i32 %26, i32 %28)
%30 = load i8*, i8** %2
ret i32 0
}

LLVM IR (-O2):
@.str = [30 x i8] c"Podaj %d liczb ca\C5\82kowitych:\0A\00"
@.str.1 = [23 x i8] c"%d, %d, %d, %d, %d, %d\00"
@.str.2 = [35 x i8] c"Od ko\C5\84ca: %d, %d, %d, %d, %d, %d\0A\00"
define i32 @main() {
%1 = alloca [8 x i32]
%2 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 0, i64 0
%3 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32 8)
%4 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 0, i64 1
%5 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 0, i64 2
%6 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 0, i64 3
%7 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 0, i64 4
%8 = getelementptr inbounds [8 x i32], [8 x i32]* %1, i64 0, i64 5
%9 = call i32 @scanf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i32* %2, i32* %4, i32* %5, i32* %6, i32* %7, i32* %8)
%10 = load i32, i32* %8
%11 = load i32, i32* %7
%12 = load i32, i32* %6
%13 = load i32, i32* %5
%14 = load i32, i32* %4
%15 = load i32, i32* %2
%16 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0), i32 %10, i32 %11, i32 %12, i32 %13, i32 %14, i32 %15)
ret i32 0
}