#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 *, ...);
void HTS_get_copyright(char *str) {
  int i, nCopyright = 2;
  char url[] = "http://hts-engine.sourceforge.net/", version[] = "1.04";
  char *copyright[] = {"2001-2010  Nagoya Institute of Technology",
                       "2001-2008  Tokyo Institute of Technology"};
  sprintf(str, "\nThe HMM-based speech synthesis system (HTS)\n");
  sprintf(str, "%shts_engine API version %s (%s)\n", str, version, url);
  for (i = 0; i < nCopyright; i++) {
    if (i == 0)
      sprintf(str, "%sCopyright (C) %s\n", str, copyright[i]);
    else
      sprintf(str, "%s              %s\n", str, copyright[i]);
  }
  sprintf(str, "%sAll rights reserved.\n", str);
  return;
}


x86 assembly (clang, -O0):
<HTS_get_copyright>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x2,-0x10(%rbp)
lea    -0x40(%rbp),%rdi
lea    0xec2(%rip),%rsi
mov    $0x23,%edx
call   1030 <memcpy@plt>
mov    0xed5(%rip),%eax
mov    %eax,-0x45(%rbp)
mov    0xed0(%rip),%al
mov    %al,-0x41(%rbp)
mov    0x2caf(%rip),%rax
mov    %rax,-0x60(%rbp)
mov    0x2cac(%rip),%rax
mov    %rax,-0x58(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xf00(%rip),%rsi
mov    $0x0,%al
call   1040 <sprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    -0x45(%rbp),%rcx
lea    -0x40(%rbp),%r8
lea    0xf10(%rip),%rsi
mov    $0x0,%al
call   1040 <sprintf@plt>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1213 <HTS_get_copyright+0xf3>
cmpl   $0x0,-0xc(%rbp)
jne    11e1 <HTS_get_copyright+0xc1>
mov    -0x8(%rbp),%rdi
mov    -0x8(%rbp),%rdx
movslq -0xc(%rbp),%rax
mov    -0x60(%rbp,%rax,8),%rcx
lea    0xef6(%rip),%rsi
mov    $0x0,%al
call   1040 <sprintf@plt>
jmp    1200 <HTS_get_copyright+0xe0>
mov    -0x8(%rbp),%rdi
mov    -0x8(%rbp),%rdx
movslq -0xc(%rbp),%rax
mov    -0x60(%rbp,%rax,8),%rcx
lea    0xee6(%rip),%rsi
mov    $0x0,%al
call   1040 <sprintf@plt>
jmp    1205 <HTS_get_copyright+0xe5>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11a7 <HTS_get_copyright+0x87>
mov    -0x8(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xed1(%rip),%rsi
mov    $0x0,%al
call   1040 <sprintf@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<HTS_get_copyright>:
push   %rbx
sub    $0x40,%rsp
mov    %rdi,%rbx
movaps 0xef1(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xed5(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movl   $0x2f7465,0x2f(%rsp)
movb   $0x0,0xc(%rsp)
movl   $0x34302e31,0x8(%rsp)
34
movups 0xf4d(%rip),%xmm0
movups %xmm0,0x1e(%rdi)
movups 0xf34(%rip),%xmm0
movups %xmm0,0x10(%rdi)
movups 0xf19(%rip),%xmm0
movups %xmm0,(%rdi)
lea    0xf3d(%rip),%rsi
lea    0x8(%rsp),%rcx
lea    0x10(%rsp),%r8
mov    %rdi,%rdx
xor    %eax,%eax
call   1030 <sprintf@plt>
lea    0xf44(%rip),%rsi
lea    0xe9a(%rip),%rcx
mov    %rbx,%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <sprintf@plt>
lea    0xf3d(%rip),%rsi
lea    0xea9(%rip),%rcx
mov    %rbx,%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <sprintf@plt>
lea    0xf36(%rip),%rsi
mov    %rbx,%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <sprintf@plt>
add    $0x40,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.HTS_get_copyright.url = [35 x i8] c"http://hts-engine.sourceforge.net/\00"
@__const.HTS_get_copyright.version = [5 x i8] c"1.04\00"
@.str = [42 x i8] c"2001-2010 Nagoya Institute of Technology\00"
@.str.1 = [41 x i8] c"2001-2008 Tokyo Institute of Technology\00"
@__const.HTS_get_copyright.copyright = [2 x i8*] [i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i32 0, i32 0)]
@.str.2 = [46 x i8] c"\0AThe HMM-based speech synthesis system (HTS)\0A\00"
@.str.3 = [34 x i8] c"%shts_engine API version %s (%s)\0A\00"
@.str.4 = [20 x i8] c"%sCopyright (C) %s\0A\00"
@.str.5 = [20 x i8] c"%s %s\0A\00"
@.str.6 = [24 x i8] c"%sAll rights reserved.\0A\00"
define void @HTS_get_copyright(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
%5 = alloca [35 x i8]
%6 = alloca [5 x i8]
%7 = alloca [2 x i8*]
store i8* %0, i8** %2
store i32 2, i32* %4
%8 = bitcast [35 x i8]* %5 to i8*
%9 = bitcast [5 x i8]* %6 to i8*
%10 = bitcast [2 x i8*]* %7 to i8*
%11 = load i8*, i8** %2
%12 = call i32 (i8*, i8*, ...) @sprintf(i8* %11, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.2, i64 0, i64 0))
%13 = load i8*, i8** %2
%14 = load i8*, i8** %2
%15 = getelementptr inbounds [5 x i8], [5 x i8]* %6, i64 0, i64 0
%16 = getelementptr inbounds [35 x i8], [35 x i8]* %5, i64 0, i64 0
%17 = call i32 (i8*, i8*, ...) @sprintf(i8* %13, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.3, i64 0, i64 0), i8* %14, i8* %15, i8* %16)
store i32 0, i32* %3
br label %18
18: ; preds = %42, %1
%19 = load i32, i32* %3
%20 = load i32, i32* %4
%21 = icmp slt i32 %19, %20
br i1 %21, label %22, label %45
22: ; preds = %18
%23 = load i32, i32* %3
%24 = icmp eq i32 %23, 0
br i1 %24, label %25, label %33
25: ; preds = %22
%26 = load i8*, i8** %2
%27 = load i8*, i8** %2
%28 = load i32, i32* %3
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds [2 x i8*], [2 x i8*]* %7, i64 0, i64 %29
%31 = load i8*, i8** %30
%32 = call i32 (i8*, i8*, ...) @sprintf(i8* %26, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0), i8* %27, i8* %31)
br label %41
33: ; preds = %22
%34 = load i8*, i8** %2
%35 = load i8*, i8** %2
%36 = load i32, i32* %3
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds [2 x i8*], [2 x i8*]* %7, i64 0, i64 %37
%39 = load i8*, i8** %38
%40 = call i32 (i8*, i8*, ...) @sprintf(i8* %34, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0), i8* %35, i8* %39)
br label %41
41: ; preds = %33, %25
br label %42
42: ; preds = %41
%43 = load i32, i32* %3
%44 = add nsw i32 %43, 1
store i32 %44, i32* %3
br label %18
45: ; preds = %18
%46 = load i8*, i8** %2
%47 = load i8*, i8** %2
%48 = call i32 (i8*, i8*, ...) @sprintf(i8* %46, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.6, i64 0, i64 0), i8* %47)
ret void
}

