#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*/ processa1(int);
int /*<<< orphan*/ processa2(int *);
int /*<<< orphan*/ processa3(int *);
int /*<<< orphan*/ processa4(int **);
int main(int argc, char const *argv[]) {
  int x = 5;
  int vetor[10];
  int matriz[5][30];
  printf("X = %d\n", x);
  processa1(x);
  printf("X = %d\n", x);
  processa2(&x);
  printf("X = %d\n", x);
  processa3(vetor);
  processa4(matriz);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2a0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x5,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xe86(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%edi
call   1070 <processa1@plt>
mov    -0x14(%rbp),%esi
lea    0xe6f(%rip),%rdi
call   1030 <printf@plt>
lea    -0x14(%rbp),%rdi
call   1040 <processa2@plt>
mov    -0x14(%rbp),%esi
lea    0xe57(%rip),%rdi
call   1030 <printf@plt>
lea    -0x40(%rbp),%rdi
call   1060 <processa3@plt>
lea    -0x2a0(%rbp),%rdi
call   1050 <processa4@plt>
xor    %eax,%eax
add    $0x2a0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x2a0,%rsp
movl   $0x5,0xc(%rsp)
lea    0xe99(%rip),%rbx
mov    %rbx,%rdi
mov    $0x5,%esi
call   1030 <printf@plt>
mov    $0x5,%edi
call   1070 <processa1@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
call   1030 <printf@plt>
lea    0xc(%rsp),%rdi
call   1040 <processa2@plt>
mov    0xc(%rsp),%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0x10(%rsp),%rdi
call   1060 <processa3@plt>
lea    0x40(%rsp),%rdi
call   1050 <processa4@plt>
xor    %eax,%eax
add    $0x2a0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"X = %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca [10 x i32]
%8 = alloca [5 x [30 x i32]]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 5, i32* %6
%9 = load i32, i32* %6
%10 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = load i32, i32* %6
%12 = call i32 @processa1(i32 %11)
%13 = load i32, i32* %6
%14 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %13)
%15 = call i32 @processa2(i32* %6)
%16 = load i32, i32* %6
%17 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %16)
%18 = getelementptr inbounds [10 x i32], [10 x i32]* %7, i64 0, i64 0
%19 = call i32 @processa3(i32* %18)
%20 = getelementptr inbounds [5 x [30 x i32]], [5 x [30 x i32]]* %8, i64 0, i64 0
%21 = bitcast [30 x i32]* %20 to i32**
%22 = call i32 @processa4(i32** %21)
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"X = %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca [10 x i32]
%5 = alloca [5 x [30 x i32]]
%6 = bitcast i32* %3 to i8*
store i32 5, i32* %3
%7 = bitcast [10 x i32]* %4 to i8*
%8 = bitcast [5 x [30 x i32]]* %5 to i8*
%9 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 5)
%10 = tail call i32 @processa1(i32 5)
%11 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 5)
%12 = call i32 @processa2(i32* %3)
%13 = load i32, i32* %3
%14 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %13)
%15 = getelementptr inbounds [10 x i32], [10 x i32]* %4, i64 0, i64 0
%16 = call i32 @processa3(i32* %15)
%17 = bitcast [5 x [30 x i32]]* %5 to i32**
%18 = call i32 @processa4(i32** %17)
ret i32 0
}