#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*/ snprintf(char *, int, char *, char *);
int /*<<< orphan*/ strncat(char *, char *, int);
int Certs(char *source, char *dest, int size) {
  snprintf(dest, size,
           "<H2><CENTER>SafedAgent Version %s Set "
           "Certificates</H2></CENTER><P><center>",
           "1.10.1");
  strncat(dest,
          "<br>"
          "<table  width=70% border=0>"
          "<tbody>"
          "<tr bgcolor=#E7E5DD><form method=post action=/setca "
          "enctype=\"multipart/form-data\"><td>Select the ca file: </td>"
          "<td><input type=file name=caname size=25 "
          "value=\"\"></td></tr><tr><td></td><td><input type=\"submit\" "
          "size=25  value=\"Set CA\"></td></tr></form><tr><td>"
          "<tr bgcolor=#E7E5DD><form method=post action=/setcert "
          "enctype=\"multipart/form-data\"><td>Select the cert file: </td>"
          "<td><input type=file name=certname size=25 "
          "value=\"\"></td></tr><tr><td></td><td><input type=\"submit\" "
          "size=25  value=\"Set CERT\"></td></tr></form><tr><td>"
          "<tr bgcolor=#E7E5DD><form method=post action=/setkey "
          "enctype=\"multipart/form-data\"><td>Select the key file: </td>"
          "<td><input type=file name=keyname size=25 "
          "value=\"\"></td></tr><tr><td></td><td><input type=\"submit\" "
          "size=25  value=\"Set KEY\"></td></tr></form><tr><td>",
          size);
  return (0);
}


x86 assembly (clang, -O0):
<Certs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
lea    0xebf(%rip),%rdx
lea    0xf04(%rip),%rcx
call   1030 <snprintf@plt>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%edx
lea    0xef8(%rip),%rsi
call   1040 <strncat@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Certs>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebp
mov    %rsi,%rbx
lea    0xed1(%rip),%rdx
lea    0xf16(%rip),%rcx
mov    %rsi,%rdi
mov    %ebp,%esi
call   1030 <snprintf@plt>
lea    0xf0c(%rip),%rsi
mov    %rbx,%rdi
mov    %ebp,%edx
call   1040 <strncat@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [76 x i8] c"<H2><CENTER>SafedAgent Version %s Set Certificates</H2></CENTER><P><center>\00"
@.str.1 = [7 x i8] c"1.10.1\00"
@.str.2 = [825 x i8] c"<br><table width=70% border=0><tbody><tr bgcolor=#E7E5DD><form method=post action=/setca enctype=\22multipart/form-data\22><td>Select the ca file: </td><td><input type=file name=caname size=25 value=\22\22></td></tr><tr><td></td><td><input type=\22submit\22 size=25 value=\22Set CA\22></td></tr></form><tr><td><tr bgcolor=#E7E5DD><form method=post action=/setcert enctype=\22multipart/form-data\22><td>Select the cert file: </td><td><input type=file name=certname size=25 value=\22\22></td></tr><tr><td></td><td><input type=\22submit\22 size=25 value=\22Set CERT\22></td></tr></form><tr><td><tr bgcolor=#E7E5DD><form method=post action=/setkey enctype=\22multipart/form-data\22><td>Select the key file: </td><td><input type=file name=keyname size=25 value=\22\22></td></tr><tr><td></td><td><input type=\22submit\22 size=25 value=\22Set KEY\22></td></tr></form><tr><td>\00"
define i32 @Certs(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %5
%8 = load i32, i32* %6
%9 = call i32 @snprintf(i8* %7, i32 %8, i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%10 = load i8*, i8** %5
%11 = load i32, i32* %6
%12 = call i32 @strncat(i8* %10, i8* getelementptr inbounds ([825 x i8], [825 x i8]* @.str.2, i64 0, i64 0), i32 %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [76 x i8] c"<H2><CENTER>SafedAgent Version %s Set Certificates</H2></CENTER><P><center>\00"
@.str.1 = [7 x i8] c"1.10.1\00"
@.str.2 = [825 x i8] c"<br><table width=70% border=0><tbody><tr bgcolor=#E7E5DD><form method=post action=/setca enctype=\22multipart/form-data\22><td>Select the ca file: </td><td><input type=file name=caname size=25 value=\22\22></td></tr><tr><td></td><td><input type=\22submit\22 size=25 value=\22Set CA\22></td></tr></form><tr><td><tr bgcolor=#E7E5DD><form method=post action=/setcert enctype=\22multipart/form-data\22><td>Select the cert file: </td><td><input type=file name=certname size=25 value=\22\22></td></tr><tr><td></td><td><input type=\22submit\22 size=25 value=\22Set CERT\22></td></tr></form><tr><td><tr bgcolor=#E7E5DD><form method=post action=/setkey enctype=\22multipart/form-data\22><td>Select the key file: </td><td><input type=file name=keyname size=25 value=\22\22></td></tr><tr><td></td><td><input type=\22submit\22 size=25 value=\22Set KEY\22></td></tr></form><tr><td>\00"
define i32 @Certs(i8* nocapture readnone %0, i8* %1, i32 %2) {
%4 = tail call i32 @snprintf(i8* %1, i32 %2, i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @strncat(i8* %1, i8* getelementptr inbounds ([825 x i8], [825 x i8]* @.str.2, i64 0, i64 0), i32 %2)
ret i32 0
}