#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*/ add_5(int *, int);
int /*<<< orphan*/ divide_10(int *, int);
int /*<<< orphan*/ output(int *, int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ swap(int *, int);
void main() {
  int i = 0;
  int a[4] = {1, 2, 3, 4};
  add_5(a, 4);
  output(a, 4);
  divide_10(a, 4);
  output(a, 4);
  swap(a, 4);
  output(a, 4);
  printf("\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xe9a(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xe97(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    -0x20(%rbp),%rdi
mov    $0x4,%esi
call   1050 <add_5@plt>
lea    -0x20(%rbp),%rdi
mov    $0x4,%esi
call   1030 <output@plt>
lea    -0x20(%rbp),%rdi
mov    $0x4,%esi
call   1060 <divide_10@plt>
lea    -0x20(%rbp),%rdi
mov    $0x4,%esi
call   1030 <output@plt>
lea    -0x20(%rbp),%rdi
mov    $0x4,%esi
call   1070 <swap@plt>
lea    -0x20(%rbp),%rdi
mov    $0x4,%esi
call   1030 <output@plt>
lea    0xe40(%rip),%rdi
call   1040 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movaps 0xea4(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x4,%esi
call   1050 <add_5@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
call   1040 <output@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
call   1060 <divide_10@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
call   1040 <output@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
call   1070 <swap@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
call   1040 <output@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.a = [4 x i32] [i32 1, i32 2, i32 3, i32 4]
@.str = [2 x i8] c"\0A\00"
define void @main() {
%1 = alloca i32
%2 = alloca [4 x i32]
store i32 0, i32* %1
%3 = bitcast [4 x i32]* %2 to i8*
%4 = getelementptr inbounds [4 x i32], [4 x i32]* %2, i64 0, i64 0
%5 = call i32 @add_5(i32* %4, i32 4)
%6 = getelementptr inbounds [4 x i32], [4 x i32]* %2, i64 0, i64 0
%7 = call i32 @output(i32* %6, i32 4)
%8 = getelementptr inbounds [4 x i32], [4 x i32]* %2, i64 0, i64 0
%9 = call i32 @divide_10(i32* %8, i32 4)
%10 = getelementptr inbounds [4 x i32], [4 x i32]* %2, i64 0, i64 0
%11 = call i32 @output(i32* %10, i32 4)
%12 = getelementptr inbounds [4 x i32], [4 x i32]* %2, i64 0, i64 0
%13 = call i32 @swap(i32* %12, i32 4)
%14 = getelementptr inbounds [4 x i32], [4 x i32]* %2, i64 0, i64 0
%15 = call i32 @output(i32* %14, i32 4)
%16 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__const.main.a = [4 x i32] [i32 1, i32 2, i32 3, i32 4]
define void @main() {
%1 = alloca [4 x i32]
%2 = bitcast [4 x i32]* %1 to i8*
%3 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 0
%4 = call i32 @add_5(i32* %3, i32 4)
%5 = call i32 @output(i32* %3, i32 4)
%6 = call i32 @divide_10(i32* %3, i32 4)
%7 = call i32 @output(i32* %3, i32 4)
%8 = call i32 @swap(i32* %3, i32 4)
%9 = call i32 @output(i32* %3, i32 4)
%10 = call i32 @putchar(i32 10)
ret void
}