#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 *, ...);
void version(char **argv, char *descr) {
  printf("%s v%s\n", *argv, "1.0.0");
  if (descr && *descr)
    printf("%s. Part of the Phorward C/C++ Library.\n\n", descr);
  printf("Copyright (C) 2006-2019 by Phorward Software Technologies, "
         "Jan Max Meyer\n"
         "All rights reserved. See LICENSE for more information.\n");
}


x86 assembly (clang, -O0):
<version>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rsi
lea    0xed2(%rip),%rdi
lea    0xed3(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
cmpq   $0x0,-0x10(%rbp)
je     1169 <version+0x59>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1169 <version+0x59>
mov    -0x10(%rbp),%rsi
lea    0xeac(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<version>:
push   %rbx
mov    %rsi,%rbx
mov    (%rdi),%rsi
lea    0xed2(%rip),%rdi
lea    0xed3(%rip),%rdx
xor    %eax,%eax
call   1040 <printf@plt>
test   %rbx,%rbx
je     1157 <version+0x37>
cmpb   $0x0,(%rbx)
je     1157 <version+0x37>
lea    0xec1(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeda(%rip),%rdi
pop    %rbx
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"%s v%s\0A\00"
@.str.1 = [6 x i8] c"1.0.0\00"
@.str.2 = [42 x i8] c"%s. Part of the Phorward C/C++ Library.\0A\0A\00"
@.str.3 = [129 x i8] c"Copyright (C) 2006-2019 by Phorward Software Technologies, Jan Max Meyer\0AAll rights reserved. See LICENSE for more information.\0A\00"
define void @version(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 = load i8*, i8** %5
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %6, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%8 = load i8*, i8** %4
%9 = icmp ne i8* %8, null
br i1 %9, label %10, label %18
10: ; preds = %2
%11 = load i8*, i8** %4
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = icmp ne i32 %13, 0
br i1 %14, label %15, label %18
15: ; preds = %10
%16 = load i8*, i8** %4
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.2, i64 0, i64 0), i8* %16)
br label %18
18: ; preds = %15, %10, %2
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([129 x i8], [129 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"%s v%s\0A\00"
@.str.1 = [6 x i8] c"1.0.0\00"
@.str.2 = [42 x i8] c"%s. Part of the Phorward C/C++ Library.\0A\0A\00"
@str = [128 x i8] c"Copyright (C) 2006-2019 by Phorward Software Technologies, Jan Max Meyer\0AAll rights reserved. See LICENSE for more information.\00"
define void @version(i8** nocapture %0, i8* %1) {
%3 = load i8*, i8** %0
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %3, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%5 = icmp eq i8* %1, null
br i1 %5, label %11, label %6
6: ; preds = %2
%7 = load i8, i8* %1
%8 = icmp eq i8 %7, 0
br i1 %8, label %11, label %9
9: ; preds = %6
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str.2, i64 0, i64 0), i8* %1)
br label %11
11: ; preds = %9, %6, %2
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([128 x i8], [128 x i8]* @str, i64 0, i64 0))
ret void
}