#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*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stdout;
scalar_t__ strcmp(char *, char *);
void print_version(char const *arg) {
  if (strcmp("", "") == 0)
    fprintf(stdout, "%s %s\n", arg, "v1.3.0");
  else
    fprintf(stdout, "%s %s (%s)\n", arg, "v1.3.0", "");
  ;
  fprintf(stdout, "Copyright (C) 2016 Arvid Gerstmann\n");
  fprintf(
      stdout,
      "Source available at https://github.com/tldr-pages/tldr-cpp-client\n");
}


x86 assembly (clang, -O0):
<print_version>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xee6(%rip),%rsi
mov    %rsi,%rdi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    116c <print_version+0x4c>
mov    0x2e94(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xea7(%rip),%rsi
lea    0xea7(%rip),%rcx
mov    $0x0,%al
call   1040 <fprintf@plt>
jmp    1195 <print_version+0x75>
mov    0x2e6d(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xe8e(%rip),%rsi
lea    0xe80(%rip),%rcx
lea    0xe8b(%rip),%r8
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2e44(%rip),%rax
mov    (%rax),%edi
lea    0xe75(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
mov    0x2e2d(%rip),%rax
mov    (%rax),%edi
lea    0xe82(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_version>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0xeeb(%rip),%rdi
mov    %rdi,%rsi
call   1030 <strcmp@plt>
mov    0x2ea3(%rip),%r14
mov    (%r14),%edi
test   %rax,%rax
je     1166 <print_version+0x46>
lea    0xec2(%rip),%rsi
lea    0xeb4(%rip),%rcx
lea    0xebf(%rip),%r8
mov    %rbx,%rdx
xor    %eax,%eax
call   1040 <fprintf@plt>
jmp    117e <print_version+0x5e>
lea    0xe93(%rip),%rsi
lea    0xe93(%rip),%rcx
mov    %rbx,%rdx
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%r14),%edi
lea    0xe92(%rip),%rsi
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    (%r14),%edi
lea    0xea5(%rip),%rsi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <fprintf@plt>

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
@stdout = global i32 0
@.str.1 = [7 x i8] c"%s %s\0A\00"
@.str.2 = [7 x i8] c"v1.3.0\00"
@.str.3 = [12 x i8] c"%s %s (%s)\0A\00"
@.str.4 = [36 x i8] c"Copyright (C) 2016 Arvid Gerstmann\0A\00"
@.str.5 = [67 x i8] c"Source available at https://github.com/tldr-pages/tldr-cpp-client\0A\00"
define void @print_version(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i64 @strcmp(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load i32, i32* @stdout
%7 = load i8*, i8** %2
%8 = call i32 (i32, i8*, ...) @fprintf(i32 %6, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %7, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
br label %13
9: ; preds = %1
%10 = load i32, i32* @stdout
%11 = load i8*, i8** %2
%12 = call i32 (i32, i8*, ...) @fprintf(i32 %10, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i8* %11, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
br label %13
13: ; preds = %9, %5
%14 = load i32, i32* @stdout
%15 = call i32 (i32, i8*, ...) @fprintf(i32 %14, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.4, i64 0, i64 0))
%16 = load i32, i32* @stdout
%17 = call i32 (i32, i8*, ...) @fprintf(i32 %16, i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.5, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
@stdout = global i32 0
@.str.1 = [7 x i8] c"%s %s\0A\00"
@.str.2 = [7 x i8] c"v1.3.0\00"
@.str.3 = [12 x i8] c"%s %s (%s)\0A\00"
@.str.4 = [36 x i8] c"Copyright (C) 2016 Arvid Gerstmann\0A\00"
@.str.5 = [67 x i8] c"Source available at https://github.com/tldr-pages/tldr-cpp-client\0A\00"
define void @print_version(i8* %0) {
%2 = tail call i64 @strcmp(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i64 %2, 0
%4 = load i32, i32* @stdout
br i1 %3, label %5, label %7
5: ; preds = %1
%6 = tail call i32 (i32, i8*, ...) @fprintf(i32 %4, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
br label %9
7: ; preds = %1
%8 = tail call i32 (i32, i8*, ...) @fprintf(i32 %4, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i8* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %5
%10 = load i32, i32* @stdout
%11 = tail call i32 (i32, i8*, ...) @fprintf(i32 %10, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.4, i64 0, i64 0))
%12 = load i32, i32* @stdout
%13 = tail call i32 (i32, i8*, ...) @fprintf(i32 %12, i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.5, i64 0, i64 0))
ret void
}