#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.sp.nitech.ac.jp/", version[] = "1.0";
  char *copyright[] = {"2001-2008  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    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x2,-0x10(%rbp)
mov    0xed6(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xed3(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xed0(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xece(%rip),%eax
mov    %eax,-0x18(%rbp)
mov    0xec9(%rip),%eax
mov    %eax,-0x34(%rbp)
mov    0x2cb3(%rip),%rax
mov    %rax,-0x50(%rbp)
mov    0x2cb0(%rip),%rax
mov    %rax,-0x48(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xefc(%rip),%rsi
mov    $0x0,%al
call   1030 <sprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    -0x34(%rbp),%rcx
lea    -0x30(%rbp),%r8
lea    0xf0c(%rip),%rsi
mov    $0x0,%al
call   1030 <sprintf@plt>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    120f <HTS_get_copyright+0xff>
cmpl   $0x0,-0xc(%rbp)
jne    11dd <HTS_get_copyright+0xcd>
mov    -0x8(%rbp),%rdi
mov    -0x8(%rbp),%rdx
movslq -0xc(%rbp),%rax
mov    -0x50(%rbp,%rax,8),%rcx
lea    0xef2(%rip),%rsi
mov    $0x0,%al
call   1030 <sprintf@plt>
jmp    11fc <HTS_get_copyright+0xec>
mov    -0x8(%rbp),%rdi
mov    -0x8(%rbp),%rdx
movslq -0xc(%rbp),%rax
mov    -0x50(%rbp,%rax,8),%rcx
lea    0xee2(%rip),%rsi
mov    $0x0,%al
call   1030 <sprintf@plt>
jmp    1201 <HTS_get_copyright+0xf1>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11a3 <HTS_get_copyright+0x93>
mov    -0x8(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xecd(%rip),%rsi
mov    $0x0,%al
call   1030 <sprintf@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<HTS_get_copyright>:
push   %rbx
sub    $0x30,%rsp
mov    %rdi,%rbx
movups 0xeed(%rip),%xmm0
movups %xmm0,0x1c(%rsp)
movaps 0xed5(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movl   $0x302e31,0xc(%rsp)
movups 0xf4e(%rip),%xmm0
movups %xmm0,0x1e(%rdi)
movups 0xf35(%rip),%xmm0
movups %xmm0,0x10(%rdi)
movups 0xf1a(%rip),%xmm0
movups %xmm0,(%rdi)
lea    0xf3e(%rip),%rsi
lea    0xc(%rsp),%rcx
lea    0x10(%rsp),%r8
mov    %rdi,%rdx
xor    %eax,%eax
call   1030 <sprintf@plt>
lea    0xf45(%rip),%rsi
lea    0xe9b(%rip),%rcx
mov    %rbx,%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <sprintf@plt>
lea    0xf3e(%rip),%rsi
lea    0xeaa(%rip),%rcx
mov    %rbx,%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <sprintf@plt>
lea    0xf37(%rip),%rsi
mov    %rbx,%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <sprintf@plt>
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.HTS_get_copyright.url = [28 x i8] c"http://hts.sp.nitech.ac.jp/\00"
@__const.HTS_get_copyright.version = [4 x i8] c"1.0\00"
@.str = [42 x i8] c"2001-2008 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 [28 x i8]
%6 = alloca [4 x i8]
%7 = alloca [2 x i8*]
store i8* %0, i8** %2
store i32 2, i32* %4
%8 = bitcast [28 x i8]* %5 to i8*
%9 = bitcast [4 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 [4 x i8], [4 x i8]* %6, i64 0, i64 0
%16 = getelementptr inbounds [28 x i8], [28 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 = [28 x i8] c"http://hts.sp.nitech.ac.jp/\00"
@.str = [42 x i8] c"2001-2008 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 [28 x i8]
%3 = alloca i32
%4 = getelementptr inbounds [28 x i8], [28 x i8]* %2, i64 0, i64 0
%5 = bitcast i32* %3 to i8*
store i32 3157553, i32* %3
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, i32* %3, 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
}