#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*/ func();
int func2();
int func3(int);
int func4(int *);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char **argv) {
  func();
  printf("Returned Value is %d\n", func2());
  int res = func3(50);
  printf("Returned Value is %d\n", res);
  int y = 100;
  int res2 = func4(&y);
  printf("Returned Value is %d\n", res2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1070 <func@plt>
mov    $0x0,%al
call   1060 <func2@plt>
mov    %eax,%esi
lea    0xe83(%rip),%rdi
call   1040 <printf@plt>
mov    $0x32,%edi
call   1030 <func3@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xe67(%rip),%rdi
call   1040 <printf@plt>
movl   $0x64,-0x18(%rbp)
lea    -0x18(%rbp),%rdi
call   1050 <func4@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%esi
lea    0xe45(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
xor    %eax,%eax
call   1070 <func@plt>
xor    %eax,%eax
call   1060 <func2@plt>
lea    0xe96(%rip),%rbx
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    $0x32,%edi
call   1030 <func3@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
movl   $0x64,0xc(%rsp)
lea    0xc(%rsp),%rdi
call   1050 <func4@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [22 x i8] c"Returned Value is %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = call i32 (...) @func()
%10 = call i32 (...) @func2()
%11 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = call i32 @func3(i32 50)
store i32 %12, i32* %6
%13 = load i32, i32* %6
%14 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %13)
store i32 100, i32* %7
%15 = call i32 @func4(i32* %7)
store i32 %15, i32* %8
%16 = load i32, i32* %8
%17 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %16)
ret i32 0
}

LLVM IR (-O2):
@.str = [22 x i8] c"Returned Value is %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = tail call i32 (...) @func()
%5 = tail call i32 (...) @func2()
%6 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = tail call i32 @func3(i32 50)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = bitcast i32* %3 to i8*
store i32 100, i32* %3
%10 = call i32 @func4(i32* %3)
%11 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %10)
ret i32 0
}