#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*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdin;
int zerrendaEskatu(int *);
int /*<<< orphan*/ zerrendaIrauli(int *, int);
int /*<<< orphan*/ zerrendaPantailaratu(int *, int);
int main(int argc, char *argv[]) {
  int zenbat;
  int bektore[50];
  char str[128];
  zenbat = zerrendaEskatu(bektore);
  printf("Zuk emandako emandako honako hau da:\n");
  zerrendaPantailaratu(bektore, zenbat);
  printf("\n\nTori orain zerrenda berbera baina alderantziz:\n");
  zerrendaIrauli(bektore, zenbat);
  zerrendaPantailaratu(bektore, zenbat);
  printf("Sakatu \"return\" amaitzeko .....");
  fgets(str, 128, stdin);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x160,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0xe0(%rbp),%rdi
call   1030 <zerrendaEskatu@plt>
mov    %eax,-0x14(%rbp)
lea    0xe81(%rip),%rdi
call   1040 <printf@plt>
lea    -0xe0(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1060 <zerrendaPantailaratu@plt>
lea    0xe8c(%rip),%rdi
call   1040 <printf@plt>
lea    -0xe0(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1070 <zerrendaIrauli@plt>
lea    -0xe0(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1060 <zerrendaPantailaratu@plt>
lea    0xe94(%rip),%rdi
call   1040 <printf@plt>
lea    -0x160(%rbp),%rdi
mov    0x2e11(%rip),%rax
mov    (%rax),%edx
mov    $0x80,%esi
call   1050 <fgets@plt>
xor    %eax,%eax
add    $0x160,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
sub    $0x148,%rsp
lea    0x80(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <zerrendaEskatu@plt>
mov    %eax,%ebp
lea    0xe9e(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
call   1070 <zerrendaPantailaratu@plt>
lea    0xead(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
call   1080 <zerrendaIrauli@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
call   1070 <zerrendaPantailaratu@plt>
lea    0xe48(%rip),%rdi
call   1050 <printf@plt>
mov    0x2e24(%rip),%rax
mov    (%rax),%edx
mov    %rsp,%rdi
mov    $0x80,%esi
call   1060 <fgets@plt>
xor    %eax,%eax
add    $0x148,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [38 x i8] c"Zuk emandako emandako honako hau da:\0A\00"
@.str.1 = [50 x i8] c"\0A\0ATori orain zerrenda berbera baina alderantziz:\0A\00"
@.str.2 = [32 x i8] c"Sakatu \22return\22 amaitzeko .....\00"
@stdin = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca [50 x i32]
%8 = alloca [128 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = getelementptr inbounds [50 x i32], [50 x i32]* %7, i64 0, i64 0
%10 = call i32 @zerrendaEskatu(i32* %9)
store i32 %10, i32* %6
%11 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%12 = getelementptr inbounds [50 x i32], [50 x i32]* %7, i64 0, i64 0
%13 = load i32, i32* %6
%14 = call i32 @zerrendaPantailaratu(i32* %12, i32 %13)
%15 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.1, i64 0, i64 0))
%16 = getelementptr inbounds [50 x i32], [50 x i32]* %7, i64 0, i64 0
%17 = load i32, i32* %6
%18 = call i32 @zerrendaIrauli(i32* %16, i32 %17)
%19 = getelementptr inbounds [50 x i32], [50 x i32]* %7, i64 0, i64 0
%20 = load i32, i32* %6
%21 = call i32 @zerrendaPantailaratu(i32* %19, i32 %20)
%22 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0))
%23 = getelementptr inbounds [128 x i8], [128 x i8]* %8, i64 0, i64 0
%24 = load i32, i32* @stdin
%25 = call i32 @fgets(i8* %23, i32 128, i32 %24)
ret i32 0
}

LLVM IR (-O2):
@.str.2 = [32 x i8] c"Sakatu \22return\22 amaitzeko .....\00"
@stdin = global i32 0
@str = [37 x i8] c"Zuk emandako emandako honako hau da:\00"
@str.3 = [49 x i8] c"\0A\0ATori orain zerrenda berbera baina alderantziz:\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [50 x i32]
%4 = alloca [128 x i8]
%5 = bitcast [50 x i32]* %3 to i8*
%6 = getelementptr inbounds [128 x i8], [128 x i8]* %4, i64 0, i64 0
%7 = getelementptr inbounds [50 x i32], [50 x i32]* %3, i64 0, i64 0
%8 = call i32 @zerrendaEskatu(i32* %7)
%9 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str, i64 0, i64 0))
%10 = call i32 @zerrendaPantailaratu(i32* %7, i32 %8)
%11 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str.3, i64 0, i64 0))
%12 = call i32 @zerrendaIrauli(i32* %7, i32 %8)
%13 = call i32 @zerrendaPantailaratu(i32* %7, i32 %8)
%14 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0))
%15 = load i32, i32* @stdin
%16 = call i32 @fgets(i8* %6, i32 128, i32 %15)
ret i32 0
}