LLVM IR (-O2):
@__const.HTS_get_copyright.url = [35 x i8] c"http://hts-engine.sourceforge.net/\00"
@__const.HTS_get_copyright.version = [5 x i8] c"1.04\00"
@.str = [42 x i8] c"2001-2010 Nagoya Institute of Technology\00"
@.str.1 = [41 x i8] c"2001-2008 Tokyo Institute of Technology\00"
@.str.2 = [46 x i8] c"\0AThe HMM-based speech synthesis system (HTS)\0A\00"
@.str.3 = [34 x i8] c"%shts_engine API version %s (%s)\0A\00"
@.str.4 = [20 x i8] c"%sCopyright (C) %s\0A\00"
@.str.5 = [20 x i8] c"%s %s\0A\00"
@.str.6 = [24 x i8] c"%sAll rights reserved.\0A\00"
define void @HTS_get_copyright(i8* %0) {
%2 = alloca [35 x i8]
%3 = alloca [5 x i8]
%4 = getelementptr inbounds [35 x i8], [35 x i8]* %2, i64 0, i64 0
%5 = getelementptr inbounds [5 x i8], [5 x i8]* %3, i64 0, i64 0
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 dereferenceable(46) %0, i8* align 1 dereferenceable(46) getelementptr inbounds ([46 x i8], [46 x i8]* @.str.2, i64 0, i64 0), i64 46, i1 false)
%6 = call i32 (i8*, i8*, ...) @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.3, i64 0, i64 0), i8* %0, i8* %5, i8* %4)
%7 = call i32 (i8*, i8*, ...) @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.4, i64 0, i64 0), i8* %0, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0))
%8 = call i32 (i8*, i8*, ...) @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.5, i64 0, i64 0), i8* %0, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
%9 = call i32 (i8*, i8*, ...) @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.6, i64 0, i64 0), i8* %0)
ret void
}