#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*/ printf(char *, char const *);
int /*<<< orphan*/ puts(char const *);
void printVersion(const char *version, const char *copyright) {
  printf("rpn %s\n", version);
  puts("");
  puts(copyright);
  puts("This is free software; see the source for copying conditions.  There "
       "is NO");
  puts("warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR "
       "PURPOSE,");
  puts("to the extent permitted by law.");
}


x86 assembly (clang, -O0):
<printVersion>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec5(%rip),%rdi
call   1040 <printf@plt>
lea    0xec0(%rip),%rdi
call   1030 <puts@plt>
mov    -0x10(%rbp),%rdi
call   1030 <puts@plt>
lea    0xeac(%rip),%rdi
call   1030 <puts@plt>
lea    0xeeb(%rip),%rdi
call   1030 <puts@plt>
lea    0xf2b(%rip),%rdi
call   1030 <puts@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printVersion>:
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%rsi
lea    0xec2(%rip),%rdi
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
lea    0xeac(%rip),%rdi
call   1040 <puts@plt>
lea    0xeeb(%rip),%rdi
call   1040 <puts@plt>
lea    0xf2b(%rip),%rdi
pop    %rbx
jmp    1040 <puts@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"rpn %s\0A\00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [75 x i8] c"This is free software; see the source for copying conditions. There is NO\00"
@.str.3 = [76 x i8] c"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE,\00"
@.str.4 = [32 x i8] c"to the extent permitted by law.\00"
define void @printVersion(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%8 = load i8*, i8** %4
%9 = call i32 @puts(i8* %8)
%10 = call i32 @puts(i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.2, i64 0, i64 0))
%11 = call i32 @puts(i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str.3, i64 0, i64 0))
%12 = call i32 @puts(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.4, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"rpn %s\0A\00"
@.str.2 = [75 x i8] c"This is free software; see the source for copying conditions. There is NO\00"
@.str.3 = [76 x i8] c"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE,\00"
@.str.4 = [32 x i8] c"to the extent permitted by law.\00"
define void @printVersion(i8* %0, i8* nocapture %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @putchar(i32 10)
%5 = tail call i32 @puts(i8* dereferenceable(1) %1)
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([75 x i8], [75 x i8]* @.str.2, i64 0, i64 0))
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([76 x i8], [76 x i8]* @.str.3, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.4, i64 0, i64 0))
ret void
}