#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
void web_page_error(FILE *f) {
  fprintf(
      f,
      "<br><table style=\"text-align: left; width: 460px; background-color: "
      "yellow; font-family: Helvetica,Arial,sans-serif; font-weight: bold; "
      "color: black;\" border=\"0\" cellpadding=\"2\" cellspacing=\"2\">\r\n");
  fprintf(f, "<tbody><tr style=\"font-size: 20px; font-weight: bold;\">\r\n");
  fprintf(f, "<td>No compatible relay card detected !<br>\r\n");
  fprintf(f, "<span style=\"font-size: 14px; color: grey;  font-weight: "
             "normal;\">This can be due to the following reasons:\r\n");
  fprintf(
      f, "<div>- No supported relay card is connected via USB cable</div>\r\n");
  fprintf(f, "<div>- The relay card is connected but it is broken</div>\r\n");
  fprintf(f,
          "<div>- There is no GPIO sysfs support available or GPIO pins not "
          "defined in %s\r\n",
          "/etc/crelay.conf");
  fprintf(f, "<div>- You are running on a multiuser OS and don't have root "
             "permissions\r\n");
  fprintf(f, "</span></td></tbody></table><br>\r\n");
}


x86 assembly (clang, -O0):
<web_page_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xf8c(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xfb4(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xfd0(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0x102c(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0x105c(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0x1086(%rip),%rsi
lea    0x10d0(%rip),%rdx
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0x10cf(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0x1108(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<web_page_error>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
mov    $0xc4,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0xf81(%rip),%rdi
mov    $0x39,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0xfa2(%rip),%rdi
mov    $0x2d,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0xfb7(%rip),%rdi
mov    $0x6d,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0x100c(%rip),%rdi
mov    $0x41,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0x1035(%rip),%rdi
mov    $0x3b,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0x1058(%rip),%rsi
lea    0x10a2(%rip),%rdx
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <fprintf@plt>
lea    0x10a2(%rip),%rdi
mov    $0x4a,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
lea    0x10d4(%rip),%rdi
mov    $0x22,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
pop    %rbx
jmp    1040 <fwrite@plt>

LLVM IR (-O0):
@.str = [197 x i8] c"<br><table style=\22text-align: left; width: 460px; background-color: yellow; font-family: Helvetica,Arial,sans-serif; font-weight: bold; color: black;\22 border=\220\22 cellpadding=\222\22 cellspacing=\222\22>\0D\0A\00"
@.str.1 = [58 x i8] c"<tbody><tr style=\22font-size: 20px; font-weight: bold;\22>\0D\0A\00"
@.str.2 = [46 x i8] c"<td>No compatible relay card detected !<br>\0D\0A\00"
@.str.3 = [110 x i8] c"<span style=\22font-size: 14px; color: grey; font-weight: normal;\22>This can be due to the following reasons:\0D\0A\00"
@.str.4 = [66 x i8] c"<div>- No supported relay card is connected via USB cable</div>\0D\0A\00"
@.str.5 = [60 x i8] c"<div>- The relay card is connected but it is broken</div>\0D\0A\00"
@.str.6 = [81 x i8] c"<div>- There is no GPIO sysfs support available or GPIO pins not defined in %s\0D\0A\00"
@.str.7 = [17 x i8] c"/etc/crelay.conf\00"
@.str.8 = [75 x i8] c"<div>- You are running on a multiuser OS and don't have root permissions\0D\0A\00"
@.str.9 = [35 x i8] c"</span></td></tbody></table><br>\0D\0A\00"
define void @web_page_error(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 (i32*, i8*, ...) @fprintf(i32* %3, i8* getelementptr inbounds ([197 x i8], [197 x i8]* @.str, i64 0, i64 0))
%5 = load i32*, i32** %2
%6 = call i32 (i32*, i8*, ...) @fprintf(i32* %5, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.1, i64 0, i64 0))
%7 = load i32*, i32** %2
%8 = call i32 (i32*, i8*, ...) @fprintf(i32* %7, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.2, i64 0, i64 0))
%9 = load i32*, i32** %2
%10 = call i32 (i32*, i8*, ...) @fprintf(i32* %9, i8* getelementptr inbounds ([110 x i8], [110 x i8]* @.str.3, i64 0, i64 0))
%11 = load i32*, i32** %2
%12 = call i32 (i32*, i8*, ...) @fprintf(i32* %11, i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.4, i64 0, i64 0))
%13 = load i32*, i32** %2
%14 = call i32 (i32*, i8*, ...) @fprintf(i32* %13, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.5, i64 0, i64 0))
%15 = load i32*, i32** %2
%16 = call i32 (i32*, i8*, ...) @fprintf(i32* %15, i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0))
%17 = load i32*, i32** %2
%18 = call i32 (i32*, i8*, ...) @fprintf(i32* %17, i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.8, i64 0, i64 0))
%19 = load i32*, i32** %2
%20 = call i32 (i32*, i8*, ...) @fprintf(i32* %19, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.9, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [197 x i8] c"<br><table style=\22text-align: left; width: 460px; background-color: yellow; font-family: Helvetica,Arial,sans-serif; font-weight: bold; color: black;\22 border=\220\22 cellpadding=\222\22 cellspacing=\222\22>\0D\0A\00"
@.str.1 = [58 x i8] c"<tbody><tr style=\22font-size: 20px; font-weight: bold;\22>\0D\0A\00"
@.str.2 = [46 x i8] c"<td>No compatible relay card detected !<br>\0D\0A\00"
@.str.3 = [110 x i8] c"<span style=\22font-size: 14px; color: grey; font-weight: normal;\22>This can be due to the following reasons:\0D\0A\00"
@.str.4 = [66 x i8] c"<div>- No supported relay card is connected via USB cable</div>\0D\0A\00"
@.str.5 = [60 x i8] c"<div>- The relay card is connected but it is broken</div>\0D\0A\00"
@.str.6 = [81 x i8] c"<div>- There is no GPIO sysfs support available or GPIO pins not defined in %s\0D\0A\00"
@.str.7 = [17 x i8] c"/etc/crelay.conf\00"
@.str.8 = [75 x i8] c"<div>- You are running on a multiuser OS and don't have root permissions\0D\0A\00"
@.str.9 = [35 x i8] c"</span></td></tbody></table><br>\0D\0A\00"
define void @web_page_error(i32* nocapture %0) {
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([197 x i8], [197 x i8]* @.str, i64 0, i64 0), i64 196, i64 1, i32* %0)
%3 = tail call i64 @fwrite(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.1, i64 0, i64 0), i64 57, i64 1, i32* %0)
%4 = tail call i64 @fwrite(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.2, i64 0, i64 0), i64 45, i64 1, i32* %0)
%5 = tail call i64 @fwrite(i8* getelementptr inbounds ([110 x i8], [110 x i8]* @.str.3, i64 0, i64 0), i64 109, i64 1, i32* %0)
%6 = tail call i64 @fwrite(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.4, i64 0, i64 0), i64 65, i64 1, i32* %0)
%7 = tail call i64 @fwrite(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.5, i64 0, i64 0), i64 59, i64 1, i32* %0)
%8 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0))
%9 = tail call i64 @fwrite(i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.8, i64 0, i64 0), i64 74, i64 1, i32* %0)
%10 = tail call i64 @fwrite(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.9, i64 0, i64 0), i64 34, i64 1, i32* %0)
ret void
}