#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*/ average_basic(int, int, int, int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ print_struct();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ test_interview_one();
int main__________________001(int argc, const char *argv[]) {
  average_basic(1, 2, 3, 4);
  printf("abc\n");
  fprintf(stderr, "a"
                  "DEF\n"
                  "abc\n");
  fprintf(stderr, "a"
                  "DEF\n"
                  "abc\n");
  fprintf(stderr, "DEF\n");
  print_struct();
  int gloabl_int_a = 1;
  printf("global int a is :%d \n.", gloabl_int_a);
  test_interview_one();
  printf("Hello, World!\n");
  return 0;
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
mov    $0x4,%ecx
call   1040 <average_basic@plt>
lea    0xe86(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    0x2e53(%rip),%rax
mov    (%rax),%edi
lea    0xe6a(%rip),%rsi
call   1070 <fprintf@plt>
mov    0x2e3e(%rip),%rax
mov    (%rax),%edi
lea    0xe55(%rip),%rsi
call   1070 <fprintf@plt>
mov    0x2e29(%rip),%rax
mov    (%rax),%edi
lea    0xe4a(%rip),%rsi
call   1070 <fprintf@plt>
mov    $0x0,%al
call   1050 <print_struct@plt>
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xe32(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    $0x0,%al
call   1030 <test_interview_one@plt>
lea    0xe34(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
push   %r14
push   %rbx
push   %rax
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
mov    $0x4,%ecx
call   1050 <average_basic@plt>
lea    0xea2(%rip),%rdi
call   1030 <puts@plt>
mov    0x2e50(%rip),%rbx
mov    (%rbx),%edi
lea    0xe67(%rip),%r14
mov    %r14,%rsi
call   1080 <fprintf@plt>
mov    (%rbx),%edi
mov    %r14,%rsi
call   1080 <fprintf@plt>
mov    (%rbx),%edi
lea    0xe56(%rip),%rsi
call   1080 <fprintf@plt>
xor    %eax,%eax
call   1060 <print_struct@plt>
lea    0xe48(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1070 <printf@plt>
xor    %eax,%eax
call   1040 <test_interview_one@plt>
lea    0xe49(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [5 x i8] c"abc\0A\00"
@stderr = global i32 0
@.str.1 = [10 x i8] c"aDEF\0Aabc\0A\00"
@.str.2 = [5 x i8] c"DEF\0A\00"
@.str.3 = [23 x i8] c"global int a is :%d \0A.\00"
@.str.4 = [15 x i8] c"Hello, World!\0A\00"
define i32 @main__________________001(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i32
store i32 %0, i32* %3
store i8** %1, i8*** %4
%6 = call i32 @average_basic(i32 1, i32 2, i32 3, i32 4)
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* @stderr
%9 = call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%10 = load i32, i32* @stderr
%11 = call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%12 = load i32, i32* @stderr
%13 = call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%14 = call i32 (...) @print_struct()
store i32 1, i32* %5
%15 = load i32, i32* %5
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0), i32 %15)
%17 = call i32 (...) @test_interview_one()
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str.1 = [10 x i8] c"aDEF\0Aabc\0A\00"
@.str.2 = [5 x i8] c"DEF\0A\00"
@.str.3 = [23 x i8] c"global int a is :%d \0A.\00"
@str = [4 x i8] c"abc\00"
@str.5 = [14 x i8] c"Hello, World!\00"
define i32 @main__________________001(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @average_basic(i32 1, i32 2, i32 3, i32 4)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str, i64 0, i64 0))
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%7 = load i32, i32* @stderr
%8 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%9 = load i32, i32* @stderr
%10 = tail call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%11 = tail call i32 (...) @print_struct()
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0), i32 1)
%13 = tail call i32 (...) @test_interview_one()
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str.5, i64 0, i64 0))
ret i32 0
}