#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*/ sprintf(char *, char *, char *, char *, ...);
int /*<<< orphan*/ strcat(char *, char *);
char *Mk_Copying_Message(char *sub_part) {
  static char buff[256];
  if (sub_part)
    sprintf(buff, "%s (%s) %s\n", sub_part, "GNU Prolog", "1.4.4");
  else
    sprintf(buff, "%s %s\n", "GNU Prolog", "1.4.4");
  strcat(buff, "By Daniel Diaz\n"
               "Copyright (C) 1999-2013 Daniel Diaz"
               "\n\n"
               "GNU Prolog"
               " comes with ABSOLUTELY NO WARRANTY.\n"
               "This is free software; see the source or the file\n"
               "named COPYING for copying conditions.\n");
  return buff;
}


x86 assembly (clang, -O0):
<Mk_Copying_Message>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1163 <Mk_Copying_Message+0x43>
mov    -0x8(%rbp),%rdx
lea    0x2efe(%rip),%rdi
lea    0xeb7(%rip),%rsi
lea    0xebc(%rip),%rcx
lea    0xec0(%rip),%r8
mov    $0x0,%al
call   1040 <sprintf@plt>
jmp    1186 <Mk_Copying_Message+0x66>
lea    0x2ed6(%rip),%rdi
lea    0xeac(%rip),%rsi
lea    0xe94(%rip),%rdx
lea    0xe98(%rip),%rcx
mov    $0x0,%al
call   1040 <sprintf@plt>
lea    0x2eb3(%rip),%rdi
lea    0xe90(%rip),%rsi
call   1030 <strcat@plt>
lea    0x2ea0(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Mk_Copying_Message>:
push   %rbx
test   %rdi,%rdi
je     114e <Mk_Copying_Message+0x2e>
mov    %rdi,%rdx
lea    0x2f10(%rip),%rdi
lea    0xec9(%rip),%rsi
lea    0xece(%rip),%rcx
lea    0xed2(%rip),%r8
xor    %eax,%eax
call   1040 <sprintf@plt>
jmp    1171 <Mk_Copying_Message+0x51>
lea    0x2eeb(%rip),%rdi
lea    0xec1(%rip),%rsi
lea    0xea9(%rip),%rdx
lea    0xead(%rip),%rcx
xor    %eax,%eax
call   1040 <sprintf@plt>
lea    0x2ec8(%rip),%rbx
lea    0xea5(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcat@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@Mk_Copying_Message.buff = internal global [256 x i8] zeroinitializer
@.str = [12 x i8] c"%s (%s) %s\0A\00"
@.str.1 = [11 x i8] c"GNU Prolog\00"
@.str.2 = [6 x i8] c"1.4.4\00"
@.str.3 = [7 x i8] c"%s %s\0A\00"
@.str.4 = [187 x i8] c"By Daniel Diaz\0ACopyright (C) 1999-2013 Daniel Diaz\0A\0AGNU Prolog comes with ABSOLUTELY NO WARRANTY.\0AThis is free software; see the source or the file\0Anamed COPYING for copying conditions.\0A\00"
define i8* @Mk_Copying_Message(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i32 (i8*, i8*, i8*, i8*, ...) @sprintf(i8* getelementptr inbounds ([256 x i8], [256 x i8]* @Mk_Copying_Message.buff, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %6, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
br label %10
8: ; preds = %1
%9 = call i32 (i8*, i8*, i8*, i8*, ...) @sprintf(i8* getelementptr inbounds ([256 x i8], [256 x i8]* @Mk_Copying_Message.buff, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
br label %10
10: ; preds = %8, %5
%11 = call i32 @strcat(i8* getelementptr inbounds ([256 x i8], [256 x i8]* @Mk_Copying_Message.buff, i64 0, i64 0), i8* getelementptr inbounds ([187 x i8], [187 x i8]* @.str.4, i64 0, i64 0))
ret i8* getelementptr inbounds ([256 x i8], [256 x i8]* @Mk_Copying_Message.buff, i64 0, i64 0)
}

LLVM IR (-O2):
@Mk_Copying_Message.buff = internal global [256 x i8] zeroinitializer
@.str = [12 x i8] c"%s (%s) %s\0A\00"
@.str.1 = [11 x i8] c"GNU Prolog\00"
@.str.2 = [6 x i8] c"1.4.4\00"
@.str.3 = [7 x i8] c"%s %s\0A\00"
@.str.4 = [187 x i8] c"By Daniel Diaz\0ACopyright (C) 1999-2013 Daniel Diaz\0A\0AGNU Prolog comes with ABSOLUTELY NO WARRANTY.\0AThis is free software; see the source or the file\0Anamed COPYING for copying conditions.\0A\00"
define i8* @Mk_Copying_Message(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 (i8*, i8*, i8*, i8*, ...) @sprintf(i8* dereferenceable(1) getelementptr inbounds ([256 x i8], [256 x i8]* @Mk_Copying_Message.buff, i64 0, i64 0), i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %0, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
br label %7
5: ; preds = %1
%6 = tail call i32 (i8*, i8*, i8*, i8*, ...) @sprintf(i8* dereferenceable(1) getelementptr inbounds ([256 x i8], [256 x i8]* @Mk_Copying_Message.buff, i64 0, i64 0), i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
br label %7
7: ; preds = %5, %3
%8 = tail call i32 @strcat(i8* getelementptr inbounds ([256 x i8], [256 x i8]* @Mk_Copying_Message.buff, i64 0, i64 0), i8* getelementptr inbounds ([187 x i8], [187 x i8]* @.str.4, i64 0, i64 0))
ret i8* getelementptr inbounds ([256 x i8], [256 x i8]* @Mk_Copying_Message.buff, i64 0, i64 0)
}