#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 strlen(char *);
int /*<<< orphan*/ strncpy(char *, char *, int);
int ShowLicense(char *dest, int size) {
  strncpy(
      dest,
      "This program is free software; you can redistribute it and/or modify<br>"
      "it under the terms of the GNU General Public License as published by<br>"
      "the Free Software Foundation; either version 2 of the License, or<br>"
      "(at your option) any later version.<br><br>"
      "This program is distributed in the hope that it will be useful,<br>"
      "but WITHOUT ANY WARRANTY; without even the implied warranty of<br>"
      "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the<br>"
      "GNU Library General Public License for more details.<br>"
      "You should have received a copy of the GNU General Public License<br>"
      "along with this program; if not, write to the Free Software<br>"
      "Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, "
      "USA.<br>",
      size - strlen(dest) - 1);
  return (0);
}


x86 assembly (clang, -O0):
<ShowLicense>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x1c(%rbp),%edx
mov    -0x18(%rbp),%rdi
sub    %eax,%edx
sub    $0x1,%edx
lea    0xea7(%rip),%rsi
call   1030 <strncpy@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ShowLicense>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
call   1040 <strlen@plt>
not    %eax
add    %eax,%ebx
lea    0xec7(%rip),%rsi
mov    %r14,%rdi
mov    %ebx,%edx
call   1030 <strncpy@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [721 x i8] c"This program is free software; you can redistribute it and/or modify<br>it under the terms of the GNU General Public License as published by<br>the Free Software Foundation; either version 2 of the License, or<br>(at your option) any later version.<br><br>This program is distributed in the hope that it will be useful,<br>but WITHOUT ANY WARRANTY; without even the implied warranty of<br>MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the<br>GNU Library General Public License for more details.<br>You should have received a copy of the GNU General Public License<br>along with this program; if not, write to the Free Software<br>Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.<br>\00"
define i32 @ShowLicense(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = load i8*, i8** %3
%8 = call i32 @strlen(i8* %7)
%9 = sub nsw i32 %6, %8
%10 = sub nsw i32 %9, 1
%11 = call i32 @strncpy(i8* %5, i8* getelementptr inbounds ([721 x i8], [721 x i8]* @.str, i64 0, i64 0), i32 %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [721 x i8] c"This program is free software; you can redistribute it and/or modify<br>it under the terms of the GNU General Public License as published by<br>the Free Software Foundation; either version 2 of the License, or<br>(at your option) any later version.<br><br>This program is distributed in the hope that it will be useful,<br>but WITHOUT ANY WARRANTY; without even the implied warranty of<br>MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the<br>GNU Library General Public License for more details.<br>You should have received a copy of the GNU General Public License<br>along with this program; if not, write to the Free Software<br>Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.<br>\00"
define i32 @ShowLicense(i8* %0, i32 %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = xor i32 %3, -1
%5 = add i32 %4, %1
%6 = tail call i32 @strncpy(i8* %0, i8* getelementptr inbounds ([721 x i8], [721 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}