#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
void version(FILE *stream, int exit_code) {
  fprintf(stream, "%s %s\n", "easter", "1.2.0");
  fprintf(
      stream,
      "Copyright (C) 2016 Free Software Foundation, Inc. <http://fsf.org/>\n"
      "This is free software with ABSOLUTELY NO WARRANTY.\n");
  fprintf(stream, "Written by %s.\n", "Jordi Trubat");
  exit(exit_code);
}


x86 assembly (clang, -O0):
<version>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xec6(%rip),%rsi
lea    0xec6(%rip),%rdx
lea    0xec6(%rip),%rcx
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xeba(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xf20(%rip),%rsi
lea    0xf29(%rip),%rdx
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0xc(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<version>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
lea    0xec1(%rip),%rsi
lea    0xec1(%rip),%rdx
lea    0xec1(%rip),%rcx
xor    %eax,%eax
call   1030 <fprintf@plt>
lea    0xeb9(%rip),%rdi
mov    $0x77,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1050 <fwrite@plt>
lea    0xf18(%rip),%rsi
lea    0xf21(%rip),%rdx
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    %ebp,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"%s %s\0A\00"
@.str.1 = [7 x i8] c"easter\00"
@.str.2 = [6 x i8] c"1.2.0\00"
@.str.3 = [120 x i8] c"Copyright (C) 2016 Free Software Foundation, Inc. <http://fsf.org/>\0AThis is free software with ABSOLUTELY NO WARRANTY.\0A\00"
@.str.4 = [16 x i8] c"Written by %s.\0A\00"
@.str.5 = [13 x i8] c"Jordi Trubat\00"
define void @version(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32*, i32** %3
%6 = call i32 (i32*, i8*, ...) @fprintf(i32* %5, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%7 = load i32*, i32** %3
%8 = call i32 (i32*, i8*, ...) @fprintf(i32* %7, i8* getelementptr inbounds ([120 x i8], [120 x i8]* @.str.3, i64 0, i64 0))
%9 = load i32*, i32** %3
%10 = call i32 (i32*, i8*, ...) @fprintf(i32* %9, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0))
%11 = load i32, i32* %4
%12 = call i32 @exit(i32 %11)
unreachable
}

LLVM IR (-O2):
@.str = [7 x i8] c"%s %s\0A\00"
@.str.1 = [7 x i8] c"easter\00"
@.str.2 = [6 x i8] c"1.2.0\00"
@.str.3 = [120 x i8] c"Copyright (C) 2016 Free Software Foundation, Inc. <http://fsf.org/>\0AThis is free software with ABSOLUTELY NO WARRANTY.\0A\00"
@.str.4 = [16 x i8] c"Written by %s.\0A\00"
@.str.5 = [13 x i8] c"Jordi Trubat\00"
define void @version(i32* nocapture %0, i32 %1) {
%3 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i64 @fwrite(i8* getelementptr inbounds ([120 x i8], [120 x i8]* @.str.3, i64 0, i64 0), i64 119, i64 1, i32* %0)
%5 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0))
%6 = tail call i32 @exit(i32 %1)
unreachable
}