#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*/ cargar(int *, int);
int /*<<< orphan*/ concatenacion(int *, int *, int *);
int /*<<< orphan*/ imprimir(int *, int *, int *);
int /*<<< orphan*/ imprimirm(int **, int **);
int /*<<< orphan*/ intercalar(int *, int *, int *);
int /*<<< orphan*/ matriz(int **, int);
int /*<<< orphan*/ ordenado(int *, int *);
int /*<<< orphan*/ paresA(int *, int *);
int /*<<< orphan*/ posicion(int *, int *, int *);
int /*<<< orphan*/ reves(int *);
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/);
void main() {
  int A[30], B[30], C[30], D[60], E[30], F[30], G[30];
  int M1[15][15], M2[15][15];
  srand(time(0));
  cargar(A, 1);
  cargar(B, 2);
  cargar(C, 3);
  matriz(M1, 1);
  matriz(M2, 2);
  imprimir(A, B, C);
  imprimirm(M1, M2);
  reves(A);
  intercalar(A, B, D);
  ordenado(A, A);
  posicion(B, C, E);
  paresA(A, F);
  concatenacion(B, C, G);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb10,%rsp
xor    %edi,%edi
call   1090 <time@plt>
mov    %eax,%edi
call   1070 <srand@plt>
lea    -0x80(%rbp),%rdi
mov    $0x1,%esi
call   10e0 <cargar@plt>
lea    -0x100(%rbp),%rdi
mov    $0x2,%esi
call   10e0 <cargar@plt>
lea    -0x180(%rbp),%rdi
mov    $0x3,%esi
call   10e0 <cargar@plt>
lea    -0x780(%rbp),%rdi
mov    $0x1,%esi
call   1080 <matriz@plt>
lea    -0xb10(%rbp),%rdi
mov    $0x2,%esi
call   1080 <matriz@plt>
lea    -0x80(%rbp),%rdi
lea    -0x100(%rbp),%rsi
lea    -0x180(%rbp),%rdx
call   1060 <imprimir@plt>
lea    -0x780(%rbp),%rdi
lea    -0xb10(%rbp),%rsi
call   10b0 <imprimirm@plt>
lea    -0x80(%rbp),%rdi
call   10d0 <reves@plt>
lea    -0x80(%rbp),%rdi
lea    -0x100(%rbp),%rsi
lea    -0x270(%rbp),%rdx
call   1040 <intercalar@plt>
lea    -0x80(%rbp),%rdi
lea    -0x80(%rbp),%rsi
call   1030 <ordenado@plt>
lea    -0x100(%rbp),%rdi
lea    -0x180(%rbp),%rsi
lea    -0x2f0(%rbp),%rdx
call   10c0 <posicion@plt>
lea    -0x80(%rbp),%rdi
lea    -0x370(%rbp),%rsi
call   10a0 <paresA@plt>
lea    -0x100(%rbp),%rdi
lea    -0x180(%rbp),%rsi
lea    -0x3f0(%rbp),%rdx
call   1050 <concatenacion@plt>
add    $0xb10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xb10,%rsp
xor    %edi,%edi
call   1090 <time@plt>
mov    %eax,%edi
call   1070 <srand@plt>
lea    0x280(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x1,%esi
call   10e0 <cargar@plt>
lea    0x200(%rsp),%r14
mov    %r14,%rdi
mov    $0x2,%esi
call   10e0 <cargar@plt>
lea    0x180(%rsp),%r15
mov    %r15,%rdi
mov    $0x3,%esi
call   10e0 <cargar@plt>
lea    0x780(%rsp),%r12
mov    %r12,%rdi
mov    $0x1,%esi
call   1080 <matriz@plt>
lea    0x3f0(%rsp),%r13
mov    %r13,%rdi
mov    $0x2,%esi
call   1080 <matriz@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1060 <imprimir@plt>
mov    %r12,%rdi
mov    %r13,%rsi
call   10b0 <imprimirm@plt>
mov    %rbx,%rdi
call   10d0 <reves@plt>
lea    0x300(%rsp),%rdx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <intercalar@plt>
mov    %rbx,%rdi
mov    %rbx,%rsi
call   1030 <ordenado@plt>
lea    0x100(%rsp),%rdx
mov    %r14,%rdi
mov    %r15,%rsi
call   10c0 <posicion@plt>
lea    0x80(%rsp),%rsi
mov    %rbx,%rdi
call   10a0 <paresA@plt>
mov    %rsp,%rdx
mov    %r14,%rdi
mov    %r15,%rsi
call   1050 <concatenacion@plt>
add    $0xb10,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @main() {
%1 = alloca [30 x i32]
%2 = alloca [30 x i32]
%3 = alloca [30 x i32]
%4 = alloca [60 x i32]
%5 = alloca [30 x i32]
%6 = alloca [30 x i32]
%7 = alloca [30 x i32]
%8 = alloca [15 x [15 x i32]]
%9 = alloca [15 x [15 x i32]]
%10 = call i32 @time(i32 0)
%11 = call i32 @srand(i32 %10)
%12 = getelementptr inbounds [30 x i32], [30 x i32]* %1, i64 0, i64 0
%13 = call i32 @cargar(i32* %12, i32 1)
%14 = getelementptr inbounds [30 x i32], [30 x i32]* %2, i64 0, i64 0
%15 = call i32 @cargar(i32* %14, i32 2)
%16 = getelementptr inbounds [30 x i32], [30 x i32]* %3, i64 0, i64 0
%17 = call i32 @cargar(i32* %16, i32 3)
%18 = getelementptr inbounds [15 x [15 x i32]], [15 x [15 x i32]]* %8, i64 0, i64 0
%19 = bitcast [15 x i32]* %18 to i32**
%20 = call i32 @matriz(i32** %19, i32 1)
%21 = getelementptr inbounds [15 x [15 x i32]], [15 x [15 x i32]]* %9, i64 0, i64 0
%22 = bitcast [15 x i32]* %21 to i32**
%23 = call i32 @matriz(i32** %22, i32 2)
%24 = getelementptr inbounds [30 x i32], [30 x i32]* %1, i64 0, i64 0
%25 = getelementptr inbounds [30 x i32], [30 x i32]* %2, i64 0, i64 0
%26 = getelementptr inbounds [30 x i32], [30 x i32]* %3, i64 0, i64 0
%27 = call i32 @imprimir(i32* %24, i32* %25, i32* %26)
%28 = getelementptr inbounds [15 x [15 x i32]], [15 x [15 x i32]]* %8, i64 0, i64 0
%29 = bitcast [15 x i32]* %28 to i32**
%30 = getelementptr inbounds [15 x [15 x i32]], [15 x [15 x i32]]* %9, i64 0, i64 0
%31 = bitcast [15 x i32]* %30 to i32**
%32 = call i32 @imprimirm(i32** %29, i32** %31)
%33 = getelementptr inbounds [30 x i32], [30 x i32]* %1, i64 0, i64 0
%34 = call i32 @reves(i32* %33)
%35 = getelementptr inbounds [30 x i32], [30 x i32]* %1, i64 0, i64 0
%36 = getelementptr inbounds [30 x i32], [30 x i32]* %2, i64 0, i64 0
%37 = getelementptr inbounds [60 x i32], [60 x i32]* %4, i64 0, i64 0
%38 = call i32 @intercalar(i32* %35, i32* %36, i32* %37)
%39 = getelementptr inbounds [30 x i32], [30 x i32]* %1, i64 0, i64 0
%40 = getelementptr inbounds [30 x i32], [30 x i32]* %1, i64 0, i64 0
%41 = call i32 @ordenado(i32* %39, i32* %40)
%42 = getelementptr inbounds [30 x i32], [30 x i32]* %2, i64 0, i64 0
%43 = getelementptr inbounds [30 x i32], [30 x i32]* %3, i64 0, i64 0
%44 = getelementptr inbounds [30 x i32], [30 x i32]* %5, i64 0, i64 0
%45 = call i32 @posicion(i32* %42, i32* %43, i32* %44)
%46 = getelementptr inbounds [30 x i32], [30 x i32]* %1, i64 0, i64 0
%47 = getelementptr inbounds [30 x i32], [30 x i32]* %6, i64 0, i64 0
%48 = call i32 @paresA(i32* %46, i32* %47)
%49 = getelementptr inbounds [30 x i32], [30 x i32]* %2, i64 0, i64 0
%50 = getelementptr inbounds [30 x i32], [30 x i32]* %3, i64 0, i64 0
%51 = getelementptr inbounds [30 x i32], [30 x i32]* %7, i64 0, i64 0
%52 = call i32 @concatenacion(i32* %49, i32* %50, i32* %51)
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = alloca [30 x i32]
%2 = alloca [30 x i32]
%3 = alloca [30 x i32]
%4 = alloca [60 x i32]
%5 = alloca [30 x i32]
%6 = alloca [30 x i32]
%7 = alloca [30 x i32]
%8 = alloca [15 x [15 x i32]]
%9 = alloca [15 x [15 x i32]]
%10 = bitcast [30 x i32]* %1 to i8*
%11 = bitcast [30 x i32]* %2 to i8*
%12 = bitcast [30 x i32]* %3 to i8*
%13 = bitcast [60 x i32]* %4 to i8*
%14 = bitcast [30 x i32]* %5 to i8*
%15 = bitcast [30 x i32]* %6 to i8*
%16 = bitcast [30 x i32]* %7 to i8*
%17 = bitcast [15 x [15 x i32]]* %8 to i8*
%18 = bitcast [15 x [15 x i32]]* %9 to i8*
%19 = tail call i32 @time(i32 0)
%20 = tail call i32 @srand(i32 %19)
%21 = getelementptr inbounds [30 x i32], [30 x i32]* %1, i64 0, i64 0
%22 = call i32 @cargar(i32* %21, i32 1)
%23 = getelementptr inbounds [30 x i32], [30 x i32]* %2, i64 0, i64 0
%24 = call i32 @cargar(i32* %23, i32 2)
%25 = getelementptr inbounds [30 x i32], [30 x i32]* %3, i64 0, i64 0
%26 = call i32 @cargar(i32* %25, i32 3)
%27 = bitcast [15 x [15 x i32]]* %8 to i32**
%28 = call i32 @matriz(i32** %27, i32 1)
%29 = bitcast [15 x [15 x i32]]* %9 to i32**
%30 = call i32 @matriz(i32** %29, i32 2)
%31 = call i32 @imprimir(i32* %21, i32* %23, i32* %25)
%32 = call i32 @imprimirm(i32** %27, i32** %29)
%33 = call i32 @reves(i32* %21)
%34 = getelementptr inbounds [60 x i32], [60 x i32]* %4, i64 0, i64 0
%35 = call i32 @intercalar(i32* %21, i32* %23, i32* %34)
%36 = call i32 @ordenado(i32* %21, i32* %21)
%37 = getelementptr inbounds [30 x i32], [30 x i32]* %5, i64 0, i64 0
%38 = call i32 @posicion(i32* %23, i32* %25, i32* %37)
%39 = getelementptr inbounds [30 x i32], [30 x i32]* %6, i64 0, i64 0
%40 = call i32 @paresA(i32* %21, i32* %39)
%41 = getelementptr inbounds [30 x i32], [30 x i32]* %7, i64 0, i64 0
%42 = call i32 @concatenacion(i32* %23, i32* %25, i32* %41)
ret void
}