#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*/ indirect(int, int, int, int);
int /*<<< orphan*/ print_int(int);
int /*<<< orphan*/ print_string(char *);
void main(void) {
  int w, x, y, z;
  w = 5;
  x = 1;
  y = 2;
  z = 3;
  print_int(w);
  print_string(" ");
  print_int(x);
  print_string(" ");
  print_int(y);
  print_string(" ");
  print_int(z);
  print_string("\n");
  indirect(w, x, y, z);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x5,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
movl   $0x3,-0x10(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <print_int@plt>
lea    0xe9d(%rip),%rdi
call   1030 <print_string@plt>
mov    -0x8(%rbp),%edi
call   1040 <print_int@plt>
lea    0xe89(%rip),%rdi
call   1030 <print_string@plt>
mov    -0xc(%rbp),%edi
call   1040 <print_int@plt>
lea    0xe75(%rip),%rdi
call   1030 <print_string@plt>
mov    -0x10(%rbp),%edi
call   1040 <print_int@plt>
lea    0xe63(%rip),%rdi
call   1030 <print_string@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
call   1050 <indirect@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x5,%edi
call   1040 <print_int@plt>
lea    0xebe(%rip),%rbx
mov    %rbx,%rdi
call   1030 <print_string@plt>
mov    $0x1,%edi
call   1040 <print_int@plt>
mov    %rbx,%rdi
call   1030 <print_string@plt>
mov    $0x2,%edi
call   1040 <print_int@plt>
mov    %rbx,%rdi
call   1030 <print_string@plt>
mov    $0x3,%edi
call   1040 <print_int@plt>
lea    0xe83(%rip),%rdi
call   1030 <print_string@plt>
mov    $0x5,%edi
mov    $0x1,%esi
mov    $0x2,%edx
mov    $0x3,%ecx
pop    %rbx
jmp    1050 <indirect@plt>

LLVM IR (-O0):
@.str = [2 x i8] c" \00"
@.str.1 = [2 x i8] c"\0A\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 5, i32* %1
store i32 1, i32* %2
store i32 2, i32* %3
store i32 3, i32* %4
%5 = load i32, i32* %1
%6 = call i32 @print_int(i32 %5)
%7 = call i32 @print_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* %2
%9 = call i32 @print_int(i32 %8)
%10 = call i32 @print_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%11 = load i32, i32* %3
%12 = call i32 @print_int(i32 %11)
%13 = call i32 @print_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%14 = load i32, i32* %4
%15 = call i32 @print_int(i32 %14)
%16 = call i32 @print_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%17 = load i32, i32* %1
%18 = load i32, i32* %2
%19 = load i32, i32* %3
%20 = load i32, i32* %4
%21 = call i32 @indirect(i32 %17, i32 %18, i32 %19, i32 %20)
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c" \00"
@.str.1 = [2 x i8] c"\0A\00"
define void @main() {
%1 = tail call i32 @print_int(i32 5)
%2 = tail call i32 @print_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @print_int(i32 1)
%4 = tail call i32 @print_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @print_int(i32 2)
%6 = tail call i32 @print_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @print_int(i32 3)
%8 = tail call i32 @print_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%9 = tail call i32 @indirect(i32 5, i32 1, i32 2, i32 3)
ret void
}